diff --git a/web/assets/ExtensionPanel-BmKi_NKS.js b/web/assets/ExtensionPanel-BMUX-f2y.js similarity index 91% rename from web/assets/ExtensionPanel-BmKi_NKS.js rename to web/assets/ExtensionPanel-BMUX-f2y.js index 6d83df536e6..18038c5c016 100644 --- a/web/assets/ExtensionPanel-BmKi_NKS.js +++ b/web/assets/ExtensionPanel-BMUX-f2y.js @@ -1,8 +1,8 @@ var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -import { d as defineComponent, bQ as useExtensionStore, u as useSettingStore, r as ref, o as onMounted, q as computed, g as openBlock, h as createElementBlock, i as createVNode, y as withCtx, z as unref, bR as script$1, A as createBaseVNode, x as createBlock, N as Fragment, O as renderList, a6 as toDisplayString, aw as createTextVNode, j as createCommentVNode, D as script$4 } from "./index-BHayQCxv.js"; -import { s as script, a as script$2, b as script$3 } from "./index-CwRXxFdA.js"; -import "./index-C_wOqB0f.js"; +import { d as defineComponent, c6 as useExtensionStore, u as useSettingStore, r as ref, o as onMounted, q as computed, g as openBlock, h as createElementBlock, i as createVNode, y as withCtx, z as unref, bT as script$1, A as createBaseVNode, x as createBlock, N as Fragment, O as renderList, a6 as toDisplayString, aw as createTextVNode, bR as script$3, j as createCommentVNode, D as script$4 } from "./index-BFF4Dqtc.js"; +import { s as script, a as script$2 } from "./index-ovZE3ghJ.js"; +import "./index-DOTKVD24.js"; const _hoisted_1 = { class: "extension-panel" }; const _hoisted_2 = { class: "mt-4" }; const _sfc_main = /* @__PURE__ */ defineComponent({ @@ -100,4 +100,4 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ export { _sfc_main as default }; -//# sourceMappingURL=ExtensionPanel-BmKi_NKS.js.map +//# sourceMappingURL=ExtensionPanel-BMUX-f2y.js.map diff --git a/web/assets/ExtensionPanel-BmKi_NKS.js.map b/web/assets/ExtensionPanel-BMUX-f2y.js.map similarity index 98% rename from web/assets/ExtensionPanel-BmKi_NKS.js.map rename to web/assets/ExtensionPanel-BMUX-f2y.js.map index e45b90ef650..fe8b699aa16 100644 --- a/web/assets/ExtensionPanel-BmKi_NKS.js.map +++ b/web/assets/ExtensionPanel-BMUX-f2y.js.map @@ -1 +1 @@ -{"version":3,"file":"ExtensionPanel-BmKi_NKS.js","sources":["../../src/components/dialog/content/setting/ExtensionPanel.vue"],"sourcesContent":["\n\n\n"],"names":[],"mappings":";;;;;;;;;;AAmDA,UAAM,iBAAiB;AACvB,UAAM,eAAe;AAEf,UAAA,2BAA2B,IAA6B,CAAA,CAAE;AAEhE,cAAU,MAAM;AACC,qBAAA,WAAW,QAAQ,CAAC,QAAQ;AACzC,iCAAyB,MAAM,IAAI,IAAI,IACrC,eAAe,mBAAmB,IAAI,IAAI;AAAA,MAAA,CAC7C;AAAA,IAAA,CACF;AAEK,UAAA,oBAAoB,SAAS,MAAM;AACvC,aAAO,eAAe,WAAW;AAAA,QAC/B,CAAC,QACC,yBAAyB,MAAM,IAAI,IAAI,MACvC,eAAe,mBAAmB,IAAI,IAAI;AAAA,MAAA;AAAA,IAC9C,CACD;AAEK,UAAA,aAAa,SAAS,MAAM;AACzB,aAAA,kBAAkB,MAAM,SAAS;AAAA,IAAA,CACzC;AAED,UAAM,wBAAwB,6BAAM;AAClC,YAAM,gCAAgC,OAAO;AAAA,QAC3C,yBAAyB;AAAA,MAExB,EAAA,OAAO,CAAC,CAAC,GAAG,OAAO,MAAM,CAAC,OAAO,EACjC,IAAI,CAAC,CAAC,IAAI,MAAM,IAAI;AAEvB,mBAAa,IAAI,4BAA4B;AAAA,QAC3C,GAAG,eAAe;AAAA,QAClB,GAAG;AAAA,MAAA,CACJ;AAAA,IAAA,GAV2B;AAa9B,UAAM,eAAe,6BAAM;AAEzB,aAAO,SAAS;IAAO,GAFJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"ExtensionPanel-BMUX-f2y.js","sources":["../../src/components/dialog/content/setting/ExtensionPanel.vue"],"sourcesContent":["\n\n\n"],"names":[],"mappings":";;;;;;;;;;AAmDA,UAAM,iBAAiB;AACvB,UAAM,eAAe;AAEf,UAAA,2BAA2B,IAA6B,CAAA,CAAE;AAEhE,cAAU,MAAM;AACC,qBAAA,WAAW,QAAQ,CAAC,QAAQ;AACzC,iCAAyB,MAAM,IAAI,IAAI,IACrC,eAAe,mBAAmB,IAAI,IAAI;AAAA,MAAA,CAC7C;AAAA,IAAA,CACF;AAEK,UAAA,oBAAoB,SAAS,MAAM;AACvC,aAAO,eAAe,WAAW;AAAA,QAC/B,CAAC,QACC,yBAAyB,MAAM,IAAI,IAAI,MACvC,eAAe,mBAAmB,IAAI,IAAI;AAAA,MAAA;AAAA,IAC9C,CACD;AAEK,UAAA,aAAa,SAAS,MAAM;AACzB,aAAA,kBAAkB,MAAM,SAAS;AAAA,IAAA,CACzC;AAED,UAAM,wBAAwB,6BAAM;AAClC,YAAM,gCAAgC,OAAO;AAAA,QAC3C,yBAAyB;AAAA,MAExB,EAAA,OAAO,CAAC,CAAC,GAAG,OAAO,MAAM,CAAC,OAAO,EACjC,IAAI,CAAC,CAAC,IAAI,MAAM,IAAI;AAEvB,mBAAa,IAAI,4BAA4B;AAAA,QAC3C,GAAG,eAAe;AAAA,QAClB,GAAG;AAAA,MAAA,CACJ;AAAA,IAAA,GAV2B;AAa9B,UAAM,eAAe,6BAAM;AAEzB,aAAO,SAAS;IAAO,GAFJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/web/assets/GraphView-C4blCugc.js b/web/assets/GraphView-BpJuETRI.js similarity index 95% rename from web/assets/GraphView-C4blCugc.js rename to web/assets/GraphView-BpJuETRI.js index af0124afe29..0cecb097355 100644 --- a/web/assets/GraphView-C4blCugc.js +++ b/web/assets/GraphView-BpJuETRI.js @@ -1,8 +1,8 @@ var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -import { d as defineComponent, u as useSettingStore, r as ref, a as useTitleEditorStore, b as useCanvasStore, w as watch, L as LGraphGroup, c as app, e as LGraphNode, o as onMounted, f as onUnmounted, g as openBlock, h as createElementBlock, i as createVNode, E as EditableText, n as normalizeStyle, j as createCommentVNode, k as LiteGraph, _ as _export_sfc, B as BaseStyle, s as script$e, l as resolveComponent, m as mergeProps, p as renderSlot, q as computed, t as resolveDirective, v as withDirectives, x as createBlock, y as withCtx, z as unref, A as createBaseVNode, C as normalizeClass, D as script$f, F as useCommandStore, G as useDialogStore, S as SettingDialogHeader, H as SettingDialogContent, I as onBeforeUnmount, J as resolveDynamicComponent, K as useWorkspaceStore, M as useKeybindingStore, N as Fragment, O as renderList, T as Teleport, P as pushScopeId, Q as popScopeId, R as script$g, U as getWidth, V as findSingle, W as getOuterHeight, X as getOffset, Y as getOuterWidth, Z as getHeight, $ as script$h, a0 as script$i, a1 as Ripple, a2 as getAttribute, a3 as focus, a4 as equals, a5 as useBottomPanelStore, a6 as toDisplayString, a7 as script$j, a8 as getVNodeProp, a9 as isArray, aa as useSidebarTabStore, ab as vShow, ac as isNotEmpty, ad as UniqueComponentId, ae as ZIndex, af as resolveFieldData, ag as OverlayEventBus, ah as isEmpty, ai as addStyle, aj as relativePosition, ak as absolutePosition, al as ConnectedOverlayScrollHandler, am as isTouchDevice, an as findLastIndex, ao as script$k, ap as script$l, aq as script$m, ar as script$n, as as script$o, at as script$p, au as Transition, av as createSlots, aw as createTextVNode, ax as useNodeFrequencyStore, ay as useNodeBookmarkStore, az as highlightQuery, aA as script$q, aB as formatNumberWithSuffix, aC as NodeSourceType, aD as useI18n, aE as useNodeDefStore, aF as NodePreview, aG as NodeSearchFilter, aH as script$r, aI as SearchFilterChip, aJ as watchEffect, aK as toRaw, aL as LinkReleaseTriggerAction, aM as useEventListener, aN as nextTick, aO as getColorPalette, aP as BadgePosition, aQ as LGraphBadge, aR as _, aS as defaultColorPalette, aT as NodeBadgeMode, aU as markRaw, aV as useModelToNodeStore, aW as usePragmaticDroppable, aX as ComfyNodeDefImpl, aY as ComfyModelDef, aZ as LGraph, a_ as LLink, a$ as DragAndScale, b0 as LGraphCanvas, b1 as ContextMenu, b2 as script$t, b3 as script$v, b4 as script$w, b5 as normalizeProps, b6 as ToastEventBus, b7 as setAttribute, b8 as TransitionGroup, b9 as useToast, ba as useToastStore, bb as useExecutionStore, bc as useWorkflowStore, bd as useTitle, be as withModifiers, bf as script$x, bg as resolve, bh as script$y, bi as script$z, bj as isPrintableCharacter, bk as guardReactiveProps, bl as useMenuItemStore, bm as script$C, bn as nestedPosition, bo as useQueueSettingsStore, bp as storeToRefs, bq as isRef, br as script$D, bs as useQueuePendingTaskCountStore, bt as useLocalStorage, bu as useDraggable, bv as watchDebounced, bw as inject, bx as useElementBounding, by as script$E, bz as lodashExports, bA as useEventBus, bB as provide, bC as api, bD as i18n, bE as useWorkflowBookmarkStore } from "./index-BHayQCxv.js"; -import { s as script$s, a as script$u, b as script$A, c as script$B } from "./index-C_wOqB0f.js"; -const _sfc_main$q = /* @__PURE__ */ defineComponent({ +import { d as defineComponent, u as useSettingStore, r as ref, a as useTitleEditorStore, b as useCanvasStore, w as watch, L as LGraphGroup, c as app, e as LGraphNode, o as onMounted, f as onUnmounted, g as openBlock, h as createElementBlock, i as createVNode, E as EditableText, n as normalizeStyle, j as createCommentVNode, k as LiteGraph, _ as _export_sfc, B as BaseStyle, s as script$e, l as resolveComponent, m as mergeProps, p as renderSlot, q as computed, t as resolveDirective, v as withDirectives, x as createBlock, y as withCtx, z as unref, A as createBaseVNode, C as normalizeClass, D as script$f, F as useCommandStore, G as useDialogStore, S as SettingDialogHeader, H as SettingDialogContent, I as onBeforeUnmount, J as resolveDynamicComponent, K as useWorkspaceStore, M as useKeybindingStore, N as Fragment, O as renderList, T as Teleport, P as pushScopeId, Q as popScopeId, R as script$g, U as getWidth, V as findSingle, W as getOuterHeight, X as getOffset, Y as getOuterWidth, Z as getHeight, $ as script$h, a0 as script$i, a1 as Ripple, a2 as getAttribute, a3 as focus, a4 as equals, a5 as useBottomPanelStore, a6 as toDisplayString, a7 as script$j, a8 as getVNodeProp, a9 as isArray, aa as useSidebarTabStore, ab as vShow, ac as isNotEmpty, ad as UniqueComponentId, ae as ZIndex, af as resolveFieldData, ag as OverlayEventBus, ah as isEmpty, ai as addStyle, aj as relativePosition, ak as absolutePosition, al as ConnectedOverlayScrollHandler, am as isTouchDevice, an as findLastIndex, ao as script$k, ap as script$l, aq as script$m, ar as script$n, as as script$o, at as script$p, au as Transition, av as createSlots, aw as createTextVNode, ax as useNodeFrequencyStore, ay as useNodeBookmarkStore, az as highlightQuery, aA as script$q, aB as formatNumberWithSuffix, aC as NodeSourceType, aD as useI18n, aE as useNodeDefStore, aF as NodePreview, aG as NodeSearchFilter, aH as script$r, aI as SearchFilterChip, aJ as watchEffect, aK as toRaw, aL as LinkReleaseTriggerAction, aM as useEventListener, aN as nextTick, aO as getColorPalette, aP as BadgePosition, aQ as LGraphBadge, aR as _, aS as defaultColorPalette, aT as NodeBadgeMode, aU as markRaw, aV as useModelToNodeStore, aW as useWorkflowStore, aX as setStorageValue, aY as usePragmaticDroppable, aZ as ComfyNodeDefImpl, a_ as ComfyModelDef, a$ as LGraph, b0 as LLink, b1 as DragAndScale, b2 as LGraphCanvas, b3 as ContextMenu, b4 as ChangeTracker, b5 as script$s, b6 as script$t, b7 as script$u, b8 as script$v, b9 as script$w, ba as normalizeProps, bb as ToastEventBus, bc as setAttribute, bd as TransitionGroup, be as useToast, bf as useToastStore, bg as useExecutionStore, bh as useTitle, bi as withModifiers, bj as script$x, bk as workflowService, bl as resolve, bm as script$y, bn as script$z, bo as isPrintableCharacter, bp as guardReactiveProps, bq as useMenuItemStore, br as script$C, bs as nestedPosition, bt as useQueueSettingsStore, bu as storeToRefs, bv as isRef, bw as script$D, bx as useQueuePendingTaskCountStore, by as useLocalStorage, bz as useDraggable, bA as watchDebounced, bB as inject, bC as useElementBounding, bD as lodashExports, bE as useEventBus, bF as provide, bG as script$E, bH as api, bI as i18n, bJ as useModelStore } from "./index-BFF4Dqtc.js"; +import { s as script$A, a as script$B } from "./index-DOTKVD24.js"; +const _sfc_main$r = /* @__PURE__ */ defineComponent({ __name: "TitleEditor", setup(__props) { const settingStore = useSettingStore(); @@ -120,7 +120,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({ }; } }); -const TitleEditor = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-8a100d5a"]]); +const TitleEditor = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-8a100d5a"]]); var theme$8 = /* @__PURE__ */ __name(function theme(_ref) { var dt = _ref.dt; return "\n.p-overlaybadge {\n position: relative;\n}\n\n.p-overlaybadge .p-badge {\n position: absolute;\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n transform-origin: 100% 0;\n margin: 0;\n outline-width: ".concat(dt("overlaybadge.outline.width"), ";\n outline-style: solid;\n outline-color: ").concat(dt("overlaybadge.outline.color"), ";\n}\n"); @@ -152,7 +152,7 @@ var script$d = { Badge: script$e } }; -function render$g(_ctx, _cache, $props, $setup, $data, $options) { +function render$j(_ctx, _cache, $props, $setup, $data, $options) { var _component_Badge = resolveComponent("Badge"); return openBlock(), createElementBlock("div", mergeProps({ "class": _ctx.cx("root") @@ -160,9 +160,9 @@ function render$g(_ctx, _cache, $props, $setup, $data, $options) { pt: _ctx.ptm("pcBadge") }), null, 16, ["pt"])], 16); } -__name(render$g, "render$g"); -script$d.render = render$g; -const _sfc_main$p = /* @__PURE__ */ defineComponent({ +__name(render$j, "render$j"); +script$d.render = render$j; +const _sfc_main$q = /* @__PURE__ */ defineComponent({ __name: "SidebarIcon", props: { icon: String, @@ -224,8 +224,8 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({ }; } }); -const SidebarIcon = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-caa3ee9c"]]); -const _sfc_main$o = /* @__PURE__ */ defineComponent({ +const SidebarIcon = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-caa3ee9c"]]); +const _sfc_main$p = /* @__PURE__ */ defineComponent({ __name: "SidebarThemeToggleIcon", setup(__props) { const settingStore = useSettingStore(); @@ -247,7 +247,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({ }; } }); -const _sfc_main$n = /* @__PURE__ */ defineComponent({ +const _sfc_main$o = /* @__PURE__ */ defineComponent({ __name: "SidebarSettingsToggleIcon", setup(__props) { const dialogStore = useDialogStore(); @@ -267,7 +267,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({ }; } }); -const _sfc_main$m = /* @__PURE__ */ defineComponent({ +const _sfc_main$n = /* @__PURE__ */ defineComponent({ __name: "ExtensionSlot", props: { extension: {} @@ -296,13 +296,13 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({ }; } }); -const _withScopeId$6 = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-37fd2fa4"), n = n(), popScopeId(), n), "_withScopeId$6"); -const _hoisted_1$k = { class: "side-tool-bar-end" }; -const _hoisted_2$h = { +const _withScopeId$6 = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-e0812a25"), n = n(), popScopeId(), n), "_withScopeId$6"); +const _hoisted_1$n = { class: "side-tool-bar-end" }; +const _hoisted_2$k = { key: 0, class: "sidebar-content-container h-full overflow-y-auto overflow-x-hidden" }; -const _sfc_main$l = /* @__PURE__ */ defineComponent({ +const _sfc_main$m = /* @__PURE__ */ defineComponent({ __name: "SideToolbar", setup(__props) { const workspaceStore = useWorkspaceStore(); @@ -342,20 +342,20 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({ onClick: /* @__PURE__ */ __name(($event) => onTabClick(tab), "onClick") }, null, 8, ["icon", "iconBadge", "tooltip", "selected", "class", "onClick"]); }), 128)), - createBaseVNode("div", _hoisted_1$k, [ - createVNode(_sfc_main$o), - createVNode(_sfc_main$n) + createBaseVNode("div", _hoisted_1$n, [ + createVNode(_sfc_main$p), + createVNode(_sfc_main$o) ]) ], 2) ], 8, ["to"])), - selectedTab.value ? (openBlock(), createElementBlock("div", _hoisted_2$h, [ - createVNode(_sfc_main$m, { extension: selectedTab.value }, null, 8, ["extension"]) + selectedTab.value ? (openBlock(), createElementBlock("div", _hoisted_2$k, [ + createVNode(_sfc_main$n, { extension: selectedTab.value }, null, 8, ["extension"]) ])) : createCommentVNode("", true) ], 64); }; } }); -const SideToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-37fd2fa4"]]); +const SideToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-e0812a25"]]); var classes$a = { root: "p-tablist", content: /* @__PURE__ */ __name(function content(_ref) { @@ -509,10 +509,10 @@ var script$c = { ripple: Ripple } }; -var _hoisted_1$j = ["aria-label", "tabindex"]; -var _hoisted_2$g = ["aria-orientation"]; -var _hoisted_3$d = ["aria-label", "tabindex"]; -function render$f(_ctx, _cache, $props, $setup, $data, $options) { +var _hoisted_1$m = ["aria-label", "tabindex"]; +var _hoisted_2$j = ["aria-orientation"]; +var _hoisted_3$g = ["aria-label", "tabindex"]; +function render$i(_ctx, _cache, $props, $setup, $data, $options) { var _directive_ripple = resolveDirective("ripple"); return openBlock(), createElementBlock("div", mergeProps({ ref: "list", @@ -530,7 +530,7 @@ function render$f(_ctx, _cache, $props, $setup, $data, $options) { "data-pc-group-section": "navigator" }), [(openBlock(), createBlock(resolveDynamicComponent($options.templates.previcon || "ChevronLeftIcon"), mergeProps({ "aria-hidden": "true" - }, _ctx.ptm("prevIcon")), null, 16))], 16, _hoisted_1$j)), [[_directive_ripple]]) : createCommentVNode("", true), createBaseVNode("div", mergeProps({ + }, _ctx.ptm("prevIcon")), null, 16))], 16, _hoisted_1$m)), [[_directive_ripple]]) : createCommentVNode("", true), createBaseVNode("div", mergeProps({ ref: "content", "class": _ctx.cx("content"), onScroll: _cache[1] || (_cache[1] = function() { @@ -546,7 +546,7 @@ function render$f(_ctx, _cache, $props, $setup, $data, $options) { "class": _ctx.cx("activeBar"), role: "presentation", "aria-hidden": "true" - }, _ctx.ptm("activeBar")), null, 16)], 16, _hoisted_2$g)], 16), $options.showNavigators && $data.isNextButtonEnabled ? withDirectives((openBlock(), createElementBlock("button", mergeProps({ + }, _ctx.ptm("activeBar")), null, 16)], 16, _hoisted_2$j)], 16), $options.showNavigators && $data.isNextButtonEnabled ? withDirectives((openBlock(), createElementBlock("button", mergeProps({ key: 1, ref: "nextButton", "class": _ctx.cx("nextButton"), @@ -559,10 +559,10 @@ function render$f(_ctx, _cache, $props, $setup, $data, $options) { "data-pc-group-section": "navigator" }), [(openBlock(), createBlock(resolveDynamicComponent($options.templates.nexticon || "ChevronRightIcon"), mergeProps({ "aria-hidden": "true" - }, _ctx.ptm("nextIcon")), null, 16))], 16, _hoisted_3$d)), [[_directive_ripple]]) : createCommentVNode("", true)], 16); + }, _ctx.ptm("nextIcon")), null, 16))], 16, _hoisted_3$g)), [[_directive_ripple]]) : createCommentVNode("", true)], 16); } -__name(render$f, "render$f"); -script$c.render = render$f; +__name(render$i, "render$i"); +script$c.render = render$i; var classes$9 = { root: /* @__PURE__ */ __name(function root(_ref) { var instance = _ref.instance, props = _ref.props; @@ -754,7 +754,7 @@ var script$b = { ripple: Ripple } }; -function render$e(_ctx, _cache, $props, $setup, $data, $options) { +function render$h(_ctx, _cache, $props, $setup, $data, $options) { var _directive_ripple = resolveDirective("ripple"); return !_ctx.asChild ? withDirectives((openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps({ key: 0, @@ -773,19 +773,19 @@ function render$e(_ctx, _cache, $props, $setup, $data, $options) { onClick: $options.onClick }); } -__name(render$e, "render$e"); -script$b.render = render$e; -const _hoisted_1$i = { class: "flex flex-col h-full" }; -const _hoisted_2$f = { class: "w-full flex justify-between" }; -const _hoisted_3$c = { class: "tabs-container" }; +__name(render$h, "render$h"); +script$b.render = render$h; +const _hoisted_1$l = { class: "flex flex-col h-full" }; +const _hoisted_2$i = { class: "w-full flex justify-between" }; +const _hoisted_3$f = { class: "tabs-container" }; const _hoisted_4$5 = { class: "font-bold" }; const _hoisted_5$4 = { class: "flex-grow h-0" }; -const _sfc_main$k = /* @__PURE__ */ defineComponent({ +const _sfc_main$l = /* @__PURE__ */ defineComponent({ __name: "BottomPanel", setup(__props) { const bottomPanelStore = useBottomPanelStore(); return (_ctx, _cache) => { - return openBlock(), createElementBlock("div", _hoisted_1$i, [ + return openBlock(), createElementBlock("div", _hoisted_1$l, [ createVNode(unref(script$j), { value: unref(bottomPanelStore).activeBottomPanelTabId, "onUpdate:value": _cache[1] || (_cache[1] = ($event) => unref(bottomPanelStore).activeBottomPanelTabId = $event) @@ -793,8 +793,8 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({ default: withCtx(() => [ createVNode(unref(script$c), { "pt:tabList": "border-none" }, { default: withCtx(() => [ - createBaseVNode("div", _hoisted_2$f, [ - createBaseVNode("div", _hoisted_3$c, [ + createBaseVNode("div", _hoisted_2$i, [ + createBaseVNode("div", _hoisted_3$f, [ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(bottomPanelStore).bottomPanelTabs, (tab) => { return openBlock(), createBlock(unref(script$b), { key: tab.id, @@ -824,7 +824,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({ _: 1 }, 8, ["value"]), createBaseVNode("div", _hoisted_5$4, [ - unref(bottomPanelStore).bottomPanelVisible && unref(bottomPanelStore).activeBottomPanelTab ? (openBlock(), createBlock(_sfc_main$m, { + unref(bottomPanelStore).bottomPanelVisible && unref(bottomPanelStore).activeBottomPanelTab ? (openBlock(), createBlock(_sfc_main$n, { key: 0, extension: unref(bottomPanelStore).activeBottomPanelTab }, null, 8, ["extension"])) : createCommentVNode("", true) @@ -1268,9 +1268,9 @@ var script$a = { }, "getPTOptions") } }; -var _hoisted_1$h = ["onMousedown", "onTouchstart", "onTouchmove", "onTouchend"]; -var _hoisted_2$e = ["aria-orientation", "aria-valuenow", "onKeydown"]; -function render$d(_ctx, _cache, $props, $setup, $data, $options) { +var _hoisted_1$k = ["onMousedown", "onTouchstart", "onTouchmove", "onTouchend"]; +var _hoisted_2$h = ["aria-orientation", "aria-valuenow", "onKeydown"]; +function render$g(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("div", mergeProps({ "class": _ctx.cx("root"), style: _ctx.sx("root"), @@ -1313,11 +1313,11 @@ function render$d(_ctx, _cache, $props, $setup, $data, $options) { return $options.onGutterKeyDown($event, i); }, "onKeydown"), ref_for: true - }, _ctx.ptm("gutterHandle")), null, 16, _hoisted_2$e)], 16, _hoisted_1$h)) : createCommentVNode("", true)], 64); + }, _ctx.ptm("gutterHandle")), null, 16, _hoisted_2$h)], 16, _hoisted_1$k)) : createCommentVNode("", true)], 64); }), 128))], 16); } -__name(render$d, "render$d"); -script$a.render = render$d; +__name(render$g, "render$g"); +script$a.render = render$g; var classes$7 = { root: /* @__PURE__ */ __name(function root4(_ref) { var instance = _ref.instance; @@ -1377,15 +1377,15 @@ var script$9 = { }, "getPTOptions") } }; -function render$c(_ctx, _cache, $props, $setup, $data, $options) { +function render$f(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("div", mergeProps({ ref: "container", "class": _ctx.cx("root") }, _ctx.ptmi("root", $options.getPTOptions)), [renderSlot(_ctx.$slots, "default")], 16); } -__name(render$c, "render$c"); -script$9.render = render$c; -const _sfc_main$j = /* @__PURE__ */ defineComponent({ +__name(render$f, "render$f"); +script$9.render = render$f; +const _sfc_main$k = /* @__PURE__ */ defineComponent({ __name: "LiteGraphCanvasSplitterOverlay", setup(__props) { const settingStore = useSettingStore(); @@ -1401,7 +1401,9 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({ return (_ctx, _cache) => { return openBlock(), createBlock(unref(script$a), { class: "splitter-overlay-root splitter-overlay", - "pt:gutter": sidebarPanelVisible.value ? "" : "hidden" + "pt:gutter": sidebarPanelVisible.value ? "" : "hidden", + stateKey: "sidebar-splitter", + stateStorage: "local" }, { default: withCtx(() => [ sidebarLocation.value === "left" ? withDirectives((openBlock(), createBlock(unref(script$9), { @@ -1420,9 +1422,11 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({ createVNode(unref(script$9), { size: 100 }, { default: withCtx(() => [ createVNode(unref(script$a), { - class: "splitter-overlay", + class: "splitter-overlay max-w-full", layout: "vertical", - "pt:gutter": bottomPanelVisible.value ? "" : "hidden" + "pt:gutter": bottomPanelVisible.value ? "" : "hidden", + stateKey: "bottom-panel-splitter", + stateStorage: "local" }, { default: withCtx(() => [ createVNode(unref(script$9), { class: "graph-canvas-panel relative" }, { @@ -1464,7 +1468,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({ }; } }); -const LiteGraphCanvasSplitterOverlay = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-b49f20b1"]]); +const LiteGraphCanvasSplitterOverlay = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-7c3279c1"]]); var theme$6 = /* @__PURE__ */ __name(function theme3(_ref) { var dt = _ref.dt; return "\n.p-autocomplete {\n display: inline-flex;\n}\n\n.p-autocomplete-loader {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n right: ".concat(dt("autocomplete.padding.x"), ";\n}\n\n.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-loader {\n right: calc(").concat(dt("autocomplete.dropdown.width"), " + ").concat(dt("autocomplete.padding.x"), ");\n}\n\n.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input {\n flex: 1 1 auto;\n width: 1%;\n}\n\n.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input,\n.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input-multiple {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.p-autocomplete-dropdown {\n cursor: pointer;\n display: inline-flex;\n cursor: pointer;\n user-select: none;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n width: ").concat(dt("autocomplete.dropdown.width"), ";\n border-top-right-radius: ").concat(dt("autocomplete.dropdown.border.radius"), ";\n border-bottom-right-radius: ").concat(dt("autocomplete.dropdown.border.radius"), ";\n background: ").concat(dt("autocomplete.dropdown.background"), ";\n border: 1px solid ").concat(dt("autocomplete.dropdown.border.color"), ";\n border-left: 0 none;\n color: ").concat(dt("autocomplete.dropdown.color"), ";\n transition: background ").concat(dt("autocomplete.transition.duration"), ", color ").concat(dt("autocomplete.transition.duration"), ", border-color ").concat(dt("autocomplete.transition.duration"), ", outline-color ").concat(dt("autocomplete.transition.duration"), ", box-shadow ").concat(dt("autocomplete.transition.duration"), ";\n outline-color: transparent;\n}\n\n.p-autocomplete-dropdown:not(:disabled):hover {\n background: ").concat(dt("autocomplete.dropdown.hover.background"), ";\n border-color: ").concat(dt("autocomplete.dropdown.hover.border.color"), ";\n color: ").concat(dt("autocomplete.dropdown.hover.color"), ";\n}\n\n.p-autocomplete-dropdown:not(:disabled):active {\n background: ").concat(dt("autocomplete.dropdown.active.background"), ";\n border-color: ").concat(dt("autocomplete.dropdown.active.border.color"), ";\n color: ").concat(dt("autocomplete.dropdown.active.color"), ";\n}\n\n.p-autocomplete-dropdown:focus-visible {\n box-shadow: ").concat(dt("autocomplete.dropdown.focus.ring.shadow"), ";\n outline: ").concat(dt("autocomplete.dropdown.focus.ring.width"), " ").concat(dt("autocomplete.dropdown.focus.ring.style"), " ").concat(dt("autocomplete.dropdown.focus.ring.color"), ";\n outline-offset: ").concat(dt("autocomplete.dropdown.focus.ring.offset"), ";\n}\n\n.p-autocomplete .p-autocomplete-overlay {\n min-width: 100%;\n}\n\n.p-autocomplete-overlay {\n position: absolute;\n overflow: auto;\n top: 0;\n left: 0;\n background: ").concat(dt("autocomplete.overlay.background"), ";\n color: ").concat(dt("autocomplete.overlay.color"), ";\n border: 1px solid ").concat(dt("autocomplete.overlay.border.color"), ";\n border-radius: ").concat(dt("autocomplete.overlay.border.radius"), ";\n box-shadow: ").concat(dt("autocomplete.overlay.shadow"), ";\n}\n\n.p-autocomplete-list {\n margin: 0;\n padding: 0;\n list-style-type: none;\n display: flex;\n flex-direction: column;\n gap: ").concat(dt("autocomplete.list.gap"), ";\n padding: ").concat(dt("autocomplete.list.padding"), ";\n}\n\n.p-autocomplete-option {\n cursor: pointer;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n display: flex;\n align-items: center;\n padding: ").concat(dt("autocomplete.option.padding"), ";\n border: 0 none;\n color: ").concat(dt("autocomplete.option.color"), ";\n background: transparent;\n transition: background ").concat(dt("autocomplete.transition.duration"), ", color ").concat(dt("autocomplete.transition.duration"), ", border-color ").concat(dt("autocomplete.transition.duration"), ";\n border-radius: ").concat(dt("autocomplete.option.border.radius"), ";\n}\n\n.p-autocomplete-option:not(.p-autocomplete-option-selected):not(.p-disabled).p-focus {\n background: ").concat(dt("autocomplete.option.focus.background"), ";\n color: ").concat(dt("autocomplete.option.focus.color"), ";\n}\n\n.p-autocomplete-option-selected {\n background: ").concat(dt("autocomplete.option.selected.background"), ";\n color: ").concat(dt("autocomplete.option.selected.color"), ";\n}\n\n.p-autocomplete-option-selected.p-focus {\n background: ").concat(dt("autocomplete.option.selected.focus.background"), ";\n color: ").concat(dt("autocomplete.option.selected.focus.color"), ";\n}\n\n.p-autocomplete-option-group {\n margin: 0;\n padding: ").concat(dt("autocomplete.option.group.padding"), ";\n color: ").concat(dt("autocomplete.option.group.color"), ";\n background: ").concat(dt("autocomplete.option.group.background"), ";\n font-weight: ").concat(dt("autocomplete.option.group.font.weight"), ";\n}\n\n.p-autocomplete-input-multiple {\n margin: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n padding: calc(").concat(dt("autocomplete.padding.y"), " / 2) ").concat(dt("autocomplete.padding.x"), ";\n gap: calc(").concat(dt("autocomplete.padding.y"), " / 2);\n color: ").concat(dt("autocomplete.color"), ";\n background: ").concat(dt("autocomplete.background"), ";\n border: 1px solid ").concat(dt("autocomplete.border.color"), ";\n border-radius: ").concat(dt("autocomplete.border.radius"), ";\n width: 100%;\n transition: background ").concat(dt("autocomplete.transition.duration"), ", color ").concat(dt("autocomplete.transition.duration"), ", border-color ").concat(dt("autocomplete.transition.duration"), ", outline-color ").concat(dt("autocomplete.transition.duration"), ", box-shadow ").concat(dt("autocomplete.transition.duration"), ";\n outline-color: transparent;\n box-shadow: ").concat(dt("autocomplete.shadow"), ";\n}\n\n.p-autocomplete:not(.p-disabled):hover .p-autocomplete-input-multiple {\n border-color: ").concat(dt("autocomplete.hover.border.color"), ";\n}\n\n.p-autocomplete:not(.p-disabled).p-focus .p-autocomplete-input-multiple {\n border-color: ").concat(dt("autocomplete.focus.border.color"), ";\n box-shadow: ").concat(dt("autocomplete.focus.ring.shadow"), ";\n outline: ").concat(dt("autocomplete.focus.ring.width"), " ").concat(dt("autocomplete.focus.ring.style"), " ").concat(dt("autocomplete.focus.ring.color"), ";\n outline-offset: ").concat(dt("autocomplete.focus.ring.offset"), ";\n}\n\n.p-autocomplete.p-invalid .p-autocomplete-input-multiple {\n border-color: ").concat(dt("autocomplete.invalid.border.color"), ";\n}\n\n.p-variant-filled.p-autocomplete-input-multiple {\n background: ").concat(dt("autocomplete.filled.background"), ";\n}\n\n.p-autocomplete:not(.p-disabled).p-focus .p-variant-filled.p-autocomplete-input-multiple {\n background: ").concat(dt("autocomplete.filled.focus.background"), ";\n}\n\n.p-autocomplete.p-disabled .p-autocomplete-input-multiple {\n opacity: 1;\n background: ").concat(dt("autocomplete.disabled.background"), ";\n color: ").concat(dt("autocomplete.disabled.color"), ";\n}\n\n.p-autocomplete-chip.p-chip {\n padding-top: calc(").concat(dt("autocomplete.padding.y"), " / 2);\n padding-bottom: calc(").concat(dt("autocomplete.padding.y"), " / 2);\n border-radius: ").concat(dt("autocomplete.chip.border.radius"), ";\n}\n\n.p-autocomplete-input-multiple:has(.p-autocomplete-chip) {\n padding-left: calc(").concat(dt("autocomplete.padding.y"), " / 2);\n padding-right: calc(").concat(dt("autocomplete.padding.y"), " / 2);\n}\n\n.p-autocomplete-chip-item.p-focus .p-autocomplete-chip {\n background: ").concat(dt("inputchips.chip.focus.background"), ";\n color: ").concat(dt("inputchips.chip.focus.color"), ";\n}\n\n.p-autocomplete-input-chip {\n flex: 1 1 auto;\n display: inline-flex;\n padding-top: calc(").concat(dt("autocomplete.padding.y"), " / 2);\n padding-bottom: calc(").concat(dt("autocomplete.padding.y"), " / 2);\n}\n\n.p-autocomplete-input-chip input {\n border: 0 none;\n outline: 0 none;\n background: transparent;\n margin: 0;\n padding: 0;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n font-family: inherit;\n font-feature-settings: inherit;\n font-size: 1rem;\n color: inherit;\n}\n\n.p-autocomplete-input-chip input::placeholder {\n color: ").concat(dt("autocomplete.placeholder.color"), ";\n}\n\n.p-autocomplete-empty-message {\n padding: ").concat(dt("autocomplete.empty.message.padding"), ";\n}\n\n.p-autocomplete-fluid {\n display: flex;\n}\n\n.p-autocomplete-fluid:has(.p-autocomplete-dropdown) .p-autocomplete-input {\n width: 1%;\n}\n"); @@ -2584,15 +2588,15 @@ function _toPrimitive$4(t, r) { return ("string" === r ? String : Number)(t); } __name(_toPrimitive$4, "_toPrimitive$4"); -var _hoisted_1$g = ["aria-activedescendant"]; -var _hoisted_2$d = ["id", "aria-label", "aria-setsize", "aria-posinset"]; -var _hoisted_3$b = ["id", "placeholder", "tabindex", "disabled", "aria-label", "aria-labelledby", "aria-expanded", "aria-controls", "aria-activedescendant", "aria-invalid"]; +var _hoisted_1$j = ["aria-activedescendant"]; +var _hoisted_2$g = ["id", "aria-label", "aria-setsize", "aria-posinset"]; +var _hoisted_3$e = ["id", "placeholder", "tabindex", "disabled", "aria-label", "aria-labelledby", "aria-expanded", "aria-controls", "aria-activedescendant", "aria-invalid"]; var _hoisted_4$4 = ["disabled", "aria-expanded", "aria-controls"]; var _hoisted_5$3 = ["id"]; var _hoisted_6$2 = ["id", "aria-label"]; var _hoisted_7$1 = ["id"]; var _hoisted_8$1 = ["id", "aria-label", "aria-selected", "aria-disabled", "aria-setsize", "aria-posinset", "onClick", "onMousemove", "data-p-selected", "data-p-focus", "data-p-disabled"]; -function render$b(_ctx, _cache, $props, $setup, $data, $options) { +function render$e(_ctx, _cache, $props, $setup, $data, $options) { var _component_InputText = resolveComponent("InputText"); var _component_Chip = resolveComponent("Chip"); var _component_SpinnerIcon = resolveComponent("SpinnerIcon"); @@ -2697,7 +2701,7 @@ function render$b(_ctx, _cache, $props, $setup, $data, $options) { }), _: 2 }, 1032, ["class", "label", "removeIcon", "unstyled", "onRemove", "pt"])]; - })], 16, _hoisted_2$d); + })], 16, _hoisted_2$g); }), 128)), createBaseVNode("li", mergeProps({ "class": _ctx.cx("inputChip"), role: "option" @@ -2735,7 +2739,7 @@ function render$b(_ctx, _cache, $props, $setup, $data, $options) { onChange: _cache[4] || (_cache[4] = function() { return $options.onChange && $options.onChange.apply($options, arguments); }) - }, _ctx.ptm("input")), null, 16, _hoisted_3$b)], 16)], 16, _hoisted_1$g)) : createCommentVNode("", true), $data.searching || _ctx.loading ? renderSlot(_ctx.$slots, _ctx.$slots.loader ? "loader" : "loadingicon", { + }, _ctx.ptm("input")), null, 16, _hoisted_3$e)], 16)], 16, _hoisted_1$j)) : createCommentVNode("", true), $data.searching || _ctx.loading ? renderSlot(_ctx.$slots, _ctx.$slots.loader ? "loader" : "loadingicon", { key: 2, "class": normalizeClass(_ctx.cx("loader")) }, function() { @@ -2915,9 +2919,9 @@ function render$b(_ctx, _cache, $props, $setup, $data, $options) { _: 3 }, 8, ["appendTo"])], 16); } -__name(render$b, "render$b"); -script$8.render = render$b; -const _sfc_main$i = { +__name(render$e, "render$e"); +script$8.render = render$e; +const _sfc_main$j = { name: "AutoCompletePlus", extends: script$8, emits: ["focused-option-changed"], @@ -2934,9 +2938,9 @@ const _sfc_main$i = { } }; const _withScopeId$5 = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-37f672ab"), n = n(), popScopeId(), n), "_withScopeId$5"); -const _hoisted_1$f = { class: "option-container flex justify-between items-center px-2 py-0 cursor-pointer overflow-hidden w-full" }; -const _hoisted_2$c = { class: "option-display-name font-semibold flex flex-col" }; -const _hoisted_3$a = { key: 0 }; +const _hoisted_1$i = { class: "option-container flex justify-between items-center px-2 py-0 cursor-pointer overflow-hidden w-full" }; +const _hoisted_2$f = { class: "option-display-name font-semibold flex flex-col" }; +const _hoisted_3$d = { key: 0 }; const _hoisted_4$3 = /* @__PURE__ */ _withScopeId$5(() => /* @__PURE__ */ createBaseVNode("i", { class: "pi pi-bookmark-fill text-sm mr-1" }, null, -1)); const _hoisted_5$2 = [ _hoisted_4$3 @@ -2949,7 +2953,7 @@ const _hoisted_9 = { class: "option-category font-light text-sm text-gray-400 overflow-hidden text-ellipsis whitespace-nowrap" }; const _hoisted_10 = { class: "option-badges" }; -const _sfc_main$h = /* @__PURE__ */ defineComponent({ +const _sfc_main$i = /* @__PURE__ */ defineComponent({ __name: "NodeSearchItem", props: { nodeDef: {}, @@ -2976,10 +2980,10 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({ ); const props = __props; return (_ctx, _cache) => { - return openBlock(), createElementBlock("div", _hoisted_1$f, [ - createBaseVNode("div", _hoisted_2$c, [ + return openBlock(), createElementBlock("div", _hoisted_1$i, [ + createBaseVNode("div", _hoisted_2$f, [ createBaseVNode("div", null, [ - isBookmarked.value ? (openBlock(), createElementBlock("span", _hoisted_3$a, _hoisted_5$2)) : createCommentVNode("", true), + isBookmarked.value ? (openBlock(), createElementBlock("span", _hoisted_3$d, _hoisted_5$2)) : createCommentVNode("", true), createBaseVNode("span", { innerHTML: unref(highlightQuery)(_ctx.nodeDef.display_name, _ctx.currentQuery) }, null, 8, _hoisted_6$1), @@ -3028,16 +3032,16 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({ }; } }); -const NodeSearchItem = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-37f672ab"]]); +const NodeSearchItem = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-37f672ab"]]); const _withScopeId$4 = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-2d409367"), n = n(), popScopeId(), n), "_withScopeId$4"); -const _hoisted_1$e = { class: "comfy-vue-node-search-container" }; -const _hoisted_2$b = { +const _hoisted_1$h = { class: "comfy-vue-node-search-container" }; +const _hoisted_2$e = { key: 0, class: "comfy-vue-node-preview-container" }; -const _hoisted_3$9 = /* @__PURE__ */ _withScopeId$4(() => /* @__PURE__ */ createBaseVNode("h3", null, "Add node filter condition", -1)); +const _hoisted_3$c = /* @__PURE__ */ _withScopeId$4(() => /* @__PURE__ */ createBaseVNode("h3", null, "Add node filter condition", -1)); const _hoisted_4$2 = { class: "_dialog-body" }; -const _sfc_main$g = /* @__PURE__ */ defineComponent({ +const _sfc_main$h = /* @__PURE__ */ defineComponent({ __name: "NodeSearchBox", props: { filters: {}, @@ -3099,8 +3103,8 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({ hoveredSuggestion.value = value; }, "setHoverSuggestion"); return (_ctx, _cache) => { - return openBlock(), createElementBlock("div", _hoisted_1$e, [ - enableNodePreview.value ? (openBlock(), createElementBlock("div", _hoisted_2$b, [ + return openBlock(), createElementBlock("div", _hoisted_1$h, [ + enableNodePreview.value ? (openBlock(), createElementBlock("div", _hoisted_2$e, [ hoveredSuggestion.value ? (openBlock(), createBlock(NodePreview, { nodeDef: hoveredSuggestion.value, key: hoveredSuggestion.value?.name || "" @@ -3118,7 +3122,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({ class: "_dialog" }, { header: withCtx(() => [ - _hoisted_3$9 + _hoisted_3$c ]), default: withCtx(() => [ createBaseVNode("div", _hoisted_4$2, [ @@ -3127,7 +3131,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({ ]), _: 1 }, 8, ["visible"]), - createVNode(_sfc_main$i, { + createVNode(_sfc_main$j, { "model-value": props.filters, class: "comfy-vue-node-search-box", scrollHeight: "40vh", @@ -3167,22 +3171,18 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({ }; } }); -const NodeSearchBox = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-2d409367"]]); +const NodeSearchBox = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-2d409367"]]); class ConnectingLinkImpl { static { __name(this, "ConnectingLinkImpl"); } - node; - slot; - input; - output; - pos; - constructor(node, slot, input, output, pos) { + constructor(node, slot, input, output, pos, afterRerouteId) { this.node = node; this.slot = slot; this.input = input; this.output = output; this.pos = pos; + this.afterRerouteId = afterRerouteId; } static createFromPlainObject(obj) { return new ConnectingLinkImpl( @@ -3190,11 +3190,12 @@ class ConnectingLinkImpl { obj.slot, obj.input, obj.output, - obj.pos + obj.pos, + obj.afterRerouteId ); } get type() { - const result = this.input ? this.input.type : this.output.type; + const result = this.input ? this.input.type : this.output?.type ?? null; return result === -1 ? null : result; } /** @@ -3217,13 +3218,13 @@ class ConnectingLinkImpl { return; } if (this.releaseSlotType === "input") { - this.node.connect(this.slot, newNode, newNodeSlot); + this.node.connect(this.slot, newNode, newNodeSlot, this.afterRerouteId); } else { - newNode.connect(newNodeSlot, this.node, this.slot); + newNode.connect(newNodeSlot, this.node, this.slot, this.afterRerouteId); } } } -const _sfc_main$f = /* @__PURE__ */ defineComponent({ +const _sfc_main$g = /* @__PURE__ */ defineComponent({ __name: "NodeSearchBoxPopover", setup(__props) { const settingStore = useSettingStore(); @@ -3315,7 +3316,15 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({ allow_searchbox: true, showSearchBox: /* @__PURE__ */ __name(() => showSearchBox(e), "showSearchBox") }; - const connectionOptions = firstLink.output ? { nodeFrom: firstLink.node, slotFrom: firstLink.output } : { nodeTo: firstLink.node, slotTo: firstLink.input }; + const connectionOptions = firstLink.output ? { + nodeFrom: firstLink.node, + slotFrom: firstLink.output, + afterRerouteId: firstLink.afterRerouteId + } : { + nodeTo: firstLink.node, + slotTo: firstLink.input, + afterRerouteId: firstLink.afterRerouteId + }; canvasStore.canvas.showConnectionMenu({ ...connectionOptions, ...commonOptions @@ -3407,7 +3416,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({ }; } }); -const _sfc_main$e = /* @__PURE__ */ defineComponent({ +const _sfc_main$f = /* @__PURE__ */ defineComponent({ __name: "NodeTooltip", setup(__props) { let idleTimeout; @@ -3416,26 +3425,6 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({ const tooltipText = ref(""); const left = ref(); const top = ref(); - const getHoveredWidget = /* @__PURE__ */ __name(() => { - const node = app.canvas.node_over; - if (!node.widgets) return; - const graphPos = app.canvas.graph_mouse; - const x = graphPos[0] - node.pos[0]; - const y = graphPos[1] - node.pos[1]; - for (const w of node.widgets) { - let widgetWidth, widgetHeight; - if (w.computeSize) { - ; - [widgetWidth, widgetHeight] = w.computeSize(node.size[0]); - } else { - widgetWidth = w.width || node.size[0]; - widgetHeight = LiteGraph.NODE_WIDGET_HEIGHT; - } - if (w.last_y !== void 0 && x >= 6 && x <= widgetWidth - 12 && y >= w.last_y && y <= w.last_y + widgetHeight) { - return w; - } - } - }, "getHoveredWidget"); const hideTooltip = /* @__PURE__ */ __name(() => tooltipText.value = null, "hideTooltip"); const showTooltip = /* @__PURE__ */ __name(async (tooltip) => { if (!tooltip) return; @@ -3480,7 +3469,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({ if (outputSlot !== -1) { return showTooltip(nodeDef.output.all?.[outputSlot]?.tooltip); } - const widget = getHoveredWidget(); + const widget = app.canvas.getWidgetAtCursor(); if (widget && !widget.element) { return showTooltip( widget.tooltip ?? nodeDef.input.getInput(widget.name)?.tooltip @@ -3506,8 +3495,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({ }; } }); -const NodeTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-79ec8c53"]]); -const _sfc_main$d = /* @__PURE__ */ defineComponent({ +const NodeTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-c2e0098f"]]); +const _sfc_main$e = /* @__PURE__ */ defineComponent({ __name: "NodeBadge", setup(__props) { const settingStore = useSettingStore(); @@ -3549,8 +3538,8 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({ length: 31 } ), - fgColor: colorPalette.value.colors.litegraph_base?.BADGE_FG_COLOR || defaultColorPalette.colors.litegraph_base.BADGE_FG_COLOR, - bgColor: colorPalette.value.colors.litegraph_base?.BADGE_BG_COLOR || defaultColorPalette.colors.litegraph_base.BADGE_BG_COLOR + fgColor: colorPalette.value?.colors?.litegraph_base?.BADGE_FG_COLOR || defaultColorPalette.colors.litegraph_base.BADGE_FG_COLOR, + bgColor: colorPalette.value?.colors?.litegraph_base?.BADGE_BG_COLOR || defaultColorPalette.colors.litegraph_base.BADGE_BG_COLOR }); }); node.badges.push(() => badge.value); @@ -3562,40 +3551,40 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({ }; } }); -const _hoisted_1$d = { +const _hoisted_1$g = { viewBox: "0 0 1024 1024", width: "1.2em", height: "1.2em" }; -const _hoisted_2$a = /* @__PURE__ */ createBaseVNode("path", { +const _hoisted_2$d = /* @__PURE__ */ createBaseVNode("path", { fill: "currentColor", d: "M921.088 103.232L584.832 889.024L465.52 544.512L121.328 440.48zM1004.46.769c-6.096 0-13.52 1.728-22.096 5.36L27.708 411.2c-34.383 14.592-36.56 42.704-4.847 62.464l395.296 123.584l129.36 403.264c9.28 15.184 20.496 22.72 31.263 22.72c11.936 0 23.296-9.152 31.04-27.248l408.272-953.728C1029.148 16.368 1022.86.769 1004.46.769" }, null, -1); -const _hoisted_3$8 = [ - _hoisted_2$a +const _hoisted_3$b = [ + _hoisted_2$d ]; -function render$a(_ctx, _cache) { - return openBlock(), createElementBlock("svg", _hoisted_1$d, [..._hoisted_3$8]); +function render$d(_ctx, _cache) { + return openBlock(), createElementBlock("svg", _hoisted_1$g, [..._hoisted_3$b]); } -__name(render$a, "render$a"); -const __unplugin_components_1$1 = markRaw({ name: "simple-line-icons-cursor", render: render$a }); -const _hoisted_1$c = { +__name(render$d, "render$d"); +const __unplugin_components_1$2 = markRaw({ name: "simple-line-icons-cursor", render: render$d }); +const _hoisted_1$f = { viewBox: "0 0 24 24", width: "1.2em", height: "1.2em" }; -const _hoisted_2$9 = /* @__PURE__ */ createBaseVNode("path", { +const _hoisted_2$c = /* @__PURE__ */ createBaseVNode("path", { fill: "currentColor", d: "M10.05 23q-.75 0-1.4-.337T7.575 21.7L1.2 12.375l.6-.575q.475-.475 1.125-.55t1.175.3L7 13.575V4q0-.425.288-.712T8 3t.713.288T9 4v13.425l-3.7-2.6l3.925 5.725q.125.2.35.325t.475.125H17q.825 0 1.413-.587T19 19V5q0-.425.288-.712T20 4t.713.288T21 5v14q0 1.65-1.175 2.825T17 23zM11 12V2q0-.425.288-.712T12 1t.713.288T13 2v10zm4 0V3q0-.425.288-.712T16 2t.713.288T17 3v9zm-2.85 4.5" }, null, -1); -const _hoisted_3$7 = [ - _hoisted_2$9 +const _hoisted_3$a = [ + _hoisted_2$c ]; -function render$9(_ctx, _cache) { - return openBlock(), createElementBlock("svg", _hoisted_1$c, [..._hoisted_3$7]); +function render$c(_ctx, _cache) { + return openBlock(), createElementBlock("svg", _hoisted_1$f, [..._hoisted_3$a]); } -__name(render$9, "render$9"); -const __unplugin_components_0$2 = markRaw({ name: "material-symbols-pan-tool-outline", render: render$9 }); +__name(render$c, "render$c"); +const __unplugin_components_0$2 = markRaw({ name: "material-symbols-pan-tool-outline", render: render$c }); var theme$5 = /* @__PURE__ */ __name(function theme4(_ref) { _ref.dt; return "\n.p-buttongroup .p-button {\n margin: 0;\n}\n\n.p-buttongroup .p-button:not(:last-child),\n.p-buttongroup .p-button:not(:last-child):hover {\n border-right: 0 none;\n}\n\n.p-buttongroup .p-button:not(:first-of-type):not(:last-of-type) {\n border-radius: 0;\n}\n\n.p-buttongroup .p-button:first-of-type:not(:only-of-type) {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.p-buttongroup .p-button:last-of-type:not(:only-of-type) {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n\n.p-buttongroup .p-button:focus {\n position: relative;\n z-index: 1;\n}\n"; @@ -3624,15 +3613,15 @@ var script$7 = { "extends": script$1$5, inheritAttrs: false }; -function render$8(_ctx, _cache, $props, $setup, $data, $options) { +function render$b(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("span", mergeProps({ "class": _ctx.cx("root"), role: "group" }, _ctx.ptmi("root")), [renderSlot(_ctx.$slots, "default")], 16); } -__name(render$8, "render$8"); -script$7.render = render$8; -const _sfc_main$c = /* @__PURE__ */ defineComponent({ +__name(render$b, "render$b"); +script$7.render = render$b; +const _sfc_main$d = /* @__PURE__ */ defineComponent({ __name: "GraphCanvasMenu", setup(__props) { const { t } = useI18n(); @@ -3657,7 +3646,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({ }, "stopRepeat"); return (_ctx, _cache) => { const _component_i_material_symbols58pan_tool_outline = __unplugin_components_0$2; - const _component_i_simple_line_icons58cursor = __unplugin_components_1$1; + const _component_i_simple_line_icons58cursor = __unplugin_components_1$2; const _directive_tooltip = resolveDirective("tooltip"); return openBlock(), createBlock(unref(script$7), { class: "p-buttongroup-vertical absolute bottom-[10px] right-[10px] z-[1000] pointer-events-auto" }, { default: withCtx(() => [ @@ -3690,11 +3679,11 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({ withDirectives(createVNode(unref(script$f), { severity: "secondary", icon: "pi pi-expand", - onClick: _cache[2] || (_cache[2] = () => unref(commandStore).execute("Comfy.Canvas.ResetView")) + onClick: _cache[2] || (_cache[2] = () => unref(commandStore).execute("Comfy.Canvas.FitView")) }, null, 512), [ [ _directive_tooltip, - unref(t)("graphCanvasMenu.resetView"), + unref(t)("graphCanvasMenu.fitView"), void 0, { left: true } ] @@ -3736,8 +3725,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({ }; } }); -const GraphCanvasMenu = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-444d3768"]]); -const _sfc_main$b = /* @__PURE__ */ defineComponent({ +const GraphCanvasMenu = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-94481f39"]]); +const _sfc_main$c = /* @__PURE__ */ defineComponent({ __name: "GraphCanvas", emits: ["ready"], setup(__props, { emit: __emit }) { @@ -3767,6 +3756,24 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({ canvasStore.canvas.zoom_speed = zoomSpeed; } }); + watchEffect(() => { + LiteGraph.snaps_for_comfy = settingStore.get("Comfy.Node.AutoSnapLinkToSlot"); + }); + watchEffect(() => { + LiteGraph.snap_highlights_node = settingStore.get( + "Comfy.Node.SnapHighlightsNode" + ); + }); + watchEffect(() => { + LGraphNode.keepAllLinksOnBypass = settingStore.get( + "Comfy.Node.BypassAllLinksOnDelete" + ); + }); + watchEffect(() => { + LiteGraph.middle_click_slot_add_default_node = settingStore.get( + "Comfy.Node.MiddleClickRerouteNode" + ); + }); watchEffect(() => { nodeDefStore.showDeprecated = settingStore.get("Comfy.Node.ShowDeprecated"); }); @@ -3784,18 +3791,53 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({ textarea.blur(); }); }); + watchEffect(() => { + const linkRenderMode = settingStore.get("Comfy.LinkRenderMode"); + if (canvasStore.canvas) { + canvasStore.canvas.links_render_mode = linkRenderMode; + canvasStore.canvas.setDirty( + /* fg */ + false, + /* bg */ + true + ); + } + }); + watchEffect(() => { + const linkMarkerShape = settingStore.get("Comfy.Graph.LinkMarkers"); + const { canvas } = canvasStore; + if (canvas) { + canvas.linkMarkerShape = linkMarkerShape; + canvas.setDirty(false, true); + } + }); + watchEffect(() => { + const reroutesEnabled = settingStore.get("Comfy.RerouteBeta"); + const { canvas } = canvasStore; + if (canvas) { + canvas.reroutesEnabled = reroutesEnabled; + canvas.setDirty(false, true); + } + }); watchEffect(() => { if (!canvasStore.canvas) return; - if (canvasStore.canvas.dragging_canvas) { + if (canvasStore.canvas.state.draggingCanvas) { canvasStore.canvas.canvas.style.cursor = "grabbing"; return; } - if (canvasStore.canvas.read_only) { + if (canvasStore.canvas.state.readOnly) { canvasStore.canvas.canvas.style.cursor = "grab"; return; } canvasStore.canvas.canvas.style.cursor = "default"; }); + const workflowStore = useWorkflowStore(); + watchEffect(() => { + if (workflowStore.activeWorkflow) { + const workflow = workflowStore.activeWorkflow; + setStorageValue("Comfy.PreviousWorkflow", workflow.key); + } + }); usePragmaticDroppable(() => canvasRef.value, { onDrop: /* @__PURE__ */ __name((event) => { const loc = event.location.current.input; @@ -3847,6 +3889,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({ } }, "onDrop") }); + const comfyAppReady = ref(false); onMounted(async () => { window["LiteGraph"] = LiteGraph; window["LGraph"] = LGraph; @@ -3859,22 +3902,24 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({ window["LGraphBadge"] = LGraphBadge; app.vueAppReady = true; workspaceStore.spinner = true; + ChangeTracker.init(app); await app.setup(canvasRef.value); canvasStore.canvas = app.canvas; workspaceStore.spinner = false; window["app"] = app; window["graph"] = app.graph; + comfyAppReady.value = true; emit("ready"); }); return (_ctx, _cache) => { return openBlock(), createElementBlock(Fragment, null, [ (openBlock(), createBlock(Teleport, { to: ".graph-canvas-container" }, [ - betaMenuEnabled.value ? (openBlock(), createBlock(LiteGraphCanvasSplitterOverlay, { key: 0 }, { + comfyAppReady.value && betaMenuEnabled.value && !unref(workspaceStore).focusMode ? (openBlock(), createBlock(LiteGraphCanvasSplitterOverlay, { key: 0 }, { "side-bar-panel": withCtx(() => [ createVNode(SideToolbar) ]), "bottom-panel": withCtx(() => [ - createVNode(_sfc_main$k) + createVNode(_sfc_main$l) ]), "graph-canvas-panel": withCtx(() => [ canvasMenuEnabled.value ? (openBlock(), createBlock(GraphCanvasMenu, { key: 0 })) : createCommentVNode("", true) @@ -3890,13 +3935,57 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({ tabindex: "1" }, null, 512) ])), - createVNode(_sfc_main$f), + createVNode(_sfc_main$g), tooltipEnabled.value ? (openBlock(), createBlock(NodeTooltip, { key: 0 })) : createCommentVNode("", true), - createVNode(_sfc_main$d) + createVNode(_sfc_main$e) ], 64); }; } }); +const _sfc_main$b = /* @__PURE__ */ defineComponent({ + __name: "MenuHamburger", + setup(__props) { + const workspaceState = useWorkspaceStore(); + const settingStore = useSettingStore(); + const exitFocusMode = /* @__PURE__ */ __name(() => { + workspaceState.focusMode = false; + }, "exitFocusMode"); + watchEffect(() => { + if (settingStore.get("Comfy.UseNewMenu") !== "Disabled") { + return; + } + if (workspaceState.focusMode) { + app.ui.menuContainer.style.display = "none"; + } else { + app.ui.menuContainer.style.display = "block"; + } + }); + const menuSetting = computed(() => settingStore.get("Comfy.UseNewMenu")); + const positionCSS = computed( + () => ( + // 'Bottom' menuSetting shows the hamburger button in the bottom right corner + // 'Disabled', 'Top' menuSetting shows the hamburger button in the top right corner + menuSetting.value === "Bottom" ? { bottom: "0px", right: "0px" } : { top: "0px", right: "0px" } + ) + ); + return (_ctx, _cache) => { + const _directive_tooltip = resolveDirective("tooltip"); + return withDirectives((openBlock(), createBlock(unref(script$f), { + class: "comfy-menu-hamburger", + style: normalizeStyle(positionCSS.value), + icon: "pi pi-bars", + severity: "secondary", + text: "", + size: "large", + onClick: exitFocusMode + }, null, 8, ["style"])), [ + [vShow, unref(workspaceState).focusMode], + [_directive_tooltip, { value: _ctx.$t("menu.showMenu"), showDelay: 300 }] + ]); + }; + } +}); +const MenuHamburger = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-2ddd26e8"]]); function _typeof$3(o) { "@babel/helpers - typeof"; return _typeof$3 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { @@ -4180,7 +4269,7 @@ function _toPrimitive$1(t, r) { return ("string" === r ? String : Number)(t); } __name(_toPrimitive$1, "_toPrimitive$1"); -var _hoisted_1$b = ["aria-label"]; +var _hoisted_1$e = ["aria-label"]; function render$1$3(_ctx, _cache, $props, $setup, $data, $options) { var _directive_ripple = resolveDirective("ripple"); return openBlock(), createElementBlock("div", mergeProps({ @@ -4220,7 +4309,7 @@ function render$1$3(_ctx, _cache, $props, $setup, $data, $options) { autofocus: "" }, _objectSpread$1(_objectSpread$1({}, $props.closeButtonProps), _ctx.ptm("closeButton"))), [(openBlock(), createBlock(resolveDynamicComponent($props.templates.closeicon || "TimesIcon"), mergeProps({ "class": [_ctx.cx("closeIcon"), $props.closeIcon] - }, _ctx.ptm("closeIcon")), null, 16, ["class"]))], 16, _hoisted_1$b)), [[_directive_ripple]])], 16)) : createCommentVNode("", true)], 16))], 16); + }, _ctx.ptm("closeIcon")), null, 16, ["class"]))], 16, _hoisted_1$e)), [[_directive_ripple]])], 16)) : createCommentVNode("", true)], 16))], 16); } __name(render$1$3, "render$1$3"); script$1$4.render = render$1$3; @@ -4423,7 +4512,7 @@ function _toPrimitive$2(t, r) { return ("string" === r ? String : Number)(t); } __name(_toPrimitive$2, "_toPrimitive$2"); -function render$7(_ctx, _cache, $props, $setup, $data, $options) { +function render$a(_ctx, _cache, $props, $setup, $data, $options) { var _component_ToastMessage = resolveComponent("ToastMessage"); var _component_Portal = resolveComponent("Portal"); return openBlock(), createBlock(_component_Portal, null, { @@ -4466,8 +4555,8 @@ function render$7(_ctx, _cache, $props, $setup, $data, $options) { _: 1 }); } -__name(render$7, "render$7"); -script$6.render = render$7; +__name(render$a, "render$a"); +script$6.render = render$a; const _sfc_main$a = /* @__PURE__ */ defineComponent({ __name: "GlobalToast", setup(__props) { @@ -4579,10 +4668,10 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({ ); const workflowStore = useWorkflowStore(); const isUnsavedText = computed( - () => workflowStore.activeWorkflow?.unsaved ? " *" : "" + () => workflowStore.activeWorkflow?.isModified ? " *" : "" ); const workflowNameText = computed(() => { - const workflowName = workflowStore.activeWorkflow?.name; + const workflowName = workflowStore.activeWorkflow?.filename; return workflowName ? isUnsavedText.value + workflowName + TITLE_SUFFIX : DEFAULT_TITLE; }); const nodeExecutionTitle = computed( @@ -4598,10 +4687,10 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({ }; } }); -const _withScopeId$3 = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-84e785b8"), n = n(), popScopeId(), n), "_withScopeId$3"); -const _hoisted_1$a = { class: "workflow-label text-sm max-w-[150px] truncate inline-block" }; -const _hoisted_2$8 = { class: "relative" }; -const _hoisted_3$6 = { +const _withScopeId$3 = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-9eb975c3"), n = n(), popScopeId(), n), "_withScopeId$3"); +const _hoisted_1$d = { class: "workflow-label text-sm max-w-[150px] truncate inline-block" }; +const _hoisted_2$b = { class: "relative" }; +const _hoisted_3$9 = { key: 0, class: "status-indicator" }; @@ -4612,14 +4701,12 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({ }, setup(__props) { const props = __props; + const workspaceStore = useWorkspaceStore(); const workflowStore = useWorkflowStore(); const workflowToOption = /* @__PURE__ */ __name((workflow) => ({ - label: workflow.name, - tooltip: workflow.path, - value: workflow.key, - unsaved: workflow.unsaved + value: workflow.path, + workflow }), "workflowToOption"); - const optionToWorkflow = /* @__PURE__ */ __name((option2) => workflowStore.workflowLookup[option2.value], "optionToWorkflow"); const options = computed( () => workflowStore.openWorkflows.map(workflowToOption) ); @@ -4633,12 +4720,12 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({ if (selectedWorkflow.value?.value === option2.value) { return; } - const workflow = optionToWorkflow(option2); - workflow.load(); + workflowService.openWorkflow(option2.workflow); }, "onWorkflowChange"); const onCloseWorkflow = /* @__PURE__ */ __name((option2) => { - const workflow = optionToWorkflow(option2); - app.workflowManager.closeWorkflow(workflow); + workflowService.closeWorkflow(option2.workflow, { + warnIfUnsaved: !workspaceStore.shiftDown + }); }, "onCloseWorkflow"); return (_ctx, _cache) => { const _directive_tooltip = resolveDirective("tooltip"); @@ -4651,13 +4738,18 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({ dataKey: "value" }, { option: withCtx(({ option: option2 }) => [ - withDirectives((openBlock(), createElementBlock("span", _hoisted_1$a, [ - createTextVNode(toDisplayString(option2.label), 1) + withDirectives((openBlock(), createElementBlock("span", _hoisted_1$d, [ + createTextVNode(toDisplayString(option2.workflow.filename), 1) ])), [ - [_directive_tooltip, option2.tooltip] + [ + _directive_tooltip, + option2.workflow.key, + void 0, + { bottom: true } + ] ]), - createBaseVNode("div", _hoisted_2$8, [ - option2.unsaved ? (openBlock(), createElementBlock("span", _hoisted_3$6, "•")) : createCommentVNode("", true), + createBaseVNode("div", _hoisted_2$b, [ + !unref(workspaceStore).shiftDown && option2.workflow.isModified ? (openBlock(), createElementBlock("span", _hoisted_3$9, "•")) : createCommentVNode("", true), createVNode(unref(script$f), { class: "close-button p-0 w-auto", icon: "pi pi-times", @@ -4673,7 +4765,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({ }; } }); -const WorkflowTabs = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-84e785b8"]]); +const WorkflowTabs = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-9eb975c3"]]); var theme$3 = /* @__PURE__ */ __name(function theme6(_ref) { var dt = _ref.dt; return "\n.p-menubar {\n display: flex;\n align-items: center;\n background: ".concat(dt("menubar.background"), ";\n border: 1px solid ").concat(dt("menubar.border.color"), ";\n border-radius: ").concat(dt("menubar.border.radius"), ";\n color: ").concat(dt("menubar.color"), ";\n padding: ").concat(dt("menubar.padding"), ";\n gap: ").concat(dt("menubar.gap"), ";\n}\n\n.p-menubar-start,\n.p-megamenu-end {\n display: flex;\n align-items: center;\n}\n\n.p-menubar-root-list,\n.p-menubar-submenu {\n display: flex;\n margin: 0;\n padding: 0;\n list-style: none;\n outline: 0 none;\n}\n\n.p-menubar-root-list {\n align-items: center;\n flex-wrap: wrap;\n gap: ").concat(dt("menubar.gap"), ";\n}\n\n.p-menubar-root-list > .p-menubar-item > .p-menubar-item-content {\n border-radius: ").concat(dt("menubar.base.item.border.radius"), ";\n}\n\n.p-menubar-root-list > .p-menubar-item > .p-menubar-item-content > .p-menubar-item-link {\n padding: ").concat(dt("menubar.base.item.padding"), ";\n}\n\n.p-menubar-item-content {\n transition: background ").concat(dt("menubar.transition.duration"), ", color ").concat(dt("menubar.transition.duration"), ";\n border-radius: ").concat(dt("menubar.item.border.radius"), ";\n color: ").concat(dt("menubar.item.color"), ";\n}\n\n.p-menubar-item-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n color: inherit;\n padding: ").concat(dt("menubar.item.padding"), ";\n gap: ").concat(dt("menubar.item.gap"), ";\n user-select: none;\n outline: 0 none;\n}\n\n.p-menubar-item-label {\n line-height: 1;\n}\n\n.p-menubar-item-icon {\n color: ").concat(dt("menubar.item.icon.color"), ";\n}\n\n.p-menubar-submenu-icon {\n color: ").concat(dt("menubar.submenu.icon.color"), ";\n margin-left: auto;\n font-size: ").concat(dt("menubar.submenu.icon.size"), ";\n width: ").concat(dt("menubar.submenu.icon.size"), ";\n height: ").concat(dt("menubar.submenu.icon.size"), ";\n}\n\n.p-menubar-item.p-focus > .p-menubar-item-content {\n color: ").concat(dt("menubar.item.focus.color"), ";\n background: ").concat(dt("menubar.item.focus.background"), ";\n}\n\n.p-menubar-item.p-focus > .p-menubar-item-content .p-menubar-item-icon {\n color: ").concat(dt("menubar.item.icon.focus.color"), ";\n}\n\n.p-menubar-item.p-focus > .p-menubar-item-content .p-menubar-submenu-icon {\n color: ").concat(dt("menubar.submenu.icon.focus.color"), ";\n}\n\n.p-menubar-item:not(.p-disabled) > .p-menubar-item-content:hover {\n color: ").concat(dt("menubar.item.focus.color"), ";\n background: ").concat(dt("menubar.item.focus.background"), ";\n}\n\n.p-menubar-item:not(.p-disabled) > .p-menubar-item-content:hover .p-menubar-item-icon {\n color: ").concat(dt("menubar.item.icon.focus.color"), ";\n}\n\n.p-menubar-item:not(.p-disabled) > .p-menubar-item-content:hover .p-menubar-submenu-icon {\n color: ").concat(dt("menubar.submenu.icon.focus.color"), ";\n}\n\n.p-menubar-item-active > .p-menubar-item-content {\n color: ").concat(dt("menubar.item.active.color"), ";\n background: ").concat(dt("menubar.item.active.background"), ";\n}\n\n.p-menubar-item-active > .p-menubar-item-content .p-menubar-item-icon {\n color: ").concat(dt("menubar.item.icon.active.color"), ";\n}\n\n.p-menubar-item-active > .p-menubar-item-content .p-menubar-submenu-icon {\n color: ").concat(dt("menubar.submenu.icon.active.color"), ";\n}\n\n.p-menubar-submenu {\n display: none;\n position: absolute;\n min-width: 12.5rem;\n z-index: 1;\n background: ").concat(dt("menubar.submenu.background"), ";\n border: 1px solid ").concat(dt("menubar.submenu.border.color"), ";\n border-radius: ").concat(dt("menubar.border.radius"), ";\n box-shadow: ").concat(dt("menubar.submenu.shadow"), ";\n color: ").concat(dt("menubar.submenu.color"), ";\n flex-direction: column;\n padding: ").concat(dt("menubar.submenu.padding"), ";\n gap: ").concat(dt("menubar.submenu.gap"), ";\n}\n\n.p-menubar-submenu .p-menubar-separator {\n border-top: 1px solid ").concat(dt("menubar.separator.border.color"), ";\n}\n\n.p-menubar-submenu .p-menubar-item {\n position: relative;\n}\n\n .p-menubar-submenu > .p-menubar-item-active > .p-menubar-submenu {\n display: block;\n left: 100%;\n top: 0;\n}\n\n.p-menubar-end {\n margin-left: auto;\n align-self: center;\n}\n\n.p-menubar-button {\n display: none;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n width: ").concat(dt("menubar.mobile.button.size"), ";\n height: ").concat(dt("menubar.mobile.button.size"), ";\n position: relative;\n color: ").concat(dt("menubar.mobile.button.color"), ";\n border: 0 none;\n background: transparent;\n border-radius: ").concat(dt("menubar.mobile.button.border.radius"), ";\n transition: background ").concat(dt("menubar.transition.duration"), ", color ").concat(dt("menubar.transition.duration"), ", outline-color ").concat(dt("menubar.transition.duration"), ";\n outline-color: transparent;\n}\n\n.p-menubar-button:hover {\n color: ").concat(dt("menubar.mobile.button.hover.color"), ";\n background: ").concat(dt("menubar.mobile.button.hover.background"), ";\n}\n\n.p-menubar-button:focus-visible {\n box-shadow: ").concat(dt("menubar.mobile.button.focus.ring.shadow"), ";\n outline: ").concat(dt("menubar.mobile.button.focus.ring.width"), " ").concat(dt("menubar.mobile.button.focus.ring.style"), " ").concat(dt("menubar.mobile.button.focus.ring.color"), ";\n outline-offset: ").concat(dt("menubar.mobile.button.focus.ring.offset"), ";\n}\n\n.p-menubar-mobile {\n position: relative;\n}\n\n.p-menubar-mobile .p-menubar-button {\n display: flex;\n}\n\n.p-menubar-mobile .p-menubar-root-list {\n position: absolute;\n display: none;\n width: 100%;\n padding: ").concat(dt("menubar.submenu.padding"), ";\n background: ").concat(dt("menubar.submenu.background"), ";\n border: 1px solid ").concat(dt("menubar.submenu.border.color"), ";\n box-shadow: ").concat(dt("menubar.submenu.shadow"), ";\n}\n\n.p-menubar-mobile .p-menubar-root-list > .p-menubar-item > .p-menubar-item-content {\n border-radius: ").concat(dt("menubar.item.border.radius"), ";\n}\n\n.p-menubar-mobile .p-menubar-root-list > .p-menubar-item > .p-menubar-item-content > .p-menubar-item-link {\n padding: ").concat(dt("menubar.item.padding"), ";\n}\n\n.p-menubar-mobile-active .p-menubar-root-list {\n display: flex;\n flex-direction: column;\n top: 100%;\n left: 0;\n z-index: 1;\n}\n\n.p-menubar-mobile .p-menubar-root-list .p-menubar-item {\n width: 100%;\n position: static;\n}\n\n.p-menubar-mobile .p-menubar-root-list .p-menubar-separator {\n border-top: 1px solid ").concat(dt("menubar.separator.border.color"), ";\n}\n\n.p-menubar-mobile .p-menubar-root-list > .p-menubar-item > .p-menubar-item-content .p-menubar-submenu-icon {\n margin-left: auto;\n transition: transform 0.2s;\n}\n\n.p-menubar-mobile .p-menubar-root-list > .p-menubar-item-active > .p-menubar-item-content .p-menubar-submenu-icon {\n transform: rotate(-180deg);\n}\n\n.p-menubar-mobile .p-menubar-submenu .p-menubar-submenu-icon {\n transition: transform 0.2s;\n transform: rotate(90deg);\n}\n\n.p-menubar-mobile .p-menubar-item-active > .p-menubar-item-content .p-menubar-submenu-icon {\n transform: rotate(-90deg);\n}\n\n.p-menubar-mobile .p-menubar-submenu {\n width: 100%;\n position: static;\n box-shadow: none;\n border: 0 none;\n padding-left: ").concat(dt("menubar.submenu.mobile.indent"), ";\n}\n"); @@ -4910,8 +5002,8 @@ var script$1$3 = { } }; var _hoisted_1$1$2 = ["id", "aria-label", "aria-disabled", "aria-expanded", "aria-haspopup", "aria-level", "aria-setsize", "aria-posinset", "data-p-active", "data-p-focused", "data-p-disabled"]; -var _hoisted_2$7 = ["onClick", "onMouseenter", "onMousemove"]; -var _hoisted_3$5 = ["href", "target"]; +var _hoisted_2$a = ["onClick", "onMouseenter", "onMousemove"]; +var _hoisted_3$8 = ["href", "target"]; var _hoisted_4$1 = ["id"]; var _hoisted_5$1 = ["id"]; function render$1$2(_ctx, _cache, $props, $setup, $data, $options) { @@ -4984,14 +5076,14 @@ function render$1$2(_ctx, _cache, $props, $setup, $data, $options) { key: 1, "class": _ctx.cx("submenuIcon"), ref_for: true - }, $options.getPTOptions(processedItem, index, "submenuIcon")), null, 16, ["class"]))], 64)) : createCommentVNode("", true)], 16, _hoisted_3$5)), [[_directive_ripple]]) : (openBlock(), createBlock(resolveDynamicComponent($props.templates.item), { + }, $options.getPTOptions(processedItem, index, "submenuIcon")), null, 16, ["class"]))], 64)) : createCommentVNode("", true)], 16, _hoisted_3$8)), [[_directive_ripple]]) : (openBlock(), createBlock(resolveDynamicComponent($props.templates.item), { key: 1, item: processedItem.item, root: $props.root, hasSubmenu: $options.getItemProp(processedItem, "items"), label: $options.getItemLabel(processedItem), props: $options.getMenuItemProps(processedItem, index) - }, null, 8, ["item", "root", "hasSubmenu", "label", "props"]))], 16, _hoisted_2$7), $options.isItemVisible(processedItem) && $options.isItemGroup(processedItem) ? (openBlock(), createBlock(_component_MenubarSub, { + }, null, 8, ["item", "root", "hasSubmenu", "label", "props"]))], 16, _hoisted_2$a), $options.isItemVisible(processedItem) && $options.isItemGroup(processedItem) ? (openBlock(), createBlock(_component_MenubarSub, { key: 0, id: $options.getItemId(processedItem) + "_list", menuId: $props.menuId, @@ -5689,8 +5781,8 @@ function _toPrimitive(t, r) { return ("string" === r ? String : Number)(t); } __name(_toPrimitive, "_toPrimitive"); -var _hoisted_1$9 = ["aria-haspopup", "aria-expanded", "aria-controls", "aria-label"]; -function render$6(_ctx, _cache, $props, $setup, $data, $options) { +var _hoisted_1$c = ["aria-haspopup", "aria-expanded", "aria-controls", "aria-label"]; +function render$9(_ctx, _cache, $props, $setup, $data, $options) { var _component_BarsIcon = resolveComponent("BarsIcon"); var _component_MenubarSub = resolveComponent("MenubarSub"); return openBlock(), createElementBlock("div", mergeProps({ @@ -5725,7 +5817,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) { }) }, _objectSpread(_objectSpread({}, _ctx.buttonProps), _ctx.ptm("button"))), [renderSlot(_ctx.$slots, _ctx.$slots.buttonicon ? "buttonicon" : "menubuttonicon", {}, function() { return [createVNode(_component_BarsIcon, normalizeProps(guardReactiveProps(_ctx.ptm("buttonicon"))), null, 16)]; - })], 16, _hoisted_1$9)) : createCommentVNode("", true)]; + })], 16, _hoisted_1$c)) : createCommentVNode("", true)]; }), createVNode(_component_MenubarSub, { ref: $options.menubarRef, id: $data.id + "_list", @@ -5755,12 +5847,12 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) { "class": _ctx.cx("end") }, _ctx.ptm("end")), [renderSlot(_ctx.$slots, "end")], 16)) : createCommentVNode("", true)], 16); } -__name(render$6, "render$6"); -script$5.render = render$6; +__name(render$9, "render$9"); +script$5.render = render$9; const _withScopeId$2 = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-9646ca0a"), n = n(), popScopeId(), n), "_withScopeId$2"); -const _hoisted_1$8 = ["href"]; -const _hoisted_2$6 = { class: "p-menubar-item-label" }; -const _hoisted_3$4 = { +const _hoisted_1$b = ["href"]; +const _hoisted_2$9 = { class: "p-menubar-item-label" }; +const _hoisted_3$7 = { key: 1, class: "ml-auto border border-surface rounded text-muted text-xs p-1 keybinding-tag" }; @@ -5792,9 +5884,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({ key: 0, class: normalizeClass(["p-menubar-item-icon", item3.icon]) }, null, 2)) : createCommentVNode("", true), - createBaseVNode("span", _hoisted_2$6, toDisplayString(item3.label), 1), - item3?.comfyCommand?.keybinding ? (openBlock(), createElementBlock("span", _hoisted_3$4, toDisplayString(item3.comfyCommand.keybinding.combo.toString()), 1)) : createCommentVNode("", true) - ], 16, _hoisted_1$8) + createBaseVNode("span", _hoisted_2$9, toDisplayString(item3.label), 1), + item3?.comfyCommand?.keybinding ? (openBlock(), createElementBlock("span", _hoisted_3$7, toDisplayString(item3.comfyCommand.keybinding.combo.toString()), 1)) : createCommentVNode("", true) + ], 16, _hoisted_1$b) ]), _: 1 }, 8, ["model", "pt"]); @@ -5904,9 +5996,9 @@ var script$4 = { ripple: Ripple } }; -var _hoisted_1$7 = ["id"]; -var _hoisted_2$5 = ["id", "aria-labelledby"]; -function render$5(_ctx, _cache, $props, $setup, $data, $options) { +var _hoisted_1$a = ["id"]; +var _hoisted_2$8 = ["id", "aria-labelledby"]; +function render$8(_ctx, _cache, $props, $setup, $data, $options) { var _component_Button = resolveComponent("Button"); return openBlock(), createElementBlock("div", mergeProps({ "class": _ctx.cx("root") @@ -5920,7 +6012,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) { key: 0, id: $data.id + "_header", "class": _ctx.cx("title") - }, _ctx.ptm("title")), toDisplayString(_ctx.header), 17, _hoisted_1$7)) : createCommentVNode("", true)]; + }, _ctx.ptm("title")), toDisplayString(_ctx.header), 17, _hoisted_1$a)) : createCommentVNode("", true)]; }), createBaseVNode("div", mergeProps({ "class": _ctx.cx("headerActions") }, _ctx.ptm("headerActions")), [renderSlot(_ctx.$slots, "icons"), _ctx.toggleable ? (openBlock(), createBlock(_component_Button, mergeProps({ @@ -5960,13 +6052,76 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) { }, _ctx.ptm("content")), [renderSlot(_ctx.$slots, "default")], 16), _ctx.$slots.footer ? (openBlock(), createElementBlock("div", mergeProps({ key: 0, "class": _ctx.cx("footer") - }, _ctx.ptm("footer")), [renderSlot(_ctx.$slots, "footer")], 16)) : createCommentVNode("", true)], 16, _hoisted_2$5), [[vShow, !$data.d_collapsed]])]; + }, _ctx.ptm("footer")), [renderSlot(_ctx.$slots, "footer")], 16)) : createCommentVNode("", true)], 16, _hoisted_2$8), [[vShow, !$data.d_collapsed]])]; }), _: 3 }, 16)], 16); } +__name(render$8, "render$8"); +script$4.render = render$8; +const _hoisted_1$9 = { + viewBox: "0 0 24 24", + width: "1.2em", + height: "1.2em" +}; +const _hoisted_2$7 = /* @__PURE__ */ createBaseVNode("path", { + fill: "none", + stroke: "currentColor", + "stroke-linecap": "round", + "stroke-linejoin": "round", + "stroke-width": "2", + d: "M6 4v16m4-16l10 8l-10 8z" +}, null, -1); +const _hoisted_3$6 = [ + _hoisted_2$7 +]; +function render$7(_ctx, _cache) { + return openBlock(), createElementBlock("svg", _hoisted_1$9, [..._hoisted_3$6]); +} +__name(render$7, "render$7"); +const __unplugin_components_3 = markRaw({ name: "lucide-step-forward", render: render$7 }); +const _hoisted_1$8 = { + viewBox: "0 0 24 24", + width: "1.2em", + height: "1.2em" +}; +const _hoisted_2$6 = /* @__PURE__ */ createBaseVNode("path", { + fill: "none", + stroke: "currentColor", + "stroke-linecap": "round", + "stroke-linejoin": "round", + "stroke-width": "2", + d: "m13 19l9-7l-9-7zM2 19l9-7l-9-7z" +}, null, -1); +const _hoisted_3$5 = [ + _hoisted_2$6 +]; +function render$6(_ctx, _cache) { + return openBlock(), createElementBlock("svg", _hoisted_1$8, [..._hoisted_3$5]); +} +__name(render$6, "render$6"); +const __unplugin_components_2 = markRaw({ name: "lucide-fast-forward", render: render$6 }); +const _hoisted_1$7 = { + viewBox: "0 0 24 24", + width: "1.2em", + height: "1.2em" +}; +const _hoisted_2$5 = /* @__PURE__ */ createBaseVNode("path", { + fill: "none", + stroke: "currentColor", + "stroke-linecap": "round", + "stroke-linejoin": "round", + "stroke-width": "2", + d: "m6 3l14 9l-14 9z" +}, null, -1); +const _hoisted_3$4 = [ + _hoisted_2$5 +]; +function render$5(_ctx, _cache) { + return openBlock(), createElementBlock("svg", _hoisted_1$7, [..._hoisted_3$4]); +} __name(render$5, "render$5"); -script$4.render = render$5; +const __unplugin_components_1$1 = markRaw({ name: "lucide-play", render: render$5 }); const _hoisted_1$6 = { viewBox: "0 0 24 24", width: "1.2em", @@ -7395,7 +7550,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({ } }); const BatchCountEdit = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-713442be"]]); -const _withScopeId$1 = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-2b80bf74"), n = n(), popScopeId(), n), "_withScopeId$1"); +const _withScopeId$1 = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-95bc9be0"), n = n(), popScopeId(), n), "_withScopeId$1"); const _hoisted_1$3 = { class: "queue-button-group flex" }; const _sfc_main$4 = /* @__PURE__ */ defineComponent({ __name: "ComfyQueueButton", @@ -7408,7 +7563,6 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({ disabled: { key: "disabled", label: "Queue", - icon: "pi pi-play", tooltip: t("menu.disabledTooltip"), command: /* @__PURE__ */ __name(() => { queueMode.value = "disabled"; @@ -7417,7 +7571,6 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({ instant: { key: "instant", label: "Queue (Instant)", - icon: "pi pi-forward", tooltip: t("menu.instantTooltip"), command: /* @__PURE__ */ __name(() => { queueMode.value = "instant"; @@ -7426,7 +7579,6 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({ change: { key: "change", label: "Queue (Change)", - icon: "pi pi-step-forward-alt", tooltip: t("menu.changeTooltip"), command: /* @__PURE__ */ __name(() => { queueMode.value = "change"; @@ -7448,27 +7600,29 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({ }, "queuePrompt"); return (_ctx, _cache) => { const _component_i_lucide58list_start = __unplugin_components_0$1; + const _component_i_lucide58play = __unplugin_components_1$1; + const _component_i_lucide58fast_forward = __unplugin_components_2; + const _component_i_lucide58step_forward = __unplugin_components_3; const _directive_tooltip = resolveDirective("tooltip"); return openBlock(), createElementBlock("div", _hoisted_1$3, [ withDirectives((openBlock(), createBlock(unref(script), { class: "comfyui-queue-button", label: activeQueueModeMenuItem.value.label, severity: "primary", + size: "small", onClick: queuePrompt, model: queueModeMenuItems.value, "data-testid": "queue-button" }, { icon: withCtx(() => [ - unref(workspaceStore).shiftDown ? (openBlock(), createBlock(_component_i_lucide58list_start, { key: 0 })) : (openBlock(), createElementBlock("i", { - key: 1, - class: normalizeClass(activeQueueModeMenuItem.value.icon) - }, null, 2)) + unref(workspaceStore).shiftDown ? (openBlock(), createBlock(_component_i_lucide58list_start, { key: 0 })) : unref(queueMode) === "disabled" ? (openBlock(), createBlock(_component_i_lucide58play, { key: 1 })) : unref(queueMode) === "instant" ? (openBlock(), createBlock(_component_i_lucide58fast_forward, { key: 2 })) : unref(queueMode) === "change" ? (openBlock(), createBlock(_component_i_lucide58step_forward, { key: 3 })) : createCommentVNode("", true) ]), item: withCtx(({ item: item3 }) => [ withDirectives(createVNode(unref(script$f), { label: item3.label, icon: item3.icon, severity: item3.key === unref(queueMode) ? "primary" : "secondary", + size: "small", text: "" }, null, 8, ["label", "icon", "severity"]), [ [_directive_tooltip, item3.tooltip] @@ -7521,13 +7675,12 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({ }; } }); -const ComfyQueueButton = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-2b80bf74"]]); +const ComfyQueueButton = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-95bc9be0"]]); const overlapThreshold = 20; const _sfc_main$3 = /* @__PURE__ */ defineComponent({ __name: "ComfyActionbar", setup(__props) { const settingsStore = useSettingStore(); - const commandStore = useCommandStore(); const visible = computed( () => settingsStore.get("Comfy.UseNewMenu") !== "Disabled" ); @@ -7659,7 +7812,6 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({ }); }); return (_ctx, _cache) => { - const _directive_tooltip = resolveDirective("tooltip"); return openBlock(), createBlock(unref(script$4), { class: normalizeClass(["actionbar w-fit", { "is-dragging": unref(isDragging), "is-docked": unref(isDocked) }]), style: normalizeStyle(unref(style)) @@ -7675,29 +7827,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({ ref_key: "dragHandleRef", ref: dragHandleRef }, null, 512), - createVNode(ComfyQueueButton), - createVNode(unref(script$E), { - layout: "vertical", - class: "mx-1" - }), - createVNode(unref(script$7), { class: "flex flex-nowrap" }, { - default: withCtx(() => [ - withDirectives(createVNode(unref(script$f), { - icon: "pi pi-refresh", - severity: "secondary", - text: "", - onClick: _cache[0] || (_cache[0] = () => unref(commandStore).execute("Comfy.RefreshNodeDefinitions")) - }, null, 512), [ - [ - _directive_tooltip, - _ctx.$t("menu.refresh"), - void 0, - { bottom: true } - ] - ]) - ]), - _: 1 - }) + createVNode(ComfyQueueButton) ], 512) ]), _: 1 @@ -7705,7 +7835,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({ }; } }); -const Actionbar = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-2e54db00"]]); +const Actionbar = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-eb6e9acf"]]); const _hoisted_1$2 = { viewBox: "0 0 24 24", width: "1.2em", @@ -7764,12 +7894,13 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({ }; } }); -const _withScopeId = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-ad2c662b"), n = n(), popScopeId(), n), "_withScopeId"); +const _withScopeId = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-d84a704d"), n = n(), popScopeId(), n), "_withScopeId"); const _hoisted_1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("h1", { class: "comfyui-logo mx-2" }, "ComfyUI", -1)); const _hoisted_2 = { class: "flex-grow" }; const _sfc_main$1 = /* @__PURE__ */ defineComponent({ __name: "TopMenubar", setup(__props) { + const workspaceState = useWorkspaceStore(); const settingStore = useSettingStore(); const workflowTabsPosition = computed( () => settingStore.get("Comfy.Workflow.WorkflowTabsPosition") @@ -7798,6 +7929,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({ } }); return (_ctx, _cache) => { + const _directive_tooltip = resolveDirective("tooltip"); return openBlock(), createBlock(Teleport, { to: teleportTarget.value }, [ withDirectives(createBaseVNode("div", { ref_key: "topMenuRef", @@ -7819,15 +7951,23 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({ ref: menuRight }, null, 512), createVNode(Actionbar), - createVNode(_sfc_main$2) + createVNode(_sfc_main$2), + withDirectives(createVNode(unref(script$f), { + icon: "pi pi-bars", + severity: "secondary", + text: "", + onClick: _cache[0] || (_cache[0] = ($event) => unref(workspaceState).focusMode = true) + }, null, 512), [ + [_directive_tooltip, { value: _ctx.$t("menu.hideMenu"), showDelay: 300 }] + ]) ], 2), [ - [vShow, betaMenuEnabled.value] + [vShow, betaMenuEnabled.value && !unref(workspaceState).focusMode] ]) ], 8, ["to"]); }; } }); -const TopMenubar = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-ad2c662b"]]); +const TopMenubar = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-d84a704d"]]); function setupAutoQueueHandler() { const queueCountStore = useQueuePendingTaskCountStore(); const queueSettingsStore = useQueueSettingsStore(); @@ -7936,11 +8076,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ life: 2e3 }); }, "onReconnected"); - const workflowStore = useWorkflowStore(); - const workflowBookmarkStore = useWorkflowBookmarkStore(); - app.workflowManager.executionStore = executionStore; - app.workflowManager.workflowStore = workflowStore; - app.workflowManager.workflowBookmarkStore = workflowBookmarkStore; onMounted(() => { api.addEventListener("status", onStatus); api.addEventListener("reconnecting", onReconnecting); @@ -7962,6 +8097,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ requestIdleCallback( () => { useKeybindingStore().loadUserKeybindings(); + useModelStore().loadModelFolders(); useNodeBookmarkStore().migrateLegacyBookmarks(); useNodeDefStore().nodeSearchService.endsWithFilterStartSequence(""); useNodeFrequencyStore().loadNodeFrequencies(); @@ -7972,10 +8108,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ return (_ctx, _cache) => { return openBlock(), createElementBlock(Fragment, null, [ createVNode(TopMenubar), - createVNode(_sfc_main$b, { onReady: onGraphReady }), + createVNode(_sfc_main$c, { onReady: onGraphReady }), createVNode(_sfc_main$a), createVNode(_sfc_main$9), - createVNode(_sfc_main$8) + createVNode(_sfc_main$8), + createVNode(MenuHamburger) ], 64); }; } @@ -7983,4 +8120,4 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ export { _sfc_main as default }; -//# sourceMappingURL=GraphView-C4blCugc.js.map +//# sourceMappingURL=GraphView-BpJuETRI.js.map diff --git a/web/assets/GraphView-BpJuETRI.js.map b/web/assets/GraphView-BpJuETRI.js.map new file mode 100644 index 00000000000..6ce8b0aa32a --- /dev/null +++ b/web/assets/GraphView-BpJuETRI.js.map @@ -0,0 +1 @@ +{"version":3,"file":"GraphView-BpJuETRI.js","sources":["../../src/components/graph/TitleEditor.vue","../../node_modules/primevue/overlaybadge/style/index.mjs","../../node_modules/primevue/overlaybadge/index.mjs","../../src/components/sidebar/SidebarIcon.vue","../../src/components/sidebar/SidebarThemeToggleIcon.vue","../../src/components/sidebar/SidebarSettingsToggleIcon.vue","../../src/components/common/ExtensionSlot.vue","../../src/components/sidebar/SideToolbar.vue","../../node_modules/primevue/tablist/style/index.mjs","../../node_modules/primevue/tablist/index.mjs","../../node_modules/primevue/tab/style/index.mjs","../../node_modules/primevue/tab/index.mjs","../../src/components/bottomPanel/BottomPanel.vue","../../node_modules/primevue/splitter/style/index.mjs","../../node_modules/primevue/splitter/index.mjs","../../node_modules/primevue/splitterpanel/style/index.mjs","../../node_modules/primevue/splitterpanel/index.mjs","../../src/components/LiteGraphCanvasSplitterOverlay.vue","../../node_modules/primevue/autocomplete/style/index.mjs","../../node_modules/primevue/autocomplete/index.mjs","../../src/components/primevueOverride/AutoCompletePlus.vue","../../src/components/searchbox/NodeSearchItem.vue","../../src/components/searchbox/NodeSearchBox.vue","../../src/types/litegraphTypes.ts","../../src/components/searchbox/NodeSearchBoxPopover.vue","../../src/components/graph/NodeTooltip.vue","../../src/components/graph/NodeBadge.vue","../../node_modules/primevue/buttongroup/style/index.mjs","../../node_modules/primevue/buttongroup/index.mjs","../../src/components/graph/GraphCanvasMenu.vue","../../src/components/graph/GraphCanvas.vue","../../src/components/MenuHamburger.vue","../../node_modules/primevue/toast/style/index.mjs","../../node_modules/primevue/toast/index.mjs","../../src/components/toast/GlobalToast.vue","../../src/components/dialog/UnloadWindowConfirmDialog.vue","../../src/components/BrowserTabTitle.vue","../../src/components/topbar/WorkflowTabs.vue","../../node_modules/primevue/menubar/style/index.mjs","../../node_modules/primevue/menubar/index.mjs","../../src/components/topbar/CommandMenubar.vue","../../node_modules/primevue/panel/style/index.mjs","../../node_modules/primevue/panel/index.mjs","../../node_modules/primevue/tieredmenu/style/index.mjs","../../node_modules/primevue/tieredmenu/index.mjs","../../node_modules/primevue/splitbutton/style/index.mjs","../../node_modules/primevue/splitbutton/index.mjs","../../src/components/actionbar/BatchCountEdit.vue","../../src/components/actionbar/ComfyQueueButton.vue","../../src/components/actionbar/ComfyActionbar.vue","../../src/components/topbar/BottomPanelToggleButton.vue","../../src/components/topbar/TopMenubar.vue","../../src/services/autoQueueService.ts","../../src/views/GraphView.vue"],"sourcesContent":["\n\n\n\n\n","import BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-overlaybadge {\\n position: relative;\\n}\\n\\n.p-overlaybadge .p-badge {\\n position: absolute;\\n top: 0;\\n right: 0;\\n transform: translate(50%, -50%);\\n transform-origin: 100% 0;\\n margin: 0;\\n outline-width: \".concat(dt('overlaybadge.outline.width'), \";\\n outline-style: solid;\\n outline-color: \").concat(dt('overlaybadge.outline.color'), \";\\n}\\n\");\n};\nvar classes = {\n root: 'p-overlaybadge'\n};\nvar OverlayBadgeStyle = BaseStyle.extend({\n name: 'overlaybadge',\n theme: theme,\n classes: classes\n});\n\nexport { OverlayBadgeStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import Badge from 'primevue/badge';\nimport OverlayBadgeStyle from 'primevue/overlaybadge/style';\nimport { resolveComponent, openBlock, createElementBlock, mergeProps, renderSlot, createVNode } from 'vue';\n\nvar script$1 = {\n name: 'OverlayBadge',\n \"extends\": Badge,\n style: OverlayBadgeStyle,\n provide: function provide() {\n return {\n $pcOverlayBadge: this,\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'OverlayBadge',\n \"extends\": script$1,\n inheritAttrs: false,\n components: {\n Badge: Badge\n }\n};\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n var _component_Badge = resolveComponent(\"Badge\");\n return openBlock(), createElementBlock(\"div\", mergeProps({\n \"class\": _ctx.cx('root')\n }, _ctx.ptmi('root')), [renderSlot(_ctx.$slots, \"default\"), createVNode(_component_Badge, mergeProps(_ctx.$props, {\n pt: _ctx.ptm('pcBadge')\n }), null, 16, [\"pt\"])], 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","\n\n\n\n\n\n\n","\n\n\n","\n\n\n","\n\n\n","\n\n\n\n\n\n\n","import BaseStyle from '@primevue/core/base/style';\n\nvar classes = {\n root: 'p-tablist',\n content: function content(_ref) {\n var instance = _ref.instance;\n return ['p-tablist-content', {\n 'p-tablist-viewport': instance.$pcTabs.scrollable\n }];\n },\n tabList: 'p-tablist-tab-list',\n activeBar: 'p-tablist-active-bar',\n prevButton: 'p-tablist-prev-button p-tablist-nav-button',\n nextButton: 'p-tablist-next-button p-tablist-nav-button'\n};\nvar TabListStyle = BaseStyle.extend({\n name: 'tablist',\n classes: classes\n});\n\nexport { TabListStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import { getWidth, findSingle, getOuterHeight, getOffset, getOuterWidth, getHeight } from '@primeuix/utils/dom';\nimport ChevronLeftIcon from '@primevue/icons/chevronleft';\nimport ChevronRightIcon from '@primevue/icons/chevronright';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport TabListStyle from 'primevue/tablist/style';\nimport Ripple from 'primevue/ripple';\nimport { resolveDirective, openBlock, createElementBlock, mergeProps, withDirectives, createBlock, resolveDynamicComponent, createCommentVNode, createElementVNode, renderSlot } from 'vue';\n\nvar script$1 = {\n name: 'BaseTabList',\n \"extends\": BaseComponent,\n props: {},\n style: TabListStyle,\n provide: function provide() {\n return {\n $pcTabList: this,\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'TabList',\n \"extends\": script$1,\n inheritAttrs: false,\n inject: ['$pcTabs'],\n data: function data() {\n return {\n isPrevButtonEnabled: false,\n isNextButtonEnabled: true\n };\n },\n resizeObserver: undefined,\n watch: {\n showNavigators: function showNavigators(newValue) {\n newValue ? this.bindResizeObserver() : this.unbindResizeObserver();\n },\n activeValue: {\n flush: 'post',\n handler: function handler() {\n this.updateInkBar();\n }\n }\n },\n mounted: function mounted() {\n var _this = this;\n this.$nextTick(function () {\n _this.updateInkBar();\n });\n if (this.showNavigators) {\n this.updateButtonState();\n this.bindResizeObserver();\n }\n },\n updated: function updated() {\n this.showNavigators && this.updateButtonState();\n },\n beforeUnmount: function beforeUnmount() {\n this.unbindResizeObserver();\n },\n methods: {\n onScroll: function onScroll(event) {\n this.showNavigators && this.updateButtonState();\n event.preventDefault();\n },\n onPrevButtonClick: function onPrevButtonClick() {\n var content = this.$refs.content;\n var width = getWidth(content);\n var pos = content.scrollLeft - width;\n content.scrollLeft = pos <= 0 ? 0 : pos;\n },\n onNextButtonClick: function onNextButtonClick() {\n var content = this.$refs.content;\n var width = getWidth(content) - this.getVisibleButtonWidths();\n var pos = content.scrollLeft + width;\n var lastPos = content.scrollWidth - width;\n content.scrollLeft = pos >= lastPos ? lastPos : pos;\n },\n bindResizeObserver: function bindResizeObserver() {\n var _this2 = this;\n this.resizeObserver = new ResizeObserver(function () {\n return _this2.updateButtonState();\n });\n this.resizeObserver.observe(this.$refs.list);\n },\n unbindResizeObserver: function unbindResizeObserver() {\n var _this$resizeObserver;\n (_this$resizeObserver = this.resizeObserver) === null || _this$resizeObserver === void 0 || _this$resizeObserver.unobserve(this.$refs.list);\n this.resizeObserver = undefined;\n },\n updateInkBar: function updateInkBar() {\n var _this$$refs = this.$refs,\n content = _this$$refs.content,\n inkbar = _this$$refs.inkbar,\n tabs = _this$$refs.tabs;\n var activeTab = findSingle(content, '[data-pc-name=\"tab\"][data-p-active=\"true\"]');\n if (this.$pcTabs.isVertical()) {\n inkbar.style.height = getOuterHeight(activeTab) + 'px';\n inkbar.style.top = getOffset(activeTab).top - getOffset(tabs).top + 'px';\n } else {\n inkbar.style.width = getOuterWidth(activeTab) + 'px';\n inkbar.style.left = getOffset(activeTab).left - getOffset(tabs).left + 'px';\n }\n },\n updateButtonState: function updateButtonState() {\n var _this$$refs2 = this.$refs,\n list = _this$$refs2.list,\n content = _this$$refs2.content;\n var scrollLeft = content.scrollLeft,\n scrollTop = content.scrollTop,\n scrollWidth = content.scrollWidth,\n scrollHeight = content.scrollHeight,\n offsetWidth = content.offsetWidth,\n offsetHeight = content.offsetHeight;\n var _ref = [getWidth(content), getHeight(content)],\n width = _ref[0],\n height = _ref[1];\n if (this.$pcTabs.isVertical()) {\n this.isPrevButtonEnabled = scrollTop !== 0;\n this.isNextButtonEnabled = list.offsetHeight >= offsetHeight && parseInt(scrollTop) !== scrollHeight - height;\n } else {\n this.isPrevButtonEnabled = scrollLeft !== 0;\n this.isNextButtonEnabled = list.offsetWidth >= offsetWidth && parseInt(scrollLeft) !== scrollWidth - width;\n }\n },\n getVisibleButtonWidths: function getVisibleButtonWidths() {\n var _this$$refs3 = this.$refs,\n prevBtn = _this$$refs3.prevBtn,\n nextBtn = _this$$refs3.nextBtn;\n return [prevBtn, nextBtn].reduce(function (acc, el) {\n return el ? acc + getWidth(el) : acc;\n }, 0);\n }\n },\n computed: {\n templates: function templates() {\n return this.$pcTabs.$slots;\n },\n activeValue: function activeValue() {\n return this.$pcTabs.d_value;\n },\n showNavigators: function showNavigators() {\n return this.$pcTabs.scrollable && this.$pcTabs.showNavigators;\n },\n prevButtonAriaLabel: function prevButtonAriaLabel() {\n return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.previous : undefined;\n },\n nextButtonAriaLabel: function nextButtonAriaLabel() {\n return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.next : undefined;\n }\n },\n components: {\n ChevronLeftIcon: ChevronLeftIcon,\n ChevronRightIcon: ChevronRightIcon\n },\n directives: {\n ripple: Ripple\n }\n};\n\nvar _hoisted_1 = [\"aria-label\", \"tabindex\"];\nvar _hoisted_2 = [\"aria-orientation\"];\nvar _hoisted_3 = [\"aria-label\", \"tabindex\"];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n var _directive_ripple = resolveDirective(\"ripple\");\n return openBlock(), createElementBlock(\"div\", mergeProps({\n ref: \"list\",\n \"class\": _ctx.cx('root')\n }, _ctx.ptmi('root')), [$options.showNavigators && $data.isPrevButtonEnabled ? withDirectives((openBlock(), createElementBlock(\"button\", mergeProps({\n key: 0,\n ref: \"prevButton\",\n \"class\": _ctx.cx('prevButton'),\n \"aria-label\": $options.prevButtonAriaLabel,\n tabindex: $options.$pcTabs.tabindex,\n onClick: _cache[0] || (_cache[0] = function () {\n return $options.onPrevButtonClick && $options.onPrevButtonClick.apply($options, arguments);\n })\n }, _ctx.ptm('prevButton'), {\n \"data-pc-group-section\": \"navigator\"\n }), [(openBlock(), createBlock(resolveDynamicComponent($options.templates.previcon || 'ChevronLeftIcon'), mergeProps({\n \"aria-hidden\": \"true\"\n }, _ctx.ptm('prevIcon')), null, 16))], 16, _hoisted_1)), [[_directive_ripple]]) : createCommentVNode(\"\", true), createElementVNode(\"div\", mergeProps({\n ref: \"content\",\n \"class\": _ctx.cx('content'),\n onScroll: _cache[1] || (_cache[1] = function () {\n return $options.onScroll && $options.onScroll.apply($options, arguments);\n })\n }, _ctx.ptm('content')), [createElementVNode(\"div\", mergeProps({\n ref: \"tabs\",\n \"class\": _ctx.cx('tabList'),\n role: \"tablist\",\n \"aria-orientation\": $options.$pcTabs.orientation || 'horizontal'\n }, _ctx.ptm('tabList')), [renderSlot(_ctx.$slots, \"default\"), createElementVNode(\"span\", mergeProps({\n ref: \"inkbar\",\n \"class\": _ctx.cx('activeBar'),\n role: \"presentation\",\n \"aria-hidden\": \"true\"\n }, _ctx.ptm('activeBar')), null, 16)], 16, _hoisted_2)], 16), $options.showNavigators && $data.isNextButtonEnabled ? withDirectives((openBlock(), createElementBlock(\"button\", mergeProps({\n key: 1,\n ref: \"nextButton\",\n \"class\": _ctx.cx('nextButton'),\n \"aria-label\": $options.nextButtonAriaLabel,\n tabindex: $options.$pcTabs.tabindex,\n onClick: _cache[2] || (_cache[2] = function () {\n return $options.onNextButtonClick && $options.onNextButtonClick.apply($options, arguments);\n })\n }, _ctx.ptm('nextButton'), {\n \"data-pc-group-section\": \"navigator\"\n }), [(openBlock(), createBlock(resolveDynamicComponent($options.templates.nexticon || 'ChevronRightIcon'), mergeProps({\n \"aria-hidden\": \"true\"\n }, _ctx.ptm('nextIcon')), null, 16))], 16, _hoisted_3)), [[_directive_ripple]]) : createCommentVNode(\"\", true)], 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseStyle from '@primevue/core/base/style';\n\nvar classes = {\n root: function root(_ref) {\n var instance = _ref.instance,\n props = _ref.props;\n return ['p-tab', {\n 'p-tab-active': instance.active,\n 'p-disabled': props.disabled\n }];\n }\n};\nvar TabStyle = BaseStyle.extend({\n name: 'tab',\n classes: classes\n});\n\nexport { TabStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import { getAttribute, findSingle, focus } from '@primeuix/utils/dom';\nimport { equals } from '@primeuix/utils/object';\nimport Ripple from 'primevue/ripple';\nimport { mergeProps, resolveDirective, withDirectives, openBlock, createBlock, resolveDynamicComponent, withCtx, renderSlot, normalizeClass } from 'vue';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport TabStyle from 'primevue/tab/style';\n\nvar script$1 = {\n name: 'BaseTab',\n \"extends\": BaseComponent,\n props: {\n value: {\n type: [String, Number],\n \"default\": undefined\n },\n disabled: {\n type: Boolean,\n \"default\": false\n },\n as: {\n type: [String, Object],\n \"default\": 'BUTTON'\n },\n asChild: {\n type: Boolean,\n \"default\": false\n }\n },\n style: TabStyle,\n provide: function provide() {\n return {\n $pcTab: this,\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'Tab',\n \"extends\": script$1,\n inheritAttrs: false,\n inject: ['$pcTabs', '$pcTabList'],\n methods: {\n onFocus: function onFocus() {\n this.$pcTabs.selectOnFocus && this.changeActiveValue();\n },\n onClick: function onClick() {\n this.changeActiveValue();\n },\n onKeydown: function onKeydown(event) {\n switch (event.code) {\n case 'ArrowRight':\n this.onArrowRightKey(event);\n break;\n case 'ArrowLeft':\n this.onArrowLeftKey(event);\n break;\n case 'Home':\n this.onHomeKey(event);\n break;\n case 'End':\n this.onEndKey(event);\n break;\n case 'PageDown':\n this.onPageDownKey(event);\n break;\n case 'PageUp':\n this.onPageUpKey(event);\n break;\n case 'Enter':\n case 'NumpadEnter':\n case 'Space':\n this.onEnterKey(event);\n break;\n }\n },\n onArrowRightKey: function onArrowRightKey(event) {\n var nextTab = this.findNextTab(event.currentTarget);\n nextTab ? this.changeFocusedTab(event, nextTab) : this.onHomeKey(event);\n event.preventDefault();\n },\n onArrowLeftKey: function onArrowLeftKey(event) {\n var prevTab = this.findPrevTab(event.currentTarget);\n prevTab ? this.changeFocusedTab(event, prevTab) : this.onEndKey(event);\n event.preventDefault();\n },\n onHomeKey: function onHomeKey(event) {\n var firstTab = this.findFirstTab();\n this.changeFocusedTab(event, firstTab);\n event.preventDefault();\n },\n onEndKey: function onEndKey(event) {\n var lastTab = this.findLastTab();\n this.changeFocusedTab(event, lastTab);\n event.preventDefault();\n },\n onPageDownKey: function onPageDownKey(event) {\n this.scrollInView(this.findLastTab());\n event.preventDefault();\n },\n onPageUpKey: function onPageUpKey(event) {\n this.scrollInView(this.findFirstTab());\n event.preventDefault();\n },\n onEnterKey: function onEnterKey(event) {\n this.changeActiveValue();\n event.preventDefault();\n },\n findNextTab: function findNextTab(tabElement) {\n var selfCheck = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var element = selfCheck ? tabElement : tabElement.nextElementSibling;\n return element ? getAttribute(element, 'data-p-disabled') || getAttribute(element, 'data-pc-section') === 'inkbar' ? this.findNextTab(element) : findSingle(element, '[data-pc-name=\"tab\"]') : null;\n },\n findPrevTab: function findPrevTab(tabElement) {\n var selfCheck = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var element = selfCheck ? tabElement : tabElement.previousElementSibling;\n return element ? getAttribute(element, 'data-p-disabled') || getAttribute(element, 'data-pc-section') === 'inkbar' ? this.findPrevTab(element) : findSingle(element, '[data-pc-name=\"tab\"]') : null;\n },\n findFirstTab: function findFirstTab() {\n return this.findNextTab(this.$pcTabList.$refs.content.firstElementChild, true);\n },\n findLastTab: function findLastTab() {\n return this.findPrevTab(this.$pcTabList.$refs.content.lastElementChild, true);\n },\n changeActiveValue: function changeActiveValue() {\n this.$pcTabs.updateValue(this.value);\n },\n changeFocusedTab: function changeFocusedTab(event, element) {\n focus(element);\n this.scrollInView(element);\n },\n scrollInView: function scrollInView(element) {\n var _element$scrollIntoVi;\n element === null || element === void 0 || (_element$scrollIntoVi = element.scrollIntoView) === null || _element$scrollIntoVi === void 0 || _element$scrollIntoVi.call(element, {\n block: 'nearest'\n });\n }\n },\n computed: {\n active: function active() {\n var _this$$pcTabs;\n return equals((_this$$pcTabs = this.$pcTabs) === null || _this$$pcTabs === void 0 ? void 0 : _this$$pcTabs.d_value, this.value);\n },\n id: function id() {\n var _this$$pcTabs2;\n return \"\".concat((_this$$pcTabs2 = this.$pcTabs) === null || _this$$pcTabs2 === void 0 ? void 0 : _this$$pcTabs2.id, \"_tab_\").concat(this.value);\n },\n ariaControls: function ariaControls() {\n var _this$$pcTabs3;\n return \"\".concat((_this$$pcTabs3 = this.$pcTabs) === null || _this$$pcTabs3 === void 0 ? void 0 : _this$$pcTabs3.id, \"_tabpanel_\").concat(this.value);\n },\n attrs: function attrs() {\n return mergeProps(this.asAttrs, this.a11yAttrs, this.ptmi('root', this.ptParams));\n },\n asAttrs: function asAttrs() {\n return this.as === 'BUTTON' ? {\n type: 'button',\n disabled: this.disabled\n } : undefined;\n },\n a11yAttrs: function a11yAttrs() {\n return {\n id: this.id,\n tabindex: this.active ? this.$pcTabs.tabindex : -1,\n role: 'tab',\n 'aria-selected': this.active,\n 'aria-controls': this.ariaControls,\n 'data-pc-name': 'tab',\n 'data-p-disabled': this.disabled,\n 'data-p-active': this.active,\n onFocus: this.onFocus,\n onKeydown: this.onKeydown\n };\n },\n ptParams: function ptParams() {\n return {\n context: {\n active: this.active\n }\n };\n }\n },\n directives: {\n ripple: Ripple\n }\n};\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n var _directive_ripple = resolveDirective(\"ripple\");\n return !_ctx.asChild ? withDirectives((openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps({\n key: 0,\n \"class\": _ctx.cx('root'),\n onClick: $options.onClick\n }, $options.attrs), {\n \"default\": withCtx(function () {\n return [renderSlot(_ctx.$slots, \"default\")];\n }),\n _: 3\n }, 16, [\"class\", \"onClick\"])), [[_directive_ripple]]) : renderSlot(_ctx.$slots, \"default\", {\n key: 1,\n \"class\": normalizeClass(_ctx.cx('root')),\n active: $options.active,\n a11yAttrs: $options.a11yAttrs,\n onClick: $options.onClick\n });\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","\n\n\n","import BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-splitter {\\n display: flex;\\n flex-wrap: nowrap;\\n border: 1px solid \".concat(dt('splitter.border.color'), \";\\n background: \").concat(dt('splitter.background'), \";\\n border-radius: \").concat(dt('border.radius.md'), \";\\n color: \").concat(dt('splitter.color'), \";\\n}\\n\\n.p-splitter-vertical {\\n flex-direction: column;\\n}\\n\\n.p-splitter-gutter {\\n flex-grow: 0;\\n flex-shrink: 0;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n z-index: 1;\\n background: \").concat(dt('splitter.gutter.background'), \";\\n}\\n\\n.p-splitter-gutter-handle {\\n border-radius: \").concat(dt('splitter.handle.border.radius'), \";\\n background: \").concat(dt('splitter.handle.background'), \";\\n transition: outline-color \").concat(dt('splitter.transition.duration'), \", box-shadow \").concat(dt('splitter.transition.duration'), \";\\n outline-color: transparent;\\n}\\n\\n.p-splitter-gutter-handle:focus-visible {\\n box-shadow: \").concat(dt('splitter.handle.focus.ring.shadow'), \";\\n outline: \").concat(dt('splitter.handle.focus.ring.width'), \" \").concat(dt('splitter.handle.focus.ring.style'), \" \").concat(dt('splitter.handle.focus.ring.color'), \";\\n outline-offset: \").concat(dt('splitter.handle.focus.ring.offset'), \";\\n}\\n\\n.p-splitter-horizontal.p-splitter-resizing {\\n cursor: col-resize;\\n user-select: none;\\n}\\n\\n.p-splitter-vertical.p-splitter-resizing {\\n cursor: row-resize;\\n user-select: none;\\n}\\n\\n.p-splitter-horizontal > .p-splitter-gutter > .p-splitter-gutter-handle {\\n height: \").concat(dt('splitter.handle.size'), \";\\n width: 100%;\\n}\\n\\n.p-splitter-vertical > .p-splitter-gutter > .p-splitter-gutter-handle {\\n width: \").concat(dt('splitter.handle.size'), \";\\n height: 100%;\\n}\\n\\n.p-splitter-horizontal > .p-splitter-gutter {\\n cursor: col-resize;\\n}\\n\\n.p-splitter-vertical > .p-splitter-gutter {\\n cursor: row-resize;\\n}\\n\\n.p-splitterpanel {\\n flex-grow: 1;\\n overflow: hidden;\\n}\\n\\n.p-splitterpanel-nested {\\n display: flex;\\n}\\n\\n.p-splitterpanel .p-splitter {\\n flex-grow: 1;\\n border: 0 none;\\n}\\n\");\n};\nvar classes = {\n root: function root(_ref2) {\n var props = _ref2.props;\n return ['p-splitter p-component', 'p-splitter-' + props.layout];\n },\n gutter: 'p-splitter-gutter',\n gutterHandle: 'p-splitter-gutter-handle'\n};\nvar inlineStyles = {\n root: function root(_ref3) {\n var props = _ref3.props;\n return [{\n display: 'flex',\n 'flex-wrap': 'nowrap'\n }, props.layout === 'vertical' ? {\n 'flex-direction': 'column'\n } : ''];\n }\n};\nvar SplitterStyle = BaseStyle.extend({\n name: 'splitter',\n theme: theme,\n classes: classes,\n inlineStyles: inlineStyles\n});\n\nexport { SplitterStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import { getVNodeProp } from '@primevue/core/utils';\nimport { getWidth, getHeight, getOuterWidth, getOuterHeight } from '@primeuix/utils/dom';\nimport { isArray } from '@primeuix/utils/object';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport SplitterStyle from 'primevue/splitter/style';\nimport { openBlock, createElementBlock, mergeProps, Fragment, renderList, createBlock, resolveDynamicComponent, createElementVNode, createCommentVNode } from 'vue';\n\nvar script$1 = {\n name: 'BaseSplitter',\n \"extends\": BaseComponent,\n props: {\n layout: {\n type: String,\n \"default\": 'horizontal'\n },\n gutterSize: {\n type: Number,\n \"default\": 4\n },\n stateKey: {\n type: String,\n \"default\": null\n },\n stateStorage: {\n type: String,\n \"default\": 'session'\n },\n step: {\n type: Number,\n \"default\": 5\n }\n },\n style: SplitterStyle,\n provide: function provide() {\n return {\n $pcSplitter: this,\n $parentInstance: this\n };\n }\n};\n\nfunction _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _iterableToArray(r) { if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r); }\nfunction _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nvar script = {\n name: 'Splitter',\n \"extends\": script$1,\n inheritAttrs: false,\n emits: ['resizestart', 'resizeend', 'resize'],\n dragging: false,\n mouseMoveListener: null,\n mouseUpListener: null,\n touchMoveListener: null,\n touchEndListener: null,\n size: null,\n gutterElement: null,\n startPos: null,\n prevPanelElement: null,\n nextPanelElement: null,\n nextPanelSize: null,\n prevPanelSize: null,\n panelSizes: null,\n prevPanelIndex: null,\n timer: null,\n data: function data() {\n return {\n prevSize: null\n };\n },\n mounted: function mounted() {\n var _this = this;\n if (this.panels && this.panels.length) {\n var initialized = false;\n if (this.isStateful()) {\n initialized = this.restoreState();\n }\n if (!initialized) {\n var children = _toConsumableArray(this.$el.children).filter(function (child) {\n return child.getAttribute('data-pc-name') === 'splitterpanel';\n });\n var _panelSizes = [];\n this.panels.map(function (panel, i) {\n var panelInitialSize = panel.props && panel.props.size ? panel.props.size : null;\n var panelSize = panelInitialSize || 100 / _this.panels.length;\n _panelSizes[i] = panelSize;\n children[i].style.flexBasis = 'calc(' + panelSize + '% - ' + (_this.panels.length - 1) * _this.gutterSize + 'px)';\n });\n this.panelSizes = _panelSizes;\n this.prevSize = parseFloat(_panelSizes[0]).toFixed(4);\n }\n }\n },\n beforeUnmount: function beforeUnmount() {\n this.clear();\n this.unbindMouseListeners();\n },\n methods: {\n isSplitterPanel: function isSplitterPanel(child) {\n return child.type.name === 'SplitterPanel';\n },\n onResizeStart: function onResizeStart(event, index, isKeyDown) {\n this.gutterElement = event.currentTarget || event.target.parentElement;\n this.size = this.horizontal ? getWidth(this.$el) : getHeight(this.$el);\n if (!isKeyDown) {\n this.dragging = true;\n this.startPos = this.layout === 'horizontal' ? event.pageX || event.changedTouches[0].pageX : event.pageY || event.changedTouches[0].pageY;\n }\n this.prevPanelElement = this.gutterElement.previousElementSibling;\n this.nextPanelElement = this.gutterElement.nextElementSibling;\n if (isKeyDown) {\n this.prevPanelSize = this.horizontal ? getOuterWidth(this.prevPanelElement, true) : getOuterHeight(this.prevPanelElement, true);\n this.nextPanelSize = this.horizontal ? getOuterWidth(this.nextPanelElement, true) : getOuterHeight(this.nextPanelElement, true);\n } else {\n this.prevPanelSize = 100 * (this.horizontal ? getOuterWidth(this.prevPanelElement, true) : getOuterHeight(this.prevPanelElement, true)) / this.size;\n this.nextPanelSize = 100 * (this.horizontal ? getOuterWidth(this.nextPanelElement, true) : getOuterHeight(this.nextPanelElement, true)) / this.size;\n }\n this.prevPanelIndex = index;\n this.$emit('resizestart', {\n originalEvent: event,\n sizes: this.panelSizes\n });\n this.$refs.gutter[index].setAttribute('data-p-gutter-resizing', true);\n this.$el.setAttribute('data-p-resizing', true);\n },\n onResize: function onResize(event, step, isKeyDown) {\n var newPos, newPrevPanelSize, newNextPanelSize;\n if (isKeyDown) {\n if (this.horizontal) {\n newPrevPanelSize = 100 * (this.prevPanelSize + step) / this.size;\n newNextPanelSize = 100 * (this.nextPanelSize - step) / this.size;\n } else {\n newPrevPanelSize = 100 * (this.prevPanelSize - step) / this.size;\n newNextPanelSize = 100 * (this.nextPanelSize + step) / this.size;\n }\n } else {\n if (this.horizontal) newPos = event.pageX * 100 / this.size - this.startPos * 100 / this.size;else newPos = event.pageY * 100 / this.size - this.startPos * 100 / this.size;\n newPrevPanelSize = this.prevPanelSize + newPos;\n newNextPanelSize = this.nextPanelSize - newPos;\n }\n if (this.validateResize(newPrevPanelSize, newNextPanelSize)) {\n this.prevPanelElement.style.flexBasis = 'calc(' + newPrevPanelSize + '% - ' + (this.panels.length - 1) * this.gutterSize + 'px)';\n this.nextPanelElement.style.flexBasis = 'calc(' + newNextPanelSize + '% - ' + (this.panels.length - 1) * this.gutterSize + 'px)';\n this.panelSizes[this.prevPanelIndex] = newPrevPanelSize;\n this.panelSizes[this.prevPanelIndex + 1] = newNextPanelSize;\n this.prevSize = parseFloat(newPrevPanelSize).toFixed(4);\n }\n this.$emit('resize', {\n originalEvent: event,\n sizes: this.panelSizes\n });\n },\n onResizeEnd: function onResizeEnd(event) {\n if (this.isStateful()) {\n this.saveState();\n }\n this.$emit('resizeend', {\n originalEvent: event,\n sizes: this.panelSizes\n });\n this.$refs.gutter.forEach(function (gutter) {\n return gutter.setAttribute('data-p-gutter-resizing', false);\n });\n this.$el.setAttribute('data-p-resizing', false);\n this.clear();\n },\n repeat: function repeat(event, index, step) {\n this.onResizeStart(event, index, true);\n this.onResize(event, step, true);\n },\n setTimer: function setTimer(event, index, step) {\n var _this2 = this;\n if (!this.timer) {\n this.timer = setInterval(function () {\n _this2.repeat(event, index, step);\n }, 40);\n }\n },\n clearTimer: function clearTimer() {\n if (this.timer) {\n clearInterval(this.timer);\n this.timer = null;\n }\n },\n onGutterKeyUp: function onGutterKeyUp() {\n this.clearTimer();\n this.onResizeEnd();\n },\n onGutterKeyDown: function onGutterKeyDown(event, index) {\n switch (event.code) {\n case 'ArrowLeft':\n {\n if (this.layout === 'horizontal') {\n this.setTimer(event, index, this.step * -1);\n }\n event.preventDefault();\n break;\n }\n case 'ArrowRight':\n {\n if (this.layout === 'horizontal') {\n this.setTimer(event, index, this.step);\n }\n event.preventDefault();\n break;\n }\n case 'ArrowDown':\n {\n if (this.layout === 'vertical') {\n this.setTimer(event, index, this.step * -1);\n }\n event.preventDefault();\n break;\n }\n case 'ArrowUp':\n {\n if (this.layout === 'vertical') {\n this.setTimer(event, index, this.step);\n }\n event.preventDefault();\n break;\n }\n }\n },\n onGutterMouseDown: function onGutterMouseDown(event, index) {\n this.onResizeStart(event, index);\n this.bindMouseListeners();\n },\n onGutterTouchStart: function onGutterTouchStart(event, index) {\n this.onResizeStart(event, index);\n this.bindTouchListeners();\n event.preventDefault();\n },\n onGutterTouchMove: function onGutterTouchMove(event) {\n this.onResize(event);\n event.preventDefault();\n },\n onGutterTouchEnd: function onGutterTouchEnd(event) {\n this.onResizeEnd(event);\n this.unbindTouchListeners();\n event.preventDefault();\n },\n bindMouseListeners: function bindMouseListeners() {\n var _this3 = this;\n if (!this.mouseMoveListener) {\n this.mouseMoveListener = function (event) {\n return _this3.onResize(event);\n };\n document.addEventListener('mousemove', this.mouseMoveListener);\n }\n if (!this.mouseUpListener) {\n this.mouseUpListener = function (event) {\n _this3.onResizeEnd(event);\n _this3.unbindMouseListeners();\n };\n document.addEventListener('mouseup', this.mouseUpListener);\n }\n },\n bindTouchListeners: function bindTouchListeners() {\n var _this4 = this;\n if (!this.touchMoveListener) {\n this.touchMoveListener = function (event) {\n return _this4.onResize(event.changedTouches[0]);\n };\n document.addEventListener('touchmove', this.touchMoveListener);\n }\n if (!this.touchEndListener) {\n this.touchEndListener = function (event) {\n _this4.resizeEnd(event);\n _this4.unbindTouchListeners();\n };\n document.addEventListener('touchend', this.touchEndListener);\n }\n },\n validateResize: function validateResize(newPrevPanelSize, newNextPanelSize) {\n if (newPrevPanelSize > 100 || newPrevPanelSize < 0) return false;\n if (newNextPanelSize > 100 || newNextPanelSize < 0) return false;\n var prevPanelMinSize = getVNodeProp(this.panels[this.prevPanelIndex], 'minSize');\n if (this.panels[this.prevPanelIndex].props && prevPanelMinSize && prevPanelMinSize > newPrevPanelSize) {\n return false;\n }\n var newPanelMinSize = getVNodeProp(this.panels[this.prevPanelIndex + 1], 'minSize');\n if (this.panels[this.prevPanelIndex + 1].props && newPanelMinSize && newPanelMinSize > newNextPanelSize) {\n return false;\n }\n return true;\n },\n unbindMouseListeners: function unbindMouseListeners() {\n if (this.mouseMoveListener) {\n document.removeEventListener('mousemove', this.mouseMoveListener);\n this.mouseMoveListener = null;\n }\n if (this.mouseUpListener) {\n document.removeEventListener('mouseup', this.mouseUpListener);\n this.mouseUpListener = null;\n }\n },\n unbindTouchListeners: function unbindTouchListeners() {\n if (this.touchMoveListener) {\n document.removeEventListener('touchmove', this.touchMoveListener);\n this.touchMoveListener = null;\n }\n if (this.touchEndListener) {\n document.removeEventListener('touchend', this.touchEndListener);\n this.touchEndListener = null;\n }\n },\n clear: function clear() {\n this.dragging = false;\n this.size = null;\n this.startPos = null;\n this.prevPanelElement = null;\n this.nextPanelElement = null;\n this.prevPanelSize = null;\n this.nextPanelSize = null;\n this.gutterElement = null;\n this.prevPanelIndex = null;\n },\n isStateful: function isStateful() {\n return this.stateKey != null;\n },\n getStorage: function getStorage() {\n switch (this.stateStorage) {\n case 'local':\n return window.localStorage;\n case 'session':\n return window.sessionStorage;\n default:\n throw new Error(this.stateStorage + ' is not a valid value for the state storage, supported values are \"local\" and \"session\".');\n }\n },\n saveState: function saveState() {\n if (isArray(this.panelSizes)) {\n this.getStorage().setItem(this.stateKey, JSON.stringify(this.panelSizes));\n }\n },\n restoreState: function restoreState() {\n var _this5 = this;\n var storage = this.getStorage();\n var stateString = storage.getItem(this.stateKey);\n if (stateString) {\n this.panelSizes = JSON.parse(stateString);\n var children = _toConsumableArray(this.$el.children).filter(function (child) {\n return child.getAttribute('data-pc-name') === 'splitterpanel';\n });\n children.forEach(function (child, i) {\n child.style.flexBasis = 'calc(' + _this5.panelSizes[i] + '% - ' + (_this5.panels.length - 1) * _this5.gutterSize + 'px)';\n });\n return true;\n }\n return false;\n }\n },\n computed: {\n panels: function panels() {\n var _this6 = this;\n var panels = [];\n this.$slots[\"default\"]().forEach(function (child) {\n if (_this6.isSplitterPanel(child)) {\n panels.push(child);\n } else if (child.children instanceof Array) {\n child.children.forEach(function (nestedChild) {\n if (_this6.isSplitterPanel(nestedChild)) {\n panels.push(nestedChild);\n }\n });\n }\n });\n return panels;\n },\n gutterStyle: function gutterStyle() {\n if (this.horizontal) return {\n width: this.gutterSize + 'px'\n };else return {\n height: this.gutterSize + 'px'\n };\n },\n horizontal: function horizontal() {\n return this.layout === 'horizontal';\n },\n getPTOptions: function getPTOptions() {\n var _this$$parentInstance;\n return {\n context: {\n nested: (_this$$parentInstance = this.$parentInstance) === null || _this$$parentInstance === void 0 ? void 0 : _this$$parentInstance.nestedState\n }\n };\n }\n }\n};\n\nvar _hoisted_1 = [\"onMousedown\", \"onTouchstart\", \"onTouchmove\", \"onTouchend\"];\nvar _hoisted_2 = [\"aria-orientation\", \"aria-valuenow\", \"onKeydown\"];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"div\", mergeProps({\n \"class\": _ctx.cx('root'),\n style: _ctx.sx('root'),\n \"data-p-resizing\": false\n }, _ctx.ptmi('root', $options.getPTOptions)), [(openBlock(true), createElementBlock(Fragment, null, renderList($options.panels, function (panel, i) {\n return openBlock(), createElementBlock(Fragment, {\n key: i\n }, [(openBlock(), createBlock(resolveDynamicComponent(panel), {\n tabindex: \"-1\"\n })), i !== $options.panels.length - 1 ? (openBlock(), createElementBlock(\"div\", mergeProps({\n key: 0,\n ref_for: true,\n ref: \"gutter\",\n \"class\": _ctx.cx('gutter'),\n role: \"separator\",\n tabindex: \"-1\",\n onMousedown: function onMousedown($event) {\n return $options.onGutterMouseDown($event, i);\n },\n onTouchstart: function onTouchstart($event) {\n return $options.onGutterTouchStart($event, i);\n },\n onTouchmove: function onTouchmove($event) {\n return $options.onGutterTouchMove($event, i);\n },\n onTouchend: function onTouchend($event) {\n return $options.onGutterTouchEnd($event, i);\n },\n \"data-p-gutter-resizing\": false\n }, _ctx.ptm('gutter')), [createElementVNode(\"div\", mergeProps({\n \"class\": _ctx.cx('gutterHandle'),\n tabindex: \"0\",\n style: [$options.gutterStyle],\n \"aria-orientation\": _ctx.layout,\n \"aria-valuenow\": $data.prevSize,\n onKeyup: _cache[0] || (_cache[0] = function () {\n return $options.onGutterKeyUp && $options.onGutterKeyUp.apply($options, arguments);\n }),\n onKeydown: function onKeydown($event) {\n return $options.onGutterKeyDown($event, i);\n },\n ref_for: true\n }, _ctx.ptm('gutterHandle')), null, 16, _hoisted_2)], 16, _hoisted_1)) : createCommentVNode(\"\", true)], 64);\n }), 128))], 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseStyle from '@primevue/core/base/style';\n\nvar classes = {\n root: function root(_ref) {\n var instance = _ref.instance;\n return ['p-splitterpanel', {\n 'p-splitterpanel-nested': instance.isNested\n }];\n }\n};\nvar SplitterPanelStyle = BaseStyle.extend({\n name: 'splitterpanel',\n classes: classes\n});\n\nexport { SplitterPanelStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseComponent from '@primevue/core/basecomponent';\nimport SplitterPanelStyle from 'primevue/splitterpanel/style';\nimport { openBlock, createElementBlock, mergeProps, renderSlot } from 'vue';\n\nvar script$1 = {\n name: 'BaseSplitterPanel',\n \"extends\": BaseComponent,\n props: {\n size: {\n type: Number,\n \"default\": null\n },\n minSize: {\n type: Number,\n \"default\": null\n }\n },\n style: SplitterPanelStyle,\n provide: function provide() {\n return {\n $pcSplitterPanel: this,\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'SplitterPanel',\n \"extends\": script$1,\n inheritAttrs: false,\n data: function data() {\n return {\n nestedState: null\n };\n },\n computed: {\n isNested: function isNested() {\n var _this = this;\n return this.$slots[\"default\"]().some(function (child) {\n _this.nestedState = child.type.name === 'Splitter' ? true : null;\n return _this.nestedState;\n });\n },\n getPTOptions: function getPTOptions() {\n return {\n context: {\n nested: this.isNested\n }\n };\n }\n }\n};\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"div\", mergeProps({\n ref: \"container\",\n \"class\": _ctx.cx('root')\n }, _ctx.ptmi('root', $options.getPTOptions)), [renderSlot(_ctx.$slots, \"default\")], 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","\n\n\n\n\n","import { isNotEmpty } from '@primeuix/utils/object';\nimport BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-autocomplete {\\n display: inline-flex;\\n}\\n\\n.p-autocomplete-loader {\\n position: absolute;\\n top: 50%;\\n margin-top: -0.5rem;\\n right: \".concat(dt('autocomplete.padding.x'), \";\\n}\\n\\n.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-loader {\\n right: calc(\").concat(dt('autocomplete.dropdown.width'), \" + \").concat(dt('autocomplete.padding.x'), \");\\n}\\n\\n.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input {\\n flex: 1 1 auto;\\n width: 1%;\\n}\\n\\n.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input,\\n.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input-multiple {\\n border-top-right-radius: 0;\\n border-bottom-right-radius: 0;\\n}\\n\\n.p-autocomplete-dropdown {\\n cursor: pointer;\\n display: inline-flex;\\n cursor: pointer;\\n user-select: none;\\n align-items: center;\\n justify-content: center;\\n overflow: hidden;\\n position: relative;\\n width: \").concat(dt('autocomplete.dropdown.width'), \";\\n border-top-right-radius: \").concat(dt('autocomplete.dropdown.border.radius'), \";\\n border-bottom-right-radius: \").concat(dt('autocomplete.dropdown.border.radius'), \";\\n background: \").concat(dt('autocomplete.dropdown.background'), \";\\n border: 1px solid \").concat(dt('autocomplete.dropdown.border.color'), \";\\n border-left: 0 none;\\n color: \").concat(dt('autocomplete.dropdown.color'), \";\\n transition: background \").concat(dt('autocomplete.transition.duration'), \", color \").concat(dt('autocomplete.transition.duration'), \", border-color \").concat(dt('autocomplete.transition.duration'), \", outline-color \").concat(dt('autocomplete.transition.duration'), \", box-shadow \").concat(dt('autocomplete.transition.duration'), \";\\n outline-color: transparent;\\n}\\n\\n.p-autocomplete-dropdown:not(:disabled):hover {\\n background: \").concat(dt('autocomplete.dropdown.hover.background'), \";\\n border-color: \").concat(dt('autocomplete.dropdown.hover.border.color'), \";\\n color: \").concat(dt('autocomplete.dropdown.hover.color'), \";\\n}\\n\\n.p-autocomplete-dropdown:not(:disabled):active {\\n background: \").concat(dt('autocomplete.dropdown.active.background'), \";\\n border-color: \").concat(dt('autocomplete.dropdown.active.border.color'), \";\\n color: \").concat(dt('autocomplete.dropdown.active.color'), \";\\n}\\n\\n.p-autocomplete-dropdown:focus-visible {\\n box-shadow: \").concat(dt('autocomplete.dropdown.focus.ring.shadow'), \";\\n outline: \").concat(dt('autocomplete.dropdown.focus.ring.width'), \" \").concat(dt('autocomplete.dropdown.focus.ring.style'), \" \").concat(dt('autocomplete.dropdown.focus.ring.color'), \";\\n outline-offset: \").concat(dt('autocomplete.dropdown.focus.ring.offset'), \";\\n}\\n\\n.p-autocomplete .p-autocomplete-overlay {\\n min-width: 100%;\\n}\\n\\n.p-autocomplete-overlay {\\n position: absolute;\\n overflow: auto;\\n top: 0;\\n left: 0;\\n background: \").concat(dt('autocomplete.overlay.background'), \";\\n color: \").concat(dt('autocomplete.overlay.color'), \";\\n border: 1px solid \").concat(dt('autocomplete.overlay.border.color'), \";\\n border-radius: \").concat(dt('autocomplete.overlay.border.radius'), \";\\n box-shadow: \").concat(dt('autocomplete.overlay.shadow'), \";\\n}\\n\\n.p-autocomplete-list {\\n margin: 0;\\n padding: 0;\\n list-style-type: none;\\n display: flex;\\n flex-direction: column;\\n gap: \").concat(dt('autocomplete.list.gap'), \";\\n padding: \").concat(dt('autocomplete.list.padding'), \";\\n}\\n\\n.p-autocomplete-option {\\n cursor: pointer;\\n white-space: nowrap;\\n position: relative;\\n overflow: hidden;\\n display: flex;\\n align-items: center;\\n padding: \").concat(dt('autocomplete.option.padding'), \";\\n border: 0 none;\\n color: \").concat(dt('autocomplete.option.color'), \";\\n background: transparent;\\n transition: background \").concat(dt('autocomplete.transition.duration'), \", color \").concat(dt('autocomplete.transition.duration'), \", border-color \").concat(dt('autocomplete.transition.duration'), \";\\n border-radius: \").concat(dt('autocomplete.option.border.radius'), \";\\n}\\n\\n.p-autocomplete-option:not(.p-autocomplete-option-selected):not(.p-disabled).p-focus {\\n background: \").concat(dt('autocomplete.option.focus.background'), \";\\n color: \").concat(dt('autocomplete.option.focus.color'), \";\\n}\\n\\n.p-autocomplete-option-selected {\\n background: \").concat(dt('autocomplete.option.selected.background'), \";\\n color: \").concat(dt('autocomplete.option.selected.color'), \";\\n}\\n\\n.p-autocomplete-option-selected.p-focus {\\n background: \").concat(dt('autocomplete.option.selected.focus.background'), \";\\n color: \").concat(dt('autocomplete.option.selected.focus.color'), \";\\n}\\n\\n.p-autocomplete-option-group {\\n margin: 0;\\n padding: \").concat(dt('autocomplete.option.group.padding'), \";\\n color: \").concat(dt('autocomplete.option.group.color'), \";\\n background: \").concat(dt('autocomplete.option.group.background'), \";\\n font-weight: \").concat(dt('autocomplete.option.group.font.weight'), \";\\n}\\n\\n.p-autocomplete-input-multiple {\\n margin: 0;\\n list-style-type: none;\\n cursor: text;\\n overflow: hidden;\\n display: flex;\\n align-items: center;\\n flex-wrap: wrap;\\n padding: calc(\").concat(dt('autocomplete.padding.y'), \" / 2) \").concat(dt('autocomplete.padding.x'), \";\\n gap: calc(\").concat(dt('autocomplete.padding.y'), \" / 2);\\n color: \").concat(dt('autocomplete.color'), \";\\n background: \").concat(dt('autocomplete.background'), \";\\n border: 1px solid \").concat(dt('autocomplete.border.color'), \";\\n border-radius: \").concat(dt('autocomplete.border.radius'), \";\\n width: 100%;\\n transition: background \").concat(dt('autocomplete.transition.duration'), \", color \").concat(dt('autocomplete.transition.duration'), \", border-color \").concat(dt('autocomplete.transition.duration'), \", outline-color \").concat(dt('autocomplete.transition.duration'), \", box-shadow \").concat(dt('autocomplete.transition.duration'), \";\\n outline-color: transparent;\\n box-shadow: \").concat(dt('autocomplete.shadow'), \";\\n}\\n\\n.p-autocomplete:not(.p-disabled):hover .p-autocomplete-input-multiple {\\n border-color: \").concat(dt('autocomplete.hover.border.color'), \";\\n}\\n\\n.p-autocomplete:not(.p-disabled).p-focus .p-autocomplete-input-multiple {\\n border-color: \").concat(dt('autocomplete.focus.border.color'), \";\\n box-shadow: \").concat(dt('autocomplete.focus.ring.shadow'), \";\\n outline: \").concat(dt('autocomplete.focus.ring.width'), \" \").concat(dt('autocomplete.focus.ring.style'), \" \").concat(dt('autocomplete.focus.ring.color'), \";\\n outline-offset: \").concat(dt('autocomplete.focus.ring.offset'), \";\\n}\\n\\n.p-autocomplete.p-invalid .p-autocomplete-input-multiple {\\n border-color: \").concat(dt('autocomplete.invalid.border.color'), \";\\n}\\n\\n.p-variant-filled.p-autocomplete-input-multiple {\\n background: \").concat(dt('autocomplete.filled.background'), \";\\n}\\n\\n.p-autocomplete:not(.p-disabled).p-focus .p-variant-filled.p-autocomplete-input-multiple {\\n background: \").concat(dt('autocomplete.filled.focus.background'), \";\\n}\\n\\n.p-autocomplete.p-disabled .p-autocomplete-input-multiple {\\n opacity: 1;\\n background: \").concat(dt('autocomplete.disabled.background'), \";\\n color: \").concat(dt('autocomplete.disabled.color'), \";\\n}\\n\\n.p-autocomplete-chip.p-chip {\\n padding-top: calc(\").concat(dt('autocomplete.padding.y'), \" / 2);\\n padding-bottom: calc(\").concat(dt('autocomplete.padding.y'), \" / 2);\\n border-radius: \").concat(dt('autocomplete.chip.border.radius'), \";\\n}\\n\\n.p-autocomplete-input-multiple:has(.p-autocomplete-chip) {\\n padding-left: calc(\").concat(dt('autocomplete.padding.y'), \" / 2);\\n padding-right: calc(\").concat(dt('autocomplete.padding.y'), \" / 2);\\n}\\n\\n.p-autocomplete-chip-item.p-focus .p-autocomplete-chip {\\n background: \").concat(dt('inputchips.chip.focus.background'), \";\\n color: \").concat(dt('inputchips.chip.focus.color'), \";\\n}\\n\\n.p-autocomplete-input-chip {\\n flex: 1 1 auto;\\n display: inline-flex;\\n padding-top: calc(\").concat(dt('autocomplete.padding.y'), \" / 2);\\n padding-bottom: calc(\").concat(dt('autocomplete.padding.y'), \" / 2);\\n}\\n\\n.p-autocomplete-input-chip input {\\n border: 0 none;\\n outline: 0 none;\\n background: transparent;\\n margin: 0;\\n padding: 0;\\n box-shadow: none;\\n border-radius: 0;\\n width: 100%;\\n font-family: inherit;\\n font-feature-settings: inherit;\\n font-size: 1rem;\\n color: inherit;\\n}\\n\\n.p-autocomplete-input-chip input::placeholder {\\n color: \").concat(dt('autocomplete.placeholder.color'), \";\\n}\\n\\n.p-autocomplete-empty-message {\\n padding: \").concat(dt('autocomplete.empty.message.padding'), \";\\n}\\n\\n.p-autocomplete-fluid {\\n display: flex;\\n}\\n\\n.p-autocomplete-fluid:has(.p-autocomplete-dropdown) .p-autocomplete-input {\\n width: 1%;\\n}\\n\");\n};\nvar inlineStyles = {\n root: {\n position: 'relative'\n }\n};\nvar classes = {\n root: function root(_ref2) {\n var instance = _ref2.instance,\n props = _ref2.props;\n return ['p-autocomplete p-component p-inputwrapper', {\n 'p-disabled': props.disabled,\n 'p-invalid': props.invalid,\n 'p-focus': instance.focused,\n 'p-inputwrapper-filled': props.modelValue || isNotEmpty(instance.inputValue),\n 'p-inputwrapper-focus': instance.focused,\n 'p-autocomplete-open': instance.overlayVisible,\n 'p-autocomplete-fluid': instance.hasFluid\n }];\n },\n pcInput: 'p-autocomplete-input',\n inputMultiple: function inputMultiple(_ref3) {\n var props = _ref3.props,\n instance = _ref3.instance;\n return ['p-autocomplete-input-multiple', {\n 'p-variant-filled': props.variant ? props.variant === 'filled' : instance.$primevue.config.inputStyle === 'filled' || instance.$primevue.config.inputVariant === 'filled'\n }];\n },\n chipItem: function chipItem(_ref4) {\n var instance = _ref4.instance,\n i = _ref4.i;\n return ['p-autocomplete-chip-item', {\n 'p-focus': instance.focusedMultipleOptionIndex === i\n }];\n },\n pcChip: 'p-autocomplete-chip',\n chipIcon: 'p-autocomplete-chip-icon',\n inputChip: 'p-autocomplete-input-chip',\n loader: 'p-autocomplete-loader',\n dropdown: 'p-autocomplete-dropdown',\n overlay: 'p-autocomplete-overlay p-component',\n list: 'p-autocomplete-list',\n optionGroup: 'p-autocomplete-option-group',\n option: function option(_ref5) {\n var instance = _ref5.instance,\n _option = _ref5.option,\n i = _ref5.i,\n getItemOptions = _ref5.getItemOptions;\n return ['p-autocomplete-option', {\n 'p-autocomplete-option-selected': instance.isSelected(_option),\n 'p-focus': instance.focusedOptionIndex === instance.getOptionIndex(i, getItemOptions),\n 'p-disabled': instance.isOptionDisabled(_option)\n }];\n },\n emptyMessage: 'p-autocomplete-empty-message'\n};\nvar AutoCompleteStyle = BaseStyle.extend({\n name: 'autocomplete',\n theme: theme,\n classes: classes,\n inlineStyles: inlineStyles\n});\n\nexport { AutoCompleteStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import { focus, addStyle, relativePosition, getOuterWidth, absolutePosition, isTouchDevice, findSingle } from '@primeuix/utils/dom';\nimport { resolveFieldData, isEmpty, isNotEmpty, equals, findLastIndex } from '@primeuix/utils/object';\nimport { ZIndex } from '@primeuix/utils/zindex';\nimport { UniqueComponentId, ConnectedOverlayScrollHandler } from '@primevue/core/utils';\nimport ChevronDownIcon from '@primevue/icons/chevrondown';\nimport SpinnerIcon from '@primevue/icons/spinner';\nimport Chip from 'primevue/chip';\nimport InputText from 'primevue/inputtext';\nimport OverlayEventBus from 'primevue/overlayeventbus';\nimport Portal from 'primevue/portal';\nimport Ripple from 'primevue/ripple';\nimport VirtualScroller from 'primevue/virtualscroller';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport AutoCompleteStyle from 'primevue/autocomplete/style';\nimport { resolveComponent, resolveDirective, openBlock, createElementBlock, mergeProps, createBlock, normalizeClass, normalizeStyle, createCommentVNode, Fragment, renderList, renderSlot, createVNode, withCtx, createElementVNode, resolveDynamicComponent, toDisplayString, Transition, createSlots, createTextVNode, withDirectives } from 'vue';\n\nvar script$1 = {\n name: 'BaseAutoComplete',\n \"extends\": BaseComponent,\n props: {\n modelValue: null,\n suggestions: {\n type: Array,\n \"default\": null\n },\n optionLabel: null,\n optionDisabled: null,\n optionGroupLabel: null,\n optionGroupChildren: null,\n scrollHeight: {\n type: String,\n \"default\": '14rem'\n },\n dropdown: {\n type: Boolean,\n \"default\": false\n },\n dropdownMode: {\n type: String,\n \"default\": 'blank'\n },\n multiple: {\n type: Boolean,\n \"default\": false\n },\n loading: {\n type: Boolean,\n \"default\": false\n },\n variant: {\n type: String,\n \"default\": null\n },\n invalid: {\n type: Boolean,\n \"default\": false\n },\n disabled: {\n type: Boolean,\n \"default\": false\n },\n placeholder: {\n type: String,\n \"default\": null\n },\n dataKey: {\n type: String,\n \"default\": null\n },\n minLength: {\n type: Number,\n \"default\": 1\n },\n delay: {\n type: Number,\n \"default\": 300\n },\n appendTo: {\n type: [String, Object],\n \"default\": 'body'\n },\n forceSelection: {\n type: Boolean,\n \"default\": false\n },\n completeOnFocus: {\n type: Boolean,\n \"default\": false\n },\n inputId: {\n type: String,\n \"default\": null\n },\n inputStyle: {\n type: Object,\n \"default\": null\n },\n inputClass: {\n type: [String, Object],\n \"default\": null\n },\n panelStyle: {\n type: Object,\n \"default\": null\n },\n panelClass: {\n type: [String, Object],\n \"default\": null\n },\n overlayStyle: {\n type: Object,\n \"default\": null\n },\n overlayClass: {\n type: [String, Object],\n \"default\": null\n },\n dropdownIcon: {\n type: String,\n \"default\": null\n },\n dropdownClass: {\n type: [String, Object],\n \"default\": null\n },\n loader: {\n type: String,\n \"default\": null\n },\n loadingIcon: {\n type: String,\n \"default\": null\n },\n removeTokenIcon: {\n type: String,\n \"default\": null\n },\n chipIcon: {\n type: String,\n \"default\": null\n },\n virtualScrollerOptions: {\n type: Object,\n \"default\": null\n },\n autoOptionFocus: {\n type: Boolean,\n \"default\": false\n },\n selectOnFocus: {\n type: Boolean,\n \"default\": false\n },\n focusOnHover: {\n type: Boolean,\n \"default\": true\n },\n searchLocale: {\n type: String,\n \"default\": undefined\n },\n searchMessage: {\n type: String,\n \"default\": null\n },\n selectionMessage: {\n type: String,\n \"default\": null\n },\n emptySelectionMessage: {\n type: String,\n \"default\": null\n },\n emptySearchMessage: {\n type: String,\n \"default\": null\n },\n tabindex: {\n type: Number,\n \"default\": 0\n },\n typeahead: {\n type: Boolean,\n \"default\": true\n },\n ariaLabel: {\n type: String,\n \"default\": null\n },\n ariaLabelledby: {\n type: String,\n \"default\": null\n },\n fluid: {\n type: Boolean,\n \"default\": null\n }\n },\n style: AutoCompleteStyle,\n provide: function provide() {\n return {\n $pcAutoComplete: this,\n $parentInstance: this\n };\n }\n};\n\nfunction _typeof$1(o) { \"@babel/helpers - typeof\"; return _typeof$1 = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof$1(o); }\nfunction _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _iterableToArray(r) { if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r); }\nfunction _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nvar script = {\n name: 'AutoComplete',\n \"extends\": script$1,\n inheritAttrs: false,\n emits: ['update:modelValue', 'change', 'focus', 'blur', 'item-select', 'item-unselect', 'option-select', 'option-unselect', 'dropdown-click', 'clear', 'complete', 'before-show', 'before-hide', 'show', 'hide'],\n inject: {\n $pcFluid: {\n \"default\": null\n }\n },\n outsideClickListener: null,\n resizeListener: null,\n scrollHandler: null,\n overlay: null,\n virtualScroller: null,\n searchTimeout: null,\n dirty: false,\n data: function data() {\n return {\n id: this.$attrs.id,\n clicked: false,\n focused: false,\n focusedOptionIndex: -1,\n focusedMultipleOptionIndex: -1,\n overlayVisible: false,\n searching: false\n };\n },\n watch: {\n '$attrs.id': function $attrsId(newValue) {\n this.id = newValue || UniqueComponentId();\n },\n suggestions: function suggestions() {\n if (this.searching) {\n this.show();\n this.focusedOptionIndex = this.overlayVisible && this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : -1;\n this.searching = false;\n }\n this.autoUpdateModel();\n }\n },\n mounted: function mounted() {\n this.id = this.id || UniqueComponentId();\n this.autoUpdateModel();\n },\n updated: function updated() {\n if (this.overlayVisible) {\n this.alignOverlay();\n }\n },\n beforeUnmount: function beforeUnmount() {\n this.unbindOutsideClickListener();\n this.unbindResizeListener();\n if (this.scrollHandler) {\n this.scrollHandler.destroy();\n this.scrollHandler = null;\n }\n if (this.overlay) {\n ZIndex.clear(this.overlay);\n this.overlay = null;\n }\n },\n methods: {\n getOptionIndex: function getOptionIndex(index, fn) {\n return this.virtualScrollerDisabled ? index : fn && fn(index)['index'];\n },\n getOptionLabel: function getOptionLabel(option) {\n return this.optionLabel ? resolveFieldData(option, this.optionLabel) : option;\n },\n getOptionValue: function getOptionValue(option) {\n return option; // TODO: The 'optionValue' properties can be added.\n },\n getOptionRenderKey: function getOptionRenderKey(option, index) {\n return (this.dataKey ? resolveFieldData(option, this.dataKey) : this.getOptionLabel(option)) + '_' + index;\n },\n getPTOptions: function getPTOptions(option, itemOptions, index, key) {\n return this.ptm(key, {\n context: {\n selected: this.isSelected(option),\n focused: this.focusedOptionIndex === this.getOptionIndex(index, itemOptions),\n disabled: this.isOptionDisabled(option)\n }\n });\n },\n isOptionDisabled: function isOptionDisabled(option) {\n return this.optionDisabled ? resolveFieldData(option, this.optionDisabled) : false;\n },\n isOptionGroup: function isOptionGroup(option) {\n return this.optionGroupLabel && option.optionGroup && option.group;\n },\n getOptionGroupLabel: function getOptionGroupLabel(optionGroup) {\n return resolveFieldData(optionGroup, this.optionGroupLabel);\n },\n getOptionGroupChildren: function getOptionGroupChildren(optionGroup) {\n return resolveFieldData(optionGroup, this.optionGroupChildren);\n },\n getAriaPosInset: function getAriaPosInset(index) {\n var _this = this;\n return (this.optionGroupLabel ? index - this.visibleOptions.slice(0, index).filter(function (option) {\n return _this.isOptionGroup(option);\n }).length : index) + 1;\n },\n show: function show(isFocus) {\n this.$emit('before-show');\n this.dirty = true;\n this.overlayVisible = true;\n this.focusedOptionIndex = this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : -1;\n isFocus && focus(this.multiple ? this.$refs.focusInput : this.$refs.focusInput.$el);\n },\n hide: function hide(isFocus) {\n var _this2 = this;\n var _hide = function _hide() {\n _this2.$emit('before-hide');\n _this2.dirty = isFocus;\n _this2.overlayVisible = false;\n _this2.clicked = false;\n _this2.focusedOptionIndex = -1;\n isFocus && focus(_this2.multiple ? _this2.$refs.focusInput : _this2.$refs.focusInput.$el);\n };\n setTimeout(function () {\n _hide();\n }, 0); // For ScreenReaders\n },\n onFocus: function onFocus(event) {\n if (this.disabled) {\n // For ScreenReaders\n return;\n }\n if (!this.dirty && this.completeOnFocus) {\n this.search(event, event.target.value, 'focus');\n }\n this.dirty = true;\n this.focused = true;\n if (this.overlayVisible) {\n this.focusedOptionIndex = this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : this.overlayVisible && this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : -1;\n this.scrollInView(this.focusedOptionIndex);\n }\n this.$emit('focus', event);\n },\n onBlur: function onBlur(event) {\n this.dirty = false;\n this.focused = false;\n this.focusedOptionIndex = -1;\n this.$emit('blur', event);\n },\n onKeyDown: function onKeyDown(event) {\n if (this.disabled) {\n event.preventDefault();\n return;\n }\n switch (event.code) {\n case 'ArrowDown':\n this.onArrowDownKey(event);\n break;\n case 'ArrowUp':\n this.onArrowUpKey(event);\n break;\n case 'ArrowLeft':\n this.onArrowLeftKey(event);\n break;\n case 'ArrowRight':\n this.onArrowRightKey(event);\n break;\n case 'Home':\n this.onHomeKey(event);\n break;\n case 'End':\n this.onEndKey(event);\n break;\n case 'PageDown':\n this.onPageDownKey(event);\n break;\n case 'PageUp':\n this.onPageUpKey(event);\n break;\n case 'Enter':\n case 'NumpadEnter':\n this.onEnterKey(event);\n break;\n case 'Escape':\n this.onEscapeKey(event);\n break;\n case 'Tab':\n this.onTabKey(event);\n break;\n case 'Backspace':\n this.onBackspaceKey(event);\n break;\n }\n this.clicked = false;\n },\n onInput: function onInput(event) {\n var _this3 = this;\n if (this.typeahead) {\n if (this.searchTimeout) {\n clearTimeout(this.searchTimeout);\n }\n var query = event.target.value;\n if (!this.multiple) {\n this.updateModel(event, query);\n }\n if (query.length === 0) {\n this.hide();\n this.$emit('clear');\n } else {\n if (query.length >= this.minLength) {\n this.focusedOptionIndex = -1;\n this.searchTimeout = setTimeout(function () {\n _this3.search(event, query, 'input');\n }, this.delay);\n } else {\n this.hide();\n }\n }\n }\n },\n onChange: function onChange(event) {\n var _this4 = this;\n if (this.forceSelection) {\n var valid = false;\n\n // when forceSelection is on, prevent called twice onOptionSelect()\n if (this.visibleOptions && !this.multiple) {\n var value = this.multiple ? this.$refs.focusInput.value : this.$refs.focusInput.$el.value;\n var matchedValue = this.visibleOptions.find(function (option) {\n return _this4.isOptionMatched(option, value || '');\n });\n if (matchedValue !== undefined) {\n valid = true;\n !this.isSelected(matchedValue) && this.onOptionSelect(event, matchedValue);\n }\n }\n if (!valid) {\n if (this.multiple) this.$refs.focusInput.value = '';else this.$refs.focusInput.$el.value = '';\n this.$emit('clear');\n !this.multiple && this.updateModel(event, null);\n }\n }\n },\n onMultipleContainerFocus: function onMultipleContainerFocus() {\n if (this.disabled) {\n // For ScreenReaders\n return;\n }\n this.focused = true;\n },\n onMultipleContainerBlur: function onMultipleContainerBlur() {\n this.focusedMultipleOptionIndex = -1;\n this.focused = false;\n },\n onMultipleContainerKeyDown: function onMultipleContainerKeyDown(event) {\n if (this.disabled) {\n event.preventDefault();\n return;\n }\n switch (event.code) {\n case 'ArrowLeft':\n this.onArrowLeftKeyOnMultiple(event);\n break;\n case 'ArrowRight':\n this.onArrowRightKeyOnMultiple(event);\n break;\n case 'Backspace':\n this.onBackspaceKeyOnMultiple(event);\n break;\n }\n },\n onContainerClick: function onContainerClick(event) {\n this.clicked = true;\n if (this.disabled || this.searching || this.loading || this.isInputClicked(event) || this.isDropdownClicked(event)) {\n return;\n }\n if (!this.overlay || !this.overlay.contains(event.target)) {\n focus(this.multiple ? this.$refs.focusInput : this.$refs.focusInput.$el);\n }\n },\n onDropdownClick: function onDropdownClick(event) {\n var query = undefined;\n if (this.overlayVisible) {\n this.hide(true);\n } else {\n var target = this.multiple ? this.$refs.focusInput : this.$refs.focusInput.$el;\n focus(target);\n query = target.value;\n if (this.dropdownMode === 'blank') this.search(event, '', 'dropdown');else if (this.dropdownMode === 'current') this.search(event, query, 'dropdown');\n }\n this.$emit('dropdown-click', {\n originalEvent: event,\n query: query\n });\n },\n onOptionSelect: function onOptionSelect(event, option) {\n var isHide = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var value = this.getOptionValue(option);\n if (this.multiple) {\n this.$refs.focusInput.value = '';\n if (!this.isSelected(option)) {\n this.updateModel(event, [].concat(_toConsumableArray(this.modelValue || []), [value]));\n }\n } else {\n this.updateModel(event, value);\n }\n this.$emit('item-select', {\n originalEvent: event,\n value: option\n });\n this.$emit('option-select', {\n originalEvent: event,\n value: option\n });\n isHide && this.hide(true);\n },\n onOptionMouseMove: function onOptionMouseMove(event, index) {\n if (this.focusOnHover) {\n this.changeFocusedOptionIndex(event, index);\n }\n },\n onOverlayClick: function onOverlayClick(event) {\n OverlayEventBus.emit('overlay-click', {\n originalEvent: event,\n target: this.$el\n });\n },\n onOverlayKeyDown: function onOverlayKeyDown(event) {\n switch (event.code) {\n case 'Escape':\n this.onEscapeKey(event);\n break;\n }\n },\n onArrowDownKey: function onArrowDownKey(event) {\n if (!this.overlayVisible) {\n return;\n }\n var optionIndex = this.focusedOptionIndex !== -1 ? this.findNextOptionIndex(this.focusedOptionIndex) : this.clicked ? this.findFirstOptionIndex() : this.findFirstFocusedOptionIndex();\n this.changeFocusedOptionIndex(event, optionIndex);\n event.preventDefault();\n },\n onArrowUpKey: function onArrowUpKey(event) {\n if (!this.overlayVisible) {\n return;\n }\n if (event.altKey) {\n if (this.focusedOptionIndex !== -1) {\n this.onOptionSelect(event, this.visibleOptions[this.focusedOptionIndex]);\n }\n this.overlayVisible && this.hide();\n event.preventDefault();\n } else {\n var optionIndex = this.focusedOptionIndex !== -1 ? this.findPrevOptionIndex(this.focusedOptionIndex) : this.clicked ? this.findLastOptionIndex() : this.findLastFocusedOptionIndex();\n this.changeFocusedOptionIndex(event, optionIndex);\n event.preventDefault();\n }\n },\n onArrowLeftKey: function onArrowLeftKey(event) {\n var target = event.currentTarget;\n this.focusedOptionIndex = -1;\n if (this.multiple) {\n if (isEmpty(target.value) && this.hasSelectedOption) {\n focus(this.$refs.multiContainer);\n this.focusedMultipleOptionIndex = this.modelValue.length;\n } else {\n event.stopPropagation(); // To prevent onArrowLeftKeyOnMultiple method\n }\n }\n },\n onArrowRightKey: function onArrowRightKey(event) {\n this.focusedOptionIndex = -1;\n this.multiple && event.stopPropagation(); // To prevent onArrowRightKeyOnMultiple method\n },\n onHomeKey: function onHomeKey(event) {\n var currentTarget = event.currentTarget;\n var len = currentTarget.value.length;\n currentTarget.setSelectionRange(0, event.shiftKey ? len : 0);\n this.focusedOptionIndex = -1;\n event.preventDefault();\n },\n onEndKey: function onEndKey(event) {\n var currentTarget = event.currentTarget;\n var len = currentTarget.value.length;\n currentTarget.setSelectionRange(event.shiftKey ? 0 : len, len);\n this.focusedOptionIndex = -1;\n event.preventDefault();\n },\n onPageUpKey: function onPageUpKey(event) {\n this.scrollInView(0);\n event.preventDefault();\n },\n onPageDownKey: function onPageDownKey(event) {\n this.scrollInView(this.visibleOptions.length - 1);\n event.preventDefault();\n },\n onEnterKey: function onEnterKey(event) {\n if (!this.typeahead) {\n if (this.multiple) {\n this.updateModel(event, [].concat(_toConsumableArray(this.modelValue || []), [event.target.value]));\n this.$refs.focusInput.value = '';\n }\n } else {\n if (!this.overlayVisible) {\n this.focusedOptionIndex = -1; // reset\n this.onArrowDownKey(event);\n } else {\n if (this.focusedOptionIndex !== -1) {\n this.onOptionSelect(event, this.visibleOptions[this.focusedOptionIndex]);\n }\n this.hide();\n }\n }\n },\n onEscapeKey: function onEscapeKey(event) {\n this.overlayVisible && this.hide(true);\n event.preventDefault();\n },\n onTabKey: function onTabKey(event) {\n if (this.focusedOptionIndex !== -1) {\n this.onOptionSelect(event, this.visibleOptions[this.focusedOptionIndex]);\n }\n this.overlayVisible && this.hide();\n },\n onBackspaceKey: function onBackspaceKey(event) {\n if (this.multiple) {\n if (isNotEmpty(this.modelValue) && !this.$refs.focusInput.value) {\n var removedValue = this.modelValue[this.modelValue.length - 1];\n var newValue = this.modelValue.slice(0, -1);\n this.$emit('update:modelValue', newValue);\n this.$emit('item-unselect', {\n originalEvent: event,\n value: removedValue\n });\n this.$emit('option-unselect', {\n originalEvent: event,\n value: removedValue\n });\n }\n event.stopPropagation(); // To prevent onBackspaceKeyOnMultiple method\n }\n },\n onArrowLeftKeyOnMultiple: function onArrowLeftKeyOnMultiple() {\n this.focusedMultipleOptionIndex = this.focusedMultipleOptionIndex < 1 ? 0 : this.focusedMultipleOptionIndex - 1;\n },\n onArrowRightKeyOnMultiple: function onArrowRightKeyOnMultiple() {\n this.focusedMultipleOptionIndex++;\n if (this.focusedMultipleOptionIndex > this.modelValue.length - 1) {\n this.focusedMultipleOptionIndex = -1;\n focus(this.$refs.focusInput);\n }\n },\n onBackspaceKeyOnMultiple: function onBackspaceKeyOnMultiple(event) {\n if (this.focusedMultipleOptionIndex !== -1) {\n this.removeOption(event, this.focusedMultipleOptionIndex);\n }\n },\n onOverlayEnter: function onOverlayEnter(el) {\n ZIndex.set('overlay', el, this.$primevue.config.zIndex.overlay);\n addStyle(el, {\n position: 'absolute',\n top: '0',\n left: '0'\n });\n this.alignOverlay();\n },\n onOverlayAfterEnter: function onOverlayAfterEnter() {\n this.bindOutsideClickListener();\n this.bindScrollListener();\n this.bindResizeListener();\n this.$emit('show');\n },\n onOverlayLeave: function onOverlayLeave() {\n this.unbindOutsideClickListener();\n this.unbindScrollListener();\n this.unbindResizeListener();\n this.$emit('hide');\n this.overlay = null;\n },\n onOverlayAfterLeave: function onOverlayAfterLeave(el) {\n ZIndex.clear(el);\n },\n alignOverlay: function alignOverlay() {\n var target = this.multiple ? this.$refs.multiContainer : this.$refs.focusInput.$el;\n if (this.appendTo === 'self') {\n relativePosition(this.overlay, target);\n } else {\n this.overlay.style.minWidth = getOuterWidth(target) + 'px';\n absolutePosition(this.overlay, target);\n }\n },\n bindOutsideClickListener: function bindOutsideClickListener() {\n var _this5 = this;\n if (!this.outsideClickListener) {\n this.outsideClickListener = function (event) {\n if (_this5.overlayVisible && _this5.overlay && _this5.isOutsideClicked(event)) {\n _this5.hide();\n }\n };\n document.addEventListener('click', this.outsideClickListener);\n }\n },\n unbindOutsideClickListener: function unbindOutsideClickListener() {\n if (this.outsideClickListener) {\n document.removeEventListener('click', this.outsideClickListener);\n this.outsideClickListener = null;\n }\n },\n bindScrollListener: function bindScrollListener() {\n var _this6 = this;\n if (!this.scrollHandler) {\n this.scrollHandler = new ConnectedOverlayScrollHandler(this.$refs.container, function () {\n if (_this6.overlayVisible) {\n _this6.hide();\n }\n });\n }\n this.scrollHandler.bindScrollListener();\n },\n unbindScrollListener: function unbindScrollListener() {\n if (this.scrollHandler) {\n this.scrollHandler.unbindScrollListener();\n }\n },\n bindResizeListener: function bindResizeListener() {\n var _this7 = this;\n if (!this.resizeListener) {\n this.resizeListener = function () {\n if (_this7.overlayVisible && !isTouchDevice()) {\n _this7.hide();\n }\n };\n window.addEventListener('resize', this.resizeListener);\n }\n },\n unbindResizeListener: function unbindResizeListener() {\n if (this.resizeListener) {\n window.removeEventListener('resize', this.resizeListener);\n this.resizeListener = null;\n }\n },\n isOutsideClicked: function isOutsideClicked(event) {\n return !this.overlay.contains(event.target) && !this.isInputClicked(event) && !this.isDropdownClicked(event);\n },\n isInputClicked: function isInputClicked(event) {\n if (this.multiple) return event.target === this.$refs.multiContainer || this.$refs.multiContainer.contains(event.target);else return event.target === this.$refs.focusInput.$el;\n },\n isDropdownClicked: function isDropdownClicked(event) {\n return this.$refs.dropdownButton ? event.target === this.$refs.dropdownButton || this.$refs.dropdownButton.contains(event.target) : false;\n },\n isOptionMatched: function isOptionMatched(option, value) {\n var _this$getOptionLabel;\n return this.isValidOption(option) && ((_this$getOptionLabel = this.getOptionLabel(option)) === null || _this$getOptionLabel === void 0 ? void 0 : _this$getOptionLabel.toLocaleLowerCase(this.searchLocale)) === value.toLocaleLowerCase(this.searchLocale);\n },\n isValidOption: function isValidOption(option) {\n return isNotEmpty(option) && !(this.isOptionDisabled(option) || this.isOptionGroup(option));\n },\n isValidSelectedOption: function isValidSelectedOption(option) {\n return this.isValidOption(option) && this.isSelected(option);\n },\n isEquals: function isEquals(value1, value2) {\n return equals(value1, value2, this.equalityKey);\n },\n isSelected: function isSelected(option) {\n var _this8 = this;\n var optionValue = this.getOptionValue(option);\n return this.multiple ? (this.modelValue || []).some(function (value) {\n return _this8.isEquals(value, optionValue);\n }) : this.isEquals(this.modelValue, this.getOptionValue(option));\n },\n findFirstOptionIndex: function findFirstOptionIndex() {\n var _this9 = this;\n return this.visibleOptions.findIndex(function (option) {\n return _this9.isValidOption(option);\n });\n },\n findLastOptionIndex: function findLastOptionIndex() {\n var _this10 = this;\n return findLastIndex(this.visibleOptions, function (option) {\n return _this10.isValidOption(option);\n });\n },\n findNextOptionIndex: function findNextOptionIndex(index) {\n var _this11 = this;\n var matchedOptionIndex = index < this.visibleOptions.length - 1 ? this.visibleOptions.slice(index + 1).findIndex(function (option) {\n return _this11.isValidOption(option);\n }) : -1;\n return matchedOptionIndex > -1 ? matchedOptionIndex + index + 1 : index;\n },\n findPrevOptionIndex: function findPrevOptionIndex(index) {\n var _this12 = this;\n var matchedOptionIndex = index > 0 ? findLastIndex(this.visibleOptions.slice(0, index), function (option) {\n return _this12.isValidOption(option);\n }) : -1;\n return matchedOptionIndex > -1 ? matchedOptionIndex : index;\n },\n findSelectedOptionIndex: function findSelectedOptionIndex() {\n var _this13 = this;\n return this.hasSelectedOption ? this.visibleOptions.findIndex(function (option) {\n return _this13.isValidSelectedOption(option);\n }) : -1;\n },\n findFirstFocusedOptionIndex: function findFirstFocusedOptionIndex() {\n var selectedIndex = this.findSelectedOptionIndex();\n return selectedIndex < 0 ? this.findFirstOptionIndex() : selectedIndex;\n },\n findLastFocusedOptionIndex: function findLastFocusedOptionIndex() {\n var selectedIndex = this.findSelectedOptionIndex();\n return selectedIndex < 0 ? this.findLastOptionIndex() : selectedIndex;\n },\n search: function search(event, query, source) {\n //allow empty string but not undefined or null\n if (query === undefined || query === null) {\n return;\n }\n\n //do not search blank values on input change\n if (source === 'input' && query.trim().length === 0) {\n return;\n }\n this.searching = true;\n this.$emit('complete', {\n originalEvent: event,\n query: query\n });\n },\n removeOption: function removeOption(event, index) {\n var _this14 = this;\n var removedOption = this.modelValue[index];\n var value = this.modelValue.filter(function (_, i) {\n return i !== index;\n }).map(function (option) {\n return _this14.getOptionValue(option);\n });\n this.updateModel(event, value);\n this.$emit('item-unselect', {\n originalEvent: event,\n value: removedOption\n });\n this.$emit('option-unselect', {\n originalEvent: event,\n value: removedOption\n });\n this.dirty = true;\n focus(this.multiple ? this.$refs.focusInput : this.$refs.focusInput.$el);\n },\n changeFocusedOptionIndex: function changeFocusedOptionIndex(event, index) {\n if (this.focusedOptionIndex !== index) {\n this.focusedOptionIndex = index;\n this.scrollInView();\n if (this.selectOnFocus) {\n this.onOptionSelect(event, this.visibleOptions[index], false);\n }\n }\n },\n scrollInView: function scrollInView() {\n var _this15 = this;\n var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;\n this.$nextTick(function () {\n var id = index !== -1 ? \"\".concat(_this15.id, \"_\").concat(index) : _this15.focusedOptionId;\n var element = findSingle(_this15.list, \"li[id=\\\"\".concat(id, \"\\\"]\"));\n if (element) {\n element.scrollIntoView && element.scrollIntoView({\n block: 'nearest',\n inline: 'start'\n });\n } else if (!_this15.virtualScrollerDisabled) {\n _this15.virtualScroller && _this15.virtualScroller.scrollToIndex(index !== -1 ? index : _this15.focusedOptionIndex);\n }\n });\n },\n autoUpdateModel: function autoUpdateModel() {\n if (this.selectOnFocus && this.autoOptionFocus && !this.hasSelectedOption) {\n this.focusedOptionIndex = this.findFirstFocusedOptionIndex();\n this.onOptionSelect(null, this.visibleOptions[this.focusedOptionIndex], false);\n }\n },\n updateModel: function updateModel(event, value) {\n this.$emit('update:modelValue', value);\n this.$emit('change', {\n originalEvent: event,\n value: value\n });\n },\n flatOptions: function flatOptions(options) {\n var _this16 = this;\n return (options || []).reduce(function (result, option, index) {\n result.push({\n optionGroup: option,\n group: true,\n index: index\n });\n var optionGroupChildren = _this16.getOptionGroupChildren(option);\n optionGroupChildren && optionGroupChildren.forEach(function (o) {\n return result.push(o);\n });\n return result;\n }, []);\n },\n overlayRef: function overlayRef(el) {\n this.overlay = el;\n },\n listRef: function listRef(el, contentRef) {\n this.list = el;\n contentRef && contentRef(el); // For VirtualScroller\n },\n virtualScrollerRef: function virtualScrollerRef(el) {\n this.virtualScroller = el;\n }\n },\n computed: {\n visibleOptions: function visibleOptions() {\n return this.optionGroupLabel ? this.flatOptions(this.suggestions) : this.suggestions || [];\n },\n inputValue: function inputValue() {\n if (isNotEmpty(this.modelValue)) {\n if (_typeof$1(this.modelValue) === 'object') {\n var label = this.getOptionLabel(this.modelValue);\n return label != null ? label : this.modelValue;\n } else {\n return this.modelValue;\n }\n } else {\n return '';\n }\n },\n hasSelectedOption: function hasSelectedOption() {\n return isNotEmpty(this.modelValue);\n },\n equalityKey: function equalityKey() {\n return this.dataKey; // TODO: The 'optionValue' properties can be added.\n },\n searchResultMessageText: function searchResultMessageText() {\n return isNotEmpty(this.visibleOptions) && this.overlayVisible ? this.searchMessageText.replaceAll('{0}', this.visibleOptions.length) : this.emptySearchMessageText;\n },\n searchMessageText: function searchMessageText() {\n return this.searchMessage || this.$primevue.config.locale.searchMessage || '';\n },\n emptySearchMessageText: function emptySearchMessageText() {\n return this.emptySearchMessage || this.$primevue.config.locale.emptySearchMessage || '';\n },\n selectionMessageText: function selectionMessageText() {\n return this.selectionMessage || this.$primevue.config.locale.selectionMessage || '';\n },\n emptySelectionMessageText: function emptySelectionMessageText() {\n return this.emptySelectionMessage || this.$primevue.config.locale.emptySelectionMessage || '';\n },\n selectedMessageText: function selectedMessageText() {\n return this.hasSelectedOption ? this.selectionMessageText.replaceAll('{0}', this.multiple ? this.modelValue.length : '1') : this.emptySelectionMessageText;\n },\n listAriaLabel: function listAriaLabel() {\n return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.listLabel : undefined;\n },\n focusedOptionId: function focusedOptionId() {\n return this.focusedOptionIndex !== -1 ? \"\".concat(this.id, \"_\").concat(this.focusedOptionIndex) : null;\n },\n focusedMultipleOptionId: function focusedMultipleOptionId() {\n return this.focusedMultipleOptionIndex !== -1 ? \"\".concat(this.id, \"_multiple_option_\").concat(this.focusedMultipleOptionIndex) : null;\n },\n ariaSetSize: function ariaSetSize() {\n var _this17 = this;\n return this.visibleOptions.filter(function (option) {\n return !_this17.isOptionGroup(option);\n }).length;\n },\n virtualScrollerDisabled: function virtualScrollerDisabled() {\n return !this.virtualScrollerOptions;\n },\n panelId: function panelId() {\n return this.id + '_panel';\n },\n hasFluid: function hasFluid() {\n return isEmpty(this.fluid) ? !!this.$pcFluid : this.fluid;\n }\n },\n components: {\n InputText: InputText,\n VirtualScroller: VirtualScroller,\n Portal: Portal,\n ChevronDownIcon: ChevronDownIcon,\n SpinnerIcon: SpinnerIcon,\n Chip: Chip\n },\n directives: {\n ripple: Ripple\n }\n};\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nvar _hoisted_1 = [\"aria-activedescendant\"];\nvar _hoisted_2 = [\"id\", \"aria-label\", \"aria-setsize\", \"aria-posinset\"];\nvar _hoisted_3 = [\"id\", \"placeholder\", \"tabindex\", \"disabled\", \"aria-label\", \"aria-labelledby\", \"aria-expanded\", \"aria-controls\", \"aria-activedescendant\", \"aria-invalid\"];\nvar _hoisted_4 = [\"disabled\", \"aria-expanded\", \"aria-controls\"];\nvar _hoisted_5 = [\"id\"];\nvar _hoisted_6 = [\"id\", \"aria-label\"];\nvar _hoisted_7 = [\"id\"];\nvar _hoisted_8 = [\"id\", \"aria-label\", \"aria-selected\", \"aria-disabled\", \"aria-setsize\", \"aria-posinset\", \"onClick\", \"onMousemove\", \"data-p-selected\", \"data-p-focus\", \"data-p-disabled\"];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n var _component_InputText = resolveComponent(\"InputText\");\n var _component_Chip = resolveComponent(\"Chip\");\n var _component_SpinnerIcon = resolveComponent(\"SpinnerIcon\");\n var _component_VirtualScroller = resolveComponent(\"VirtualScroller\");\n var _component_Portal = resolveComponent(\"Portal\");\n var _directive_ripple = resolveDirective(\"ripple\");\n return openBlock(), createElementBlock(\"div\", mergeProps({\n ref: \"container\",\n \"class\": _ctx.cx('root'),\n style: _ctx.sx('root'),\n onClick: _cache[11] || (_cache[11] = function () {\n return $options.onContainerClick && $options.onContainerClick.apply($options, arguments);\n })\n }, _ctx.ptmi('root')), [!_ctx.multiple ? (openBlock(), createBlock(_component_InputText, {\n key: 0,\n ref: \"focusInput\",\n id: _ctx.inputId,\n type: \"text\",\n \"class\": normalizeClass([_ctx.cx('pcInput'), _ctx.inputClass]),\n style: normalizeStyle(_ctx.inputStyle),\n value: $options.inputValue,\n placeholder: _ctx.placeholder,\n tabindex: !_ctx.disabled ? _ctx.tabindex : -1,\n fluid: $options.hasFluid,\n disabled: _ctx.disabled,\n invalid: _ctx.invalid,\n variant: _ctx.variant,\n autocomplete: \"off\",\n role: \"combobox\",\n \"aria-label\": _ctx.ariaLabel,\n \"aria-labelledby\": _ctx.ariaLabelledby,\n \"aria-haspopup\": \"listbox\",\n \"aria-autocomplete\": \"list\",\n \"aria-expanded\": $data.overlayVisible,\n \"aria-controls\": $options.panelId,\n \"aria-activedescendant\": $data.focused ? $options.focusedOptionId : undefined,\n onFocus: $options.onFocus,\n onBlur: $options.onBlur,\n onKeydown: $options.onKeyDown,\n onInput: $options.onInput,\n onChange: $options.onChange,\n unstyled: _ctx.unstyled,\n pt: _ctx.ptm('pcInput')\n }, null, 8, [\"id\", \"class\", \"style\", \"value\", \"placeholder\", \"tabindex\", \"fluid\", \"disabled\", \"invalid\", \"variant\", \"aria-label\", \"aria-labelledby\", \"aria-expanded\", \"aria-controls\", \"aria-activedescendant\", \"onFocus\", \"onBlur\", \"onKeydown\", \"onInput\", \"onChange\", \"unstyled\", \"pt\"])) : createCommentVNode(\"\", true), _ctx.multiple ? (openBlock(), createElementBlock(\"ul\", mergeProps({\n key: 1,\n ref: \"multiContainer\",\n \"class\": _ctx.cx('inputMultiple'),\n tabindex: \"-1\",\n role: \"listbox\",\n \"aria-orientation\": \"horizontal\",\n \"aria-activedescendant\": $data.focused ? $options.focusedMultipleOptionId : undefined,\n onFocus: _cache[5] || (_cache[5] = function () {\n return $options.onMultipleContainerFocus && $options.onMultipleContainerFocus.apply($options, arguments);\n }),\n onBlur: _cache[6] || (_cache[6] = function () {\n return $options.onMultipleContainerBlur && $options.onMultipleContainerBlur.apply($options, arguments);\n }),\n onKeydown: _cache[7] || (_cache[7] = function () {\n return $options.onMultipleContainerKeyDown && $options.onMultipleContainerKeyDown.apply($options, arguments);\n })\n }, _ctx.ptm('inputMultiple')), [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.modelValue, function (option, i) {\n return openBlock(), createElementBlock(\"li\", mergeProps({\n key: \"\".concat(i, \"_\").concat($options.getOptionLabel(option)),\n id: $data.id + '_multiple_option_' + i,\n \"class\": _ctx.cx('chipItem', {\n i: i\n }),\n role: \"option\",\n \"aria-label\": $options.getOptionLabel(option),\n \"aria-selected\": true,\n \"aria-setsize\": _ctx.modelValue.length,\n \"aria-posinset\": i + 1,\n ref_for: true\n }, _ctx.ptm('chipItem')), [renderSlot(_ctx.$slots, \"chip\", mergeProps({\n \"class\": _ctx.cx('pcChip'),\n value: option,\n index: i,\n removeCallback: function removeCallback(event) {\n return $options.removeOption(event, i);\n },\n ref_for: true\n }, _ctx.ptm('pcChip')), function () {\n return [createVNode(_component_Chip, {\n \"class\": normalizeClass(_ctx.cx('pcChip')),\n label: $options.getOptionLabel(option),\n removeIcon: _ctx.chipIcon || _ctx.removeTokenIcon,\n removable: \"\",\n unstyled: _ctx.unstyled,\n onRemove: function onRemove($event) {\n return $options.removeOption($event, i);\n },\n pt: _ctx.ptm('pcChip')\n }, {\n removeicon: withCtx(function () {\n return [renderSlot(_ctx.$slots, _ctx.$slots.chipicon ? 'chipicon' : 'removetokenicon', {\n \"class\": normalizeClass(_ctx.cx('chipIcon')),\n index: i,\n removeCallback: function removeCallback(event) {\n return $options.removeOption(event, i);\n }\n })];\n }),\n _: 2\n }, 1032, [\"class\", \"label\", \"removeIcon\", \"unstyled\", \"onRemove\", \"pt\"])];\n })], 16, _hoisted_2);\n }), 128)), createElementVNode(\"li\", mergeProps({\n \"class\": _ctx.cx('inputChip'),\n role: \"option\"\n }, _ctx.ptm('inputChip')), [createElementVNode(\"input\", mergeProps({\n ref: \"focusInput\",\n id: _ctx.inputId,\n type: \"text\",\n style: _ctx.inputStyle,\n \"class\": _ctx.inputClass,\n placeholder: _ctx.placeholder,\n tabindex: !_ctx.disabled ? _ctx.tabindex : -1,\n disabled: _ctx.disabled,\n autocomplete: \"off\",\n role: \"combobox\",\n \"aria-label\": _ctx.ariaLabel,\n \"aria-labelledby\": _ctx.ariaLabelledby,\n \"aria-haspopup\": \"listbox\",\n \"aria-autocomplete\": \"list\",\n \"aria-expanded\": $data.overlayVisible,\n \"aria-controls\": $data.id + '_list',\n \"aria-activedescendant\": $data.focused ? $options.focusedOptionId : undefined,\n \"aria-invalid\": _ctx.invalid || undefined,\n onFocus: _cache[0] || (_cache[0] = function () {\n return $options.onFocus && $options.onFocus.apply($options, arguments);\n }),\n onBlur: _cache[1] || (_cache[1] = function () {\n return $options.onBlur && $options.onBlur.apply($options, arguments);\n }),\n onKeydown: _cache[2] || (_cache[2] = function () {\n return $options.onKeyDown && $options.onKeyDown.apply($options, arguments);\n }),\n onInput: _cache[3] || (_cache[3] = function () {\n return $options.onInput && $options.onInput.apply($options, arguments);\n }),\n onChange: _cache[4] || (_cache[4] = function () {\n return $options.onChange && $options.onChange.apply($options, arguments);\n })\n }, _ctx.ptm('input')), null, 16, _hoisted_3)], 16)], 16, _hoisted_1)) : createCommentVNode(\"\", true), $data.searching || _ctx.loading ? renderSlot(_ctx.$slots, _ctx.$slots.loader ? 'loader' : 'loadingicon', {\n key: 2,\n \"class\": normalizeClass(_ctx.cx('loader'))\n }, function () {\n return [_ctx.loader || _ctx.loadingIcon ? (openBlock(), createElementBlock(\"i\", mergeProps({\n key: 0,\n \"class\": ['pi-spin', _ctx.cx('loader'), _ctx.loader, _ctx.loadingIcon],\n \"aria-hidden\": \"true\"\n }, _ctx.ptm('loader')), null, 16)) : (openBlock(), createBlock(_component_SpinnerIcon, mergeProps({\n key: 1,\n \"class\": _ctx.cx('loader'),\n spin: \"\",\n \"aria-hidden\": \"true\"\n }, _ctx.ptm('loader')), null, 16, [\"class\"]))];\n }) : createCommentVNode(\"\", true), renderSlot(_ctx.$slots, _ctx.$slots.dropdown ? 'dropdown' : 'dropdownbutton', {\n toggleCallback: function toggleCallback(event) {\n return $options.onDropdownClick(event);\n }\n }, function () {\n return [_ctx.dropdown ? (openBlock(), createElementBlock(\"button\", mergeProps({\n key: 0,\n ref: \"dropdownButton\",\n type: \"button\",\n \"class\": [_ctx.cx('dropdown'), _ctx.dropdownClass],\n disabled: _ctx.disabled,\n \"aria-haspopup\": \"listbox\",\n \"aria-expanded\": $data.overlayVisible,\n \"aria-controls\": $options.panelId,\n onClick: _cache[8] || (_cache[8] = function () {\n return $options.onDropdownClick && $options.onDropdownClick.apply($options, arguments);\n })\n }, _ctx.ptm('dropdown')), [renderSlot(_ctx.$slots, \"dropdownicon\", {\n \"class\": normalizeClass(_ctx.dropdownIcon)\n }, function () {\n return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.dropdownIcon ? 'span' : 'ChevronDownIcon'), mergeProps({\n \"class\": _ctx.dropdownIcon\n }, _ctx.ptm('dropdownIcon')), null, 16, [\"class\"]))];\n })], 16, _hoisted_4)) : createCommentVNode(\"\", true)];\n }), createElementVNode(\"span\", mergeProps({\n role: \"status\",\n \"aria-live\": \"polite\",\n \"class\": \"p-hidden-accessible\"\n }, _ctx.ptm('hiddenSearchResult'), {\n \"data-p-hidden-accessible\": true\n }), toDisplayString($options.searchResultMessageText), 17), createVNode(_component_Portal, {\n appendTo: _ctx.appendTo\n }, {\n \"default\": withCtx(function () {\n return [createVNode(Transition, mergeProps({\n name: \"p-connected-overlay\",\n onEnter: $options.onOverlayEnter,\n onAfterEnter: $options.onOverlayAfterEnter,\n onLeave: $options.onOverlayLeave,\n onAfterLeave: $options.onOverlayAfterLeave\n }, _ctx.ptm('transition')), {\n \"default\": withCtx(function () {\n return [$data.overlayVisible ? (openBlock(), createElementBlock(\"div\", mergeProps({\n key: 0,\n ref: $options.overlayRef,\n id: $options.panelId,\n \"class\": [_ctx.cx('overlay'), _ctx.panelClass, _ctx.overlayClass],\n style: _objectSpread(_objectSpread(_objectSpread({}, _ctx.panelStyle), _ctx.overlayStyle), {}, {\n 'max-height': $options.virtualScrollerDisabled ? _ctx.scrollHeight : ''\n }),\n onClick: _cache[9] || (_cache[9] = function () {\n return $options.onOverlayClick && $options.onOverlayClick.apply($options, arguments);\n }),\n onKeydown: _cache[10] || (_cache[10] = function () {\n return $options.onOverlayKeyDown && $options.onOverlayKeyDown.apply($options, arguments);\n })\n }, _ctx.ptm('overlay')), [renderSlot(_ctx.$slots, \"header\", {\n value: _ctx.modelValue,\n suggestions: $options.visibleOptions\n }), createVNode(_component_VirtualScroller, mergeProps({\n ref: $options.virtualScrollerRef\n }, _ctx.virtualScrollerOptions, {\n style: {\n height: _ctx.scrollHeight\n },\n items: $options.visibleOptions,\n tabindex: -1,\n disabled: $options.virtualScrollerDisabled,\n pt: _ctx.ptm('virtualScroller')\n }), createSlots({\n content: withCtx(function (_ref) {\n var styleClass = _ref.styleClass,\n contentRef = _ref.contentRef,\n items = _ref.items,\n getItemOptions = _ref.getItemOptions,\n contentStyle = _ref.contentStyle,\n itemSize = _ref.itemSize;\n return [createElementVNode(\"ul\", mergeProps({\n ref: function ref(el) {\n return $options.listRef(el, contentRef);\n },\n id: $data.id + '_list',\n \"class\": [_ctx.cx('list'), styleClass],\n style: contentStyle,\n role: \"listbox\",\n \"aria-label\": $options.listAriaLabel\n }, _ctx.ptm('list')), [(openBlock(true), createElementBlock(Fragment, null, renderList(items, function (option, i) {\n return openBlock(), createElementBlock(Fragment, {\n key: $options.getOptionRenderKey(option, $options.getOptionIndex(i, getItemOptions))\n }, [$options.isOptionGroup(option) ? (openBlock(), createElementBlock(\"li\", mergeProps({\n key: 0,\n id: $data.id + '_' + $options.getOptionIndex(i, getItemOptions),\n style: {\n height: itemSize ? itemSize + 'px' : undefined\n },\n \"class\": _ctx.cx('optionGroup'),\n role: \"option\",\n ref_for: true\n }, _ctx.ptm('optionGroup')), [renderSlot(_ctx.$slots, \"optiongroup\", {\n option: option.optionGroup,\n index: $options.getOptionIndex(i, getItemOptions)\n }, function () {\n return [createTextVNode(toDisplayString($options.getOptionGroupLabel(option.optionGroup)), 1)];\n })], 16, _hoisted_7)) : withDirectives((openBlock(), createElementBlock(\"li\", mergeProps({\n key: 1,\n id: $data.id + '_' + $options.getOptionIndex(i, getItemOptions),\n style: {\n height: itemSize ? itemSize + 'px' : undefined\n },\n \"class\": _ctx.cx('option', {\n option: option,\n i: i,\n getItemOptions: getItemOptions\n }),\n role: \"option\",\n \"aria-label\": $options.getOptionLabel(option),\n \"aria-selected\": $options.isSelected(option),\n \"aria-disabled\": $options.isOptionDisabled(option),\n \"aria-setsize\": $options.ariaSetSize,\n \"aria-posinset\": $options.getAriaPosInset($options.getOptionIndex(i, getItemOptions)),\n onClick: function onClick($event) {\n return $options.onOptionSelect($event, option);\n },\n onMousemove: function onMousemove($event) {\n return $options.onOptionMouseMove($event, $options.getOptionIndex(i, getItemOptions));\n },\n \"data-p-selected\": $options.isSelected(option),\n \"data-p-focus\": $data.focusedOptionIndex === $options.getOptionIndex(i, getItemOptions),\n \"data-p-disabled\": $options.isOptionDisabled(option),\n ref_for: true\n }, $options.getPTOptions(option, getItemOptions, i, 'option')), [renderSlot(_ctx.$slots, \"option\", {\n option: option,\n index: $options.getOptionIndex(i, getItemOptions)\n }, function () {\n return [createTextVNode(toDisplayString($options.getOptionLabel(option)), 1)];\n })], 16, _hoisted_8)), [[_directive_ripple]])], 64);\n }), 128)), !items || items && items.length === 0 ? (openBlock(), createElementBlock(\"li\", mergeProps({\n key: 0,\n \"class\": _ctx.cx('emptyMessage'),\n role: \"option\"\n }, _ctx.ptm('emptyMessage')), [renderSlot(_ctx.$slots, \"empty\", {}, function () {\n return [createTextVNode(toDisplayString($options.searchResultMessageText), 1)];\n })], 16)) : createCommentVNode(\"\", true)], 16, _hoisted_6)];\n }),\n _: 2\n }, [_ctx.$slots.loader ? {\n name: \"loader\",\n fn: withCtx(function (_ref2) {\n var options = _ref2.options;\n return [renderSlot(_ctx.$slots, \"loader\", {\n options: options\n })];\n }),\n key: \"0\"\n } : undefined]), 1040, [\"style\", \"items\", \"disabled\", \"pt\"]), renderSlot(_ctx.$slots, \"footer\", {\n value: _ctx.modelValue,\n suggestions: $options.visibleOptions\n }), createElementVNode(\"span\", mergeProps({\n role: \"status\",\n \"aria-live\": \"polite\",\n \"class\": \"p-hidden-accessible\"\n }, _ctx.ptm('hiddenSelectedMessage'), {\n \"data-p-hidden-accessible\": true\n }), toDisplayString($options.selectedMessageText), 17)], 16, _hoisted_5)) : createCommentVNode(\"\", true)];\n }),\n _: 3\n }, 16, [\"onEnter\", \"onAfterEnter\", \"onLeave\", \"onAfterLeave\"])];\n }),\n _: 3\n }, 8, [\"appendTo\"])], 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","\n\n","\n\n\n\n\n","\n\n\n\n\n","import type {\n ConnectingLink,\n LGraphNode,\n Vector2,\n INodeInputSlot,\n INodeOutputSlot,\n INodeSlot,\n ISlotType\n} from '@comfyorg/litegraph'\nimport { LiteGraph } from '@comfyorg/litegraph'\nimport { RerouteId } from '@comfyorg/litegraph/dist/Reroute'\n\nexport class ConnectingLinkImpl implements ConnectingLink {\n constructor(\n public node: LGraphNode,\n public slot: number,\n public input: INodeInputSlot | undefined,\n public output: INodeOutputSlot | undefined,\n public pos: Vector2,\n public afterRerouteId?: RerouteId\n ) {}\n\n static createFromPlainObject(obj: ConnectingLink) {\n return new ConnectingLinkImpl(\n obj.node,\n obj.slot,\n obj.input,\n obj.output,\n obj.pos,\n obj.afterRerouteId\n )\n }\n\n get type(): ISlotType | null {\n const result = this.input ? this.input.type : this.output?.type ?? null\n return result === -1 ? null : result\n }\n\n /**\n * Which slot type is release and need to be reconnected.\n * - 'output' means we need a new node's outputs slot to connect with this link\n */\n get releaseSlotType(): 'input' | 'output' {\n return this.output ? 'input' : 'output'\n }\n\n connectTo(newNode: LGraphNode) {\n const newNodeSlots =\n this.releaseSlotType === 'output' ? newNode.outputs : newNode.inputs\n if (!newNodeSlots) return\n\n const newNodeSlot = newNodeSlots.findIndex((slot: INodeSlot) =>\n LiteGraph.isValidConnection(slot.type, this.type)\n )\n\n if (newNodeSlot === -1) {\n console.warn(\n `Could not find slot with type ${this.type} on node ${newNode.title}. This should never happen`\n )\n return\n }\n\n if (this.releaseSlotType === 'input') {\n this.node.connect(this.slot, newNode, newNodeSlot, this.afterRerouteId)\n } else {\n newNode.connect(newNodeSlot, this.node, this.slot, this.afterRerouteId)\n }\n }\n}\n\nexport type CanvasDragAndDropData = {\n type: 'add-node'\n data: T\n}\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n","import BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n _ref.dt;\n return \"\\n.p-buttongroup .p-button {\\n margin: 0;\\n}\\n\\n.p-buttongroup .p-button:not(:last-child),\\n.p-buttongroup .p-button:not(:last-child):hover {\\n border-right: 0 none;\\n}\\n\\n.p-buttongroup .p-button:not(:first-of-type):not(:last-of-type) {\\n border-radius: 0;\\n}\\n\\n.p-buttongroup .p-button:first-of-type:not(:only-of-type) {\\n border-top-right-radius: 0;\\n border-bottom-right-radius: 0;\\n}\\n\\n.p-buttongroup .p-button:last-of-type:not(:only-of-type) {\\n border-top-left-radius: 0;\\n border-bottom-left-radius: 0;\\n}\\n\\n.p-buttongroup .p-button:focus {\\n position: relative;\\n z-index: 1;\\n}\\n\";\n};\nvar classes = {\n root: 'p-buttongroup p-component'\n};\nvar ButtonGroupStyle = BaseStyle.extend({\n name: 'buttongroup',\n theme: theme,\n classes: classes\n});\n\nexport { ButtonGroupStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseComponent from '@primevue/core/basecomponent';\nimport ButtonGroupStyle from 'primevue/buttongroup/style';\nimport { openBlock, createElementBlock, mergeProps, renderSlot } from 'vue';\n\nvar script$1 = {\n name: 'BaseButtonGroup',\n \"extends\": BaseComponent,\n style: ButtonGroupStyle,\n provide: function provide() {\n return {\n $pcButtonGroup: this,\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'ButtonGroup',\n \"extends\": script$1,\n inheritAttrs: false\n};\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps({\n \"class\": _ctx.cx('root'),\n role: \"group\"\n }, _ctx.ptmi('root')), [renderSlot(_ctx.$slots, \"default\")], 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","\n\n\n\n\n","\n\n\n","\n\n\n\n\n","import BaseStyle from '@primevue/core/base/style';\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-toast {\\n width: \".concat(dt('toast.width'), \";\\n white-space: pre-line;\\n word-break: break-word;\\n}\\n\\n.p-toast-message {\\n margin: 0 0 1rem 0;\\n}\\n\\n.p-toast-message-icon {\\n flex-shrink: 0;\\n font-size: \").concat(dt('toast.icon.size'), \";\\n width: \").concat(dt('toast.icon.size'), \";\\n height: \").concat(dt('toast.icon.size'), \";\\n}\\n\\n.p-toast-message-content {\\n display: flex;\\n align-items: flex-start;\\n padding: \").concat(dt('toast.content.padding'), \";\\n gap: \").concat(dt('toast.content.gap'), \";\\n}\\n\\n.p-toast-message-text {\\n flex: 1 1 auto;\\n display: flex;\\n flex-direction: column;\\n gap: \").concat(dt('toast.text.gap'), \";\\n}\\n\\n.p-toast-summary {\\n font-weight: \").concat(dt('toast.summary.font.weight'), \";\\n font-size: \").concat(dt('toast.summary.font.size'), \";\\n}\\n\\n.p-toast-detail {\\n font-weight: \").concat(dt('toast.detail.font.weight'), \";\\n font-size: \").concat(dt('toast.detail.font.size'), \";\\n}\\n\\n.p-toast-close-button {\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n overflow: hidden;\\n position: relative;\\n cursor: pointer;\\n background: transparent;\\n transition: background \").concat(dt('toast.transition.duration'), \", color \").concat(dt('toast.transition.duration'), \", outline-color \").concat(dt('toast.transition.duration'), \", box-shadow \").concat(dt('toast.transition.duration'), \";\\n outline-color: transparent;\\n color: inherit;\\n width: \").concat(dt('toast.close.button.width'), \";\\n height: \").concat(dt('toast.close.button.height'), \";\\n border-radius: \").concat(dt('toast.close.button.border.radius'), \";\\n margin: -25% 0 0 0;\\n right: -25%;\\n padding: 0;\\n border: none;\\n user-select: none;\\n}\\n\\n.p-toast-message-info,\\n.p-toast-message-success,\\n.p-toast-message-warn,\\n.p-toast-message-error,\\n.p-toast-message-secondary,\\n.p-toast-message-contrast {\\n border-width: \").concat(dt('toast.border.width'), \";\\n border-style: solid;\\n backdrop-filter: blur(\").concat(dt('toast.blur'), \");\\n border-radius: \").concat(dt('toast.border.radius'), \";\\n}\\n\\n.p-toast-close-icon {\\n font-size: \").concat(dt('toast.close.icon.size'), \";\\n width: \").concat(dt('toast.close.icon.size'), \";\\n height: \").concat(dt('toast.close.icon.size'), \";\\n}\\n\\n.p-toast-close-button:focus-visible {\\n outline-width: \").concat(dt('focus.ring.width'), \";\\n outline-style: \").concat(dt('focus.ring.style'), \";\\n outline-offset: \").concat(dt('focus.ring.offset'), \";\\n}\\n\\n.p-toast-message-info {\\n background: \").concat(dt('toast.info.background'), \";\\n border-color: \").concat(dt('toast.info.border.color'), \";\\n color: \").concat(dt('toast.info.color'), \";\\n box-shadow: \").concat(dt('toast.info.shadow'), \";\\n}\\n\\n.p-toast-message-info .p-toast-detail {\\n color: \").concat(dt('toast.info.detail.color'), \";\\n}\\n\\n.p-toast-message-info .p-toast-close-button:focus-visible {\\n outline-color: \").concat(dt('toast.info.close.button.focus.ring.color'), \";\\n box-shadow: \").concat(dt('toast.info.close.button.focus.ring.shadow'), \";\\n}\\n\\n.p-toast-message-info .p-toast-close-button:hover {\\n background: \").concat(dt('toast.info.close.button.hover.background'), \";\\n}\\n\\n.p-toast-message-success {\\n background: \").concat(dt('toast.success.background'), \";\\n border-color: \").concat(dt('toast.success.border.color'), \";\\n color: \").concat(dt('toast.success.color'), \";\\n box-shadow: \").concat(dt('toast.success.shadow'), \";\\n}\\n\\n.p-toast-message-success .p-toast-detail {\\n color: \").concat(dt('toast.success.detail.color'), \";\\n}\\n\\n.p-toast-message-success .p-toast-close-button:focus-visible {\\n outline-color: \").concat(dt('toast.success.close.button.focus.ring.color'), \";\\n box-shadow: \").concat(dt('toast.success.close.button.focus.ring.shadow'), \";\\n}\\n\\n.p-toast-message-success .p-toast-close-button:hover {\\n background: \").concat(dt('toast.success.close.button.hover.background'), \";\\n}\\n\\n.p-toast-message-warn {\\n background: \").concat(dt('toast.warn.background'), \";\\n border-color: \").concat(dt('toast.warn.border.color'), \";\\n color: \").concat(dt('toast.warn.color'), \";\\n box-shadow: \").concat(dt('toast.warn.shadow'), \";\\n}\\n\\n.p-toast-message-warn .p-toast-detail {\\n color: \").concat(dt('toast.warn.detail.color'), \";\\n}\\n\\n.p-toast-message-warn .p-toast-close-button:focus-visible {\\n outline-color: \").concat(dt('toast.warn.close.button.focus.ring.color'), \";\\n box-shadow: \").concat(dt('toast.warn.close.button.focus.ring.shadow'), \";\\n}\\n\\n.p-toast-message-warn .p-toast-close-button:hover {\\n background: \").concat(dt('toast.warn.close.button.hover.background'), \";\\n}\\n\\n.p-toast-message-error {\\n background: \").concat(dt('toast.error.background'), \";\\n border-color: \").concat(dt('toast.error.border.color'), \";\\n color: \").concat(dt('toast.error.color'), \";\\n box-shadow: \").concat(dt('toast.error.shadow'), \";\\n}\\n\\n.p-toast-message-error .p-toast-detail {\\n color: \").concat(dt('toast.error.detail.color'), \";\\n}\\n\\n.p-toast-message-error .p-toast-close-button:focus-visible {\\n outline-color: \").concat(dt('toast.error.close.button.focus.ring.color'), \";\\n box-shadow: \").concat(dt('toast.error.close.button.focus.ring.shadow'), \";\\n}\\n\\n.p-toast-message-error .p-toast-close-button:hover {\\n background: \").concat(dt('toast.error.close.button.hover.background'), \";\\n}\\n\\n.p-toast-message-secondary {\\n background: \").concat(dt('toast.secondary.background'), \";\\n border-color: \").concat(dt('toast.secondary.border.color'), \";\\n color: \").concat(dt('toast.secondary.color'), \";\\n box-shadow: \").concat(dt('toast.secondary.shadow'), \";\\n}\\n\\n.p-toast-message-secondary .p-toast-detail {\\n color: \").concat(dt('toast.secondary.detail.color'), \";\\n}\\n\\n.p-toast-message-secondary .p-toast-close-button:focus-visible {\\n outline-color: \").concat(dt('toast.secondary.close.button.focus.ring.color'), \";\\n box-shadow: \").concat(dt('toast.secondary.close.button.focus.ring.shadow'), \";\\n}\\n\\n.p-toast-message-secondary .p-toast-close-button:hover {\\n background: \").concat(dt('toast.secondary.close.button.hover.background'), \";\\n}\\n\\n.p-toast-message-contrast {\\n background: \").concat(dt('toast.contrast.background'), \";\\n border-color: \").concat(dt('toast.contrast.border.color'), \";\\n color: \").concat(dt('toast.contrast.color'), \";\\n box-shadow: \").concat(dt('toast.contrast.shadow'), \";\\n}\\n\\n.p-toast-message-contrast .p-toast-detail {\\n color: \").concat(dt('toast.contrast.detail.color'), \";\\n}\\n\\n.p-toast-message-contrast .p-toast-close-button:focus-visible {\\n outline-color: \").concat(dt('toast.contrast.close.button.focus.ring.color'), \";\\n box-shadow: \").concat(dt('toast.contrast.close.button.focus.ring.shadow'), \";\\n}\\n\\n.p-toast-message-contrast .p-toast-close-button:hover {\\n background: \").concat(dt('toast.contrast.close.button.hover.background'), \";\\n}\\n\\n.p-toast-top-center {\\n transform: translateX(-50%);\\n}\\n\\n.p-toast-bottom-center {\\n transform: translateX(-50%);\\n}\\n\\n.p-toast-center {\\n min-width: 20vw;\\n transform: translate(-50%, -50%);\\n}\\n\\n.p-toast-message-enter-from {\\n opacity: 0;\\n transform: translateY(50%);\\n}\\n\\n.p-toast-message-leave-from {\\n max-height: 1000px;\\n}\\n\\n.p-toast .p-toast-message.p-toast-message-leave-to {\\n max-height: 0;\\n opacity: 0;\\n margin-bottom: 0;\\n overflow: hidden;\\n}\\n\\n.p-toast-message-enter-active {\\n transition: transform 0.3s, opacity 0.3s;\\n}\\n\\n.p-toast-message-leave-active {\\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\\n}\\n\");\n};\n\n// Position\nvar inlineStyles = {\n root: function root(_ref2) {\n var position = _ref2.position;\n return {\n position: 'fixed',\n top: position === 'top-right' || position === 'top-left' || position === 'top-center' ? '20px' : position === 'center' ? '50%' : null,\n right: (position === 'top-right' || position === 'bottom-right') && '20px',\n bottom: (position === 'bottom-left' || position === 'bottom-right' || position === 'bottom-center') && '20px',\n left: position === 'top-left' || position === 'bottom-left' ? '20px' : position === 'center' || position === 'top-center' || position === 'bottom-center' ? '50%' : null\n };\n }\n};\nvar classes = {\n root: function root(_ref3) {\n var props = _ref3.props;\n return ['p-toast p-component p-toast-' + props.position];\n },\n message: function message(_ref4) {\n var props = _ref4.props;\n return ['p-toast-message', {\n 'p-toast-message-info': props.message.severity === 'info' || props.message.severity === undefined,\n 'p-toast-message-warn': props.message.severity === 'warn',\n 'p-toast-message-error': props.message.severity === 'error',\n 'p-toast-message-success': props.message.severity === 'success',\n 'p-toast-message-secondary': props.message.severity === 'secondary',\n 'p-toast-message-contrast': props.message.severity === 'contrast'\n }];\n },\n messageContent: 'p-toast-message-content',\n messageIcon: function messageIcon(_ref5) {\n var props = _ref5.props;\n return ['p-toast-message-icon', _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, props.infoIcon, props.message.severity === 'info'), props.warnIcon, props.message.severity === 'warn'), props.errorIcon, props.message.severity === 'error'), props.successIcon, props.message.severity === 'success')];\n },\n messageText: 'p-toast-message-text',\n summary: 'p-toast-summary',\n detail: 'p-toast-detail',\n closeButton: 'p-toast-close-button',\n closeIcon: 'p-toast-close-icon'\n};\nvar ToastStyle = BaseStyle.extend({\n name: 'toast',\n theme: theme,\n classes: classes,\n inlineStyles: inlineStyles\n});\n\nexport { ToastStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import { setAttribute } from '@primeuix/utils/dom';\nimport { isEmpty } from '@primeuix/utils/object';\nimport { ZIndex } from '@primeuix/utils/zindex';\nimport { UniqueComponentId } from '@primevue/core/utils';\nimport Portal from 'primevue/portal';\nimport ToastEventBus from 'primevue/toasteventbus';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport ToastStyle from 'primevue/toast/style';\nimport CheckIcon from '@primevue/icons/check';\nimport ExclamationTriangleIcon from '@primevue/icons/exclamationtriangle';\nimport InfoCircleIcon from '@primevue/icons/infocircle';\nimport TimesIcon from '@primevue/icons/times';\nimport TimesCircleIcon from '@primevue/icons/timescircle';\nimport Ripple from 'primevue/ripple';\nimport { resolveDirective, openBlock, createElementBlock, mergeProps, createBlock, resolveDynamicComponent, Fragment, createElementVNode, toDisplayString, normalizeProps, withDirectives, createCommentVNode, resolveComponent, withCtx, createVNode, TransitionGroup, renderList } from 'vue';\n\nvar script$2 = {\n name: 'BaseToast',\n \"extends\": BaseComponent,\n props: {\n group: {\n type: String,\n \"default\": null\n },\n position: {\n type: String,\n \"default\": 'top-right'\n },\n autoZIndex: {\n type: Boolean,\n \"default\": true\n },\n baseZIndex: {\n type: Number,\n \"default\": 0\n },\n breakpoints: {\n type: Object,\n \"default\": null\n },\n closeIcon: {\n type: String,\n \"default\": undefined\n },\n infoIcon: {\n type: String,\n \"default\": undefined\n },\n warnIcon: {\n type: String,\n \"default\": undefined\n },\n errorIcon: {\n type: String,\n \"default\": undefined\n },\n successIcon: {\n type: String,\n \"default\": undefined\n },\n closeButtonProps: {\n type: null,\n \"default\": null\n }\n },\n style: ToastStyle,\n provide: function provide() {\n return {\n $pcToast: this,\n $parentInstance: this\n };\n }\n};\n\nvar script$1 = {\n name: 'ToastMessage',\n hostName: 'Toast',\n \"extends\": BaseComponent,\n emits: ['close'],\n closeTimeout: null,\n props: {\n message: {\n type: null,\n \"default\": null\n },\n templates: {\n type: Object,\n \"default\": null\n },\n closeIcon: {\n type: String,\n \"default\": null\n },\n infoIcon: {\n type: String,\n \"default\": null\n },\n warnIcon: {\n type: String,\n \"default\": null\n },\n errorIcon: {\n type: String,\n \"default\": null\n },\n successIcon: {\n type: String,\n \"default\": null\n },\n closeButtonProps: {\n type: null,\n \"default\": null\n }\n },\n mounted: function mounted() {\n var _this = this;\n if (this.message.life) {\n this.closeTimeout = setTimeout(function () {\n _this.close({\n message: _this.message,\n type: 'life-end'\n });\n }, this.message.life);\n }\n },\n beforeUnmount: function beforeUnmount() {\n this.clearCloseTimeout();\n },\n methods: {\n close: function close(params) {\n this.$emit('close', params);\n },\n onCloseClick: function onCloseClick() {\n this.clearCloseTimeout();\n this.close({\n message: this.message,\n type: 'close'\n });\n },\n clearCloseTimeout: function clearCloseTimeout() {\n if (this.closeTimeout) {\n clearTimeout(this.closeTimeout);\n this.closeTimeout = null;\n }\n }\n },\n computed: {\n iconComponent: function iconComponent() {\n return {\n info: !this.infoIcon && InfoCircleIcon,\n success: !this.successIcon && CheckIcon,\n warn: !this.warnIcon && ExclamationTriangleIcon,\n error: !this.errorIcon && TimesCircleIcon\n }[this.message.severity];\n },\n closeAriaLabel: function closeAriaLabel() {\n return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.close : undefined;\n }\n },\n components: {\n TimesIcon: TimesIcon,\n InfoCircleIcon: InfoCircleIcon,\n CheckIcon: CheckIcon,\n ExclamationTriangleIcon: ExclamationTriangleIcon,\n TimesCircleIcon: TimesCircleIcon\n },\n directives: {\n ripple: Ripple\n }\n};\n\nfunction _typeof$1(o) { \"@babel/helpers - typeof\"; return _typeof$1 = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof$1(o); }\nfunction ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty$1(e, r, t) { return (r = _toPropertyKey$1(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey$1(t) { var i = _toPrimitive$1(t, \"string\"); return \"symbol\" == _typeof$1(i) ? i : i + \"\"; }\nfunction _toPrimitive$1(t, r) { if (\"object\" != _typeof$1(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof$1(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nvar _hoisted_1 = [\"aria-label\"];\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n var _directive_ripple = resolveDirective(\"ripple\");\n return openBlock(), createElementBlock(\"div\", mergeProps({\n \"class\": [_ctx.cx('message'), $props.message.styleClass],\n role: \"alert\",\n \"aria-live\": \"assertive\",\n \"aria-atomic\": \"true\"\n }, _ctx.ptm('message')), [$props.templates.container ? (openBlock(), createBlock(resolveDynamicComponent($props.templates.container), {\n key: 0,\n message: $props.message,\n closeCallback: $options.onCloseClick\n }, null, 8, [\"message\", \"closeCallback\"])) : (openBlock(), createElementBlock(\"div\", mergeProps({\n key: 1,\n \"class\": [_ctx.cx('messageContent'), $props.message.contentStyleClass]\n }, _ctx.ptm('messageContent')), [!$props.templates.message ? (openBlock(), createElementBlock(Fragment, {\n key: 0\n }, [(openBlock(), createBlock(resolveDynamicComponent($props.templates.messageicon ? $props.templates.messageicon : $props.templates.icon ? $props.templates.icon : $options.iconComponent && $options.iconComponent.name ? $options.iconComponent : 'span'), mergeProps({\n \"class\": _ctx.cx('messageIcon')\n }, _ctx.ptm('messageIcon')), null, 16, [\"class\"])), createElementVNode(\"div\", mergeProps({\n \"class\": _ctx.cx('messageText')\n }, _ctx.ptm('messageText')), [createElementVNode(\"span\", mergeProps({\n \"class\": _ctx.cx('summary')\n }, _ctx.ptm('summary')), toDisplayString($props.message.summary), 17), createElementVNode(\"div\", mergeProps({\n \"class\": _ctx.cx('detail')\n }, _ctx.ptm('detail')), toDisplayString($props.message.detail), 17)], 16)], 64)) : (openBlock(), createBlock(resolveDynamicComponent($props.templates.message), {\n key: 1,\n message: $props.message\n }, null, 8, [\"message\"])), $props.message.closable !== false ? (openBlock(), createElementBlock(\"div\", normalizeProps(mergeProps({\n key: 2\n }, _ctx.ptm('buttonContainer'))), [withDirectives((openBlock(), createElementBlock(\"button\", mergeProps({\n \"class\": _ctx.cx('closeButton'),\n type: \"button\",\n \"aria-label\": $options.closeAriaLabel,\n onClick: _cache[0] || (_cache[0] = function () {\n return $options.onCloseClick && $options.onCloseClick.apply($options, arguments);\n }),\n autofocus: \"\"\n }, _objectSpread$1(_objectSpread$1({}, $props.closeButtonProps), _ctx.ptm('closeButton'))), [(openBlock(), createBlock(resolveDynamicComponent($props.templates.closeicon || 'TimesIcon'), mergeProps({\n \"class\": [_ctx.cx('closeIcon'), $props.closeIcon]\n }, _ctx.ptm('closeIcon')), null, 16, [\"class\"]))], 16, _hoisted_1)), [[_directive_ripple]])], 16)) : createCommentVNode(\"\", true)], 16))], 16);\n}\n\nscript$1.render = render$1;\n\nfunction _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _iterableToArray(r) { if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r); }\nfunction _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nvar messageIdx = 0;\nvar script = {\n name: 'Toast',\n \"extends\": script$2,\n inheritAttrs: false,\n emits: ['close', 'life-end'],\n data: function data() {\n return {\n messages: []\n };\n },\n styleElement: null,\n mounted: function mounted() {\n ToastEventBus.on('add', this.onAdd);\n ToastEventBus.on('remove', this.onRemove);\n ToastEventBus.on('remove-group', this.onRemoveGroup);\n ToastEventBus.on('remove-all-groups', this.onRemoveAllGroups);\n if (this.breakpoints) {\n this.createStyle();\n }\n },\n beforeUnmount: function beforeUnmount() {\n this.destroyStyle();\n if (this.$refs.container && this.autoZIndex) {\n ZIndex.clear(this.$refs.container);\n }\n ToastEventBus.off('add', this.onAdd);\n ToastEventBus.off('remove', this.onRemove);\n ToastEventBus.off('remove-group', this.onRemoveGroup);\n ToastEventBus.off('remove-all-groups', this.onRemoveAllGroups);\n },\n methods: {\n add: function add(message) {\n if (message.id == null) {\n message.id = messageIdx++;\n }\n this.messages = [].concat(_toConsumableArray(this.messages), [message]);\n },\n remove: function remove(params) {\n var index = this.messages.findIndex(function (m) {\n return m.id === params.message.id;\n });\n if (index !== -1) {\n this.messages.splice(index, 1);\n this.$emit(params.type, {\n message: params.message\n });\n }\n },\n onAdd: function onAdd(message) {\n if (this.group == message.group) {\n this.add(message);\n }\n },\n onRemove: function onRemove(message) {\n this.remove({\n message: message,\n type: 'close'\n });\n },\n onRemoveGroup: function onRemoveGroup(group) {\n if (this.group === group) {\n this.messages = [];\n }\n },\n onRemoveAllGroups: function onRemoveAllGroups() {\n this.messages = [];\n },\n onEnter: function onEnter() {\n this.$refs.container.setAttribute(this.attributeSelector, '');\n if (this.autoZIndex) {\n ZIndex.set('modal', this.$refs.container, this.baseZIndex || this.$primevue.config.zIndex.modal);\n }\n },\n onLeave: function onLeave() {\n var _this = this;\n if (this.$refs.container && this.autoZIndex && isEmpty(this.messages)) {\n setTimeout(function () {\n ZIndex.clear(_this.$refs.container);\n }, 200);\n }\n },\n createStyle: function createStyle() {\n if (!this.styleElement && !this.isUnstyled) {\n var _this$$primevue;\n this.styleElement = document.createElement('style');\n this.styleElement.type = 'text/css';\n setAttribute(this.styleElement, 'nonce', (_this$$primevue = this.$primevue) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.config) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.csp) === null || _this$$primevue === void 0 ? void 0 : _this$$primevue.nonce);\n document.head.appendChild(this.styleElement);\n var innerHTML = '';\n for (var breakpoint in this.breakpoints) {\n var breakpointStyle = '';\n for (var styleProp in this.breakpoints[breakpoint]) {\n breakpointStyle += styleProp + ':' + this.breakpoints[breakpoint][styleProp] + '!important;';\n }\n innerHTML += \"\\n @media screen and (max-width: \".concat(breakpoint, \") {\\n .p-toast[\").concat(this.attributeSelector, \"] {\\n \").concat(breakpointStyle, \"\\n }\\n }\\n \");\n }\n this.styleElement.innerHTML = innerHTML;\n }\n },\n destroyStyle: function destroyStyle() {\n if (this.styleElement) {\n document.head.removeChild(this.styleElement);\n this.styleElement = null;\n }\n }\n },\n computed: {\n attributeSelector: function attributeSelector() {\n return UniqueComponentId();\n }\n },\n components: {\n ToastMessage: script$1,\n Portal: Portal\n }\n};\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n var _component_ToastMessage = resolveComponent(\"ToastMessage\");\n var _component_Portal = resolveComponent(\"Portal\");\n return openBlock(), createBlock(_component_Portal, null, {\n \"default\": withCtx(function () {\n return [createElementVNode(\"div\", mergeProps({\n ref: \"container\",\n \"class\": _ctx.cx('root'),\n style: _ctx.sx('root', true, {\n position: _ctx.position\n })\n }, _ctx.ptmi('root')), [createVNode(TransitionGroup, mergeProps({\n name: \"p-toast-message\",\n tag: \"div\",\n onEnter: $options.onEnter,\n onLeave: $options.onLeave\n }, _objectSpread({}, _ctx.ptm('transition'))), {\n \"default\": withCtx(function () {\n return [(openBlock(true), createElementBlock(Fragment, null, renderList($data.messages, function (msg) {\n return openBlock(), createBlock(_component_ToastMessage, {\n key: msg.id,\n message: msg,\n templates: _ctx.$slots,\n closeIcon: _ctx.closeIcon,\n infoIcon: _ctx.infoIcon,\n warnIcon: _ctx.warnIcon,\n errorIcon: _ctx.errorIcon,\n successIcon: _ctx.successIcon,\n closeButtonProps: _ctx.closeButtonProps,\n unstyled: _ctx.unstyled,\n onClose: _cache[0] || (_cache[0] = function ($event) {\n return $options.remove($event);\n }),\n pt: _ctx.pt\n }, null, 8, [\"message\", \"templates\", \"closeIcon\", \"infoIcon\", \"warnIcon\", \"errorIcon\", \"successIcon\", \"closeButtonProps\", \"unstyled\", \"pt\"]);\n }), 128))];\n }),\n _: 1\n }, 16, [\"onEnter\", \"onLeave\"])], 16)];\n }),\n _: 1\n });\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","\n\n\n","\n\n\n","\n\n\n","\n\n\n\n\n","import BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-menubar {\\n display: flex;\\n align-items: center;\\n background: \".concat(dt('menubar.background'), \";\\n border: 1px solid \").concat(dt('menubar.border.color'), \";\\n border-radius: \").concat(dt('menubar.border.radius'), \";\\n color: \").concat(dt('menubar.color'), \";\\n padding: \").concat(dt('menubar.padding'), \";\\n gap: \").concat(dt('menubar.gap'), \";\\n}\\n\\n.p-menubar-start,\\n.p-megamenu-end {\\n display: flex;\\n align-items: center;\\n}\\n\\n.p-menubar-root-list,\\n.p-menubar-submenu {\\n display: flex;\\n margin: 0;\\n padding: 0;\\n list-style: none;\\n outline: 0 none;\\n}\\n\\n.p-menubar-root-list {\\n align-items: center;\\n flex-wrap: wrap;\\n gap: \").concat(dt('menubar.gap'), \";\\n}\\n\\n.p-menubar-root-list > .p-menubar-item > .p-menubar-item-content {\\n border-radius: \").concat(dt('menubar.base.item.border.radius'), \";\\n}\\n\\n.p-menubar-root-list > .p-menubar-item > .p-menubar-item-content > .p-menubar-item-link {\\n padding: \").concat(dt('menubar.base.item.padding'), \";\\n}\\n\\n.p-menubar-item-content {\\n transition: background \").concat(dt('menubar.transition.duration'), \", color \").concat(dt('menubar.transition.duration'), \";\\n border-radius: \").concat(dt('menubar.item.border.radius'), \";\\n color: \").concat(dt('menubar.item.color'), \";\\n}\\n\\n.p-menubar-item-link {\\n cursor: pointer;\\n display: flex;\\n align-items: center;\\n text-decoration: none;\\n overflow: hidden;\\n position: relative;\\n color: inherit;\\n padding: \").concat(dt('menubar.item.padding'), \";\\n gap: \").concat(dt('menubar.item.gap'), \";\\n user-select: none;\\n outline: 0 none;\\n}\\n\\n.p-menubar-item-label {\\n line-height: 1;\\n}\\n\\n.p-menubar-item-icon {\\n color: \").concat(dt('menubar.item.icon.color'), \";\\n}\\n\\n.p-menubar-submenu-icon {\\n color: \").concat(dt('menubar.submenu.icon.color'), \";\\n margin-left: auto;\\n font-size: \").concat(dt('menubar.submenu.icon.size'), \";\\n width: \").concat(dt('menubar.submenu.icon.size'), \";\\n height: \").concat(dt('menubar.submenu.icon.size'), \";\\n}\\n\\n.p-menubar-item.p-focus > .p-menubar-item-content {\\n color: \").concat(dt('menubar.item.focus.color'), \";\\n background: \").concat(dt('menubar.item.focus.background'), \";\\n}\\n\\n.p-menubar-item.p-focus > .p-menubar-item-content .p-menubar-item-icon {\\n color: \").concat(dt('menubar.item.icon.focus.color'), \";\\n}\\n\\n.p-menubar-item.p-focus > .p-menubar-item-content .p-menubar-submenu-icon {\\n color: \").concat(dt('menubar.submenu.icon.focus.color'), \";\\n}\\n\\n.p-menubar-item:not(.p-disabled) > .p-menubar-item-content:hover {\\n color: \").concat(dt('menubar.item.focus.color'), \";\\n background: \").concat(dt('menubar.item.focus.background'), \";\\n}\\n\\n.p-menubar-item:not(.p-disabled) > .p-menubar-item-content:hover .p-menubar-item-icon {\\n color: \").concat(dt('menubar.item.icon.focus.color'), \";\\n}\\n\\n.p-menubar-item:not(.p-disabled) > .p-menubar-item-content:hover .p-menubar-submenu-icon {\\n color: \").concat(dt('menubar.submenu.icon.focus.color'), \";\\n}\\n\\n.p-menubar-item-active > .p-menubar-item-content {\\n color: \").concat(dt('menubar.item.active.color'), \";\\n background: \").concat(dt('menubar.item.active.background'), \";\\n}\\n\\n.p-menubar-item-active > .p-menubar-item-content .p-menubar-item-icon {\\n color: \").concat(dt('menubar.item.icon.active.color'), \";\\n}\\n\\n.p-menubar-item-active > .p-menubar-item-content .p-menubar-submenu-icon {\\n color: \").concat(dt('menubar.submenu.icon.active.color'), \";\\n}\\n\\n.p-menubar-submenu {\\n display: none;\\n position: absolute;\\n min-width: 12.5rem;\\n z-index: 1;\\n background: \").concat(dt('menubar.submenu.background'), \";\\n border: 1px solid \").concat(dt('menubar.submenu.border.color'), \";\\n border-radius: \").concat(dt('menubar.border.radius'), \";\\n box-shadow: \").concat(dt('menubar.submenu.shadow'), \";\\n color: \").concat(dt('menubar.submenu.color'), \";\\n flex-direction: column;\\n padding: \").concat(dt('menubar.submenu.padding'), \";\\n gap: \").concat(dt('menubar.submenu.gap'), \";\\n}\\n\\n.p-menubar-submenu .p-menubar-separator {\\n border-top: 1px solid \").concat(dt('menubar.separator.border.color'), \";\\n}\\n\\n.p-menubar-submenu .p-menubar-item {\\n position: relative;\\n}\\n\\n .p-menubar-submenu > .p-menubar-item-active > .p-menubar-submenu {\\n display: block;\\n left: 100%;\\n top: 0;\\n}\\n\\n.p-menubar-end {\\n margin-left: auto;\\n align-self: center;\\n}\\n\\n.p-menubar-button {\\n display: none;\\n justify-content: center;\\n align-items: center;\\n cursor: pointer;\\n width: \").concat(dt('menubar.mobile.button.size'), \";\\n height: \").concat(dt('menubar.mobile.button.size'), \";\\n position: relative;\\n color: \").concat(dt('menubar.mobile.button.color'), \";\\n border: 0 none;\\n background: transparent;\\n border-radius: \").concat(dt('menubar.mobile.button.border.radius'), \";\\n transition: background \").concat(dt('menubar.transition.duration'), \", color \").concat(dt('menubar.transition.duration'), \", outline-color \").concat(dt('menubar.transition.duration'), \";\\n outline-color: transparent;\\n}\\n\\n.p-menubar-button:hover {\\n color: \").concat(dt('menubar.mobile.button.hover.color'), \";\\n background: \").concat(dt('menubar.mobile.button.hover.background'), \";\\n}\\n\\n.p-menubar-button:focus-visible {\\n box-shadow: \").concat(dt('menubar.mobile.button.focus.ring.shadow'), \";\\n outline: \").concat(dt('menubar.mobile.button.focus.ring.width'), \" \").concat(dt('menubar.mobile.button.focus.ring.style'), \" \").concat(dt('menubar.mobile.button.focus.ring.color'), \";\\n outline-offset: \").concat(dt('menubar.mobile.button.focus.ring.offset'), \";\\n}\\n\\n.p-menubar-mobile {\\n position: relative;\\n}\\n\\n.p-menubar-mobile .p-menubar-button {\\n display: flex;\\n}\\n\\n.p-menubar-mobile .p-menubar-root-list {\\n position: absolute;\\n display: none;\\n width: 100%;\\n padding: \").concat(dt('menubar.submenu.padding'), \";\\n background: \").concat(dt('menubar.submenu.background'), \";\\n border: 1px solid \").concat(dt('menubar.submenu.border.color'), \";\\n box-shadow: \").concat(dt('menubar.submenu.shadow'), \";\\n}\\n\\n.p-menubar-mobile .p-menubar-root-list > .p-menubar-item > .p-menubar-item-content {\\n border-radius: \").concat(dt('menubar.item.border.radius'), \";\\n}\\n\\n.p-menubar-mobile .p-menubar-root-list > .p-menubar-item > .p-menubar-item-content > .p-menubar-item-link {\\n padding: \").concat(dt('menubar.item.padding'), \";\\n}\\n\\n.p-menubar-mobile-active .p-menubar-root-list {\\n display: flex;\\n flex-direction: column;\\n top: 100%;\\n left: 0;\\n z-index: 1;\\n}\\n\\n.p-menubar-mobile .p-menubar-root-list .p-menubar-item {\\n width: 100%;\\n position: static;\\n}\\n\\n.p-menubar-mobile .p-menubar-root-list .p-menubar-separator {\\n border-top: 1px solid \").concat(dt('menubar.separator.border.color'), \";\\n}\\n\\n.p-menubar-mobile .p-menubar-root-list > .p-menubar-item > .p-menubar-item-content .p-menubar-submenu-icon {\\n margin-left: auto;\\n transition: transform 0.2s;\\n}\\n\\n.p-menubar-mobile .p-menubar-root-list > .p-menubar-item-active > .p-menubar-item-content .p-menubar-submenu-icon {\\n transform: rotate(-180deg);\\n}\\n\\n.p-menubar-mobile .p-menubar-submenu .p-menubar-submenu-icon {\\n transition: transform 0.2s;\\n transform: rotate(90deg);\\n}\\n\\n.p-menubar-mobile .p-menubar-item-active > .p-menubar-item-content .p-menubar-submenu-icon {\\n transform: rotate(-90deg);\\n}\\n\\n.p-menubar-mobile .p-menubar-submenu {\\n width: 100%;\\n position: static;\\n box-shadow: none;\\n border: 0 none;\\n padding-left: \").concat(dt('menubar.submenu.mobile.indent'), \";\\n}\\n\");\n};\nvar inlineStyles = {\n submenu: function submenu(_ref2) {\n var instance = _ref2.instance,\n processedItem = _ref2.processedItem;\n return {\n display: instance.isItemActive(processedItem) ? 'flex' : 'none'\n };\n }\n};\nvar classes = {\n root: function root(_ref3) {\n var instance = _ref3.instance;\n return ['p-menubar p-component', {\n 'p-menubar-mobile': instance.queryMatches,\n 'p-menubar-mobile-active': instance.mobileActive\n }];\n },\n start: 'p-menubar-start',\n button: 'p-menubar-button',\n rootList: 'p-menubar-root-list',\n item: function item(_ref4) {\n var instance = _ref4.instance,\n processedItem = _ref4.processedItem;\n return ['p-menubar-item', {\n 'p-menubar-item-active': instance.isItemActive(processedItem),\n 'p-focus': instance.isItemFocused(processedItem),\n 'p-disabled': instance.isItemDisabled(processedItem)\n }];\n },\n itemContent: 'p-menubar-item-content',\n itemLink: 'p-menubar-item-link',\n itemIcon: 'p-menubar-item-icon',\n itemLabel: 'p-menubar-item-label',\n submenuIcon: 'p-menubar-submenu-icon',\n submenu: 'p-menubar-submenu',\n separator: 'p-menubar-separator',\n end: 'p-menubar-end'\n};\nvar MenubarStyle = BaseStyle.extend({\n name: 'menubar',\n theme: theme,\n classes: classes,\n inlineStyles: inlineStyles\n});\n\nexport { MenubarStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import { UniqueComponentId } from '@primevue/core/utils';\nimport { focus, findSingle, isTouchDevice } from '@primeuix/utils/dom';\nimport { resolve, isNotEmpty, isPrintableCharacter, isEmpty, findLastIndex } from '@primeuix/utils/object';\nimport { ZIndex } from '@primeuix/utils/zindex';\nimport BarsIcon from '@primevue/icons/bars';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport MenubarStyle from 'primevue/menubar/style';\nimport AngleDownIcon from '@primevue/icons/angledown';\nimport AngleRightIcon from '@primevue/icons/angleright';\nimport Ripple from 'primevue/ripple';\nimport { mergeProps, resolveComponent, resolveDirective, openBlock, createElementBlock, Fragment, renderList, createElementVNode, withDirectives, createBlock, resolveDynamicComponent, normalizeClass, createCommentVNode, toDisplayString, normalizeStyle, renderSlot, createVNode, normalizeProps, guardReactiveProps } from 'vue';\n\nvar script$2 = {\n name: 'BaseMenubar',\n \"extends\": BaseComponent,\n props: {\n model: {\n type: Array,\n \"default\": null\n },\n buttonProps: {\n type: null,\n \"default\": null\n },\n breakpoint: {\n type: String,\n \"default\": '960px'\n },\n ariaLabelledby: {\n type: String,\n \"default\": null\n },\n ariaLabel: {\n type: String,\n \"default\": null\n }\n },\n style: MenubarStyle,\n provide: function provide() {\n return {\n $pcMenubar: this,\n $parentInstance: this\n };\n }\n};\n\nvar script$1 = {\n name: 'MenubarSub',\n hostName: 'Menubar',\n \"extends\": BaseComponent,\n emits: ['item-mouseenter', 'item-click', 'item-mousemove'],\n props: {\n items: {\n type: Array,\n \"default\": null\n },\n root: {\n type: Boolean,\n \"default\": false\n },\n popup: {\n type: Boolean,\n \"default\": false\n },\n mobileActive: {\n type: Boolean,\n \"default\": false\n },\n templates: {\n type: Object,\n \"default\": null\n },\n level: {\n type: Number,\n \"default\": 0\n },\n menuId: {\n type: String,\n \"default\": null\n },\n focusedItemId: {\n type: String,\n \"default\": null\n },\n activeItemPath: {\n type: Object,\n \"default\": null\n }\n },\n list: null,\n methods: {\n getItemId: function getItemId(processedItem) {\n return \"\".concat(this.menuId, \"_\").concat(processedItem.key);\n },\n getItemKey: function getItemKey(processedItem) {\n return this.getItemId(processedItem);\n },\n getItemProp: function getItemProp(processedItem, name, params) {\n return processedItem && processedItem.item ? resolve(processedItem.item[name], params) : undefined;\n },\n getItemLabel: function getItemLabel(processedItem) {\n return this.getItemProp(processedItem, 'label');\n },\n getItemLabelId: function getItemLabelId(processedItem) {\n return \"\".concat(this.menuId, \"_\").concat(processedItem.key, \"_label\");\n },\n getPTOptions: function getPTOptions(processedItem, index, key) {\n return this.ptm(key, {\n context: {\n item: processedItem.item,\n index: index,\n active: this.isItemActive(processedItem),\n focused: this.isItemFocused(processedItem),\n disabled: this.isItemDisabled(processedItem),\n level: this.level\n }\n });\n },\n isItemActive: function isItemActive(processedItem) {\n return this.activeItemPath.some(function (path) {\n return path.key === processedItem.key;\n });\n },\n isItemVisible: function isItemVisible(processedItem) {\n return this.getItemProp(processedItem, 'visible') !== false;\n },\n isItemDisabled: function isItemDisabled(processedItem) {\n return this.getItemProp(processedItem, 'disabled');\n },\n isItemFocused: function isItemFocused(processedItem) {\n return this.focusedItemId === this.getItemId(processedItem);\n },\n isItemGroup: function isItemGroup(processedItem) {\n return isNotEmpty(processedItem.items);\n },\n onItemClick: function onItemClick(event, processedItem) {\n this.getItemProp(processedItem, 'command', {\n originalEvent: event,\n item: processedItem.item\n });\n this.$emit('item-click', {\n originalEvent: event,\n processedItem: processedItem,\n isFocus: true\n });\n },\n onItemMouseEnter: function onItemMouseEnter(event, processedItem) {\n this.$emit('item-mouseenter', {\n originalEvent: event,\n processedItem: processedItem\n });\n },\n onItemMouseMove: function onItemMouseMove(event, processedItem) {\n this.$emit('item-mousemove', {\n originalEvent: event,\n processedItem: processedItem\n });\n },\n getAriaPosInset: function getAriaPosInset(index) {\n return index - this.calculateAriaSetSize.slice(0, index).length + 1;\n },\n getMenuItemProps: function getMenuItemProps(processedItem, index) {\n return {\n action: mergeProps({\n \"class\": this.cx('itemLink'),\n tabindex: -1,\n 'aria-hidden': true\n }, this.getPTOptions(processedItem, index, 'itemLink')),\n icon: mergeProps({\n \"class\": [this.cx('itemIcon'), this.getItemProp(processedItem, 'icon')]\n }, this.getPTOptions(processedItem, index, 'itemIcon')),\n label: mergeProps({\n \"class\": this.cx('itemLabel')\n }, this.getPTOptions(processedItem, index, 'itemLabel')),\n submenuicon: mergeProps({\n \"class\": this.cx('submenuIcon')\n }, this.getPTOptions(processedItem, index, 'submenuIcon'))\n };\n }\n },\n computed: {\n calculateAriaSetSize: function calculateAriaSetSize() {\n var _this = this;\n return this.items.filter(function (processedItem) {\n return _this.isItemVisible(processedItem) && _this.getItemProp(processedItem, 'separator');\n });\n },\n getAriaSetSize: function getAriaSetSize() {\n var _this2 = this;\n return this.items.filter(function (processedItem) {\n return _this2.isItemVisible(processedItem) && !_this2.getItemProp(processedItem, 'separator');\n }).length;\n }\n },\n components: {\n AngleRightIcon: AngleRightIcon,\n AngleDownIcon: AngleDownIcon\n },\n directives: {\n ripple: Ripple\n }\n};\n\nvar _hoisted_1$1 = [\"id\", \"aria-label\", \"aria-disabled\", \"aria-expanded\", \"aria-haspopup\", \"aria-level\", \"aria-setsize\", \"aria-posinset\", \"data-p-active\", \"data-p-focused\", \"data-p-disabled\"];\nvar _hoisted_2 = [\"onClick\", \"onMouseenter\", \"onMousemove\"];\nvar _hoisted_3 = [\"href\", \"target\"];\nvar _hoisted_4 = [\"id\"];\nvar _hoisted_5 = [\"id\"];\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n var _component_MenubarSub = resolveComponent(\"MenubarSub\", true);\n var _directive_ripple = resolveDirective(\"ripple\");\n return openBlock(), createElementBlock(\"ul\", mergeProps({\n \"class\": $props.level === 0 ? _ctx.cx('rootList') : _ctx.cx('submenu')\n }, $props.level === 0 ? _ctx.ptm('rootList') : _ctx.ptm('submenu')), [(openBlock(true), createElementBlock(Fragment, null, renderList($props.items, function (processedItem, index) {\n return openBlock(), createElementBlock(Fragment, {\n key: $options.getItemKey(processedItem)\n }, [$options.isItemVisible(processedItem) && !$options.getItemProp(processedItem, 'separator') ? (openBlock(), createElementBlock(\"li\", mergeProps({\n key: 0,\n id: $options.getItemId(processedItem),\n style: $options.getItemProp(processedItem, 'style'),\n \"class\": [_ctx.cx('item', {\n processedItem: processedItem\n }), $options.getItemProp(processedItem, 'class')],\n role: \"menuitem\",\n \"aria-label\": $options.getItemLabel(processedItem),\n \"aria-disabled\": $options.isItemDisabled(processedItem) || undefined,\n \"aria-expanded\": $options.isItemGroup(processedItem) ? $options.isItemActive(processedItem) : undefined,\n \"aria-haspopup\": $options.isItemGroup(processedItem) && !$options.getItemProp(processedItem, 'to') ? 'menu' : undefined,\n \"aria-level\": $props.level + 1,\n \"aria-setsize\": $options.getAriaSetSize,\n \"aria-posinset\": $options.getAriaPosInset(index),\n ref_for: true\n }, $options.getPTOptions(processedItem, index, 'item'), {\n \"data-p-active\": $options.isItemActive(processedItem),\n \"data-p-focused\": $options.isItemFocused(processedItem),\n \"data-p-disabled\": $options.isItemDisabled(processedItem)\n }), [createElementVNode(\"div\", mergeProps({\n \"class\": _ctx.cx('itemContent'),\n onClick: function onClick($event) {\n return $options.onItemClick($event, processedItem);\n },\n onMouseenter: function onMouseenter($event) {\n return $options.onItemMouseEnter($event, processedItem);\n },\n onMousemove: function onMousemove($event) {\n return $options.onItemMouseMove($event, processedItem);\n },\n ref_for: true\n }, $options.getPTOptions(processedItem, index, 'itemContent')), [!$props.templates.item ? withDirectives((openBlock(), createElementBlock(\"a\", mergeProps({\n key: 0,\n href: $options.getItemProp(processedItem, 'url'),\n \"class\": _ctx.cx('itemLink'),\n target: $options.getItemProp(processedItem, 'target'),\n tabindex: \"-1\",\n ref_for: true\n }, $options.getPTOptions(processedItem, index, 'itemLink')), [$props.templates.itemicon ? (openBlock(), createBlock(resolveDynamicComponent($props.templates.itemicon), {\n key: 0,\n item: processedItem.item,\n \"class\": normalizeClass(_ctx.cx('itemIcon'))\n }, null, 8, [\"item\", \"class\"])) : $options.getItemProp(processedItem, 'icon') ? (openBlock(), createElementBlock(\"span\", mergeProps({\n key: 1,\n \"class\": [_ctx.cx('itemIcon'), $options.getItemProp(processedItem, 'icon')],\n ref_for: true\n }, $options.getPTOptions(processedItem, index, 'itemIcon')), null, 16)) : createCommentVNode(\"\", true), createElementVNode(\"span\", mergeProps({\n id: $options.getItemLabelId(processedItem),\n \"class\": _ctx.cx('itemLabel'),\n ref_for: true\n }, $options.getPTOptions(processedItem, index, 'itemLabel')), toDisplayString($options.getItemLabel(processedItem)), 17, _hoisted_4), $options.getItemProp(processedItem, 'items') ? (openBlock(), createElementBlock(Fragment, {\n key: 2\n }, [$props.templates.submenuicon ? (openBlock(), createBlock(resolveDynamicComponent($props.templates.submenuicon), {\n key: 0,\n root: $props.root,\n active: $options.isItemActive(processedItem),\n \"class\": normalizeClass(_ctx.cx('submenuIcon'))\n }, null, 8, [\"root\", \"active\", \"class\"])) : (openBlock(), createBlock(resolveDynamicComponent($props.root ? 'AngleDownIcon' : 'AngleRightIcon'), mergeProps({\n key: 1,\n \"class\": _ctx.cx('submenuIcon'),\n ref_for: true\n }, $options.getPTOptions(processedItem, index, 'submenuIcon')), null, 16, [\"class\"]))], 64)) : createCommentVNode(\"\", true)], 16, _hoisted_3)), [[_directive_ripple]]) : (openBlock(), createBlock(resolveDynamicComponent($props.templates.item), {\n key: 1,\n item: processedItem.item,\n root: $props.root,\n hasSubmenu: $options.getItemProp(processedItem, 'items'),\n label: $options.getItemLabel(processedItem),\n props: $options.getMenuItemProps(processedItem, index)\n }, null, 8, [\"item\", \"root\", \"hasSubmenu\", \"label\", \"props\"]))], 16, _hoisted_2), $options.isItemVisible(processedItem) && $options.isItemGroup(processedItem) ? (openBlock(), createBlock(_component_MenubarSub, {\n key: 0,\n id: $options.getItemId(processedItem) + '_list',\n menuId: $props.menuId,\n role: \"menu\",\n style: normalizeStyle(_ctx.sx('submenu', true, {\n processedItem: processedItem\n })),\n focusedItemId: $props.focusedItemId,\n items: processedItem.items,\n mobileActive: $props.mobileActive,\n activeItemPath: $props.activeItemPath,\n templates: $props.templates,\n level: $props.level + 1,\n \"aria-labelledby\": $options.getItemLabelId(processedItem),\n pt: _ctx.pt,\n unstyled: _ctx.unstyled,\n onItemClick: _cache[0] || (_cache[0] = function ($event) {\n return _ctx.$emit('item-click', $event);\n }),\n onItemMouseenter: _cache[1] || (_cache[1] = function ($event) {\n return _ctx.$emit('item-mouseenter', $event);\n }),\n onItemMousemove: _cache[2] || (_cache[2] = function ($event) {\n return _ctx.$emit('item-mousemove', $event);\n })\n }, null, 8, [\"id\", \"menuId\", \"style\", \"focusedItemId\", \"items\", \"mobileActive\", \"activeItemPath\", \"templates\", \"level\", \"aria-labelledby\", \"pt\", \"unstyled\"])) : createCommentVNode(\"\", true)], 16, _hoisted_1$1)) : createCommentVNode(\"\", true), $options.isItemVisible(processedItem) && $options.getItemProp(processedItem, 'separator') ? (openBlock(), createElementBlock(\"li\", mergeProps({\n key: 1,\n id: $options.getItemId(processedItem),\n \"class\": [_ctx.cx('separator'), $options.getItemProp(processedItem, 'class')],\n style: $options.getItemProp(processedItem, 'style'),\n role: \"separator\",\n ref_for: true\n }, _ctx.ptm('separator')), null, 16, _hoisted_5)) : createCommentVNode(\"\", true)], 64);\n }), 128))], 16);\n}\n\nscript$1.render = render$1;\n\nvar script = {\n name: 'Menubar',\n \"extends\": script$2,\n inheritAttrs: false,\n emits: ['focus', 'blur'],\n matchMediaListener: null,\n data: function data() {\n return {\n id: this.$attrs.id,\n mobileActive: false,\n focused: false,\n focusedItemInfo: {\n index: -1,\n level: 0,\n parentKey: ''\n },\n activeItemPath: [],\n dirty: false,\n query: null,\n queryMatches: false\n };\n },\n watch: {\n '$attrs.id': function $attrsId(newValue) {\n this.id = newValue || UniqueComponentId();\n },\n activeItemPath: function activeItemPath(newPath) {\n if (isNotEmpty(newPath)) {\n this.bindOutsideClickListener();\n this.bindResizeListener();\n } else {\n this.unbindOutsideClickListener();\n this.unbindResizeListener();\n }\n }\n },\n outsideClickListener: null,\n container: null,\n menubar: null,\n mounted: function mounted() {\n this.id = this.id || UniqueComponentId();\n this.bindMatchMediaListener();\n },\n beforeUnmount: function beforeUnmount() {\n this.mobileActive = false;\n this.unbindOutsideClickListener();\n this.unbindResizeListener();\n this.unbindMatchMediaListener();\n if (this.container) {\n ZIndex.clear(this.container);\n }\n this.container = null;\n },\n methods: {\n getItemProp: function getItemProp(item, name) {\n return item ? resolve(item[name]) : undefined;\n },\n getItemLabel: function getItemLabel(item) {\n return this.getItemProp(item, 'label');\n },\n isItemDisabled: function isItemDisabled(item) {\n return this.getItemProp(item, 'disabled');\n },\n isItemVisible: function isItemVisible(item) {\n return this.getItemProp(item, 'visible') !== false;\n },\n isItemGroup: function isItemGroup(item) {\n return isNotEmpty(this.getItemProp(item, 'items'));\n },\n isItemSeparator: function isItemSeparator(item) {\n return this.getItemProp(item, 'separator');\n },\n getProccessedItemLabel: function getProccessedItemLabel(processedItem) {\n return processedItem ? this.getItemLabel(processedItem.item) : undefined;\n },\n isProccessedItemGroup: function isProccessedItemGroup(processedItem) {\n return processedItem && isNotEmpty(processedItem.items);\n },\n toggle: function toggle(event) {\n var _this = this;\n if (this.mobileActive) {\n this.mobileActive = false;\n ZIndex.clear(this.menubar);\n this.hide();\n } else {\n this.mobileActive = true;\n ZIndex.set('menu', this.menubar, this.$primevue.config.zIndex.menu);\n setTimeout(function () {\n _this.show();\n }, 1);\n }\n this.bindOutsideClickListener();\n event.preventDefault();\n },\n show: function show() {\n focus(this.menubar);\n },\n hide: function hide(event, isFocus) {\n var _this2 = this;\n if (this.mobileActive) {\n this.mobileActive = false;\n setTimeout(function () {\n focus(_this2.$refs.menubutton);\n }, 0);\n }\n this.activeItemPath = [];\n this.focusedItemInfo = {\n index: -1,\n level: 0,\n parentKey: ''\n };\n isFocus && focus(this.menubar);\n this.dirty = false;\n },\n onFocus: function onFocus(event) {\n this.focused = true;\n this.focusedItemInfo = this.focusedItemInfo.index !== -1 ? this.focusedItemInfo : {\n index: this.findFirstFocusedItemIndex(),\n level: 0,\n parentKey: ''\n };\n this.$emit('focus', event);\n },\n onBlur: function onBlur(event) {\n this.focused = false;\n this.focusedItemInfo = {\n index: -1,\n level: 0,\n parentKey: ''\n };\n this.searchValue = '';\n this.dirty = false;\n this.$emit('blur', event);\n },\n onKeyDown: function onKeyDown(event) {\n var metaKey = event.metaKey || event.ctrlKey;\n switch (event.code) {\n case 'ArrowDown':\n this.onArrowDownKey(event);\n break;\n case 'ArrowUp':\n this.onArrowUpKey(event);\n break;\n case 'ArrowLeft':\n this.onArrowLeftKey(event);\n break;\n case 'ArrowRight':\n this.onArrowRightKey(event);\n break;\n case 'Home':\n this.onHomeKey(event);\n break;\n case 'End':\n this.onEndKey(event);\n break;\n case 'Space':\n this.onSpaceKey(event);\n break;\n case 'Enter':\n case 'NumpadEnter':\n this.onEnterKey(event);\n break;\n case 'Escape':\n this.onEscapeKey(event);\n break;\n case 'Tab':\n this.onTabKey(event);\n break;\n case 'PageDown':\n case 'PageUp':\n case 'Backspace':\n case 'ShiftLeft':\n case 'ShiftRight':\n //NOOP\n break;\n default:\n if (!metaKey && isPrintableCharacter(event.key)) {\n this.searchItems(event, event.key);\n }\n break;\n }\n },\n onItemChange: function onItemChange(event) {\n var processedItem = event.processedItem,\n isFocus = event.isFocus;\n if (isEmpty(processedItem)) return;\n var index = processedItem.index,\n key = processedItem.key,\n level = processedItem.level,\n parentKey = processedItem.parentKey,\n items = processedItem.items;\n var grouped = isNotEmpty(items);\n var activeItemPath = this.activeItemPath.filter(function (p) {\n return p.parentKey !== parentKey && p.parentKey !== key;\n });\n grouped && activeItemPath.push(processedItem);\n this.focusedItemInfo = {\n index: index,\n level: level,\n parentKey: parentKey\n };\n this.activeItemPath = activeItemPath;\n grouped && (this.dirty = true);\n isFocus && focus(this.menubar);\n },\n onItemClick: function onItemClick(event) {\n var originalEvent = event.originalEvent,\n processedItem = event.processedItem;\n var grouped = this.isProccessedItemGroup(processedItem);\n var root = isEmpty(processedItem.parent);\n var selected = this.isSelected(processedItem);\n if (selected) {\n var index = processedItem.index,\n key = processedItem.key,\n level = processedItem.level,\n parentKey = processedItem.parentKey;\n this.activeItemPath = this.activeItemPath.filter(function (p) {\n return key !== p.key && key.startsWith(p.key);\n });\n this.focusedItemInfo = {\n index: index,\n level: level,\n parentKey: parentKey\n };\n this.dirty = !root;\n focus(this.menubar);\n } else {\n if (grouped) {\n this.onItemChange(event);\n } else {\n var rootProcessedItem = root ? processedItem : this.activeItemPath.find(function (p) {\n return p.parentKey === '';\n });\n this.hide(originalEvent);\n this.changeFocusedItemIndex(originalEvent, rootProcessedItem ? rootProcessedItem.index : -1);\n this.mobileActive = false;\n focus(this.menubar);\n }\n }\n },\n onItemMouseEnter: function onItemMouseEnter(event) {\n if (this.dirty) {\n this.onItemChange(event);\n }\n },\n onItemMouseMove: function onItemMouseMove(event) {\n if (this.focused) {\n this.changeFocusedItemIndex(event, event.processedItem.index);\n }\n },\n menuButtonClick: function menuButtonClick(event) {\n this.toggle(event);\n },\n menuButtonKeydown: function menuButtonKeydown(event) {\n (event.code === 'Enter' || event.code === 'NumpadEnter' || event.code === 'Space') && this.menuButtonClick(event);\n },\n onArrowDownKey: function onArrowDownKey(event) {\n var processedItem = this.visibleItems[this.focusedItemInfo.index];\n var root = processedItem ? isEmpty(processedItem.parent) : null;\n if (root) {\n var grouped = this.isProccessedItemGroup(processedItem);\n if (grouped) {\n this.onItemChange({\n originalEvent: event,\n processedItem: processedItem\n });\n this.focusedItemInfo = {\n index: -1,\n parentKey: processedItem.key\n };\n this.onArrowRightKey(event);\n }\n } else {\n var itemIndex = this.focusedItemInfo.index !== -1 ? this.findNextItemIndex(this.focusedItemInfo.index) : this.findFirstFocusedItemIndex();\n this.changeFocusedItemIndex(event, itemIndex);\n }\n event.preventDefault();\n },\n onArrowUpKey: function onArrowUpKey(event) {\n var _this3 = this;\n var processedItem = this.visibleItems[this.focusedItemInfo.index];\n var root = isEmpty(processedItem.parent);\n if (root) {\n var grouped = this.isProccessedItemGroup(processedItem);\n if (grouped) {\n this.onItemChange({\n originalEvent: event,\n processedItem: processedItem\n });\n this.focusedItemInfo = {\n index: -1,\n parentKey: processedItem.key\n };\n var itemIndex = this.findLastItemIndex();\n this.changeFocusedItemIndex(event, itemIndex);\n }\n } else {\n var parentItem = this.activeItemPath.find(function (p) {\n return p.key === processedItem.parentKey;\n });\n if (this.focusedItemInfo.index === 0) {\n this.focusedItemInfo = {\n index: -1,\n parentKey: parentItem ? parentItem.parentKey : ''\n };\n this.searchValue = '';\n this.onArrowLeftKey(event);\n this.activeItemPath = this.activeItemPath.filter(function (p) {\n return p.parentKey !== _this3.focusedItemInfo.parentKey;\n });\n } else {\n var _itemIndex = this.focusedItemInfo.index !== -1 ? this.findPrevItemIndex(this.focusedItemInfo.index) : this.findLastFocusedItemIndex();\n this.changeFocusedItemIndex(event, _itemIndex);\n }\n }\n event.preventDefault();\n },\n onArrowLeftKey: function onArrowLeftKey(event) {\n var _this4 = this;\n var processedItem = this.visibleItems[this.focusedItemInfo.index];\n var parentItem = processedItem ? this.activeItemPath.find(function (p) {\n return p.key === processedItem.parentKey;\n }) : null;\n if (parentItem) {\n this.onItemChange({\n originalEvent: event,\n processedItem: parentItem\n });\n this.activeItemPath = this.activeItemPath.filter(function (p) {\n return p.parentKey !== _this4.focusedItemInfo.parentKey;\n });\n event.preventDefault();\n } else {\n var itemIndex = this.focusedItemInfo.index !== -1 ? this.findPrevItemIndex(this.focusedItemInfo.index) : this.findLastFocusedItemIndex();\n this.changeFocusedItemIndex(event, itemIndex);\n event.preventDefault();\n }\n },\n onArrowRightKey: function onArrowRightKey(event) {\n var processedItem = this.visibleItems[this.focusedItemInfo.index];\n var parentItem = processedItem ? this.activeItemPath.find(function (p) {\n return p.key === processedItem.parentKey;\n }) : null;\n if (parentItem) {\n var grouped = this.isProccessedItemGroup(processedItem);\n if (grouped) {\n this.onItemChange({\n originalEvent: event,\n processedItem: processedItem\n });\n this.focusedItemInfo = {\n index: -1,\n parentKey: processedItem.key\n };\n this.onArrowDownKey(event);\n }\n } else {\n var itemIndex = this.focusedItemInfo.index !== -1 ? this.findNextItemIndex(this.focusedItemInfo.index) : this.findFirstFocusedItemIndex();\n this.changeFocusedItemIndex(event, itemIndex);\n event.preventDefault();\n }\n },\n onHomeKey: function onHomeKey(event) {\n this.changeFocusedItemIndex(event, this.findFirstItemIndex());\n event.preventDefault();\n },\n onEndKey: function onEndKey(event) {\n this.changeFocusedItemIndex(event, this.findLastItemIndex());\n event.preventDefault();\n },\n onEnterKey: function onEnterKey(event) {\n if (this.focusedItemInfo.index !== -1) {\n var element = findSingle(this.menubar, \"li[id=\\\"\".concat(\"\".concat(this.focusedItemId), \"\\\"]\"));\n var anchorElement = element && findSingle(element, 'a[data-pc-section=\"itemlink\"]');\n anchorElement ? anchorElement.click() : element && element.click();\n var processedItem = this.visibleItems[this.focusedItemInfo.index];\n var grouped = this.isProccessedItemGroup(processedItem);\n !grouped && (this.focusedItemInfo.index = this.findFirstFocusedItemIndex());\n }\n event.preventDefault();\n },\n onSpaceKey: function onSpaceKey(event) {\n this.onEnterKey(event);\n },\n onEscapeKey: function onEscapeKey(event) {\n if (this.focusedItemInfo.level !== 0) {\n var _focusedItemInfo = this.focusedItemInfo;\n this.hide(event, false);\n this.focusedItemInfo = {\n index: Number(_focusedItemInfo.parentKey.split('_')[0]),\n level: 0,\n parentKey: ''\n };\n }\n event.preventDefault();\n },\n onTabKey: function onTabKey(event) {\n if (this.focusedItemInfo.index !== -1) {\n var processedItem = this.visibleItems[this.focusedItemInfo.index];\n var grouped = this.isProccessedItemGroup(processedItem);\n !grouped && this.onItemChange({\n originalEvent: event,\n processedItem: processedItem\n });\n }\n this.hide();\n },\n bindOutsideClickListener: function bindOutsideClickListener() {\n var _this5 = this;\n if (!this.outsideClickListener) {\n this.outsideClickListener = function (event) {\n var isOutsideContainer = _this5.container && !_this5.container.contains(event.target);\n var isOutsideTarget = !(_this5.target && (_this5.target === event.target || _this5.target.contains(event.target)));\n if (isOutsideContainer && isOutsideTarget) {\n _this5.hide();\n }\n };\n document.addEventListener('click', this.outsideClickListener);\n }\n },\n unbindOutsideClickListener: function unbindOutsideClickListener() {\n if (this.outsideClickListener) {\n document.removeEventListener('click', this.outsideClickListener);\n this.outsideClickListener = null;\n }\n },\n bindResizeListener: function bindResizeListener() {\n var _this6 = this;\n if (!this.resizeListener) {\n this.resizeListener = function (event) {\n if (!isTouchDevice()) {\n _this6.hide(event, true);\n }\n _this6.mobileActive = false;\n };\n window.addEventListener('resize', this.resizeListener);\n }\n },\n unbindResizeListener: function unbindResizeListener() {\n if (this.resizeListener) {\n window.removeEventListener('resize', this.resizeListener);\n this.resizeListener = null;\n }\n },\n bindMatchMediaListener: function bindMatchMediaListener() {\n var _this7 = this;\n if (!this.matchMediaListener) {\n var query = matchMedia(\"(max-width: \".concat(this.breakpoint, \")\"));\n this.query = query;\n this.queryMatches = query.matches;\n this.matchMediaListener = function () {\n _this7.queryMatches = query.matches;\n _this7.mobileActive = false;\n };\n this.query.addEventListener('change', this.matchMediaListener);\n }\n },\n unbindMatchMediaListener: function unbindMatchMediaListener() {\n if (this.matchMediaListener) {\n this.query.removeEventListener('change', this.matchMediaListener);\n this.matchMediaListener = null;\n }\n },\n isItemMatched: function isItemMatched(processedItem) {\n var _this$getProccessedIt;\n return this.isValidItem(processedItem) && ((_this$getProccessedIt = this.getProccessedItemLabel(processedItem)) === null || _this$getProccessedIt === void 0 ? void 0 : _this$getProccessedIt.toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase()));\n },\n isValidItem: function isValidItem(processedItem) {\n return !!processedItem && !this.isItemDisabled(processedItem.item) && !this.isItemSeparator(processedItem.item) && this.isItemVisible(processedItem.item);\n },\n isValidSelectedItem: function isValidSelectedItem(processedItem) {\n return this.isValidItem(processedItem) && this.isSelected(processedItem);\n },\n isSelected: function isSelected(processedItem) {\n return this.activeItemPath.some(function (p) {\n return p.key === processedItem.key;\n });\n },\n findFirstItemIndex: function findFirstItemIndex() {\n var _this8 = this;\n return this.visibleItems.findIndex(function (processedItem) {\n return _this8.isValidItem(processedItem);\n });\n },\n findLastItemIndex: function findLastItemIndex() {\n var _this9 = this;\n return findLastIndex(this.visibleItems, function (processedItem) {\n return _this9.isValidItem(processedItem);\n });\n },\n findNextItemIndex: function findNextItemIndex(index) {\n var _this10 = this;\n var matchedItemIndex = index < this.visibleItems.length - 1 ? this.visibleItems.slice(index + 1).findIndex(function (processedItem) {\n return _this10.isValidItem(processedItem);\n }) : -1;\n return matchedItemIndex > -1 ? matchedItemIndex + index + 1 : index;\n },\n findPrevItemIndex: function findPrevItemIndex(index) {\n var _this11 = this;\n var matchedItemIndex = index > 0 ? findLastIndex(this.visibleItems.slice(0, index), function (processedItem) {\n return _this11.isValidItem(processedItem);\n }) : -1;\n return matchedItemIndex > -1 ? matchedItemIndex : index;\n },\n findSelectedItemIndex: function findSelectedItemIndex() {\n var _this12 = this;\n return this.visibleItems.findIndex(function (processedItem) {\n return _this12.isValidSelectedItem(processedItem);\n });\n },\n findFirstFocusedItemIndex: function findFirstFocusedItemIndex() {\n var selectedIndex = this.findSelectedItemIndex();\n return selectedIndex < 0 ? this.findFirstItemIndex() : selectedIndex;\n },\n findLastFocusedItemIndex: function findLastFocusedItemIndex() {\n var selectedIndex = this.findSelectedItemIndex();\n return selectedIndex < 0 ? this.findLastItemIndex() : selectedIndex;\n },\n searchItems: function searchItems(event, _char) {\n var _this13 = this;\n this.searchValue = (this.searchValue || '') + _char;\n var itemIndex = -1;\n var matched = false;\n if (this.focusedItemInfo.index !== -1) {\n itemIndex = this.visibleItems.slice(this.focusedItemInfo.index).findIndex(function (processedItem) {\n return _this13.isItemMatched(processedItem);\n });\n itemIndex = itemIndex === -1 ? this.visibleItems.slice(0, this.focusedItemInfo.index).findIndex(function (processedItem) {\n return _this13.isItemMatched(processedItem);\n }) : itemIndex + this.focusedItemInfo.index;\n } else {\n itemIndex = this.visibleItems.findIndex(function (processedItem) {\n return _this13.isItemMatched(processedItem);\n });\n }\n if (itemIndex !== -1) {\n matched = true;\n }\n if (itemIndex === -1 && this.focusedItemInfo.index === -1) {\n itemIndex = this.findFirstFocusedItemIndex();\n }\n if (itemIndex !== -1) {\n this.changeFocusedItemIndex(event, itemIndex);\n }\n if (this.searchTimeout) {\n clearTimeout(this.searchTimeout);\n }\n this.searchTimeout = setTimeout(function () {\n _this13.searchValue = '';\n _this13.searchTimeout = null;\n }, 500);\n return matched;\n },\n changeFocusedItemIndex: function changeFocusedItemIndex(event, index) {\n if (this.focusedItemInfo.index !== index) {\n this.focusedItemInfo.index = index;\n this.scrollInView();\n }\n },\n scrollInView: function scrollInView() {\n var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;\n var id = index !== -1 ? \"\".concat(this.id, \"_\").concat(index) : this.focusedItemId;\n var element = findSingle(this.menubar, \"li[id=\\\"\".concat(id, \"\\\"]\"));\n if (element) {\n element.scrollIntoView && element.scrollIntoView({\n block: 'nearest',\n inline: 'start'\n });\n }\n },\n createProcessedItems: function createProcessedItems(items) {\n var _this14 = this;\n var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var parent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var parentKey = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';\n var processedItems = [];\n items && items.forEach(function (item, index) {\n var key = (parentKey !== '' ? parentKey + '_' : '') + index;\n var newItem = {\n item: item,\n index: index,\n level: level,\n key: key,\n parent: parent,\n parentKey: parentKey\n };\n newItem['items'] = _this14.createProcessedItems(item.items, level + 1, newItem, key);\n processedItems.push(newItem);\n });\n return processedItems;\n },\n containerRef: function containerRef(el) {\n this.container = el;\n },\n menubarRef: function menubarRef(el) {\n this.menubar = el ? el.$el : undefined;\n }\n },\n computed: {\n processedItems: function processedItems() {\n return this.createProcessedItems(this.model || []);\n },\n visibleItems: function visibleItems() {\n var _this15 = this;\n var processedItem = this.activeItemPath.find(function (p) {\n return p.key === _this15.focusedItemInfo.parentKey;\n });\n return processedItem ? processedItem.items : this.processedItems;\n },\n focusedItemId: function focusedItemId() {\n return this.focusedItemInfo.index !== -1 ? \"\".concat(this.id).concat(isNotEmpty(this.focusedItemInfo.parentKey) ? '_' + this.focusedItemInfo.parentKey : '', \"_\").concat(this.focusedItemInfo.index) : null;\n }\n },\n components: {\n MenubarSub: script$1,\n BarsIcon: BarsIcon\n }\n};\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nvar _hoisted_1 = [\"aria-haspopup\", \"aria-expanded\", \"aria-controls\", \"aria-label\"];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n var _component_BarsIcon = resolveComponent(\"BarsIcon\");\n var _component_MenubarSub = resolveComponent(\"MenubarSub\");\n return openBlock(), createElementBlock(\"div\", mergeProps({\n ref: $options.containerRef,\n \"class\": _ctx.cx('root')\n }, _ctx.ptmi('root')), [_ctx.$slots.start ? (openBlock(), createElementBlock(\"div\", mergeProps({\n key: 0,\n \"class\": _ctx.cx('start')\n }, _ctx.ptm('start')), [renderSlot(_ctx.$slots, \"start\")], 16)) : createCommentVNode(\"\", true), renderSlot(_ctx.$slots, _ctx.$slots.button ? 'button' : 'menubutton', {\n id: $data.id,\n \"class\": normalizeClass(_ctx.cx('button')),\n toggleCallback: function toggleCallback(event) {\n return $options.menuButtonClick(event);\n }\n }, function () {\n var _ctx$$primevue$config;\n return [_ctx.model && _ctx.model.length > 0 ? (openBlock(), createElementBlock(\"a\", mergeProps({\n key: 0,\n ref: \"menubutton\",\n role: \"button\",\n tabindex: \"0\",\n \"class\": _ctx.cx('button'),\n \"aria-haspopup\": _ctx.model.length && _ctx.model.length > 0 ? true : false,\n \"aria-expanded\": $data.mobileActive,\n \"aria-controls\": $data.id,\n \"aria-label\": (_ctx$$primevue$config = _ctx.$primevue.config.locale.aria) === null || _ctx$$primevue$config === void 0 ? void 0 : _ctx$$primevue$config.navigation,\n onClick: _cache[0] || (_cache[0] = function ($event) {\n return $options.menuButtonClick($event);\n }),\n onKeydown: _cache[1] || (_cache[1] = function ($event) {\n return $options.menuButtonKeydown($event);\n })\n }, _objectSpread(_objectSpread({}, _ctx.buttonProps), _ctx.ptm('button'))), [renderSlot(_ctx.$slots, _ctx.$slots.buttonicon ? 'buttonicon' : 'menubuttonicon', {}, function () {\n return [createVNode(_component_BarsIcon, normalizeProps(guardReactiveProps(_ctx.ptm('buttonicon'))), null, 16)];\n })], 16, _hoisted_1)) : createCommentVNode(\"\", true)];\n }), createVNode(_component_MenubarSub, {\n ref: $options.menubarRef,\n id: $data.id + '_list',\n role: \"menubar\",\n items: $options.processedItems,\n templates: _ctx.$slots,\n root: true,\n mobileActive: $data.mobileActive,\n tabindex: \"0\",\n \"aria-activedescendant\": $data.focused ? $options.focusedItemId : undefined,\n menuId: $data.id,\n focusedItemId: $data.focused ? $options.focusedItemId : undefined,\n activeItemPath: $data.activeItemPath,\n level: 0,\n \"aria-labelledby\": _ctx.ariaLabelledby,\n \"aria-label\": _ctx.ariaLabel,\n pt: _ctx.pt,\n unstyled: _ctx.unstyled,\n onFocus: $options.onFocus,\n onBlur: $options.onBlur,\n onKeydown: $options.onKeyDown,\n onItemClick: $options.onItemClick,\n onItemMouseenter: $options.onItemMouseEnter,\n onItemMousemove: $options.onItemMouseMove\n }, null, 8, [\"id\", \"items\", \"templates\", \"mobileActive\", \"aria-activedescendant\", \"menuId\", \"focusedItemId\", \"activeItemPath\", \"aria-labelledby\", \"aria-label\", \"pt\", \"unstyled\", \"onFocus\", \"onBlur\", \"onKeydown\", \"onItemClick\", \"onItemMouseenter\", \"onItemMousemove\"]), _ctx.$slots.end ? (openBlock(), createElementBlock(\"div\", mergeProps({\n key: 1,\n \"class\": _ctx.cx('end')\n }, _ctx.ptm('end')), [renderSlot(_ctx.$slots, \"end\")], 16)) : createCommentVNode(\"\", true)], 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","\n\n\n\n\n","import BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-panel {\\n border: 1px solid \".concat(dt('panel.border.color'), \";\\n border-radius: \").concat(dt('panel.border.radius'), \";\\n background: \").concat(dt('panel.background'), \";\\n color: \").concat(dt('panel.color'), \";\\n}\\n\\n.p-panel-header {\\n display: flex;\\n justify-content: space-between;\\n align-items: center;\\n padding: \").concat(dt('panel.header.padding'), \";\\n background: \").concat(dt('panel.header.background'), \";\\n color: \").concat(dt('panel.header.color'), \";\\n border-style: solid;\\n border-width: \").concat(dt('panel.header.border.width'), \";\\n border-color: \").concat(dt('panel.header.border.color'), \";\\n border-radius: \").concat(dt('panel.header.border.radius'), \";\\n}\\n\\n.p-panel-toggleable .p-panel-header {\\n padding: \").concat(dt('panel.toggleable.header.padding'), \";\\n}\\n\\n.p-panel-title {\\n line-height: 1;\\n font-weight: \").concat(dt('panel.title.font.weight'), \";\\n}\\n\\n.p-panel-content {\\n padding: \").concat(dt('panel.content.padding'), \";\\n}\\n\\n.p-panel-footer {\\n padding: \").concat(dt('panel.footer.padding'), \";\\n}\\n\");\n};\nvar classes = {\n root: function root(_ref2) {\n var props = _ref2.props;\n return ['p-panel p-component', {\n 'p-panel-toggleable': props.toggleable\n }];\n },\n header: 'p-panel-header',\n title: 'p-panel-title',\n headerActions: 'p-panel-header-actions',\n pcToggleButton: 'p-panel-toggle-button',\n contentContainer: 'p-panel-content-container',\n content: 'p-panel-content',\n footer: 'p-panel-footer'\n};\nvar PanelStyle = BaseStyle.extend({\n name: 'panel',\n theme: theme,\n classes: classes\n});\n\nexport { PanelStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import { UniqueComponentId } from '@primevue/core/utils';\nimport MinusIcon from '@primevue/icons/minus';\nimport PlusIcon from '@primevue/icons/plus';\nimport Button from 'primevue/button';\nimport Ripple from 'primevue/ripple';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport PanelStyle from 'primevue/panel/style';\nimport { resolveComponent, openBlock, createElementBlock, mergeProps, createElementVNode, renderSlot, normalizeClass, toDisplayString, createCommentVNode, createBlock, withCtx, resolveDynamicComponent, createVNode, Transition, withDirectives, vShow } from 'vue';\n\nvar script$1 = {\n name: 'BasePanel',\n \"extends\": BaseComponent,\n props: {\n header: String,\n toggleable: Boolean,\n collapsed: Boolean,\n toggleButtonProps: {\n type: Object,\n \"default\": function _default() {\n return {\n severity: 'secondary',\n text: true,\n rounded: true\n };\n }\n }\n },\n style: PanelStyle,\n provide: function provide() {\n return {\n $pcPanel: this,\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'Panel',\n \"extends\": script$1,\n inheritAttrs: false,\n emits: ['update:collapsed', 'toggle'],\n data: function data() {\n return {\n id: this.$attrs.id,\n d_collapsed: this.collapsed\n };\n },\n watch: {\n '$attrs.id': function $attrsId(newValue) {\n this.id = newValue || UniqueComponentId();\n },\n collapsed: function collapsed(newValue) {\n this.d_collapsed = newValue;\n }\n },\n mounted: function mounted() {\n this.id = this.id || UniqueComponentId();\n },\n methods: {\n toggle: function toggle(event) {\n this.d_collapsed = !this.d_collapsed;\n this.$emit('update:collapsed', this.d_collapsed);\n this.$emit('toggle', {\n originalEvent: event,\n value: this.d_collapsed\n });\n },\n onKeyDown: function onKeyDown(event) {\n if (event.code === 'Enter' || event.code === 'NumpadEnter' || event.code === 'Space') {\n this.toggle(event);\n event.preventDefault();\n }\n }\n },\n computed: {\n buttonAriaLabel: function buttonAriaLabel() {\n return this.toggleButtonProps && this.toggleButtonProps.ariaLabel ? this.toggleButtonProps.ariaLabel : this.header;\n }\n },\n components: {\n PlusIcon: PlusIcon,\n MinusIcon: MinusIcon,\n Button: Button\n },\n directives: {\n ripple: Ripple\n }\n};\n\nvar _hoisted_1 = [\"id\"];\nvar _hoisted_2 = [\"id\", \"aria-labelledby\"];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n var _component_Button = resolveComponent(\"Button\");\n return openBlock(), createElementBlock(\"div\", mergeProps({\n \"class\": _ctx.cx('root')\n }, _ctx.ptmi('root')), [createElementVNode(\"div\", mergeProps({\n \"class\": _ctx.cx('header')\n }, _ctx.ptm('header')), [renderSlot(_ctx.$slots, \"header\", {\n id: $data.id + '_header',\n \"class\": normalizeClass(_ctx.cx('title'))\n }, function () {\n return [_ctx.header ? (openBlock(), createElementBlock(\"span\", mergeProps({\n key: 0,\n id: $data.id + '_header',\n \"class\": _ctx.cx('title')\n }, _ctx.ptm('title')), toDisplayString(_ctx.header), 17, _hoisted_1)) : createCommentVNode(\"\", true)];\n }), createElementVNode(\"div\", mergeProps({\n \"class\": _ctx.cx('headerActions')\n }, _ctx.ptm('headerActions')), [renderSlot(_ctx.$slots, \"icons\"), _ctx.toggleable ? (openBlock(), createBlock(_component_Button, mergeProps({\n key: 0,\n id: $data.id + '_header',\n \"class\": _ctx.cx('pcToggleButton'),\n \"aria-label\": $options.buttonAriaLabel,\n \"aria-controls\": $data.id + '_content',\n \"aria-expanded\": !$data.d_collapsed,\n unstyled: _ctx.unstyled,\n onClick: $options.toggle,\n onKeydown: $options.onKeyDown\n }, _ctx.toggleButtonProps, {\n pt: _ctx.ptm('pcToggleButton')\n }), {\n icon: withCtx(function (slotProps) {\n return [renderSlot(_ctx.$slots, _ctx.$slots.toggleicon ? 'toggleicon' : 'togglericon', {\n collapsed: $data.d_collapsed\n }, function () {\n return [(openBlock(), createBlock(resolveDynamicComponent($data.d_collapsed ? 'PlusIcon' : 'MinusIcon'), mergeProps({\n \"class\": slotProps[\"class\"]\n }, _ctx.ptm('pcToggleButton')['icon']), null, 16, [\"class\"]))];\n })];\n }),\n _: 3\n }, 16, [\"id\", \"class\", \"aria-label\", \"aria-controls\", \"aria-expanded\", \"unstyled\", \"onClick\", \"onKeydown\", \"pt\"])) : createCommentVNode(\"\", true)], 16)], 16), createVNode(Transition, mergeProps({\n name: \"p-toggleable-content\"\n }, _ctx.ptm('transition')), {\n \"default\": withCtx(function () {\n return [withDirectives(createElementVNode(\"div\", mergeProps({\n id: $data.id + '_content',\n \"class\": _ctx.cx('contentContainer'),\n role: \"region\",\n \"aria-labelledby\": $data.id + '_header'\n }, _ctx.ptm('contentContainer')), [createElementVNode(\"div\", mergeProps({\n \"class\": _ctx.cx('content')\n }, _ctx.ptm('content')), [renderSlot(_ctx.$slots, \"default\")], 16), _ctx.$slots.footer ? (openBlock(), createElementBlock(\"div\", mergeProps({\n key: 0,\n \"class\": _ctx.cx('footer')\n }, _ctx.ptm('footer')), [renderSlot(_ctx.$slots, \"footer\")], 16)) : createCommentVNode(\"\", true)], 16, _hoisted_2), [[vShow, !$data.d_collapsed]])];\n }),\n _: 3\n }, 16)], 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-tieredmenu {\\n background: \".concat(dt('tieredmenu.background'), \";\\n color: \").concat(dt('tieredmenu.color'), \";\\n border: 1px solid \").concat(dt('tieredmenu.border.color'), \";\\n border-radius: \").concat(dt('tieredmenu.border.radius'), \";\\n min-width: 12.5rem;\\n}\\n\\n.p-tieredmenu-root-list,\\n.p-tieredmenu-submenu {\\n margin: 0;\\n padding: \").concat(dt('tieredmenu.list.padding'), \";\\n list-style: none;\\n outline: 0 none;\\n display: flex;\\n flex-direction: column;\\n gap: \").concat(dt('tieredmenu.list.gap'), \";\\n}\\n\\n.p-tieredmenu-submenu {\\n position: absolute;\\n min-width: 100%;\\n z-index: 1;\\n background: \").concat(dt('tieredmenu.background'), \";\\n color: \").concat(dt('tieredmenu.color'), \";\\n border: 1px solid \").concat(dt('tieredmenu.border.color'), \";\\n border-radius: \").concat(dt('tieredmenu.border.radius'), \";\\n box-shadow: \").concat(dt('tieredmenu.shadow'), \";\\n}\\n\\n.p-tieredmenu-item {\\n position: relative;\\n}\\n\\n.p-tieredmenu-item-content {\\n transition: background \").concat(dt('tieredmenu.transition.duration'), \", color \").concat(dt('tieredmenu.transition.duration'), \";\\n border-radius: \").concat(dt('tieredmenu.item.border.radius'), \";\\n color: \").concat(dt('tieredmenu.item.color'), \";\\n}\\n\\n.p-tieredmenu-item-link {\\n cursor: pointer;\\n display: flex;\\n align-items: center;\\n text-decoration: none;\\n overflow: hidden;\\n position: relative;\\n color: inherit;\\n padding: \").concat(dt('tieredmenu.item.padding'), \";\\n gap: \").concat(dt('tieredmenu.item.gap'), \";\\n user-select: none;\\n outline: 0 none;\\n}\\n\\n.p-tieredmenu-item-label {\\n line-height: 1;\\n}\\n\\n.p-tieredmenu-item-icon {\\n color: \").concat(dt('tieredmenu.item.icon.color'), \";\\n}\\n\\n.p-tieredmenu-submenu-icon {\\n color: \").concat(dt('tieredmenu.submenu.icon.color'), \";\\n margin-left: auto;\\n font-size: \").concat(dt('tieredmenu.submenu.icon.size'), \";\\n width: \").concat(dt('tieredmenu.submenu.icon.size'), \";\\n height: \").concat(dt('tieredmenu.submenu.icon.size'), \";\\n}\\n\\n.p-tieredmenu-item.p-focus > .p-tieredmenu-item-content {\\n color: \").concat(dt('tieredmenu.item.focus.color'), \";\\n background: \").concat(dt('tieredmenu.item.focus.background'), \";\\n}\\n\\n.p-tieredmenu-item.p-focus > .p-tieredmenu-item-content .p-tieredmenu-item-icon {\\n color: \").concat(dt('tieredmenu.item.icon.focus.color'), \";\\n}\\n\\n.p-tieredmenu-item.p-focus > .p-tieredmenu-item-content .p-tieredmenu-submenu-icon {\\n color: \").concat(dt('tieredmenu.submenu.icon.focus.color'), \";\\n}\\n\\n.p-tieredmenu-item:not(.p-disabled) > .p-tieredmenu-item-content:hover {\\n color: \").concat(dt('tieredmenu.item.focus.color'), \";\\n background: \").concat(dt('tieredmenu.item.focus.background'), \";\\n}\\n\\n.p-tieredmenu-item:not(.p-disabled) > .p-tieredmenu-item-content:hover .p-tieredmenu-item-icon {\\n color: \").concat(dt('tieredmenu.item.icon.focus.color'), \";\\n}\\n\\n.p-tieredmenu-item:not(.p-disabled) > .p-tieredmenu-item-content:hover .p-tieredmenu-submenu-icon {\\n color: \").concat(dt('tieredmenu.submenu.icon.focus.color'), \";\\n}\\n\\n.p-tieredmenu-item-active > .p-tieredmenu-item-content {\\n color: \").concat(dt('tieredmenu.item.active.color'), \";\\n background: \").concat(dt('tieredmenu.item.active.background'), \";\\n}\\n\\n.p-tieredmenu-item-active > .p-tieredmenu-item-content .p-tieredmenu-item-icon {\\n color: \").concat(dt('tieredmenu.item.icon.active.color'), \";\\n}\\n\\n.p-tieredmenu-item-active > .p-tieredmenu-item-content .p-tieredmenu-submenu-icon {\\n color: \").concat(dt('tieredmenu.submenu.icon.active.color'), \";\\n}\\n\\n.p-tieredmenu-separator {\\n border-top: 1px solid \").concat(dt('tieredmenu.separator.border.color'), \";\\n}\\n\\n.p-tieredmenu-overlay {\\n box-shadow: \").concat(dt('tieredmenu.shadow'), \";\\n}\\n\\n.p-tieredmenu-enter-from,\\n.p-tieredmenu-leave-active {\\n opacity: 0;\\n}\\n\\n.p-tieredmenu-enter-active {\\n transition: opacity 250ms;\\n}\\n\");\n};\nvar inlineStyles = {\n submenu: function submenu(_ref2) {\n var instance = _ref2.instance,\n processedItem = _ref2.processedItem;\n return {\n display: instance.isItemActive(processedItem) ? 'flex' : 'none'\n };\n }\n};\nvar classes = {\n root: function root(_ref3) {\n _ref3.instance;\n var props = _ref3.props;\n return ['p-tieredmenu p-component', {\n 'p-tieredmenu-overlay': props.popup\n }];\n },\n start: 'p-tieredmenu-start',\n rootList: 'p-tieredmenu-root-list',\n item: function item(_ref4) {\n var instance = _ref4.instance,\n processedItem = _ref4.processedItem;\n return ['p-tieredmenu-item', {\n 'p-tieredmenu-item-active': instance.isItemActive(processedItem),\n 'p-focus': instance.isItemFocused(processedItem),\n 'p-disabled': instance.isItemDisabled(processedItem)\n }];\n },\n itemContent: 'p-tieredmenu-item-content',\n itemLink: 'p-tieredmenu-item-link',\n itemIcon: 'p-tieredmenu-item-icon',\n itemLabel: 'p-tieredmenu-item-label',\n submenuIcon: 'p-tieredmenu-submenu-icon',\n submenu: 'p-tieredmenu-submenu',\n separator: 'p-tieredmenu-separator',\n end: 'p-tieredmenu-end'\n};\nvar TieredMenuStyle = BaseStyle.extend({\n name: 'tieredmenu',\n theme: theme,\n classes: classes,\n inlineStyles: inlineStyles\n});\n\nexport { TieredMenuStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import { UniqueComponentId, ConnectedOverlayScrollHandler } from '@primevue/core/utils';\nimport { nestedPosition, focus, findSingle, addStyle, absolutePosition, getOuterWidth, isTouchDevice } from '@primeuix/utils/dom';\nimport { resolve, isNotEmpty, isPrintableCharacter, isEmpty, findLastIndex } from '@primeuix/utils/object';\nimport { ZIndex } from '@primeuix/utils/zindex';\nimport OverlayEventBus from 'primevue/overlayeventbus';\nimport Portal from 'primevue/portal';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport TieredMenuStyle from 'primevue/tieredmenu/style';\nimport AngleRightIcon from '@primevue/icons/angleright';\nimport Ripple from 'primevue/ripple';\nimport { mergeProps, resolveComponent, resolveDirective, openBlock, createBlock, Transition, withCtx, createElementBlock, Fragment, renderList, createElementVNode, withDirectives, resolveDynamicComponent, normalizeClass, createCommentVNode, toDisplayString, normalizeStyle, createVNode, renderSlot } from 'vue';\n\nvar script$2 = {\n name: 'BaseTieredMenu',\n \"extends\": BaseComponent,\n props: {\n popup: {\n type: Boolean,\n \"default\": false\n },\n model: {\n type: Array,\n \"default\": null\n },\n appendTo: {\n type: [String, Object],\n \"default\": 'body'\n },\n autoZIndex: {\n type: Boolean,\n \"default\": true\n },\n baseZIndex: {\n type: Number,\n \"default\": 0\n },\n disabled: {\n type: Boolean,\n \"default\": false\n },\n tabindex: {\n type: Number,\n \"default\": 0\n },\n ariaLabelledby: {\n type: String,\n \"default\": null\n },\n ariaLabel: {\n type: String,\n \"default\": null\n }\n },\n style: TieredMenuStyle,\n provide: function provide() {\n return {\n $pcTieredMenu: this,\n $parentInstance: this\n };\n }\n};\n\nvar script$1 = {\n name: 'TieredMenuSub',\n hostName: 'TieredMenu',\n \"extends\": BaseComponent,\n emits: ['item-click', 'item-mouseenter', 'item-mousemove'],\n container: null,\n props: {\n menuId: {\n type: String,\n \"default\": null\n },\n focusedItemId: {\n type: String,\n \"default\": null\n },\n items: {\n type: Array,\n \"default\": null\n },\n visible: {\n type: Boolean,\n \"default\": false\n },\n level: {\n type: Number,\n \"default\": 0\n },\n templates: {\n type: Object,\n \"default\": null\n },\n activeItemPath: {\n type: Object,\n \"default\": null\n },\n tabindex: {\n type: Number,\n \"default\": 0\n }\n },\n methods: {\n getItemId: function getItemId(processedItem) {\n return \"\".concat(this.menuId, \"_\").concat(processedItem.key);\n },\n getItemKey: function getItemKey(processedItem) {\n return this.getItemId(processedItem);\n },\n getItemProp: function getItemProp(processedItem, name, params) {\n return processedItem && processedItem.item ? resolve(processedItem.item[name], params) : undefined;\n },\n getItemLabel: function getItemLabel(processedItem) {\n return this.getItemProp(processedItem, 'label');\n },\n getItemLabelId: function getItemLabelId(processedItem) {\n return \"\".concat(this.menuId, \"_\").concat(processedItem.key, \"_label\");\n },\n getPTOptions: function getPTOptions(processedItem, index, key) {\n return this.ptm(key, {\n context: {\n item: processedItem.item,\n index: index,\n active: this.isItemActive(processedItem),\n focused: this.isItemFocused(processedItem),\n disabled: this.isItemDisabled(processedItem)\n }\n });\n },\n isItemActive: function isItemActive(processedItem) {\n return this.activeItemPath.some(function (path) {\n return path.key === processedItem.key;\n });\n },\n isItemVisible: function isItemVisible(processedItem) {\n return this.getItemProp(processedItem, 'visible') !== false;\n },\n isItemDisabled: function isItemDisabled(processedItem) {\n return this.getItemProp(processedItem, 'disabled');\n },\n isItemFocused: function isItemFocused(processedItem) {\n return this.focusedItemId === this.getItemId(processedItem);\n },\n isItemGroup: function isItemGroup(processedItem) {\n return isNotEmpty(processedItem.items);\n },\n onEnter: function onEnter() {\n nestedPosition(this.container, this.level);\n },\n onItemClick: function onItemClick(event, processedItem) {\n this.getItemProp(processedItem, 'command', {\n originalEvent: event,\n item: processedItem.item\n });\n this.$emit('item-click', {\n originalEvent: event,\n processedItem: processedItem,\n isFocus: true\n });\n },\n onItemMouseEnter: function onItemMouseEnter(event, processedItem) {\n this.$emit('item-mouseenter', {\n originalEvent: event,\n processedItem: processedItem\n });\n },\n onItemMouseMove: function onItemMouseMove(event, processedItem) {\n this.$emit('item-mousemove', {\n originalEvent: event,\n processedItem: processedItem\n });\n },\n getAriaSetSize: function getAriaSetSize() {\n var _this = this;\n return this.items.filter(function (processedItem) {\n return _this.isItemVisible(processedItem) && !_this.getItemProp(processedItem, 'separator');\n }).length;\n },\n getAriaPosInset: function getAriaPosInset(index) {\n var _this2 = this;\n return index - this.items.slice(0, index).filter(function (processedItem) {\n return _this2.isItemVisible(processedItem) && _this2.getItemProp(processedItem, 'separator');\n }).length + 1;\n },\n getMenuItemProps: function getMenuItemProps(processedItem, index) {\n return {\n action: mergeProps({\n \"class\": this.cx('itemLink'),\n tabindex: -1,\n 'aria-hidden': true\n }, this.getPTOptions(processedItem, index, 'itemLink')),\n icon: mergeProps({\n \"class\": [this.cx('itemIcon'), this.getItemProp(processedItem, 'icon')]\n }, this.getPTOptions(processedItem, index, 'itemIcon')),\n label: mergeProps({\n \"class\": this.cx('itemLabel')\n }, this.getPTOptions(processedItem, index, 'itemLabel')),\n submenuicon: mergeProps({\n \"class\": this.cx('submenuIcon')\n }, this.getPTOptions(processedItem, index, 'submenuIcon'))\n };\n },\n containerRef: function containerRef(el) {\n this.container = el;\n }\n },\n components: {\n AngleRightIcon: AngleRightIcon\n },\n directives: {\n ripple: Ripple\n }\n};\n\nvar _hoisted_1$1 = [\"tabindex\"];\nvar _hoisted_2 = [\"id\", \"aria-label\", \"aria-disabled\", \"aria-expanded\", \"aria-haspopup\", \"aria-level\", \"aria-setsize\", \"aria-posinset\", \"data-p-active\", \"data-p-focused\", \"data-p-disabled\"];\nvar _hoisted_3 = [\"onClick\", \"onMouseenter\", \"onMousemove\"];\nvar _hoisted_4 = [\"href\", \"target\"];\nvar _hoisted_5 = [\"id\"];\nvar _hoisted_6 = [\"id\"];\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n var _component_AngleRightIcon = resolveComponent(\"AngleRightIcon\");\n var _component_TieredMenuSub = resolveComponent(\"TieredMenuSub\", true);\n var _directive_ripple = resolveDirective(\"ripple\");\n return openBlock(), createBlock(Transition, mergeProps({\n name: \"p-tieredmenu\",\n onEnter: $options.onEnter\n }, _ctx.ptm('menu.transition')), {\n \"default\": withCtx(function () {\n return [($props.level === 0 ? true : $props.visible) ? (openBlock(), createElementBlock(\"ul\", mergeProps({\n key: 0,\n ref: $options.containerRef,\n \"class\": $props.level === 0 ? _ctx.cx('rootList') : _ctx.cx('submenu'),\n tabindex: $props.tabindex\n }, $props.level === 0 ? _ctx.ptm('rootList') : _ctx.ptm('submenu')), [(openBlock(true), createElementBlock(Fragment, null, renderList($props.items, function (processedItem, index) {\n return openBlock(), createElementBlock(Fragment, {\n key: $options.getItemKey(processedItem)\n }, [$options.isItemVisible(processedItem) && !$options.getItemProp(processedItem, 'separator') ? (openBlock(), createElementBlock(\"li\", mergeProps({\n key: 0,\n id: $options.getItemId(processedItem),\n style: $options.getItemProp(processedItem, 'style'),\n \"class\": [_ctx.cx('item', {\n processedItem: processedItem\n }), $options.getItemProp(processedItem, 'class')],\n role: \"menuitem\",\n \"aria-label\": $options.getItemLabel(processedItem),\n \"aria-disabled\": $options.isItemDisabled(processedItem) || undefined,\n \"aria-expanded\": $options.isItemGroup(processedItem) ? $options.isItemActive(processedItem) : undefined,\n \"aria-haspopup\": $options.isItemGroup(processedItem) && !$options.getItemProp(processedItem, 'to') ? 'menu' : undefined,\n \"aria-level\": $props.level + 1,\n \"aria-setsize\": $options.getAriaSetSize(),\n \"aria-posinset\": $options.getAriaPosInset(index),\n ref_for: true\n }, $options.getPTOptions(processedItem, index, 'item'), {\n \"data-p-active\": $options.isItemActive(processedItem),\n \"data-p-focused\": $options.isItemFocused(processedItem),\n \"data-p-disabled\": $options.isItemDisabled(processedItem)\n }), [createElementVNode(\"div\", mergeProps({\n \"class\": _ctx.cx('itemContent'),\n onClick: function onClick($event) {\n return $options.onItemClick($event, processedItem);\n },\n onMouseenter: function onMouseenter($event) {\n return $options.onItemMouseEnter($event, processedItem);\n },\n onMousemove: function onMousemove($event) {\n return $options.onItemMouseMove($event, processedItem);\n },\n ref_for: true\n }, $options.getPTOptions(processedItem, index, 'itemContent')), [!$props.templates.item ? withDirectives((openBlock(), createElementBlock(\"a\", mergeProps({\n key: 0,\n href: $options.getItemProp(processedItem, 'url'),\n \"class\": _ctx.cx('itemLink'),\n target: $options.getItemProp(processedItem, 'target'),\n tabindex: \"-1\",\n ref_for: true\n }, $options.getPTOptions(processedItem, index, 'itemLink')), [$props.templates.itemicon ? (openBlock(), createBlock(resolveDynamicComponent($props.templates.itemicon), {\n key: 0,\n item: processedItem.item,\n \"class\": normalizeClass(_ctx.cx('itemIcon'))\n }, null, 8, [\"item\", \"class\"])) : $options.getItemProp(processedItem, 'icon') ? (openBlock(), createElementBlock(\"span\", mergeProps({\n key: 1,\n \"class\": [_ctx.cx('itemIcon'), $options.getItemProp(processedItem, 'icon')],\n ref_for: true\n }, $options.getPTOptions(processedItem, index, 'itemIcon')), null, 16)) : createCommentVNode(\"\", true), createElementVNode(\"span\", mergeProps({\n id: $options.getItemLabelId(processedItem),\n \"class\": _ctx.cx('itemLabel'),\n ref_for: true\n }, $options.getPTOptions(processedItem, index, 'itemLabel')), toDisplayString($options.getItemLabel(processedItem)), 17, _hoisted_5), $options.getItemProp(processedItem, 'items') ? (openBlock(), createElementBlock(Fragment, {\n key: 2\n }, [$props.templates.submenuicon ? (openBlock(), createBlock(resolveDynamicComponent($props.templates.submenuicon), mergeProps({\n key: 0,\n \"class\": _ctx.cx('submenuIcon'),\n active: $options.isItemActive(processedItem),\n ref_for: true\n }, $options.getPTOptions(processedItem, index, 'submenuIcon')), null, 16, [\"class\", \"active\"])) : (openBlock(), createBlock(_component_AngleRightIcon, mergeProps({\n key: 1,\n \"class\": _ctx.cx('submenuIcon'),\n ref_for: true\n }, $options.getPTOptions(processedItem, index, 'submenuIcon')), null, 16, [\"class\"]))], 64)) : createCommentVNode(\"\", true)], 16, _hoisted_4)), [[_directive_ripple]]) : (openBlock(), createBlock(resolveDynamicComponent($props.templates.item), {\n key: 1,\n item: processedItem.item,\n hasSubmenu: $options.getItemProp(processedItem, 'items'),\n label: $options.getItemLabel(processedItem),\n props: $options.getMenuItemProps(processedItem, index)\n }, null, 8, [\"item\", \"hasSubmenu\", \"label\", \"props\"]))], 16, _hoisted_3), $options.isItemVisible(processedItem) && $options.isItemGroup(processedItem) ? (openBlock(), createBlock(_component_TieredMenuSub, {\n key: 0,\n id: $options.getItemId(processedItem) + '_list',\n style: normalizeStyle(_ctx.sx('submenu', true, {\n processedItem: processedItem\n })),\n \"aria-labelledby\": $options.getItemLabelId(processedItem),\n role: \"menu\",\n menuId: $props.menuId,\n focusedItemId: $props.focusedItemId,\n items: processedItem.items,\n templates: $props.templates,\n activeItemPath: $props.activeItemPath,\n level: $props.level + 1,\n visible: $options.isItemActive(processedItem) && $options.isItemGroup(processedItem),\n pt: _ctx.pt,\n unstyled: _ctx.unstyled,\n onItemClick: _cache[0] || (_cache[0] = function ($event) {\n return _ctx.$emit('item-click', $event);\n }),\n onItemMouseenter: _cache[1] || (_cache[1] = function ($event) {\n return _ctx.$emit('item-mouseenter', $event);\n }),\n onItemMousemove: _cache[2] || (_cache[2] = function ($event) {\n return _ctx.$emit('item-mousemove', $event);\n })\n }, null, 8, [\"id\", \"style\", \"aria-labelledby\", \"menuId\", \"focusedItemId\", \"items\", \"templates\", \"activeItemPath\", \"level\", \"visible\", \"pt\", \"unstyled\"])) : createCommentVNode(\"\", true)], 16, _hoisted_2)) : createCommentVNode(\"\", true), $options.isItemVisible(processedItem) && $options.getItemProp(processedItem, 'separator') ? (openBlock(), createElementBlock(\"li\", mergeProps({\n key: 1,\n id: $options.getItemId(processedItem),\n style: $options.getItemProp(processedItem, 'style'),\n \"class\": [_ctx.cx('separator'), $options.getItemProp(processedItem, 'class')],\n role: \"separator\",\n ref_for: true\n }, _ctx.ptm('separator')), null, 16, _hoisted_6)) : createCommentVNode(\"\", true)], 64);\n }), 128))], 16, _hoisted_1$1)) : createCommentVNode(\"\", true)];\n }),\n _: 1\n }, 16, [\"onEnter\"]);\n}\n\nscript$1.render = render$1;\n\nvar script = {\n name: 'TieredMenu',\n \"extends\": script$2,\n inheritAttrs: false,\n emits: ['focus', 'blur', 'before-show', 'before-hide', 'hide', 'show'],\n outsideClickListener: null,\n scrollHandler: null,\n resizeListener: null,\n target: null,\n container: null,\n menubar: null,\n searchTimeout: null,\n searchValue: null,\n data: function data() {\n return {\n id: this.$attrs.id,\n focused: false,\n focusedItemInfo: {\n index: -1,\n level: 0,\n parentKey: ''\n },\n activeItemPath: [],\n visible: !this.popup,\n submenuVisible: false,\n dirty: false\n };\n },\n watch: {\n '$attrs.id': function $attrsId(newValue) {\n this.id = newValue || UniqueComponentId();\n },\n activeItemPath: function activeItemPath(newPath) {\n if (!this.popup) {\n if (isNotEmpty(newPath)) {\n this.bindOutsideClickListener();\n this.bindResizeListener();\n } else {\n this.unbindOutsideClickListener();\n this.unbindResizeListener();\n }\n }\n }\n },\n mounted: function mounted() {\n this.id = this.id || UniqueComponentId();\n },\n beforeUnmount: function beforeUnmount() {\n this.unbindOutsideClickListener();\n this.unbindResizeListener();\n if (this.scrollHandler) {\n this.scrollHandler.destroy();\n this.scrollHandler = null;\n }\n if (this.container && this.autoZIndex) {\n ZIndex.clear(this.container);\n }\n this.target = null;\n this.container = null;\n },\n methods: {\n getItemProp: function getItemProp(item, name) {\n return item ? resolve(item[name]) : undefined;\n },\n getItemLabel: function getItemLabel(item) {\n return this.getItemProp(item, 'label');\n },\n isItemDisabled: function isItemDisabled(item) {\n return this.getItemProp(item, 'disabled');\n },\n isItemVisible: function isItemVisible(item) {\n return this.getItemProp(item, 'visible') !== false;\n },\n isItemGroup: function isItemGroup(item) {\n return isNotEmpty(this.getItemProp(item, 'items'));\n },\n isItemSeparator: function isItemSeparator(item) {\n return this.getItemProp(item, 'separator');\n },\n getProccessedItemLabel: function getProccessedItemLabel(processedItem) {\n return processedItem ? this.getItemLabel(processedItem.item) : undefined;\n },\n isProccessedItemGroup: function isProccessedItemGroup(processedItem) {\n return processedItem && isNotEmpty(processedItem.items);\n },\n toggle: function toggle(event) {\n this.visible ? this.hide(event, true) : this.show(event);\n },\n show: function show(event, isFocus) {\n if (this.popup) {\n this.$emit('before-show');\n this.visible = true;\n this.target = this.target || event.currentTarget;\n this.relatedTarget = event.relatedTarget || null;\n }\n isFocus && focus(this.menubar);\n },\n hide: function hide(event, isFocus) {\n if (this.popup) {\n this.$emit('before-hide');\n this.visible = false;\n }\n this.activeItemPath = [];\n this.focusedItemInfo = {\n index: -1,\n level: 0,\n parentKey: ''\n };\n isFocus && focus(this.relatedTarget || this.target || this.menubar);\n this.dirty = false;\n },\n onFocus: function onFocus(event) {\n this.focused = true;\n if (!this.popup) {\n this.focusedItemInfo = this.focusedItemInfo.index !== -1 ? this.focusedItemInfo : {\n index: this.findFirstFocusedItemIndex(),\n level: 0,\n parentKey: ''\n };\n }\n this.$emit('focus', event);\n },\n onBlur: function onBlur(event) {\n this.focused = false;\n this.focusedItemInfo = {\n index: -1,\n level: 0,\n parentKey: ''\n };\n this.searchValue = '';\n this.dirty = false;\n this.$emit('blur', event);\n },\n onKeyDown: function onKeyDown(event) {\n if (this.disabled) {\n event.preventDefault();\n return;\n }\n var metaKey = event.metaKey || event.ctrlKey;\n switch (event.code) {\n case 'ArrowDown':\n this.onArrowDownKey(event);\n break;\n case 'ArrowUp':\n this.onArrowUpKey(event);\n break;\n case 'ArrowLeft':\n this.onArrowLeftKey(event);\n break;\n case 'ArrowRight':\n this.onArrowRightKey(event);\n break;\n case 'Home':\n this.onHomeKey(event);\n break;\n case 'End':\n this.onEndKey(event);\n break;\n case 'Space':\n this.onSpaceKey(event);\n break;\n case 'Enter':\n case 'NumpadEnter':\n this.onEnterKey(event);\n break;\n case 'Escape':\n this.onEscapeKey(event);\n break;\n case 'Tab':\n this.onTabKey(event);\n break;\n case 'PageDown':\n case 'PageUp':\n case 'Backspace':\n case 'ShiftLeft':\n case 'ShiftRight':\n //NOOP\n break;\n default:\n if (!metaKey && isPrintableCharacter(event.key)) {\n this.searchItems(event, event.key);\n }\n break;\n }\n },\n onItemChange: function onItemChange(event) {\n var processedItem = event.processedItem,\n isFocus = event.isFocus;\n if (isEmpty(processedItem)) return;\n var index = processedItem.index,\n key = processedItem.key,\n level = processedItem.level,\n parentKey = processedItem.parentKey,\n items = processedItem.items;\n var grouped = isNotEmpty(items);\n var activeItemPath = this.activeItemPath.filter(function (p) {\n return p.parentKey !== parentKey && p.parentKey !== key;\n });\n if (grouped) {\n activeItemPath.push(processedItem);\n this.submenuVisible = true;\n }\n this.focusedItemInfo = {\n index: index,\n level: level,\n parentKey: parentKey\n };\n this.activeItemPath = activeItemPath;\n grouped && (this.dirty = true);\n isFocus && focus(this.menubar);\n },\n onOverlayClick: function onOverlayClick(event) {\n OverlayEventBus.emit('overlay-click', {\n originalEvent: event,\n target: this.target\n });\n },\n onItemClick: function onItemClick(event) {\n var originalEvent = event.originalEvent,\n processedItem = event.processedItem;\n var grouped = this.isProccessedItemGroup(processedItem);\n var root = isEmpty(processedItem.parent);\n var selected = this.isSelected(processedItem);\n if (selected) {\n var index = processedItem.index,\n key = processedItem.key,\n level = processedItem.level,\n parentKey = processedItem.parentKey;\n this.activeItemPath = this.activeItemPath.filter(function (p) {\n return key !== p.key && key.startsWith(p.key);\n });\n this.focusedItemInfo = {\n index: index,\n level: level,\n parentKey: parentKey\n };\n this.dirty = !root;\n focus(this.menubar);\n } else {\n if (grouped) {\n this.onItemChange(event);\n } else {\n var rootProcessedItem = root ? processedItem : this.activeItemPath.find(function (p) {\n return p.parentKey === '';\n });\n this.hide(originalEvent);\n this.changeFocusedItemIndex(originalEvent, rootProcessedItem ? rootProcessedItem.index : -1);\n focus(this.menubar);\n }\n }\n },\n onItemMouseEnter: function onItemMouseEnter(event) {\n if (this.dirty) {\n this.onItemChange(event);\n }\n },\n onItemMouseMove: function onItemMouseMove(event) {\n if (this.focused) {\n this.changeFocusedItemIndex(event, event.processedItem.index);\n }\n },\n onArrowDownKey: function onArrowDownKey(event) {\n var itemIndex = this.focusedItemInfo.index !== -1 ? this.findNextItemIndex(this.focusedItemInfo.index) : this.findFirstFocusedItemIndex();\n this.changeFocusedItemIndex(event, itemIndex);\n event.preventDefault();\n },\n onArrowUpKey: function onArrowUpKey(event) {\n if (event.altKey) {\n if (this.focusedItemInfo.index !== -1) {\n var processedItem = this.visibleItems[this.focusedItemInfo.index];\n var grouped = this.isProccessedItemGroup(processedItem);\n !grouped && this.onItemChange({\n originalEvent: event,\n processedItem: processedItem\n });\n }\n this.popup && this.hide(event, true);\n event.preventDefault();\n } else {\n var itemIndex = this.focusedItemInfo.index !== -1 ? this.findPrevItemIndex(this.focusedItemInfo.index) : this.findLastFocusedItemIndex();\n this.changeFocusedItemIndex(event, itemIndex);\n event.preventDefault();\n }\n },\n onArrowLeftKey: function onArrowLeftKey(event) {\n var _this = this;\n var processedItem = this.visibleItems[this.focusedItemInfo.index];\n var parentItem = this.activeItemPath.find(function (p) {\n return p.key === processedItem.parentKey;\n });\n var root = isEmpty(processedItem.parent);\n if (!root) {\n this.focusedItemInfo = {\n index: -1,\n parentKey: parentItem ? parentItem.parentKey : ''\n };\n this.searchValue = '';\n this.onArrowDownKey(event);\n }\n this.activeItemPath = this.activeItemPath.filter(function (p) {\n return p.parentKey !== _this.focusedItemInfo.parentKey;\n });\n event.preventDefault();\n },\n onArrowRightKey: function onArrowRightKey(event) {\n var processedItem = this.visibleItems[this.focusedItemInfo.index];\n var grouped = this.isProccessedItemGroup(processedItem);\n if (grouped) {\n this.onItemChange({\n originalEvent: event,\n processedItem: processedItem\n });\n this.focusedItemInfo = {\n index: -1,\n parentKey: processedItem.key\n };\n this.searchValue = '';\n this.onArrowDownKey(event);\n }\n event.preventDefault();\n },\n onHomeKey: function onHomeKey(event) {\n this.changeFocusedItemIndex(event, this.findFirstItemIndex());\n event.preventDefault();\n },\n onEndKey: function onEndKey(event) {\n this.changeFocusedItemIndex(event, this.findLastItemIndex());\n event.preventDefault();\n },\n onEnterKey: function onEnterKey(event) {\n if (this.focusedItemInfo.index !== -1) {\n var element = findSingle(this.menubar, \"li[id=\\\"\".concat(\"\".concat(this.focusedItemId), \"\\\"]\"));\n var anchorElement = element && findSingle(element, '[data-pc-section=\"itemlink\"]');\n anchorElement ? anchorElement.click() : element && element.click();\n if (!this.popup) {\n var processedItem = this.visibleItems[this.focusedItemInfo.index];\n var grouped = this.isProccessedItemGroup(processedItem);\n !grouped && (this.focusedItemInfo.index = this.findFirstFocusedItemIndex());\n }\n }\n event.preventDefault();\n },\n onSpaceKey: function onSpaceKey(event) {\n this.onEnterKey(event);\n },\n onEscapeKey: function onEscapeKey(event) {\n if (this.popup || this.focusedItemInfo.level !== 0) {\n var _focusedItemInfo = this.focusedItemInfo;\n this.hide(event, false);\n this.focusedItemInfo = {\n index: Number(_focusedItemInfo.parentKey.split('_')[0]),\n level: 0,\n parentKey: ''\n };\n this.popup && focus(this.target);\n }\n event.preventDefault();\n },\n onTabKey: function onTabKey(event) {\n if (this.focusedItemInfo.index !== -1) {\n var processedItem = this.visibleItems[this.focusedItemInfo.index];\n var grouped = this.isProccessedItemGroup(processedItem);\n !grouped && this.onItemChange({\n originalEvent: event,\n processedItem: processedItem\n });\n }\n this.hide();\n },\n onEnter: function onEnter(el) {\n if (this.autoZIndex) {\n ZIndex.set('menu', el, this.baseZIndex + this.$primevue.config.zIndex.menu);\n }\n addStyle(el, {\n position: 'absolute',\n top: '0',\n left: '0'\n });\n this.alignOverlay();\n focus(this.menubar);\n this.scrollInView();\n },\n onAfterEnter: function onAfterEnter() {\n this.bindOutsideClickListener();\n this.bindScrollListener();\n this.bindResizeListener();\n this.$emit('show');\n },\n onLeave: function onLeave() {\n this.unbindOutsideClickListener();\n this.unbindScrollListener();\n this.unbindResizeListener();\n this.$emit('hide');\n this.container = null;\n this.dirty = false;\n },\n onAfterLeave: function onAfterLeave(el) {\n if (this.autoZIndex) {\n ZIndex.clear(el);\n }\n },\n alignOverlay: function alignOverlay() {\n absolutePosition(this.container, this.target);\n var targetWidth = getOuterWidth(this.target);\n if (targetWidth > getOuterWidth(this.container)) {\n this.container.style.minWidth = getOuterWidth(this.target) + 'px';\n }\n },\n bindOutsideClickListener: function bindOutsideClickListener() {\n var _this2 = this;\n if (!this.outsideClickListener) {\n this.outsideClickListener = function (event) {\n var isOutsideContainer = _this2.container && !_this2.container.contains(event.target);\n var isOutsideTarget = _this2.popup ? !(_this2.target && (_this2.target === event.target || _this2.target.contains(event.target))) : true;\n if (isOutsideContainer && isOutsideTarget) {\n _this2.hide();\n }\n };\n document.addEventListener('click', this.outsideClickListener);\n }\n },\n unbindOutsideClickListener: function unbindOutsideClickListener() {\n if (this.outsideClickListener) {\n document.removeEventListener('click', this.outsideClickListener);\n this.outsideClickListener = null;\n }\n },\n bindScrollListener: function bindScrollListener() {\n var _this3 = this;\n if (!this.scrollHandler) {\n this.scrollHandler = new ConnectedOverlayScrollHandler(this.target, function (event) {\n _this3.hide(event, true);\n });\n }\n this.scrollHandler.bindScrollListener();\n },\n unbindScrollListener: function unbindScrollListener() {\n if (this.scrollHandler) {\n this.scrollHandler.unbindScrollListener();\n }\n },\n bindResizeListener: function bindResizeListener() {\n var _this4 = this;\n if (!this.resizeListener) {\n this.resizeListener = function (event) {\n if (!isTouchDevice()) {\n _this4.hide(event, true);\n }\n };\n window.addEventListener('resize', this.resizeListener);\n }\n },\n unbindResizeListener: function unbindResizeListener() {\n if (this.resizeListener) {\n window.removeEventListener('resize', this.resizeListener);\n this.resizeListener = null;\n }\n },\n isItemMatched: function isItemMatched(processedItem) {\n var _this$getProccessedIt;\n return this.isValidItem(processedItem) && ((_this$getProccessedIt = this.getProccessedItemLabel(processedItem)) === null || _this$getProccessedIt === void 0 ? void 0 : _this$getProccessedIt.toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase()));\n },\n isValidItem: function isValidItem(processedItem) {\n return !!processedItem && !this.isItemDisabled(processedItem.item) && !this.isItemSeparator(processedItem.item) && this.isItemVisible(processedItem.item);\n },\n isValidSelectedItem: function isValidSelectedItem(processedItem) {\n return this.isValidItem(processedItem) && this.isSelected(processedItem);\n },\n isSelected: function isSelected(processedItem) {\n return this.activeItemPath.some(function (p) {\n return p.key === processedItem.key;\n });\n },\n findFirstItemIndex: function findFirstItemIndex() {\n var _this5 = this;\n return this.visibleItems.findIndex(function (processedItem) {\n return _this5.isValidItem(processedItem);\n });\n },\n findLastItemIndex: function findLastItemIndex() {\n var _this6 = this;\n return findLastIndex(this.visibleItems, function (processedItem) {\n return _this6.isValidItem(processedItem);\n });\n },\n findNextItemIndex: function findNextItemIndex(index) {\n var _this7 = this;\n var matchedItemIndex = index < this.visibleItems.length - 1 ? this.visibleItems.slice(index + 1).findIndex(function (processedItem) {\n return _this7.isValidItem(processedItem);\n }) : -1;\n return matchedItemIndex > -1 ? matchedItemIndex + index + 1 : index;\n },\n findPrevItemIndex: function findPrevItemIndex(index) {\n var _this8 = this;\n var matchedItemIndex = index > 0 ? findLastIndex(this.visibleItems.slice(0, index), function (processedItem) {\n return _this8.isValidItem(processedItem);\n }) : -1;\n return matchedItemIndex > -1 ? matchedItemIndex : index;\n },\n findSelectedItemIndex: function findSelectedItemIndex() {\n var _this9 = this;\n return this.visibleItems.findIndex(function (processedItem) {\n return _this9.isValidSelectedItem(processedItem);\n });\n },\n findFirstFocusedItemIndex: function findFirstFocusedItemIndex() {\n var selectedIndex = this.findSelectedItemIndex();\n return selectedIndex < 0 ? this.findFirstItemIndex() : selectedIndex;\n },\n findLastFocusedItemIndex: function findLastFocusedItemIndex() {\n var selectedIndex = this.findSelectedItemIndex();\n return selectedIndex < 0 ? this.findLastItemIndex() : selectedIndex;\n },\n searchItems: function searchItems(event, _char) {\n var _this10 = this;\n this.searchValue = (this.searchValue || '') + _char;\n var itemIndex = -1;\n var matched = false;\n if (this.focusedItemInfo.index !== -1) {\n itemIndex = this.visibleItems.slice(this.focusedItemInfo.index).findIndex(function (processedItem) {\n return _this10.isItemMatched(processedItem);\n });\n itemIndex = itemIndex === -1 ? this.visibleItems.slice(0, this.focusedItemInfo.index).findIndex(function (processedItem) {\n return _this10.isItemMatched(processedItem);\n }) : itemIndex + this.focusedItemInfo.index;\n } else {\n itemIndex = this.visibleItems.findIndex(function (processedItem) {\n return _this10.isItemMatched(processedItem);\n });\n }\n if (itemIndex !== -1) {\n matched = true;\n }\n if (itemIndex === -1 && this.focusedItemInfo.index === -1) {\n itemIndex = this.findFirstFocusedItemIndex();\n }\n if (itemIndex !== -1) {\n this.changeFocusedItemIndex(event, itemIndex);\n }\n if (this.searchTimeout) {\n clearTimeout(this.searchTimeout);\n }\n this.searchTimeout = setTimeout(function () {\n _this10.searchValue = '';\n _this10.searchTimeout = null;\n }, 500);\n return matched;\n },\n changeFocusedItemIndex: function changeFocusedItemIndex(event, index) {\n if (this.focusedItemInfo.index !== index) {\n this.focusedItemInfo.index = index;\n this.scrollInView();\n }\n },\n scrollInView: function scrollInView() {\n var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;\n var id = index !== -1 ? \"\".concat(this.id, \"_\").concat(index) : this.focusedItemId;\n var element = findSingle(this.menubar, \"li[id=\\\"\".concat(id, \"\\\"]\"));\n if (element) {\n element.scrollIntoView && element.scrollIntoView({\n block: 'nearest',\n inline: 'start'\n });\n }\n },\n createProcessedItems: function createProcessedItems(items) {\n var _this11 = this;\n var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var parent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var parentKey = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';\n var processedItems = [];\n items && items.forEach(function (item, index) {\n var key = (parentKey !== '' ? parentKey + '_' : '') + index;\n var newItem = {\n item: item,\n index: index,\n level: level,\n key: key,\n parent: parent,\n parentKey: parentKey\n };\n newItem['items'] = _this11.createProcessedItems(item.items, level + 1, newItem, key);\n processedItems.push(newItem);\n });\n return processedItems;\n },\n containerRef: function containerRef(el) {\n this.container = el;\n },\n menubarRef: function menubarRef(el) {\n this.menubar = el ? el.$el : undefined;\n }\n },\n computed: {\n processedItems: function processedItems() {\n return this.createProcessedItems(this.model || []);\n },\n visibleItems: function visibleItems() {\n var _this12 = this;\n var processedItem = this.activeItemPath.find(function (p) {\n return p.key === _this12.focusedItemInfo.parentKey;\n });\n return processedItem ? processedItem.items : this.processedItems;\n },\n focusedItemId: function focusedItemId() {\n return this.focusedItemInfo.index !== -1 ? \"\".concat(this.id).concat(isNotEmpty(this.focusedItemInfo.parentKey) ? '_' + this.focusedItemInfo.parentKey : '', \"_\").concat(this.focusedItemInfo.index) : null;\n }\n },\n components: {\n TieredMenuSub: script$1,\n Portal: Portal\n }\n};\n\nvar _hoisted_1 = [\"id\"];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n var _component_TieredMenuSub = resolveComponent(\"TieredMenuSub\");\n var _component_Portal = resolveComponent(\"Portal\");\n return openBlock(), createBlock(_component_Portal, {\n appendTo: _ctx.appendTo,\n disabled: !_ctx.popup\n }, {\n \"default\": withCtx(function () {\n return [createVNode(Transition, mergeProps({\n name: \"p-connected-overlay\",\n onEnter: $options.onEnter,\n onAfterEnter: $options.onAfterEnter,\n onLeave: $options.onLeave,\n onAfterLeave: $options.onAfterLeave\n }, _ctx.ptm('transition')), {\n \"default\": withCtx(function () {\n return [$data.visible ? (openBlock(), createElementBlock(\"div\", mergeProps({\n key: 0,\n ref: $options.containerRef,\n id: $data.id,\n \"class\": _ctx.cx('root'),\n onClick: _cache[0] || (_cache[0] = function () {\n return $options.onOverlayClick && $options.onOverlayClick.apply($options, arguments);\n })\n }, _ctx.ptmi('root')), [_ctx.$slots.start ? (openBlock(), createElementBlock(\"div\", mergeProps({\n key: 0,\n \"class\": _ctx.cx('start')\n }, _ctx.ptm('start')), [renderSlot(_ctx.$slots, \"start\")], 16)) : createCommentVNode(\"\", true), createVNode(_component_TieredMenuSub, {\n ref: $options.menubarRef,\n id: $data.id + '_list',\n tabindex: !_ctx.disabled ? _ctx.tabindex : -1,\n role: \"menubar\",\n \"aria-label\": _ctx.ariaLabel,\n \"aria-labelledby\": _ctx.ariaLabelledby,\n \"aria-disabled\": _ctx.disabled || undefined,\n \"aria-orientation\": \"vertical\",\n \"aria-activedescendant\": $data.focused ? $options.focusedItemId : undefined,\n menuId: $data.id,\n focusedItemId: $data.focused ? $options.focusedItemId : undefined,\n items: $options.processedItems,\n templates: _ctx.$slots,\n activeItemPath: $data.activeItemPath,\n level: 0,\n visible: $data.submenuVisible,\n pt: _ctx.pt,\n unstyled: _ctx.unstyled,\n onFocus: $options.onFocus,\n onBlur: $options.onBlur,\n onKeydown: $options.onKeyDown,\n onItemClick: $options.onItemClick,\n onItemMouseenter: $options.onItemMouseEnter,\n onItemMousemove: $options.onItemMouseMove\n }, null, 8, [\"id\", \"tabindex\", \"aria-label\", \"aria-labelledby\", \"aria-disabled\", \"aria-activedescendant\", \"menuId\", \"focusedItemId\", \"items\", \"templates\", \"activeItemPath\", \"visible\", \"pt\", \"unstyled\", \"onFocus\", \"onBlur\", \"onKeydown\", \"onItemClick\", \"onItemMouseenter\", \"onItemMousemove\"]), _ctx.$slots.end ? (openBlock(), createElementBlock(\"div\", mergeProps({\n key: 1,\n \"class\": _ctx.cx('end')\n }, _ctx.ptm('end')), [renderSlot(_ctx.$slots, \"end\")], 16)) : createCommentVNode(\"\", true)], 16, _hoisted_1)) : createCommentVNode(\"\", true)];\n }),\n _: 3\n }, 16, [\"onEnter\", \"onAfterEnter\", \"onLeave\", \"onAfterLeave\"])];\n }),\n _: 3\n }, 8, [\"appendTo\", \"disabled\"]);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-splitbutton {\\n display: inline-flex;\\n position: relative;\\n border-radius: \".concat(dt('splitbutton.border.radius'), \";\\n}\\n\\n.p-splitbutton-button {\\n border-top-right-radius: 0;\\n border-bottom-right-radius: 0;\\n border-right: 0 none;\\n}\\n\\n.p-splitbutton-button:focus-visible,\\n.p-splitbutton-dropdown:focus-visible {\\n z-index: 1;\\n}\\n\\n.p-splitbutton-button:not(:disabled):hover,\\n.p-splitbutton-button:not(:disabled):active {\\n border-right: 0 none;\\n}\\n\\n.p-splitbutton-dropdown {\\n border-top-left-radius: 0;\\n border-bottom-left-radius: 0;\\n}\\n\\n.p-splitbutton .p-menu {\\n min-width: 100%;\\n}\\n\\n.p-splitbutton-fluid {\\n display: flex;\\n}\\n\\n.p-splitbutton-rounded .p-splitbutton-dropdown {\\n border-top-right-radius: \").concat(dt('splitbutton.rounded.border.radius'), \";\\n border-bottom-right-radius: \").concat(dt('splitbutton.rounded.border.radius'), \";\\n}\\n\\n.p-splitbutton-rounded .p-splitbutton-button {\\n border-top-left-radius: \").concat(dt('splitbutton.rounded.border.radius'), \";\\n border-bottom-left-radius: \").concat(dt('splitbutton.rounded.border.radius'), \";\\n}\\n\\n.p-splitbutton-raised {\\n box-shadow: \").concat(dt('splitbutton.raised.shadow'), \";\\n}\\n\");\n};\nvar classes = {\n root: function root(_ref2) {\n var instance = _ref2.instance,\n props = _ref2.props;\n return ['p-splitbutton p-component', {\n 'p-splitbutton-raised': props.raised,\n 'p-splitbutton-rounded': props.rounded,\n 'p-splitbutton-fluid': instance.hasFluid\n }];\n },\n pcButton: 'p-splitbutton-button',\n pcDropdown: 'p-splitbutton-dropdown'\n};\nvar SplitButtonStyle = BaseStyle.extend({\n name: 'splitbutton',\n theme: theme,\n classes: classes\n});\n\nexport { SplitButtonStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import { isEmpty } from '@primeuix/utils/object';\nimport { UniqueComponentId } from '@primevue/core/utils';\nimport ChevronDownIcon from '@primevue/icons/chevrondown';\nimport Button from 'primevue/button';\nimport TieredMenu from 'primevue/tieredmenu';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport SplitButtonStyle from 'primevue/splitbutton/style';\nimport { resolveComponent, openBlock, createElementBlock, mergeProps, createVNode, createSlots, withCtx, renderSlot, normalizeClass, createElementVNode, createBlock, resolveDynamicComponent } from 'vue';\n\nvar script$1 = {\n name: 'BaseSplitButton',\n \"extends\": BaseComponent,\n props: {\n label: {\n type: String,\n \"default\": null\n },\n icon: {\n type: String,\n \"default\": null\n },\n model: {\n type: Array,\n \"default\": null\n },\n autoZIndex: {\n type: Boolean,\n \"default\": true\n },\n baseZIndex: {\n type: Number,\n \"default\": 0\n },\n appendTo: {\n type: [String, Object],\n \"default\": 'body'\n },\n disabled: {\n type: Boolean,\n \"default\": false\n },\n fluid: {\n type: Boolean,\n \"default\": null\n },\n \"class\": {\n type: null,\n \"default\": null\n },\n style: {\n type: null,\n \"default\": null\n },\n buttonProps: {\n type: null,\n \"default\": null\n },\n menuButtonProps: {\n type: null,\n \"default\": null\n },\n menuButtonIcon: {\n type: String,\n \"default\": undefined\n },\n dropdownIcon: {\n type: String,\n \"default\": undefined\n },\n severity: {\n type: String,\n \"default\": null\n },\n raised: {\n type: Boolean,\n \"default\": false\n },\n rounded: {\n type: Boolean,\n \"default\": false\n },\n text: {\n type: Boolean,\n \"default\": false\n },\n outlined: {\n type: Boolean,\n \"default\": false\n },\n size: {\n type: String,\n \"default\": null\n },\n plain: {\n type: Boolean,\n \"default\": false\n }\n },\n style: SplitButtonStyle,\n provide: function provide() {\n return {\n $pcSplitButton: this,\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'SplitButton',\n \"extends\": script$1,\n inheritAttrs: false,\n emits: ['click'],\n inject: {\n $pcFluid: {\n \"default\": null\n }\n },\n data: function data() {\n return {\n id: this.$attrs.id,\n isExpanded: false\n };\n },\n watch: {\n '$attrs.id': function $attrsId(newValue) {\n this.id = newValue || UniqueComponentId();\n }\n },\n mounted: function mounted() {\n var _this = this;\n this.id = this.id || UniqueComponentId();\n this.$watch('$refs.menu.visible', function (newValue) {\n _this.isExpanded = newValue;\n });\n },\n methods: {\n onDropdownButtonClick: function onDropdownButtonClick(event) {\n if (event) {\n event.preventDefault();\n }\n this.$refs.menu.toggle({\n currentTarget: this.$el,\n relatedTarget: this.$refs.button.$el\n });\n this.isExpanded = this.$refs.menu.visible;\n },\n onDropdownKeydown: function onDropdownKeydown(event) {\n if (event.code === 'ArrowDown' || event.code === 'ArrowUp') {\n this.onDropdownButtonClick();\n event.preventDefault();\n }\n },\n onDefaultButtonClick: function onDefaultButtonClick(event) {\n if (this.isExpanded) {\n this.$refs.menu.hide(event);\n }\n this.$emit('click', event);\n }\n },\n computed: {\n containerClass: function containerClass() {\n return [this.cx('root'), this[\"class\"]];\n },\n hasFluid: function hasFluid() {\n return isEmpty(this.fluid) ? !!this.$pcFluid : this.fluid;\n }\n },\n components: {\n PVSButton: Button,\n PVSMenu: TieredMenu,\n ChevronDownIcon: ChevronDownIcon\n }\n};\n\nvar _hoisted_1 = [\"data-p-severity\"];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n var _component_PVSButton = resolveComponent(\"PVSButton\");\n var _component_PVSMenu = resolveComponent(\"PVSMenu\");\n return openBlock(), createElementBlock(\"div\", mergeProps({\n \"class\": $options.containerClass,\n style: _ctx.style\n }, _ctx.ptmi('root'), {\n \"data-p-severity\": _ctx.severity\n }), [createVNode(_component_PVSButton, mergeProps({\n type: \"button\",\n \"class\": _ctx.cx('pcButton'),\n label: _ctx.label,\n disabled: _ctx.disabled,\n severity: _ctx.severity,\n text: _ctx.text,\n icon: _ctx.icon,\n outlined: _ctx.outlined,\n size: _ctx.size,\n fluid: _ctx.fluid,\n \"aria-label\": _ctx.label,\n onClick: $options.onDefaultButtonClick\n }, _ctx.buttonProps, {\n pt: _ctx.ptm('pcButton'),\n unstyled: _ctx.unstyled\n }), createSlots({\n \"default\": withCtx(function () {\n return [renderSlot(_ctx.$slots, \"default\")];\n }),\n _: 2\n }, [_ctx.$slots.icon ? {\n name: \"icon\",\n fn: withCtx(function (slotProps) {\n return [renderSlot(_ctx.$slots, \"icon\", {\n \"class\": normalizeClass(slotProps[\"class\"])\n }, function () {\n return [createElementVNode(\"span\", mergeProps({\n \"class\": [_ctx.icon, slotProps[\"class\"]]\n }, _ctx.ptm('pcButton')['icon'], {\n \"data-pc-section\": \"buttonicon\"\n }), null, 16)];\n })];\n }),\n key: \"0\"\n } : undefined]), 1040, [\"class\", \"label\", \"disabled\", \"severity\", \"text\", \"icon\", \"outlined\", \"size\", \"fluid\", \"aria-label\", \"onClick\", \"pt\", \"unstyled\"]), createVNode(_component_PVSButton, mergeProps({\n ref: \"button\",\n type: \"button\",\n \"class\": _ctx.cx('pcDropdown'),\n disabled: _ctx.disabled,\n \"aria-haspopup\": \"true\",\n \"aria-expanded\": $data.isExpanded,\n \"aria-controls\": $data.id + '_overlay',\n onClick: $options.onDropdownButtonClick,\n onKeydown: $options.onDropdownKeydown,\n severity: _ctx.severity,\n text: _ctx.text,\n outlined: _ctx.outlined,\n size: _ctx.size,\n unstyled: _ctx.unstyled\n }, _ctx.menuButtonProps, {\n pt: _ctx.ptm('pcDropdown')\n }), {\n icon: withCtx(function (slotProps) {\n return [renderSlot(_ctx.$slots, _ctx.$slots.dropdownicon ? 'dropdownicon' : 'menubuttonicon', {\n \"class\": normalizeClass(slotProps[\"class\"])\n }, function () {\n return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.menuButtonIcon || _ctx.dropdownIcon ? 'span' : 'ChevronDownIcon'), mergeProps({\n \"class\": [_ctx.dropdownIcon || _ctx.menuButtonIcon, slotProps[\"class\"]]\n }, _ctx.ptm('pcDropdown')['icon'], {\n \"data-pc-section\": \"menubuttonicon\"\n }), null, 16, [\"class\"]))];\n })];\n }),\n _: 3\n }, 16, [\"class\", \"disabled\", \"aria-expanded\", \"aria-controls\", \"onClick\", \"onKeydown\", \"severity\", \"text\", \"outlined\", \"size\", \"unstyled\", \"pt\"]), createVNode(_component_PVSMenu, {\n ref: \"menu\",\n id: $data.id + '_overlay',\n model: _ctx.model,\n popup: true,\n autoZIndex: _ctx.autoZIndex,\n baseZIndex: _ctx.baseZIndex,\n appendTo: _ctx.appendTo,\n unstyled: _ctx.unstyled,\n pt: _ctx.ptm('pcMenu')\n }, createSlots({\n _: 2\n }, [_ctx.$slots.menuitemicon ? {\n name: \"itemicon\",\n fn: withCtx(function (slotProps) {\n return [renderSlot(_ctx.$slots, \"menuitemicon\", {\n item: slotProps.item,\n \"class\": normalizeClass(slotProps[\"class\"])\n })];\n }),\n key: \"0\"\n } : undefined, _ctx.$slots.item ? {\n name: \"item\",\n fn: withCtx(function (slotProps) {\n return [renderSlot(_ctx.$slots, \"item\", {\n item: slotProps.item,\n hasSubmenu: slotProps.hasSubmenu,\n label: slotProps.label,\n props: slotProps.props\n })];\n }),\n key: \"1\"\n } : undefined]), 1032, [\"id\", \"model\", \"autoZIndex\", \"baseZIndex\", \"appendTo\", \"unstyled\", \"pt\"])], 16, _hoisted_1);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n","\n\n\n\n\n","import {\n useQueueSettingsStore,\n useQueuePendingTaskCountStore\n} from '@/stores/queueStore'\nimport { app } from '@/scripts/app'\nimport { api } from '@/scripts/api'\n\nexport function setupAutoQueueHandler() {\n const queueCountStore = useQueuePendingTaskCountStore()\n const queueSettingsStore = useQueueSettingsStore()\n\n let graphHasChanged = false\n let internalCount = 0 // Use an internal counter here so it is instantly updated when re-queuing\n api.addEventListener('graphChanged', () => {\n if (queueSettingsStore.mode === 'change') {\n if (internalCount) {\n graphHasChanged = true\n } else {\n graphHasChanged = false\n app.queuePrompt(0, queueSettingsStore.batchCount)\n internalCount++\n }\n }\n })\n\n queueCountStore.$subscribe(\n () => {\n internalCount = queueCountStore.count\n if (!internalCount && !app.lastExecutionError) {\n if (\n queueSettingsStore.mode === 'instant' ||\n (queueSettingsStore.mode === 'change' && graphHasChanged)\n ) {\n graphHasChanged = false\n app.queuePrompt(0, queueSettingsStore.batchCount)\n }\n }\n },\n { detached: true }\n )\n}\n","\n\n\n"],"names":["theme","classes","script$1","Badge","provide","script","render","item","BaseComponent","content","showNavigators","ChevronLeftIcon","ChevronRightIcon","_hoisted_1","_hoisted_2","_hoisted_3","createElementVNode","root","inlineStyles","_toConsumableArray","_arrayWithoutHoles","_iterableToArray","_unsupportedIterableToArray","_nonIterableSpread","_arrayLikeToArray","data","mounted","beforeUnmount","panels","onKeydown","getPTOptions","_typeof$1","o","updated","option","_hide","onFocus","onArrowLeftKey","onArrowRightKey","onHomeKey","onEndKey","onPageUpKey","onPageDownKey","onEnterKey","_","scrollInView","id","InputText","VirtualScroller","Portal","ChevronDownIcon","SpinnerIcon","Chip","_typeof","ownKeys","r","_objectSpread","_defineProperty","_toPropertyKey","_toPrimitive","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","onRemove","ref","onClick","_sfc_main","AutoComplete","suggestions","search","comfyApp","repeat","widget","script$2","InfoCircleIcon","CheckIcon","ExclamationTriangleIcon","TimesCircleIcon","TimesIcon","render$1","message","getAriaPosInset","AngleRightIcon","AngleDownIcon","_hoisted_1$1","$attrsId","getItemProp","getItemLabel","isItemDisabled","isItemVisible","isItemGroup","show","hide","onBlur","onKeyDown","activeItemPath","onItemClick","onItemMouseEnter","onItemMouseMove","onArrowDownKey","onArrowUpKey","onEscapeKey","onTabKey","bindOutsideClickListener","unbindOutsideClickListener","bindResizeListener","unbindResizeListener","isSelected","processedItems","BarsIcon","toggle","PlusIcon","MinusIcon","Button","submenu","getItemId","getItemKey","getItemLabelId","isItemActive","isItemFocused","onEnter","getAriaSetSize","getMenuItemProps","containerRef","isItemSeparator","getProccessedItemLabel","isProccessedItemGroup","onItemChange","onOverlayClick","onSpaceKey","onLeave","alignOverlay","bindScrollListener","unbindScrollListener","isItemMatched","isValidItem","isValidSelectedItem","findFirstItemIndex","findLastItemIndex","findNextItemIndex","findPrevItemIndex","findSelectedItemIndex","findFirstFocusedItemIndex","findLastFocusedItemIndex","searchItems","changeFocusedItemIndex","createProcessedItems","menubarRef","visibleItems","focusedItemId","hasFluid","TieredMenu","clamp"],"mappings":";;;;;;;AAwBA,UAAM,eAAe;AAEf,UAAA,YAAY,IAAI,KAAK;AACrB,UAAA,cAAc,IAAI,EAAE;AAC1B,UAAM,aAAa,IAAmB;AAAA,MACpC,UAAU;AAAA,MACV,MAAM;AAAA,MACN,KAAK;AAAA,MACL,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,UAAU;AAAA,IAAA,CACX;AAED,UAAM,mBAAmB;AACzB,UAAM,cAAc;AACd,UAAA,0BAA0B,IAAI,IAAI;AAElC,UAAA,SAAS,wBAAC,aAAqB;AACnC,UAAI,iBAAiB,qBAAqB,SAAS,KAAA,MAAW,IAAI;AAC/C,yBAAA,kBAAkB,QAAQ,SAAS,KAAK;AACrD,YAAA,MAAM,eAAe,MAAM,IAAI;AAAA,MACrC;AACA,gBAAU,QAAQ;AAClB,uBAAiB,oBAAoB;AACzB,kBAAA,OAAQ,mBAAmB,wBAAwB;AAAA,IAAA,GAPlD;AAUf;AAAA,MACE,MAAM,iBAAiB;AAAA,MACvB,CAAC,WAAW;AACV,YA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;AAGJ,6BAAA,EAAqB;AAGrB,wBAAA,EAAgB;AAGhB,+BAAA,EAAuB;AAKP,4BAAE,kBAAkB,4BAA4B,EAAE;AAGlE,gCAAA,EAAwB;QAC1B;AAAA,QACA,EAAE,SAAS,IAAK;AAAA,MAAA;AAAA,IAClB,GAtBmB;;;;;;;;;;;;;","x_google_ignoreList":[1,2,8,9,10,11,13,14,15,16,18,19,27,28,32,33,38,39,41,42,43,44,45,46]} \ No newline at end of file diff --git a/web/assets/GraphView-C4blCugc.js.map b/web/assets/GraphView-C4blCugc.js.map deleted file mode 100644 index 1971ac565e4..00000000000 --- a/web/assets/GraphView-C4blCugc.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GraphView-C4blCugc.js","sources":["../../src/components/graph/TitleEditor.vue","../../node_modules/primevue/overlaybadge/style/index.mjs","../../node_modules/primevue/overlaybadge/index.mjs","../../src/components/sidebar/SidebarIcon.vue","../../src/components/sidebar/SidebarThemeToggleIcon.vue","../../src/components/sidebar/SidebarSettingsToggleIcon.vue","../../src/components/common/ExtensionSlot.vue","../../src/components/sidebar/SideToolbar.vue","../../node_modules/primevue/tablist/style/index.mjs","../../node_modules/primevue/tablist/index.mjs","../../node_modules/primevue/tab/style/index.mjs","../../node_modules/primevue/tab/index.mjs","../../src/components/bottomPanel/BottomPanel.vue","../../node_modules/primevue/splitter/style/index.mjs","../../node_modules/primevue/splitter/index.mjs","../../node_modules/primevue/splitterpanel/style/index.mjs","../../node_modules/primevue/splitterpanel/index.mjs","../../src/components/LiteGraphCanvasSplitterOverlay.vue","../../node_modules/primevue/autocomplete/style/index.mjs","../../node_modules/primevue/autocomplete/index.mjs","../../src/components/primevueOverride/AutoCompletePlus.vue","../../src/components/searchbox/NodeSearchItem.vue","../../src/components/searchbox/NodeSearchBox.vue","../../src/types/litegraphTypes.ts","../../src/components/searchbox/NodeSearchBoxPopover.vue","../../src/components/graph/NodeTooltip.vue","../../src/components/graph/NodeBadge.vue","../../node_modules/primevue/buttongroup/style/index.mjs","../../node_modules/primevue/buttongroup/index.mjs","../../src/components/graph/GraphCanvasMenu.vue","../../src/components/graph/GraphCanvas.vue","../../node_modules/primevue/toast/style/index.mjs","../../node_modules/primevue/toast/index.mjs","../../src/components/toast/GlobalToast.vue","../../src/components/dialog/UnloadWindowConfirmDialog.vue","../../src/components/BrowserTabTitle.vue","../../src/components/topbar/WorkflowTabs.vue","../../node_modules/primevue/menubar/style/index.mjs","../../node_modules/primevue/menubar/index.mjs","../../src/components/topbar/CommandMenubar.vue","../../node_modules/primevue/panel/style/index.mjs","../../node_modules/primevue/panel/index.mjs","../../node_modules/primevue/tieredmenu/style/index.mjs","../../node_modules/primevue/tieredmenu/index.mjs","../../node_modules/primevue/splitbutton/style/index.mjs","../../node_modules/primevue/splitbutton/index.mjs","../../src/components/actionbar/BatchCountEdit.vue","../../src/components/actionbar/ComfyQueueButton.vue","../../src/components/actionbar/ComfyActionbar.vue","../../src/components/topbar/BottomPanelToggleButton.vue","../../src/components/topbar/TopMenubar.vue","../../src/services/autoQueueService.ts","../../src/views/GraphView.vue"],"sourcesContent":["\n\n\n\n\n","import BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-overlaybadge {\\n position: relative;\\n}\\n\\n.p-overlaybadge .p-badge {\\n position: absolute;\\n top: 0;\\n right: 0;\\n transform: translate(50%, -50%);\\n transform-origin: 100% 0;\\n margin: 0;\\n outline-width: \".concat(dt('overlaybadge.outline.width'), \";\\n outline-style: solid;\\n outline-color: \").concat(dt('overlaybadge.outline.color'), \";\\n}\\n\");\n};\nvar classes = {\n root: 'p-overlaybadge'\n};\nvar OverlayBadgeStyle = BaseStyle.extend({\n name: 'overlaybadge',\n theme: theme,\n classes: classes\n});\n\nexport { OverlayBadgeStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import Badge from 'primevue/badge';\nimport OverlayBadgeStyle from 'primevue/overlaybadge/style';\nimport { resolveComponent, openBlock, createElementBlock, mergeProps, renderSlot, createVNode } from 'vue';\n\nvar script$1 = {\n name: 'OverlayBadge',\n \"extends\": Badge,\n style: OverlayBadgeStyle,\n provide: function provide() {\n return {\n $pcOverlayBadge: this,\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'OverlayBadge',\n \"extends\": script$1,\n inheritAttrs: false,\n components: {\n Badge: Badge\n }\n};\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n var _component_Badge = resolveComponent(\"Badge\");\n return openBlock(), createElementBlock(\"div\", mergeProps({\n \"class\": _ctx.cx('root')\n }, _ctx.ptmi('root')), [renderSlot(_ctx.$slots, \"default\"), createVNode(_component_Badge, mergeProps(_ctx.$props, {\n pt: _ctx.ptm('pcBadge')\n }), null, 16, [\"pt\"])], 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","\n\n\n\n\n\n\n","\n\n\n","\n\n\n","\n\n\n","\n\n\n\n\n\n\n","import BaseStyle from '@primevue/core/base/style';\n\nvar classes = {\n root: 'p-tablist',\n content: function content(_ref) {\n var instance = _ref.instance;\n return ['p-tablist-content', {\n 'p-tablist-viewport': instance.$pcTabs.scrollable\n }];\n },\n tabList: 'p-tablist-tab-list',\n activeBar: 'p-tablist-active-bar',\n prevButton: 'p-tablist-prev-button p-tablist-nav-button',\n nextButton: 'p-tablist-next-button p-tablist-nav-button'\n};\nvar TabListStyle = BaseStyle.extend({\n name: 'tablist',\n classes: classes\n});\n\nexport { TabListStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import { getWidth, findSingle, getOuterHeight, getOffset, getOuterWidth, getHeight } from '@primeuix/utils/dom';\nimport ChevronLeftIcon from '@primevue/icons/chevronleft';\nimport ChevronRightIcon from '@primevue/icons/chevronright';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport TabListStyle from 'primevue/tablist/style';\nimport Ripple from 'primevue/ripple';\nimport { resolveDirective, openBlock, createElementBlock, mergeProps, withDirectives, createBlock, resolveDynamicComponent, createCommentVNode, createElementVNode, renderSlot } from 'vue';\n\nvar script$1 = {\n name: 'BaseTabList',\n \"extends\": BaseComponent,\n props: {},\n style: TabListStyle,\n provide: function provide() {\n return {\n $pcTabList: this,\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'TabList',\n \"extends\": script$1,\n inheritAttrs: false,\n inject: ['$pcTabs'],\n data: function data() {\n return {\n isPrevButtonEnabled: false,\n isNextButtonEnabled: true\n };\n },\n resizeObserver: undefined,\n watch: {\n showNavigators: function showNavigators(newValue) {\n newValue ? this.bindResizeObserver() : this.unbindResizeObserver();\n },\n activeValue: {\n flush: 'post',\n handler: function handler() {\n this.updateInkBar();\n }\n }\n },\n mounted: function mounted() {\n var _this = this;\n this.$nextTick(function () {\n _this.updateInkBar();\n });\n if (this.showNavigators) {\n this.updateButtonState();\n this.bindResizeObserver();\n }\n },\n updated: function updated() {\n this.showNavigators && this.updateButtonState();\n },\n beforeUnmount: function beforeUnmount() {\n this.unbindResizeObserver();\n },\n methods: {\n onScroll: function onScroll(event) {\n this.showNavigators && this.updateButtonState();\n event.preventDefault();\n },\n onPrevButtonClick: function onPrevButtonClick() {\n var content = this.$refs.content;\n var width = getWidth(content);\n var pos = content.scrollLeft - width;\n content.scrollLeft = pos <= 0 ? 0 : pos;\n },\n onNextButtonClick: function onNextButtonClick() {\n var content = this.$refs.content;\n var width = getWidth(content) - this.getVisibleButtonWidths();\n var pos = content.scrollLeft + width;\n var lastPos = content.scrollWidth - width;\n content.scrollLeft = pos >= lastPos ? lastPos : pos;\n },\n bindResizeObserver: function bindResizeObserver() {\n var _this2 = this;\n this.resizeObserver = new ResizeObserver(function () {\n return _this2.updateButtonState();\n });\n this.resizeObserver.observe(this.$refs.list);\n },\n unbindResizeObserver: function unbindResizeObserver() {\n var _this$resizeObserver;\n (_this$resizeObserver = this.resizeObserver) === null || _this$resizeObserver === void 0 || _this$resizeObserver.unobserve(this.$refs.list);\n this.resizeObserver = undefined;\n },\n updateInkBar: function updateInkBar() {\n var _this$$refs = this.$refs,\n content = _this$$refs.content,\n inkbar = _this$$refs.inkbar,\n tabs = _this$$refs.tabs;\n var activeTab = findSingle(content, '[data-pc-name=\"tab\"][data-p-active=\"true\"]');\n if (this.$pcTabs.isVertical()) {\n inkbar.style.height = getOuterHeight(activeTab) + 'px';\n inkbar.style.top = getOffset(activeTab).top - getOffset(tabs).top + 'px';\n } else {\n inkbar.style.width = getOuterWidth(activeTab) + 'px';\n inkbar.style.left = getOffset(activeTab).left - getOffset(tabs).left + 'px';\n }\n },\n updateButtonState: function updateButtonState() {\n var _this$$refs2 = this.$refs,\n list = _this$$refs2.list,\n content = _this$$refs2.content;\n var scrollLeft = content.scrollLeft,\n scrollTop = content.scrollTop,\n scrollWidth = content.scrollWidth,\n scrollHeight = content.scrollHeight,\n offsetWidth = content.offsetWidth,\n offsetHeight = content.offsetHeight;\n var _ref = [getWidth(content), getHeight(content)],\n width = _ref[0],\n height = _ref[1];\n if (this.$pcTabs.isVertical()) {\n this.isPrevButtonEnabled = scrollTop !== 0;\n this.isNextButtonEnabled = list.offsetHeight >= offsetHeight && parseInt(scrollTop) !== scrollHeight - height;\n } else {\n this.isPrevButtonEnabled = scrollLeft !== 0;\n this.isNextButtonEnabled = list.offsetWidth >= offsetWidth && parseInt(scrollLeft) !== scrollWidth - width;\n }\n },\n getVisibleButtonWidths: function getVisibleButtonWidths() {\n var _this$$refs3 = this.$refs,\n prevBtn = _this$$refs3.prevBtn,\n nextBtn = _this$$refs3.nextBtn;\n return [prevBtn, nextBtn].reduce(function (acc, el) {\n return el ? acc + getWidth(el) : acc;\n }, 0);\n }\n },\n computed: {\n templates: function templates() {\n return this.$pcTabs.$slots;\n },\n activeValue: function activeValue() {\n return this.$pcTabs.d_value;\n },\n showNavigators: function showNavigators() {\n return this.$pcTabs.scrollable && this.$pcTabs.showNavigators;\n },\n prevButtonAriaLabel: function prevButtonAriaLabel() {\n return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.previous : undefined;\n },\n nextButtonAriaLabel: function nextButtonAriaLabel() {\n return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.next : undefined;\n }\n },\n components: {\n ChevronLeftIcon: ChevronLeftIcon,\n ChevronRightIcon: ChevronRightIcon\n },\n directives: {\n ripple: Ripple\n }\n};\n\nvar _hoisted_1 = [\"aria-label\", \"tabindex\"];\nvar _hoisted_2 = [\"aria-orientation\"];\nvar _hoisted_3 = [\"aria-label\", \"tabindex\"];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n var _directive_ripple = resolveDirective(\"ripple\");\n return openBlock(), createElementBlock(\"div\", mergeProps({\n ref: \"list\",\n \"class\": _ctx.cx('root')\n }, _ctx.ptmi('root')), [$options.showNavigators && $data.isPrevButtonEnabled ? withDirectives((openBlock(), createElementBlock(\"button\", mergeProps({\n key: 0,\n ref: \"prevButton\",\n \"class\": _ctx.cx('prevButton'),\n \"aria-label\": $options.prevButtonAriaLabel,\n tabindex: $options.$pcTabs.tabindex,\n onClick: _cache[0] || (_cache[0] = function () {\n return $options.onPrevButtonClick && $options.onPrevButtonClick.apply($options, arguments);\n })\n }, _ctx.ptm('prevButton'), {\n \"data-pc-group-section\": \"navigator\"\n }), [(openBlock(), createBlock(resolveDynamicComponent($options.templates.previcon || 'ChevronLeftIcon'), mergeProps({\n \"aria-hidden\": \"true\"\n }, _ctx.ptm('prevIcon')), null, 16))], 16, _hoisted_1)), [[_directive_ripple]]) : createCommentVNode(\"\", true), createElementVNode(\"div\", mergeProps({\n ref: \"content\",\n \"class\": _ctx.cx('content'),\n onScroll: _cache[1] || (_cache[1] = function () {\n return $options.onScroll && $options.onScroll.apply($options, arguments);\n })\n }, _ctx.ptm('content')), [createElementVNode(\"div\", mergeProps({\n ref: \"tabs\",\n \"class\": _ctx.cx('tabList'),\n role: \"tablist\",\n \"aria-orientation\": $options.$pcTabs.orientation || 'horizontal'\n }, _ctx.ptm('tabList')), [renderSlot(_ctx.$slots, \"default\"), createElementVNode(\"span\", mergeProps({\n ref: \"inkbar\",\n \"class\": _ctx.cx('activeBar'),\n role: \"presentation\",\n \"aria-hidden\": \"true\"\n }, _ctx.ptm('activeBar')), null, 16)], 16, _hoisted_2)], 16), $options.showNavigators && $data.isNextButtonEnabled ? withDirectives((openBlock(), createElementBlock(\"button\", mergeProps({\n key: 1,\n ref: \"nextButton\",\n \"class\": _ctx.cx('nextButton'),\n \"aria-label\": $options.nextButtonAriaLabel,\n tabindex: $options.$pcTabs.tabindex,\n onClick: _cache[2] || (_cache[2] = function () {\n return $options.onNextButtonClick && $options.onNextButtonClick.apply($options, arguments);\n })\n }, _ctx.ptm('nextButton'), {\n \"data-pc-group-section\": \"navigator\"\n }), [(openBlock(), createBlock(resolveDynamicComponent($options.templates.nexticon || 'ChevronRightIcon'), mergeProps({\n \"aria-hidden\": \"true\"\n }, _ctx.ptm('nextIcon')), null, 16))], 16, _hoisted_3)), [[_directive_ripple]]) : createCommentVNode(\"\", true)], 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseStyle from '@primevue/core/base/style';\n\nvar classes = {\n root: function root(_ref) {\n var instance = _ref.instance,\n props = _ref.props;\n return ['p-tab', {\n 'p-tab-active': instance.active,\n 'p-disabled': props.disabled\n }];\n }\n};\nvar TabStyle = BaseStyle.extend({\n name: 'tab',\n classes: classes\n});\n\nexport { TabStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import { getAttribute, findSingle, focus } from '@primeuix/utils/dom';\nimport { equals } from '@primeuix/utils/object';\nimport Ripple from 'primevue/ripple';\nimport { mergeProps, resolveDirective, withDirectives, openBlock, createBlock, resolveDynamicComponent, withCtx, renderSlot, normalizeClass } from 'vue';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport TabStyle from 'primevue/tab/style';\n\nvar script$1 = {\n name: 'BaseTab',\n \"extends\": BaseComponent,\n props: {\n value: {\n type: [String, Number],\n \"default\": undefined\n },\n disabled: {\n type: Boolean,\n \"default\": false\n },\n as: {\n type: [String, Object],\n \"default\": 'BUTTON'\n },\n asChild: {\n type: Boolean,\n \"default\": false\n }\n },\n style: TabStyle,\n provide: function provide() {\n return {\n $pcTab: this,\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'Tab',\n \"extends\": script$1,\n inheritAttrs: false,\n inject: ['$pcTabs', '$pcTabList'],\n methods: {\n onFocus: function onFocus() {\n this.$pcTabs.selectOnFocus && this.changeActiveValue();\n },\n onClick: function onClick() {\n this.changeActiveValue();\n },\n onKeydown: function onKeydown(event) {\n switch (event.code) {\n case 'ArrowRight':\n this.onArrowRightKey(event);\n break;\n case 'ArrowLeft':\n this.onArrowLeftKey(event);\n break;\n case 'Home':\n this.onHomeKey(event);\n break;\n case 'End':\n this.onEndKey(event);\n break;\n case 'PageDown':\n this.onPageDownKey(event);\n break;\n case 'PageUp':\n this.onPageUpKey(event);\n break;\n case 'Enter':\n case 'NumpadEnter':\n case 'Space':\n this.onEnterKey(event);\n break;\n }\n },\n onArrowRightKey: function onArrowRightKey(event) {\n var nextTab = this.findNextTab(event.currentTarget);\n nextTab ? this.changeFocusedTab(event, nextTab) : this.onHomeKey(event);\n event.preventDefault();\n },\n onArrowLeftKey: function onArrowLeftKey(event) {\n var prevTab = this.findPrevTab(event.currentTarget);\n prevTab ? this.changeFocusedTab(event, prevTab) : this.onEndKey(event);\n event.preventDefault();\n },\n onHomeKey: function onHomeKey(event) {\n var firstTab = this.findFirstTab();\n this.changeFocusedTab(event, firstTab);\n event.preventDefault();\n },\n onEndKey: function onEndKey(event) {\n var lastTab = this.findLastTab();\n this.changeFocusedTab(event, lastTab);\n event.preventDefault();\n },\n onPageDownKey: function onPageDownKey(event) {\n this.scrollInView(this.findLastTab());\n event.preventDefault();\n },\n onPageUpKey: function onPageUpKey(event) {\n this.scrollInView(this.findFirstTab());\n event.preventDefault();\n },\n onEnterKey: function onEnterKey(event) {\n this.changeActiveValue();\n event.preventDefault();\n },\n findNextTab: function findNextTab(tabElement) {\n var selfCheck = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var element = selfCheck ? tabElement : tabElement.nextElementSibling;\n return element ? getAttribute(element, 'data-p-disabled') || getAttribute(element, 'data-pc-section') === 'inkbar' ? this.findNextTab(element) : findSingle(element, '[data-pc-name=\"tab\"]') : null;\n },\n findPrevTab: function findPrevTab(tabElement) {\n var selfCheck = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var element = selfCheck ? tabElement : tabElement.previousElementSibling;\n return element ? getAttribute(element, 'data-p-disabled') || getAttribute(element, 'data-pc-section') === 'inkbar' ? this.findPrevTab(element) : findSingle(element, '[data-pc-name=\"tab\"]') : null;\n },\n findFirstTab: function findFirstTab() {\n return this.findNextTab(this.$pcTabList.$refs.content.firstElementChild, true);\n },\n findLastTab: function findLastTab() {\n return this.findPrevTab(this.$pcTabList.$refs.content.lastElementChild, true);\n },\n changeActiveValue: function changeActiveValue() {\n this.$pcTabs.updateValue(this.value);\n },\n changeFocusedTab: function changeFocusedTab(event, element) {\n focus(element);\n this.scrollInView(element);\n },\n scrollInView: function scrollInView(element) {\n var _element$scrollIntoVi;\n element === null || element === void 0 || (_element$scrollIntoVi = element.scrollIntoView) === null || _element$scrollIntoVi === void 0 || _element$scrollIntoVi.call(element, {\n block: 'nearest'\n });\n }\n },\n computed: {\n active: function active() {\n var _this$$pcTabs;\n return equals((_this$$pcTabs = this.$pcTabs) === null || _this$$pcTabs === void 0 ? void 0 : _this$$pcTabs.d_value, this.value);\n },\n id: function id() {\n var _this$$pcTabs2;\n return \"\".concat((_this$$pcTabs2 = this.$pcTabs) === null || _this$$pcTabs2 === void 0 ? void 0 : _this$$pcTabs2.id, \"_tab_\").concat(this.value);\n },\n ariaControls: function ariaControls() {\n var _this$$pcTabs3;\n return \"\".concat((_this$$pcTabs3 = this.$pcTabs) === null || _this$$pcTabs3 === void 0 ? void 0 : _this$$pcTabs3.id, \"_tabpanel_\").concat(this.value);\n },\n attrs: function attrs() {\n return mergeProps(this.asAttrs, this.a11yAttrs, this.ptmi('root', this.ptParams));\n },\n asAttrs: function asAttrs() {\n return this.as === 'BUTTON' ? {\n type: 'button',\n disabled: this.disabled\n } : undefined;\n },\n a11yAttrs: function a11yAttrs() {\n return {\n id: this.id,\n tabindex: this.active ? this.$pcTabs.tabindex : -1,\n role: 'tab',\n 'aria-selected': this.active,\n 'aria-controls': this.ariaControls,\n 'data-pc-name': 'tab',\n 'data-p-disabled': this.disabled,\n 'data-p-active': this.active,\n onFocus: this.onFocus,\n onKeydown: this.onKeydown\n };\n },\n ptParams: function ptParams() {\n return {\n context: {\n active: this.active\n }\n };\n }\n },\n directives: {\n ripple: Ripple\n }\n};\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n var _directive_ripple = resolveDirective(\"ripple\");\n return !_ctx.asChild ? withDirectives((openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps({\n key: 0,\n \"class\": _ctx.cx('root'),\n onClick: $options.onClick\n }, $options.attrs), {\n \"default\": withCtx(function () {\n return [renderSlot(_ctx.$slots, \"default\")];\n }),\n _: 3\n }, 16, [\"class\", \"onClick\"])), [[_directive_ripple]]) : renderSlot(_ctx.$slots, \"default\", {\n key: 1,\n \"class\": normalizeClass(_ctx.cx('root')),\n active: $options.active,\n a11yAttrs: $options.a11yAttrs,\n onClick: $options.onClick\n });\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","\n\n\n","import BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-splitter {\\n display: flex;\\n flex-wrap: nowrap;\\n border: 1px solid \".concat(dt('splitter.border.color'), \";\\n background: \").concat(dt('splitter.background'), \";\\n border-radius: \").concat(dt('border.radius.md'), \";\\n color: \").concat(dt('splitter.color'), \";\\n}\\n\\n.p-splitter-vertical {\\n flex-direction: column;\\n}\\n\\n.p-splitter-gutter {\\n flex-grow: 0;\\n flex-shrink: 0;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n z-index: 1;\\n background: \").concat(dt('splitter.gutter.background'), \";\\n}\\n\\n.p-splitter-gutter-handle {\\n border-radius: \").concat(dt('splitter.handle.border.radius'), \";\\n background: \").concat(dt('splitter.handle.background'), \";\\n transition: outline-color \").concat(dt('splitter.transition.duration'), \", box-shadow \").concat(dt('splitter.transition.duration'), \";\\n outline-color: transparent;\\n}\\n\\n.p-splitter-gutter-handle:focus-visible {\\n box-shadow: \").concat(dt('splitter.handle.focus.ring.shadow'), \";\\n outline: \").concat(dt('splitter.handle.focus.ring.width'), \" \").concat(dt('splitter.handle.focus.ring.style'), \" \").concat(dt('splitter.handle.focus.ring.color'), \";\\n outline-offset: \").concat(dt('splitter.handle.focus.ring.offset'), \";\\n}\\n\\n.p-splitter-horizontal.p-splitter-resizing {\\n cursor: col-resize;\\n user-select: none;\\n}\\n\\n.p-splitter-vertical.p-splitter-resizing {\\n cursor: row-resize;\\n user-select: none;\\n}\\n\\n.p-splitter-horizontal > .p-splitter-gutter > .p-splitter-gutter-handle {\\n height: \").concat(dt('splitter.handle.size'), \";\\n width: 100%;\\n}\\n\\n.p-splitter-vertical > .p-splitter-gutter > .p-splitter-gutter-handle {\\n width: \").concat(dt('splitter.handle.size'), \";\\n height: 100%;\\n}\\n\\n.p-splitter-horizontal > .p-splitter-gutter {\\n cursor: col-resize;\\n}\\n\\n.p-splitter-vertical > .p-splitter-gutter {\\n cursor: row-resize;\\n}\\n\\n.p-splitterpanel {\\n flex-grow: 1;\\n overflow: hidden;\\n}\\n\\n.p-splitterpanel-nested {\\n display: flex;\\n}\\n\\n.p-splitterpanel .p-splitter {\\n flex-grow: 1;\\n border: 0 none;\\n}\\n\");\n};\nvar classes = {\n root: function root(_ref2) {\n var props = _ref2.props;\n return ['p-splitter p-component', 'p-splitter-' + props.layout];\n },\n gutter: 'p-splitter-gutter',\n gutterHandle: 'p-splitter-gutter-handle'\n};\nvar inlineStyles = {\n root: function root(_ref3) {\n var props = _ref3.props;\n return [{\n display: 'flex',\n 'flex-wrap': 'nowrap'\n }, props.layout === 'vertical' ? {\n 'flex-direction': 'column'\n } : ''];\n }\n};\nvar SplitterStyle = BaseStyle.extend({\n name: 'splitter',\n theme: theme,\n classes: classes,\n inlineStyles: inlineStyles\n});\n\nexport { SplitterStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import { getVNodeProp } from '@primevue/core/utils';\nimport { getWidth, getHeight, getOuterWidth, getOuterHeight } from '@primeuix/utils/dom';\nimport { isArray } from '@primeuix/utils/object';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport SplitterStyle from 'primevue/splitter/style';\nimport { openBlock, createElementBlock, mergeProps, Fragment, renderList, createBlock, resolveDynamicComponent, createElementVNode, createCommentVNode } from 'vue';\n\nvar script$1 = {\n name: 'BaseSplitter',\n \"extends\": BaseComponent,\n props: {\n layout: {\n type: String,\n \"default\": 'horizontal'\n },\n gutterSize: {\n type: Number,\n \"default\": 4\n },\n stateKey: {\n type: String,\n \"default\": null\n },\n stateStorage: {\n type: String,\n \"default\": 'session'\n },\n step: {\n type: Number,\n \"default\": 5\n }\n },\n style: SplitterStyle,\n provide: function provide() {\n return {\n $pcSplitter: this,\n $parentInstance: this\n };\n }\n};\n\nfunction _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _iterableToArray(r) { if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r); }\nfunction _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nvar script = {\n name: 'Splitter',\n \"extends\": script$1,\n inheritAttrs: false,\n emits: ['resizestart', 'resizeend', 'resize'],\n dragging: false,\n mouseMoveListener: null,\n mouseUpListener: null,\n touchMoveListener: null,\n touchEndListener: null,\n size: null,\n gutterElement: null,\n startPos: null,\n prevPanelElement: null,\n nextPanelElement: null,\n nextPanelSize: null,\n prevPanelSize: null,\n panelSizes: null,\n prevPanelIndex: null,\n timer: null,\n data: function data() {\n return {\n prevSize: null\n };\n },\n mounted: function mounted() {\n var _this = this;\n if (this.panels && this.panels.length) {\n var initialized = false;\n if (this.isStateful()) {\n initialized = this.restoreState();\n }\n if (!initialized) {\n var children = _toConsumableArray(this.$el.children).filter(function (child) {\n return child.getAttribute('data-pc-name') === 'splitterpanel';\n });\n var _panelSizes = [];\n this.panels.map(function (panel, i) {\n var panelInitialSize = panel.props && panel.props.size ? panel.props.size : null;\n var panelSize = panelInitialSize || 100 / _this.panels.length;\n _panelSizes[i] = panelSize;\n children[i].style.flexBasis = 'calc(' + panelSize + '% - ' + (_this.panels.length - 1) * _this.gutterSize + 'px)';\n });\n this.panelSizes = _panelSizes;\n this.prevSize = parseFloat(_panelSizes[0]).toFixed(4);\n }\n }\n },\n beforeUnmount: function beforeUnmount() {\n this.clear();\n this.unbindMouseListeners();\n },\n methods: {\n isSplitterPanel: function isSplitterPanel(child) {\n return child.type.name === 'SplitterPanel';\n },\n onResizeStart: function onResizeStart(event, index, isKeyDown) {\n this.gutterElement = event.currentTarget || event.target.parentElement;\n this.size = this.horizontal ? getWidth(this.$el) : getHeight(this.$el);\n if (!isKeyDown) {\n this.dragging = true;\n this.startPos = this.layout === 'horizontal' ? event.pageX || event.changedTouches[0].pageX : event.pageY || event.changedTouches[0].pageY;\n }\n this.prevPanelElement = this.gutterElement.previousElementSibling;\n this.nextPanelElement = this.gutterElement.nextElementSibling;\n if (isKeyDown) {\n this.prevPanelSize = this.horizontal ? getOuterWidth(this.prevPanelElement, true) : getOuterHeight(this.prevPanelElement, true);\n this.nextPanelSize = this.horizontal ? getOuterWidth(this.nextPanelElement, true) : getOuterHeight(this.nextPanelElement, true);\n } else {\n this.prevPanelSize = 100 * (this.horizontal ? getOuterWidth(this.prevPanelElement, true) : getOuterHeight(this.prevPanelElement, true)) / this.size;\n this.nextPanelSize = 100 * (this.horizontal ? getOuterWidth(this.nextPanelElement, true) : getOuterHeight(this.nextPanelElement, true)) / this.size;\n }\n this.prevPanelIndex = index;\n this.$emit('resizestart', {\n originalEvent: event,\n sizes: this.panelSizes\n });\n this.$refs.gutter[index].setAttribute('data-p-gutter-resizing', true);\n this.$el.setAttribute('data-p-resizing', true);\n },\n onResize: function onResize(event, step, isKeyDown) {\n var newPos, newPrevPanelSize, newNextPanelSize;\n if (isKeyDown) {\n if (this.horizontal) {\n newPrevPanelSize = 100 * (this.prevPanelSize + step) / this.size;\n newNextPanelSize = 100 * (this.nextPanelSize - step) / this.size;\n } else {\n newPrevPanelSize = 100 * (this.prevPanelSize - step) / this.size;\n newNextPanelSize = 100 * (this.nextPanelSize + step) / this.size;\n }\n } else {\n if (this.horizontal) newPos = event.pageX * 100 / this.size - this.startPos * 100 / this.size;else newPos = event.pageY * 100 / this.size - this.startPos * 100 / this.size;\n newPrevPanelSize = this.prevPanelSize + newPos;\n newNextPanelSize = this.nextPanelSize - newPos;\n }\n if (this.validateResize(newPrevPanelSize, newNextPanelSize)) {\n this.prevPanelElement.style.flexBasis = 'calc(' + newPrevPanelSize + '% - ' + (this.panels.length - 1) * this.gutterSize + 'px)';\n this.nextPanelElement.style.flexBasis = 'calc(' + newNextPanelSize + '% - ' + (this.panels.length - 1) * this.gutterSize + 'px)';\n this.panelSizes[this.prevPanelIndex] = newPrevPanelSize;\n this.panelSizes[this.prevPanelIndex + 1] = newNextPanelSize;\n this.prevSize = parseFloat(newPrevPanelSize).toFixed(4);\n }\n this.$emit('resize', {\n originalEvent: event,\n sizes: this.panelSizes\n });\n },\n onResizeEnd: function onResizeEnd(event) {\n if (this.isStateful()) {\n this.saveState();\n }\n this.$emit('resizeend', {\n originalEvent: event,\n sizes: this.panelSizes\n });\n this.$refs.gutter.forEach(function (gutter) {\n return gutter.setAttribute('data-p-gutter-resizing', false);\n });\n this.$el.setAttribute('data-p-resizing', false);\n this.clear();\n },\n repeat: function repeat(event, index, step) {\n this.onResizeStart(event, index, true);\n this.onResize(event, step, true);\n },\n setTimer: function setTimer(event, index, step) {\n var _this2 = this;\n if (!this.timer) {\n this.timer = setInterval(function () {\n _this2.repeat(event, index, step);\n }, 40);\n }\n },\n clearTimer: function clearTimer() {\n if (this.timer) {\n clearInterval(this.timer);\n this.timer = null;\n }\n },\n onGutterKeyUp: function onGutterKeyUp() {\n this.clearTimer();\n this.onResizeEnd();\n },\n onGutterKeyDown: function onGutterKeyDown(event, index) {\n switch (event.code) {\n case 'ArrowLeft':\n {\n if (this.layout === 'horizontal') {\n this.setTimer(event, index, this.step * -1);\n }\n event.preventDefault();\n break;\n }\n case 'ArrowRight':\n {\n if (this.layout === 'horizontal') {\n this.setTimer(event, index, this.step);\n }\n event.preventDefault();\n break;\n }\n case 'ArrowDown':\n {\n if (this.layout === 'vertical') {\n this.setTimer(event, index, this.step * -1);\n }\n event.preventDefault();\n break;\n }\n case 'ArrowUp':\n {\n if (this.layout === 'vertical') {\n this.setTimer(event, index, this.step);\n }\n event.preventDefault();\n break;\n }\n }\n },\n onGutterMouseDown: function onGutterMouseDown(event, index) {\n this.onResizeStart(event, index);\n this.bindMouseListeners();\n },\n onGutterTouchStart: function onGutterTouchStart(event, index) {\n this.onResizeStart(event, index);\n this.bindTouchListeners();\n event.preventDefault();\n },\n onGutterTouchMove: function onGutterTouchMove(event) {\n this.onResize(event);\n event.preventDefault();\n },\n onGutterTouchEnd: function onGutterTouchEnd(event) {\n this.onResizeEnd(event);\n this.unbindTouchListeners();\n event.preventDefault();\n },\n bindMouseListeners: function bindMouseListeners() {\n var _this3 = this;\n if (!this.mouseMoveListener) {\n this.mouseMoveListener = function (event) {\n return _this3.onResize(event);\n };\n document.addEventListener('mousemove', this.mouseMoveListener);\n }\n if (!this.mouseUpListener) {\n this.mouseUpListener = function (event) {\n _this3.onResizeEnd(event);\n _this3.unbindMouseListeners();\n };\n document.addEventListener('mouseup', this.mouseUpListener);\n }\n },\n bindTouchListeners: function bindTouchListeners() {\n var _this4 = this;\n if (!this.touchMoveListener) {\n this.touchMoveListener = function (event) {\n return _this4.onResize(event.changedTouches[0]);\n };\n document.addEventListener('touchmove', this.touchMoveListener);\n }\n if (!this.touchEndListener) {\n this.touchEndListener = function (event) {\n _this4.resizeEnd(event);\n _this4.unbindTouchListeners();\n };\n document.addEventListener('touchend', this.touchEndListener);\n }\n },\n validateResize: function validateResize(newPrevPanelSize, newNextPanelSize) {\n if (newPrevPanelSize > 100 || newPrevPanelSize < 0) return false;\n if (newNextPanelSize > 100 || newNextPanelSize < 0) return false;\n var prevPanelMinSize = getVNodeProp(this.panels[this.prevPanelIndex], 'minSize');\n if (this.panels[this.prevPanelIndex].props && prevPanelMinSize && prevPanelMinSize > newPrevPanelSize) {\n return false;\n }\n var newPanelMinSize = getVNodeProp(this.panels[this.prevPanelIndex + 1], 'minSize');\n if (this.panels[this.prevPanelIndex + 1].props && newPanelMinSize && newPanelMinSize > newNextPanelSize) {\n return false;\n }\n return true;\n },\n unbindMouseListeners: function unbindMouseListeners() {\n if (this.mouseMoveListener) {\n document.removeEventListener('mousemove', this.mouseMoveListener);\n this.mouseMoveListener = null;\n }\n if (this.mouseUpListener) {\n document.removeEventListener('mouseup', this.mouseUpListener);\n this.mouseUpListener = null;\n }\n },\n unbindTouchListeners: function unbindTouchListeners() {\n if (this.touchMoveListener) {\n document.removeEventListener('touchmove', this.touchMoveListener);\n this.touchMoveListener = null;\n }\n if (this.touchEndListener) {\n document.removeEventListener('touchend', this.touchEndListener);\n this.touchEndListener = null;\n }\n },\n clear: function clear() {\n this.dragging = false;\n this.size = null;\n this.startPos = null;\n this.prevPanelElement = null;\n this.nextPanelElement = null;\n this.prevPanelSize = null;\n this.nextPanelSize = null;\n this.gutterElement = null;\n this.prevPanelIndex = null;\n },\n isStateful: function isStateful() {\n return this.stateKey != null;\n },\n getStorage: function getStorage() {\n switch (this.stateStorage) {\n case 'local':\n return window.localStorage;\n case 'session':\n return window.sessionStorage;\n default:\n throw new Error(this.stateStorage + ' is not a valid value for the state storage, supported values are \"local\" and \"session\".');\n }\n },\n saveState: function saveState() {\n if (isArray(this.panelSizes)) {\n this.getStorage().setItem(this.stateKey, JSON.stringify(this.panelSizes));\n }\n },\n restoreState: function restoreState() {\n var _this5 = this;\n var storage = this.getStorage();\n var stateString = storage.getItem(this.stateKey);\n if (stateString) {\n this.panelSizes = JSON.parse(stateString);\n var children = _toConsumableArray(this.$el.children).filter(function (child) {\n return child.getAttribute('data-pc-name') === 'splitterpanel';\n });\n children.forEach(function (child, i) {\n child.style.flexBasis = 'calc(' + _this5.panelSizes[i] + '% - ' + (_this5.panels.length - 1) * _this5.gutterSize + 'px)';\n });\n return true;\n }\n return false;\n }\n },\n computed: {\n panels: function panels() {\n var _this6 = this;\n var panels = [];\n this.$slots[\"default\"]().forEach(function (child) {\n if (_this6.isSplitterPanel(child)) {\n panels.push(child);\n } else if (child.children instanceof Array) {\n child.children.forEach(function (nestedChild) {\n if (_this6.isSplitterPanel(nestedChild)) {\n panels.push(nestedChild);\n }\n });\n }\n });\n return panels;\n },\n gutterStyle: function gutterStyle() {\n if (this.horizontal) return {\n width: this.gutterSize + 'px'\n };else return {\n height: this.gutterSize + 'px'\n };\n },\n horizontal: function horizontal() {\n return this.layout === 'horizontal';\n },\n getPTOptions: function getPTOptions() {\n var _this$$parentInstance;\n return {\n context: {\n nested: (_this$$parentInstance = this.$parentInstance) === null || _this$$parentInstance === void 0 ? void 0 : _this$$parentInstance.nestedState\n }\n };\n }\n }\n};\n\nvar _hoisted_1 = [\"onMousedown\", \"onTouchstart\", \"onTouchmove\", \"onTouchend\"];\nvar _hoisted_2 = [\"aria-orientation\", \"aria-valuenow\", \"onKeydown\"];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"div\", mergeProps({\n \"class\": _ctx.cx('root'),\n style: _ctx.sx('root'),\n \"data-p-resizing\": false\n }, _ctx.ptmi('root', $options.getPTOptions)), [(openBlock(true), createElementBlock(Fragment, null, renderList($options.panels, function (panel, i) {\n return openBlock(), createElementBlock(Fragment, {\n key: i\n }, [(openBlock(), createBlock(resolveDynamicComponent(panel), {\n tabindex: \"-1\"\n })), i !== $options.panels.length - 1 ? (openBlock(), createElementBlock(\"div\", mergeProps({\n key: 0,\n ref_for: true,\n ref: \"gutter\",\n \"class\": _ctx.cx('gutter'),\n role: \"separator\",\n tabindex: \"-1\",\n onMousedown: function onMousedown($event) {\n return $options.onGutterMouseDown($event, i);\n },\n onTouchstart: function onTouchstart($event) {\n return $options.onGutterTouchStart($event, i);\n },\n onTouchmove: function onTouchmove($event) {\n return $options.onGutterTouchMove($event, i);\n },\n onTouchend: function onTouchend($event) {\n return $options.onGutterTouchEnd($event, i);\n },\n \"data-p-gutter-resizing\": false\n }, _ctx.ptm('gutter')), [createElementVNode(\"div\", mergeProps({\n \"class\": _ctx.cx('gutterHandle'),\n tabindex: \"0\",\n style: [$options.gutterStyle],\n \"aria-orientation\": _ctx.layout,\n \"aria-valuenow\": $data.prevSize,\n onKeyup: _cache[0] || (_cache[0] = function () {\n return $options.onGutterKeyUp && $options.onGutterKeyUp.apply($options, arguments);\n }),\n onKeydown: function onKeydown($event) {\n return $options.onGutterKeyDown($event, i);\n },\n ref_for: true\n }, _ctx.ptm('gutterHandle')), null, 16, _hoisted_2)], 16, _hoisted_1)) : createCommentVNode(\"\", true)], 64);\n }), 128))], 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseStyle from '@primevue/core/base/style';\n\nvar classes = {\n root: function root(_ref) {\n var instance = _ref.instance;\n return ['p-splitterpanel', {\n 'p-splitterpanel-nested': instance.isNested\n }];\n }\n};\nvar SplitterPanelStyle = BaseStyle.extend({\n name: 'splitterpanel',\n classes: classes\n});\n\nexport { SplitterPanelStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseComponent from '@primevue/core/basecomponent';\nimport SplitterPanelStyle from 'primevue/splitterpanel/style';\nimport { openBlock, createElementBlock, mergeProps, renderSlot } from 'vue';\n\nvar script$1 = {\n name: 'BaseSplitterPanel',\n \"extends\": BaseComponent,\n props: {\n size: {\n type: Number,\n \"default\": null\n },\n minSize: {\n type: Number,\n \"default\": null\n }\n },\n style: SplitterPanelStyle,\n provide: function provide() {\n return {\n $pcSplitterPanel: this,\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'SplitterPanel',\n \"extends\": script$1,\n inheritAttrs: false,\n data: function data() {\n return {\n nestedState: null\n };\n },\n computed: {\n isNested: function isNested() {\n var _this = this;\n return this.$slots[\"default\"]().some(function (child) {\n _this.nestedState = child.type.name === 'Splitter' ? true : null;\n return _this.nestedState;\n });\n },\n getPTOptions: function getPTOptions() {\n return {\n context: {\n nested: this.isNested\n }\n };\n }\n }\n};\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"div\", mergeProps({\n ref: \"container\",\n \"class\": _ctx.cx('root')\n }, _ctx.ptmi('root', $options.getPTOptions)), [renderSlot(_ctx.$slots, \"default\")], 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","\n\n\n\n\n","import { isNotEmpty } from '@primeuix/utils/object';\nimport BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-autocomplete {\\n display: inline-flex;\\n}\\n\\n.p-autocomplete-loader {\\n position: absolute;\\n top: 50%;\\n margin-top: -0.5rem;\\n right: \".concat(dt('autocomplete.padding.x'), \";\\n}\\n\\n.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-loader {\\n right: calc(\").concat(dt('autocomplete.dropdown.width'), \" + \").concat(dt('autocomplete.padding.x'), \");\\n}\\n\\n.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input {\\n flex: 1 1 auto;\\n width: 1%;\\n}\\n\\n.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input,\\n.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input-multiple {\\n border-top-right-radius: 0;\\n border-bottom-right-radius: 0;\\n}\\n\\n.p-autocomplete-dropdown {\\n cursor: pointer;\\n display: inline-flex;\\n cursor: pointer;\\n user-select: none;\\n align-items: center;\\n justify-content: center;\\n overflow: hidden;\\n position: relative;\\n width: \").concat(dt('autocomplete.dropdown.width'), \";\\n border-top-right-radius: \").concat(dt('autocomplete.dropdown.border.radius'), \";\\n border-bottom-right-radius: \").concat(dt('autocomplete.dropdown.border.radius'), \";\\n background: \").concat(dt('autocomplete.dropdown.background'), \";\\n border: 1px solid \").concat(dt('autocomplete.dropdown.border.color'), \";\\n border-left: 0 none;\\n color: \").concat(dt('autocomplete.dropdown.color'), \";\\n transition: background \").concat(dt('autocomplete.transition.duration'), \", color \").concat(dt('autocomplete.transition.duration'), \", border-color \").concat(dt('autocomplete.transition.duration'), \", outline-color \").concat(dt('autocomplete.transition.duration'), \", box-shadow \").concat(dt('autocomplete.transition.duration'), \";\\n outline-color: transparent;\\n}\\n\\n.p-autocomplete-dropdown:not(:disabled):hover {\\n background: \").concat(dt('autocomplete.dropdown.hover.background'), \";\\n border-color: \").concat(dt('autocomplete.dropdown.hover.border.color'), \";\\n color: \").concat(dt('autocomplete.dropdown.hover.color'), \";\\n}\\n\\n.p-autocomplete-dropdown:not(:disabled):active {\\n background: \").concat(dt('autocomplete.dropdown.active.background'), \";\\n border-color: \").concat(dt('autocomplete.dropdown.active.border.color'), \";\\n color: \").concat(dt('autocomplete.dropdown.active.color'), \";\\n}\\n\\n.p-autocomplete-dropdown:focus-visible {\\n box-shadow: \").concat(dt('autocomplete.dropdown.focus.ring.shadow'), \";\\n outline: \").concat(dt('autocomplete.dropdown.focus.ring.width'), \" \").concat(dt('autocomplete.dropdown.focus.ring.style'), \" \").concat(dt('autocomplete.dropdown.focus.ring.color'), \";\\n outline-offset: \").concat(dt('autocomplete.dropdown.focus.ring.offset'), \";\\n}\\n\\n.p-autocomplete .p-autocomplete-overlay {\\n min-width: 100%;\\n}\\n\\n.p-autocomplete-overlay {\\n position: absolute;\\n overflow: auto;\\n top: 0;\\n left: 0;\\n background: \").concat(dt('autocomplete.overlay.background'), \";\\n color: \").concat(dt('autocomplete.overlay.color'), \";\\n border: 1px solid \").concat(dt('autocomplete.overlay.border.color'), \";\\n border-radius: \").concat(dt('autocomplete.overlay.border.radius'), \";\\n box-shadow: \").concat(dt('autocomplete.overlay.shadow'), \";\\n}\\n\\n.p-autocomplete-list {\\n margin: 0;\\n padding: 0;\\n list-style-type: none;\\n display: flex;\\n flex-direction: column;\\n gap: \").concat(dt('autocomplete.list.gap'), \";\\n padding: \").concat(dt('autocomplete.list.padding'), \";\\n}\\n\\n.p-autocomplete-option {\\n cursor: pointer;\\n white-space: nowrap;\\n position: relative;\\n overflow: hidden;\\n display: flex;\\n align-items: center;\\n padding: \").concat(dt('autocomplete.option.padding'), \";\\n border: 0 none;\\n color: \").concat(dt('autocomplete.option.color'), \";\\n background: transparent;\\n transition: background \").concat(dt('autocomplete.transition.duration'), \", color \").concat(dt('autocomplete.transition.duration'), \", border-color \").concat(dt('autocomplete.transition.duration'), \";\\n border-radius: \").concat(dt('autocomplete.option.border.radius'), \";\\n}\\n\\n.p-autocomplete-option:not(.p-autocomplete-option-selected):not(.p-disabled).p-focus {\\n background: \").concat(dt('autocomplete.option.focus.background'), \";\\n color: \").concat(dt('autocomplete.option.focus.color'), \";\\n}\\n\\n.p-autocomplete-option-selected {\\n background: \").concat(dt('autocomplete.option.selected.background'), \";\\n color: \").concat(dt('autocomplete.option.selected.color'), \";\\n}\\n\\n.p-autocomplete-option-selected.p-focus {\\n background: \").concat(dt('autocomplete.option.selected.focus.background'), \";\\n color: \").concat(dt('autocomplete.option.selected.focus.color'), \";\\n}\\n\\n.p-autocomplete-option-group {\\n margin: 0;\\n padding: \").concat(dt('autocomplete.option.group.padding'), \";\\n color: \").concat(dt('autocomplete.option.group.color'), \";\\n background: \").concat(dt('autocomplete.option.group.background'), \";\\n font-weight: \").concat(dt('autocomplete.option.group.font.weight'), \";\\n}\\n\\n.p-autocomplete-input-multiple {\\n margin: 0;\\n list-style-type: none;\\n cursor: text;\\n overflow: hidden;\\n display: flex;\\n align-items: center;\\n flex-wrap: wrap;\\n padding: calc(\").concat(dt('autocomplete.padding.y'), \" / 2) \").concat(dt('autocomplete.padding.x'), \";\\n gap: calc(\").concat(dt('autocomplete.padding.y'), \" / 2);\\n color: \").concat(dt('autocomplete.color'), \";\\n background: \").concat(dt('autocomplete.background'), \";\\n border: 1px solid \").concat(dt('autocomplete.border.color'), \";\\n border-radius: \").concat(dt('autocomplete.border.radius'), \";\\n width: 100%;\\n transition: background \").concat(dt('autocomplete.transition.duration'), \", color \").concat(dt('autocomplete.transition.duration'), \", border-color \").concat(dt('autocomplete.transition.duration'), \", outline-color \").concat(dt('autocomplete.transition.duration'), \", box-shadow \").concat(dt('autocomplete.transition.duration'), \";\\n outline-color: transparent;\\n box-shadow: \").concat(dt('autocomplete.shadow'), \";\\n}\\n\\n.p-autocomplete:not(.p-disabled):hover .p-autocomplete-input-multiple {\\n border-color: \").concat(dt('autocomplete.hover.border.color'), \";\\n}\\n\\n.p-autocomplete:not(.p-disabled).p-focus .p-autocomplete-input-multiple {\\n border-color: \").concat(dt('autocomplete.focus.border.color'), \";\\n box-shadow: \").concat(dt('autocomplete.focus.ring.shadow'), \";\\n outline: \").concat(dt('autocomplete.focus.ring.width'), \" \").concat(dt('autocomplete.focus.ring.style'), \" \").concat(dt('autocomplete.focus.ring.color'), \";\\n outline-offset: \").concat(dt('autocomplete.focus.ring.offset'), \";\\n}\\n\\n.p-autocomplete.p-invalid .p-autocomplete-input-multiple {\\n border-color: \").concat(dt('autocomplete.invalid.border.color'), \";\\n}\\n\\n.p-variant-filled.p-autocomplete-input-multiple {\\n background: \").concat(dt('autocomplete.filled.background'), \";\\n}\\n\\n.p-autocomplete:not(.p-disabled).p-focus .p-variant-filled.p-autocomplete-input-multiple {\\n background: \").concat(dt('autocomplete.filled.focus.background'), \";\\n}\\n\\n.p-autocomplete.p-disabled .p-autocomplete-input-multiple {\\n opacity: 1;\\n background: \").concat(dt('autocomplete.disabled.background'), \";\\n color: \").concat(dt('autocomplete.disabled.color'), \";\\n}\\n\\n.p-autocomplete-chip.p-chip {\\n padding-top: calc(\").concat(dt('autocomplete.padding.y'), \" / 2);\\n padding-bottom: calc(\").concat(dt('autocomplete.padding.y'), \" / 2);\\n border-radius: \").concat(dt('autocomplete.chip.border.radius'), \";\\n}\\n\\n.p-autocomplete-input-multiple:has(.p-autocomplete-chip) {\\n padding-left: calc(\").concat(dt('autocomplete.padding.y'), \" / 2);\\n padding-right: calc(\").concat(dt('autocomplete.padding.y'), \" / 2);\\n}\\n\\n.p-autocomplete-chip-item.p-focus .p-autocomplete-chip {\\n background: \").concat(dt('inputchips.chip.focus.background'), \";\\n color: \").concat(dt('inputchips.chip.focus.color'), \";\\n}\\n\\n.p-autocomplete-input-chip {\\n flex: 1 1 auto;\\n display: inline-flex;\\n padding-top: calc(\").concat(dt('autocomplete.padding.y'), \" / 2);\\n padding-bottom: calc(\").concat(dt('autocomplete.padding.y'), \" / 2);\\n}\\n\\n.p-autocomplete-input-chip input {\\n border: 0 none;\\n outline: 0 none;\\n background: transparent;\\n margin: 0;\\n padding: 0;\\n box-shadow: none;\\n border-radius: 0;\\n width: 100%;\\n font-family: inherit;\\n font-feature-settings: inherit;\\n font-size: 1rem;\\n color: inherit;\\n}\\n\\n.p-autocomplete-input-chip input::placeholder {\\n color: \").concat(dt('autocomplete.placeholder.color'), \";\\n}\\n\\n.p-autocomplete-empty-message {\\n padding: \").concat(dt('autocomplete.empty.message.padding'), \";\\n}\\n\\n.p-autocomplete-fluid {\\n display: flex;\\n}\\n\\n.p-autocomplete-fluid:has(.p-autocomplete-dropdown) .p-autocomplete-input {\\n width: 1%;\\n}\\n\");\n};\nvar inlineStyles = {\n root: {\n position: 'relative'\n }\n};\nvar classes = {\n root: function root(_ref2) {\n var instance = _ref2.instance,\n props = _ref2.props;\n return ['p-autocomplete p-component p-inputwrapper', {\n 'p-disabled': props.disabled,\n 'p-invalid': props.invalid,\n 'p-focus': instance.focused,\n 'p-inputwrapper-filled': props.modelValue || isNotEmpty(instance.inputValue),\n 'p-inputwrapper-focus': instance.focused,\n 'p-autocomplete-open': instance.overlayVisible,\n 'p-autocomplete-fluid': instance.hasFluid\n }];\n },\n pcInput: 'p-autocomplete-input',\n inputMultiple: function inputMultiple(_ref3) {\n var props = _ref3.props,\n instance = _ref3.instance;\n return ['p-autocomplete-input-multiple', {\n 'p-variant-filled': props.variant ? props.variant === 'filled' : instance.$primevue.config.inputStyle === 'filled' || instance.$primevue.config.inputVariant === 'filled'\n }];\n },\n chipItem: function chipItem(_ref4) {\n var instance = _ref4.instance,\n i = _ref4.i;\n return ['p-autocomplete-chip-item', {\n 'p-focus': instance.focusedMultipleOptionIndex === i\n }];\n },\n pcChip: 'p-autocomplete-chip',\n chipIcon: 'p-autocomplete-chip-icon',\n inputChip: 'p-autocomplete-input-chip',\n loader: 'p-autocomplete-loader',\n dropdown: 'p-autocomplete-dropdown',\n overlay: 'p-autocomplete-overlay p-component',\n list: 'p-autocomplete-list',\n optionGroup: 'p-autocomplete-option-group',\n option: function option(_ref5) {\n var instance = _ref5.instance,\n _option = _ref5.option,\n i = _ref5.i,\n getItemOptions = _ref5.getItemOptions;\n return ['p-autocomplete-option', {\n 'p-autocomplete-option-selected': instance.isSelected(_option),\n 'p-focus': instance.focusedOptionIndex === instance.getOptionIndex(i, getItemOptions),\n 'p-disabled': instance.isOptionDisabled(_option)\n }];\n },\n emptyMessage: 'p-autocomplete-empty-message'\n};\nvar AutoCompleteStyle = BaseStyle.extend({\n name: 'autocomplete',\n theme: theme,\n classes: classes,\n inlineStyles: inlineStyles\n});\n\nexport { AutoCompleteStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import { focus, addStyle, relativePosition, getOuterWidth, absolutePosition, isTouchDevice, findSingle } from '@primeuix/utils/dom';\nimport { resolveFieldData, isEmpty, isNotEmpty, equals, findLastIndex } from '@primeuix/utils/object';\nimport { ZIndex } from '@primeuix/utils/zindex';\nimport { UniqueComponentId, ConnectedOverlayScrollHandler } from '@primevue/core/utils';\nimport ChevronDownIcon from '@primevue/icons/chevrondown';\nimport SpinnerIcon from '@primevue/icons/spinner';\nimport Chip from 'primevue/chip';\nimport InputText from 'primevue/inputtext';\nimport OverlayEventBus from 'primevue/overlayeventbus';\nimport Portal from 'primevue/portal';\nimport Ripple from 'primevue/ripple';\nimport VirtualScroller from 'primevue/virtualscroller';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport AutoCompleteStyle from 'primevue/autocomplete/style';\nimport { resolveComponent, resolveDirective, openBlock, createElementBlock, mergeProps, createBlock, normalizeClass, normalizeStyle, createCommentVNode, Fragment, renderList, renderSlot, createVNode, withCtx, createElementVNode, resolveDynamicComponent, toDisplayString, Transition, createSlots, createTextVNode, withDirectives } from 'vue';\n\nvar script$1 = {\n name: 'BaseAutoComplete',\n \"extends\": BaseComponent,\n props: {\n modelValue: null,\n suggestions: {\n type: Array,\n \"default\": null\n },\n optionLabel: null,\n optionDisabled: null,\n optionGroupLabel: null,\n optionGroupChildren: null,\n scrollHeight: {\n type: String,\n \"default\": '14rem'\n },\n dropdown: {\n type: Boolean,\n \"default\": false\n },\n dropdownMode: {\n type: String,\n \"default\": 'blank'\n },\n multiple: {\n type: Boolean,\n \"default\": false\n },\n loading: {\n type: Boolean,\n \"default\": false\n },\n variant: {\n type: String,\n \"default\": null\n },\n invalid: {\n type: Boolean,\n \"default\": false\n },\n disabled: {\n type: Boolean,\n \"default\": false\n },\n placeholder: {\n type: String,\n \"default\": null\n },\n dataKey: {\n type: String,\n \"default\": null\n },\n minLength: {\n type: Number,\n \"default\": 1\n },\n delay: {\n type: Number,\n \"default\": 300\n },\n appendTo: {\n type: [String, Object],\n \"default\": 'body'\n },\n forceSelection: {\n type: Boolean,\n \"default\": false\n },\n completeOnFocus: {\n type: Boolean,\n \"default\": false\n },\n inputId: {\n type: String,\n \"default\": null\n },\n inputStyle: {\n type: Object,\n \"default\": null\n },\n inputClass: {\n type: [String, Object],\n \"default\": null\n },\n panelStyle: {\n type: Object,\n \"default\": null\n },\n panelClass: {\n type: [String, Object],\n \"default\": null\n },\n overlayStyle: {\n type: Object,\n \"default\": null\n },\n overlayClass: {\n type: [String, Object],\n \"default\": null\n },\n dropdownIcon: {\n type: String,\n \"default\": null\n },\n dropdownClass: {\n type: [String, Object],\n \"default\": null\n },\n loader: {\n type: String,\n \"default\": null\n },\n loadingIcon: {\n type: String,\n \"default\": null\n },\n removeTokenIcon: {\n type: String,\n \"default\": null\n },\n chipIcon: {\n type: String,\n \"default\": null\n },\n virtualScrollerOptions: {\n type: Object,\n \"default\": null\n },\n autoOptionFocus: {\n type: Boolean,\n \"default\": false\n },\n selectOnFocus: {\n type: Boolean,\n \"default\": false\n },\n focusOnHover: {\n type: Boolean,\n \"default\": true\n },\n searchLocale: {\n type: String,\n \"default\": undefined\n },\n searchMessage: {\n type: String,\n \"default\": null\n },\n selectionMessage: {\n type: String,\n \"default\": null\n },\n emptySelectionMessage: {\n type: String,\n \"default\": null\n },\n emptySearchMessage: {\n type: String,\n \"default\": null\n },\n tabindex: {\n type: Number,\n \"default\": 0\n },\n typeahead: {\n type: Boolean,\n \"default\": true\n },\n ariaLabel: {\n type: String,\n \"default\": null\n },\n ariaLabelledby: {\n type: String,\n \"default\": null\n },\n fluid: {\n type: Boolean,\n \"default\": null\n }\n },\n style: AutoCompleteStyle,\n provide: function provide() {\n return {\n $pcAutoComplete: this,\n $parentInstance: this\n };\n }\n};\n\nfunction _typeof$1(o) { \"@babel/helpers - typeof\"; return _typeof$1 = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof$1(o); }\nfunction _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _iterableToArray(r) { if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r); }\nfunction _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nvar script = {\n name: 'AutoComplete',\n \"extends\": script$1,\n inheritAttrs: false,\n emits: ['update:modelValue', 'change', 'focus', 'blur', 'item-select', 'item-unselect', 'option-select', 'option-unselect', 'dropdown-click', 'clear', 'complete', 'before-show', 'before-hide', 'show', 'hide'],\n inject: {\n $pcFluid: {\n \"default\": null\n }\n },\n outsideClickListener: null,\n resizeListener: null,\n scrollHandler: null,\n overlay: null,\n virtualScroller: null,\n searchTimeout: null,\n dirty: false,\n data: function data() {\n return {\n id: this.$attrs.id,\n clicked: false,\n focused: false,\n focusedOptionIndex: -1,\n focusedMultipleOptionIndex: -1,\n overlayVisible: false,\n searching: false\n };\n },\n watch: {\n '$attrs.id': function $attrsId(newValue) {\n this.id = newValue || UniqueComponentId();\n },\n suggestions: function suggestions() {\n if (this.searching) {\n this.show();\n this.focusedOptionIndex = this.overlayVisible && this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : -1;\n this.searching = false;\n }\n this.autoUpdateModel();\n }\n },\n mounted: function mounted() {\n this.id = this.id || UniqueComponentId();\n this.autoUpdateModel();\n },\n updated: function updated() {\n if (this.overlayVisible) {\n this.alignOverlay();\n }\n },\n beforeUnmount: function beforeUnmount() {\n this.unbindOutsideClickListener();\n this.unbindResizeListener();\n if (this.scrollHandler) {\n this.scrollHandler.destroy();\n this.scrollHandler = null;\n }\n if (this.overlay) {\n ZIndex.clear(this.overlay);\n this.overlay = null;\n }\n },\n methods: {\n getOptionIndex: function getOptionIndex(index, fn) {\n return this.virtualScrollerDisabled ? index : fn && fn(index)['index'];\n },\n getOptionLabel: function getOptionLabel(option) {\n return this.optionLabel ? resolveFieldData(option, this.optionLabel) : option;\n },\n getOptionValue: function getOptionValue(option) {\n return option; // TODO: The 'optionValue' properties can be added.\n },\n getOptionRenderKey: function getOptionRenderKey(option, index) {\n return (this.dataKey ? resolveFieldData(option, this.dataKey) : this.getOptionLabel(option)) + '_' + index;\n },\n getPTOptions: function getPTOptions(option, itemOptions, index, key) {\n return this.ptm(key, {\n context: {\n selected: this.isSelected(option),\n focused: this.focusedOptionIndex === this.getOptionIndex(index, itemOptions),\n disabled: this.isOptionDisabled(option)\n }\n });\n },\n isOptionDisabled: function isOptionDisabled(option) {\n return this.optionDisabled ? resolveFieldData(option, this.optionDisabled) : false;\n },\n isOptionGroup: function isOptionGroup(option) {\n return this.optionGroupLabel && option.optionGroup && option.group;\n },\n getOptionGroupLabel: function getOptionGroupLabel(optionGroup) {\n return resolveFieldData(optionGroup, this.optionGroupLabel);\n },\n getOptionGroupChildren: function getOptionGroupChildren(optionGroup) {\n return resolveFieldData(optionGroup, this.optionGroupChildren);\n },\n getAriaPosInset: function getAriaPosInset(index) {\n var _this = this;\n return (this.optionGroupLabel ? index - this.visibleOptions.slice(0, index).filter(function (option) {\n return _this.isOptionGroup(option);\n }).length : index) + 1;\n },\n show: function show(isFocus) {\n this.$emit('before-show');\n this.dirty = true;\n this.overlayVisible = true;\n this.focusedOptionIndex = this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : -1;\n isFocus && focus(this.multiple ? this.$refs.focusInput : this.$refs.focusInput.$el);\n },\n hide: function hide(isFocus) {\n var _this2 = this;\n var _hide = function _hide() {\n _this2.$emit('before-hide');\n _this2.dirty = isFocus;\n _this2.overlayVisible = false;\n _this2.clicked = false;\n _this2.focusedOptionIndex = -1;\n isFocus && focus(_this2.multiple ? _this2.$refs.focusInput : _this2.$refs.focusInput.$el);\n };\n setTimeout(function () {\n _hide();\n }, 0); // For ScreenReaders\n },\n onFocus: function onFocus(event) {\n if (this.disabled) {\n // For ScreenReaders\n return;\n }\n if (!this.dirty && this.completeOnFocus) {\n this.search(event, event.target.value, 'focus');\n }\n this.dirty = true;\n this.focused = true;\n if (this.overlayVisible) {\n this.focusedOptionIndex = this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : this.overlayVisible && this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : -1;\n this.scrollInView(this.focusedOptionIndex);\n }\n this.$emit('focus', event);\n },\n onBlur: function onBlur(event) {\n this.dirty = false;\n this.focused = false;\n this.focusedOptionIndex = -1;\n this.$emit('blur', event);\n },\n onKeyDown: function onKeyDown(event) {\n if (this.disabled) {\n event.preventDefault();\n return;\n }\n switch (event.code) {\n case 'ArrowDown':\n this.onArrowDownKey(event);\n break;\n case 'ArrowUp':\n this.onArrowUpKey(event);\n break;\n case 'ArrowLeft':\n this.onArrowLeftKey(event);\n break;\n case 'ArrowRight':\n this.onArrowRightKey(event);\n break;\n case 'Home':\n this.onHomeKey(event);\n break;\n case 'End':\n this.onEndKey(event);\n break;\n case 'PageDown':\n this.onPageDownKey(event);\n break;\n case 'PageUp':\n this.onPageUpKey(event);\n break;\n case 'Enter':\n case 'NumpadEnter':\n this.onEnterKey(event);\n break;\n case 'Escape':\n this.onEscapeKey(event);\n break;\n case 'Tab':\n this.onTabKey(event);\n break;\n case 'Backspace':\n this.onBackspaceKey(event);\n break;\n }\n this.clicked = false;\n },\n onInput: function onInput(event) {\n var _this3 = this;\n if (this.typeahead) {\n if (this.searchTimeout) {\n clearTimeout(this.searchTimeout);\n }\n var query = event.target.value;\n if (!this.multiple) {\n this.updateModel(event, query);\n }\n if (query.length === 0) {\n this.hide();\n this.$emit('clear');\n } else {\n if (query.length >= this.minLength) {\n this.focusedOptionIndex = -1;\n this.searchTimeout = setTimeout(function () {\n _this3.search(event, query, 'input');\n }, this.delay);\n } else {\n this.hide();\n }\n }\n }\n },\n onChange: function onChange(event) {\n var _this4 = this;\n if (this.forceSelection) {\n var valid = false;\n\n // when forceSelection is on, prevent called twice onOptionSelect()\n if (this.visibleOptions && !this.multiple) {\n var value = this.multiple ? this.$refs.focusInput.value : this.$refs.focusInput.$el.value;\n var matchedValue = this.visibleOptions.find(function (option) {\n return _this4.isOptionMatched(option, value || '');\n });\n if (matchedValue !== undefined) {\n valid = true;\n !this.isSelected(matchedValue) && this.onOptionSelect(event, matchedValue);\n }\n }\n if (!valid) {\n if (this.multiple) this.$refs.focusInput.value = '';else this.$refs.focusInput.$el.value = '';\n this.$emit('clear');\n !this.multiple && this.updateModel(event, null);\n }\n }\n },\n onMultipleContainerFocus: function onMultipleContainerFocus() {\n if (this.disabled) {\n // For ScreenReaders\n return;\n }\n this.focused = true;\n },\n onMultipleContainerBlur: function onMultipleContainerBlur() {\n this.focusedMultipleOptionIndex = -1;\n this.focused = false;\n },\n onMultipleContainerKeyDown: function onMultipleContainerKeyDown(event) {\n if (this.disabled) {\n event.preventDefault();\n return;\n }\n switch (event.code) {\n case 'ArrowLeft':\n this.onArrowLeftKeyOnMultiple(event);\n break;\n case 'ArrowRight':\n this.onArrowRightKeyOnMultiple(event);\n break;\n case 'Backspace':\n this.onBackspaceKeyOnMultiple(event);\n break;\n }\n },\n onContainerClick: function onContainerClick(event) {\n this.clicked = true;\n if (this.disabled || this.searching || this.loading || this.isInputClicked(event) || this.isDropdownClicked(event)) {\n return;\n }\n if (!this.overlay || !this.overlay.contains(event.target)) {\n focus(this.multiple ? this.$refs.focusInput : this.$refs.focusInput.$el);\n }\n },\n onDropdownClick: function onDropdownClick(event) {\n var query = undefined;\n if (this.overlayVisible) {\n this.hide(true);\n } else {\n var target = this.multiple ? this.$refs.focusInput : this.$refs.focusInput.$el;\n focus(target);\n query = target.value;\n if (this.dropdownMode === 'blank') this.search(event, '', 'dropdown');else if (this.dropdownMode === 'current') this.search(event, query, 'dropdown');\n }\n this.$emit('dropdown-click', {\n originalEvent: event,\n query: query\n });\n },\n onOptionSelect: function onOptionSelect(event, option) {\n var isHide = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var value = this.getOptionValue(option);\n if (this.multiple) {\n this.$refs.focusInput.value = '';\n if (!this.isSelected(option)) {\n this.updateModel(event, [].concat(_toConsumableArray(this.modelValue || []), [value]));\n }\n } else {\n this.updateModel(event, value);\n }\n this.$emit('item-select', {\n originalEvent: event,\n value: option\n });\n this.$emit('option-select', {\n originalEvent: event,\n value: option\n });\n isHide && this.hide(true);\n },\n onOptionMouseMove: function onOptionMouseMove(event, index) {\n if (this.focusOnHover) {\n this.changeFocusedOptionIndex(event, index);\n }\n },\n onOverlayClick: function onOverlayClick(event) {\n OverlayEventBus.emit('overlay-click', {\n originalEvent: event,\n target: this.$el\n });\n },\n onOverlayKeyDown: function onOverlayKeyDown(event) {\n switch (event.code) {\n case 'Escape':\n this.onEscapeKey(event);\n break;\n }\n },\n onArrowDownKey: function onArrowDownKey(event) {\n if (!this.overlayVisible) {\n return;\n }\n var optionIndex = this.focusedOptionIndex !== -1 ? this.findNextOptionIndex(this.focusedOptionIndex) : this.clicked ? this.findFirstOptionIndex() : this.findFirstFocusedOptionIndex();\n this.changeFocusedOptionIndex(event, optionIndex);\n event.preventDefault();\n },\n onArrowUpKey: function onArrowUpKey(event) {\n if (!this.overlayVisible) {\n return;\n }\n if (event.altKey) {\n if (this.focusedOptionIndex !== -1) {\n this.onOptionSelect(event, this.visibleOptions[this.focusedOptionIndex]);\n }\n this.overlayVisible && this.hide();\n event.preventDefault();\n } else {\n var optionIndex = this.focusedOptionIndex !== -1 ? this.findPrevOptionIndex(this.focusedOptionIndex) : this.clicked ? this.findLastOptionIndex() : this.findLastFocusedOptionIndex();\n this.changeFocusedOptionIndex(event, optionIndex);\n event.preventDefault();\n }\n },\n onArrowLeftKey: function onArrowLeftKey(event) {\n var target = event.currentTarget;\n this.focusedOptionIndex = -1;\n if (this.multiple) {\n if (isEmpty(target.value) && this.hasSelectedOption) {\n focus(this.$refs.multiContainer);\n this.focusedMultipleOptionIndex = this.modelValue.length;\n } else {\n event.stopPropagation(); // To prevent onArrowLeftKeyOnMultiple method\n }\n }\n },\n onArrowRightKey: function onArrowRightKey(event) {\n this.focusedOptionIndex = -1;\n this.multiple && event.stopPropagation(); // To prevent onArrowRightKeyOnMultiple method\n },\n onHomeKey: function onHomeKey(event) {\n var currentTarget = event.currentTarget;\n var len = currentTarget.value.length;\n currentTarget.setSelectionRange(0, event.shiftKey ? len : 0);\n this.focusedOptionIndex = -1;\n event.preventDefault();\n },\n onEndKey: function onEndKey(event) {\n var currentTarget = event.currentTarget;\n var len = currentTarget.value.length;\n currentTarget.setSelectionRange(event.shiftKey ? 0 : len, len);\n this.focusedOptionIndex = -1;\n event.preventDefault();\n },\n onPageUpKey: function onPageUpKey(event) {\n this.scrollInView(0);\n event.preventDefault();\n },\n onPageDownKey: function onPageDownKey(event) {\n this.scrollInView(this.visibleOptions.length - 1);\n event.preventDefault();\n },\n onEnterKey: function onEnterKey(event) {\n if (!this.typeahead) {\n if (this.multiple) {\n this.updateModel(event, [].concat(_toConsumableArray(this.modelValue || []), [event.target.value]));\n this.$refs.focusInput.value = '';\n }\n } else {\n if (!this.overlayVisible) {\n this.focusedOptionIndex = -1; // reset\n this.onArrowDownKey(event);\n } else {\n if (this.focusedOptionIndex !== -1) {\n this.onOptionSelect(event, this.visibleOptions[this.focusedOptionIndex]);\n }\n this.hide();\n }\n }\n },\n onEscapeKey: function onEscapeKey(event) {\n this.overlayVisible && this.hide(true);\n event.preventDefault();\n },\n onTabKey: function onTabKey(event) {\n if (this.focusedOptionIndex !== -1) {\n this.onOptionSelect(event, this.visibleOptions[this.focusedOptionIndex]);\n }\n this.overlayVisible && this.hide();\n },\n onBackspaceKey: function onBackspaceKey(event) {\n if (this.multiple) {\n if (isNotEmpty(this.modelValue) && !this.$refs.focusInput.value) {\n var removedValue = this.modelValue[this.modelValue.length - 1];\n var newValue = this.modelValue.slice(0, -1);\n this.$emit('update:modelValue', newValue);\n this.$emit('item-unselect', {\n originalEvent: event,\n value: removedValue\n });\n this.$emit('option-unselect', {\n originalEvent: event,\n value: removedValue\n });\n }\n event.stopPropagation(); // To prevent onBackspaceKeyOnMultiple method\n }\n },\n onArrowLeftKeyOnMultiple: function onArrowLeftKeyOnMultiple() {\n this.focusedMultipleOptionIndex = this.focusedMultipleOptionIndex < 1 ? 0 : this.focusedMultipleOptionIndex - 1;\n },\n onArrowRightKeyOnMultiple: function onArrowRightKeyOnMultiple() {\n this.focusedMultipleOptionIndex++;\n if (this.focusedMultipleOptionIndex > this.modelValue.length - 1) {\n this.focusedMultipleOptionIndex = -1;\n focus(this.$refs.focusInput);\n }\n },\n onBackspaceKeyOnMultiple: function onBackspaceKeyOnMultiple(event) {\n if (this.focusedMultipleOptionIndex !== -1) {\n this.removeOption(event, this.focusedMultipleOptionIndex);\n }\n },\n onOverlayEnter: function onOverlayEnter(el) {\n ZIndex.set('overlay', el, this.$primevue.config.zIndex.overlay);\n addStyle(el, {\n position: 'absolute',\n top: '0',\n left: '0'\n });\n this.alignOverlay();\n },\n onOverlayAfterEnter: function onOverlayAfterEnter() {\n this.bindOutsideClickListener();\n this.bindScrollListener();\n this.bindResizeListener();\n this.$emit('show');\n },\n onOverlayLeave: function onOverlayLeave() {\n this.unbindOutsideClickListener();\n this.unbindScrollListener();\n this.unbindResizeListener();\n this.$emit('hide');\n this.overlay = null;\n },\n onOverlayAfterLeave: function onOverlayAfterLeave(el) {\n ZIndex.clear(el);\n },\n alignOverlay: function alignOverlay() {\n var target = this.multiple ? this.$refs.multiContainer : this.$refs.focusInput.$el;\n if (this.appendTo === 'self') {\n relativePosition(this.overlay, target);\n } else {\n this.overlay.style.minWidth = getOuterWidth(target) + 'px';\n absolutePosition(this.overlay, target);\n }\n },\n bindOutsideClickListener: function bindOutsideClickListener() {\n var _this5 = this;\n if (!this.outsideClickListener) {\n this.outsideClickListener = function (event) {\n if (_this5.overlayVisible && _this5.overlay && _this5.isOutsideClicked(event)) {\n _this5.hide();\n }\n };\n document.addEventListener('click', this.outsideClickListener);\n }\n },\n unbindOutsideClickListener: function unbindOutsideClickListener() {\n if (this.outsideClickListener) {\n document.removeEventListener('click', this.outsideClickListener);\n this.outsideClickListener = null;\n }\n },\n bindScrollListener: function bindScrollListener() {\n var _this6 = this;\n if (!this.scrollHandler) {\n this.scrollHandler = new ConnectedOverlayScrollHandler(this.$refs.container, function () {\n if (_this6.overlayVisible) {\n _this6.hide();\n }\n });\n }\n this.scrollHandler.bindScrollListener();\n },\n unbindScrollListener: function unbindScrollListener() {\n if (this.scrollHandler) {\n this.scrollHandler.unbindScrollListener();\n }\n },\n bindResizeListener: function bindResizeListener() {\n var _this7 = this;\n if (!this.resizeListener) {\n this.resizeListener = function () {\n if (_this7.overlayVisible && !isTouchDevice()) {\n _this7.hide();\n }\n };\n window.addEventListener('resize', this.resizeListener);\n }\n },\n unbindResizeListener: function unbindResizeListener() {\n if (this.resizeListener) {\n window.removeEventListener('resize', this.resizeListener);\n this.resizeListener = null;\n }\n },\n isOutsideClicked: function isOutsideClicked(event) {\n return !this.overlay.contains(event.target) && !this.isInputClicked(event) && !this.isDropdownClicked(event);\n },\n isInputClicked: function isInputClicked(event) {\n if (this.multiple) return event.target === this.$refs.multiContainer || this.$refs.multiContainer.contains(event.target);else return event.target === this.$refs.focusInput.$el;\n },\n isDropdownClicked: function isDropdownClicked(event) {\n return this.$refs.dropdownButton ? event.target === this.$refs.dropdownButton || this.$refs.dropdownButton.contains(event.target) : false;\n },\n isOptionMatched: function isOptionMatched(option, value) {\n var _this$getOptionLabel;\n return this.isValidOption(option) && ((_this$getOptionLabel = this.getOptionLabel(option)) === null || _this$getOptionLabel === void 0 ? void 0 : _this$getOptionLabel.toLocaleLowerCase(this.searchLocale)) === value.toLocaleLowerCase(this.searchLocale);\n },\n isValidOption: function isValidOption(option) {\n return isNotEmpty(option) && !(this.isOptionDisabled(option) || this.isOptionGroup(option));\n },\n isValidSelectedOption: function isValidSelectedOption(option) {\n return this.isValidOption(option) && this.isSelected(option);\n },\n isEquals: function isEquals(value1, value2) {\n return equals(value1, value2, this.equalityKey);\n },\n isSelected: function isSelected(option) {\n var _this8 = this;\n var optionValue = this.getOptionValue(option);\n return this.multiple ? (this.modelValue || []).some(function (value) {\n return _this8.isEquals(value, optionValue);\n }) : this.isEquals(this.modelValue, this.getOptionValue(option));\n },\n findFirstOptionIndex: function findFirstOptionIndex() {\n var _this9 = this;\n return this.visibleOptions.findIndex(function (option) {\n return _this9.isValidOption(option);\n });\n },\n findLastOptionIndex: function findLastOptionIndex() {\n var _this10 = this;\n return findLastIndex(this.visibleOptions, function (option) {\n return _this10.isValidOption(option);\n });\n },\n findNextOptionIndex: function findNextOptionIndex(index) {\n var _this11 = this;\n var matchedOptionIndex = index < this.visibleOptions.length - 1 ? this.visibleOptions.slice(index + 1).findIndex(function (option) {\n return _this11.isValidOption(option);\n }) : -1;\n return matchedOptionIndex > -1 ? matchedOptionIndex + index + 1 : index;\n },\n findPrevOptionIndex: function findPrevOptionIndex(index) {\n var _this12 = this;\n var matchedOptionIndex = index > 0 ? findLastIndex(this.visibleOptions.slice(0, index), function (option) {\n return _this12.isValidOption(option);\n }) : -1;\n return matchedOptionIndex > -1 ? matchedOptionIndex : index;\n },\n findSelectedOptionIndex: function findSelectedOptionIndex() {\n var _this13 = this;\n return this.hasSelectedOption ? this.visibleOptions.findIndex(function (option) {\n return _this13.isValidSelectedOption(option);\n }) : -1;\n },\n findFirstFocusedOptionIndex: function findFirstFocusedOptionIndex() {\n var selectedIndex = this.findSelectedOptionIndex();\n return selectedIndex < 0 ? this.findFirstOptionIndex() : selectedIndex;\n },\n findLastFocusedOptionIndex: function findLastFocusedOptionIndex() {\n var selectedIndex = this.findSelectedOptionIndex();\n return selectedIndex < 0 ? this.findLastOptionIndex() : selectedIndex;\n },\n search: function search(event, query, source) {\n //allow empty string but not undefined or null\n if (query === undefined || query === null) {\n return;\n }\n\n //do not search blank values on input change\n if (source === 'input' && query.trim().length === 0) {\n return;\n }\n this.searching = true;\n this.$emit('complete', {\n originalEvent: event,\n query: query\n });\n },\n removeOption: function removeOption(event, index) {\n var _this14 = this;\n var removedOption = this.modelValue[index];\n var value = this.modelValue.filter(function (_, i) {\n return i !== index;\n }).map(function (option) {\n return _this14.getOptionValue(option);\n });\n this.updateModel(event, value);\n this.$emit('item-unselect', {\n originalEvent: event,\n value: removedOption\n });\n this.$emit('option-unselect', {\n originalEvent: event,\n value: removedOption\n });\n this.dirty = true;\n focus(this.multiple ? this.$refs.focusInput : this.$refs.focusInput.$el);\n },\n changeFocusedOptionIndex: function changeFocusedOptionIndex(event, index) {\n if (this.focusedOptionIndex !== index) {\n this.focusedOptionIndex = index;\n this.scrollInView();\n if (this.selectOnFocus) {\n this.onOptionSelect(event, this.visibleOptions[index], false);\n }\n }\n },\n scrollInView: function scrollInView() {\n var _this15 = this;\n var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;\n this.$nextTick(function () {\n var id = index !== -1 ? \"\".concat(_this15.id, \"_\").concat(index) : _this15.focusedOptionId;\n var element = findSingle(_this15.list, \"li[id=\\\"\".concat(id, \"\\\"]\"));\n if (element) {\n element.scrollIntoView && element.scrollIntoView({\n block: 'nearest',\n inline: 'start'\n });\n } else if (!_this15.virtualScrollerDisabled) {\n _this15.virtualScroller && _this15.virtualScroller.scrollToIndex(index !== -1 ? index : _this15.focusedOptionIndex);\n }\n });\n },\n autoUpdateModel: function autoUpdateModel() {\n if (this.selectOnFocus && this.autoOptionFocus && !this.hasSelectedOption) {\n this.focusedOptionIndex = this.findFirstFocusedOptionIndex();\n this.onOptionSelect(null, this.visibleOptions[this.focusedOptionIndex], false);\n }\n },\n updateModel: function updateModel(event, value) {\n this.$emit('update:modelValue', value);\n this.$emit('change', {\n originalEvent: event,\n value: value\n });\n },\n flatOptions: function flatOptions(options) {\n var _this16 = this;\n return (options || []).reduce(function (result, option, index) {\n result.push({\n optionGroup: option,\n group: true,\n index: index\n });\n var optionGroupChildren = _this16.getOptionGroupChildren(option);\n optionGroupChildren && optionGroupChildren.forEach(function (o) {\n return result.push(o);\n });\n return result;\n }, []);\n },\n overlayRef: function overlayRef(el) {\n this.overlay = el;\n },\n listRef: function listRef(el, contentRef) {\n this.list = el;\n contentRef && contentRef(el); // For VirtualScroller\n },\n virtualScrollerRef: function virtualScrollerRef(el) {\n this.virtualScroller = el;\n }\n },\n computed: {\n visibleOptions: function visibleOptions() {\n return this.optionGroupLabel ? this.flatOptions(this.suggestions) : this.suggestions || [];\n },\n inputValue: function inputValue() {\n if (isNotEmpty(this.modelValue)) {\n if (_typeof$1(this.modelValue) === 'object') {\n var label = this.getOptionLabel(this.modelValue);\n return label != null ? label : this.modelValue;\n } else {\n return this.modelValue;\n }\n } else {\n return '';\n }\n },\n hasSelectedOption: function hasSelectedOption() {\n return isNotEmpty(this.modelValue);\n },\n equalityKey: function equalityKey() {\n return this.dataKey; // TODO: The 'optionValue' properties can be added.\n },\n searchResultMessageText: function searchResultMessageText() {\n return isNotEmpty(this.visibleOptions) && this.overlayVisible ? this.searchMessageText.replaceAll('{0}', this.visibleOptions.length) : this.emptySearchMessageText;\n },\n searchMessageText: function searchMessageText() {\n return this.searchMessage || this.$primevue.config.locale.searchMessage || '';\n },\n emptySearchMessageText: function emptySearchMessageText() {\n return this.emptySearchMessage || this.$primevue.config.locale.emptySearchMessage || '';\n },\n selectionMessageText: function selectionMessageText() {\n return this.selectionMessage || this.$primevue.config.locale.selectionMessage || '';\n },\n emptySelectionMessageText: function emptySelectionMessageText() {\n return this.emptySelectionMessage || this.$primevue.config.locale.emptySelectionMessage || '';\n },\n selectedMessageText: function selectedMessageText() {\n return this.hasSelectedOption ? this.selectionMessageText.replaceAll('{0}', this.multiple ? this.modelValue.length : '1') : this.emptySelectionMessageText;\n },\n listAriaLabel: function listAriaLabel() {\n return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.listLabel : undefined;\n },\n focusedOptionId: function focusedOptionId() {\n return this.focusedOptionIndex !== -1 ? \"\".concat(this.id, \"_\").concat(this.focusedOptionIndex) : null;\n },\n focusedMultipleOptionId: function focusedMultipleOptionId() {\n return this.focusedMultipleOptionIndex !== -1 ? \"\".concat(this.id, \"_multiple_option_\").concat(this.focusedMultipleOptionIndex) : null;\n },\n ariaSetSize: function ariaSetSize() {\n var _this17 = this;\n return this.visibleOptions.filter(function (option) {\n return !_this17.isOptionGroup(option);\n }).length;\n },\n virtualScrollerDisabled: function virtualScrollerDisabled() {\n return !this.virtualScrollerOptions;\n },\n panelId: function panelId() {\n return this.id + '_panel';\n },\n hasFluid: function hasFluid() {\n return isEmpty(this.fluid) ? !!this.$pcFluid : this.fluid;\n }\n },\n components: {\n InputText: InputText,\n VirtualScroller: VirtualScroller,\n Portal: Portal,\n ChevronDownIcon: ChevronDownIcon,\n SpinnerIcon: SpinnerIcon,\n Chip: Chip\n },\n directives: {\n ripple: Ripple\n }\n};\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nvar _hoisted_1 = [\"aria-activedescendant\"];\nvar _hoisted_2 = [\"id\", \"aria-label\", \"aria-setsize\", \"aria-posinset\"];\nvar _hoisted_3 = [\"id\", \"placeholder\", \"tabindex\", \"disabled\", \"aria-label\", \"aria-labelledby\", \"aria-expanded\", \"aria-controls\", \"aria-activedescendant\", \"aria-invalid\"];\nvar _hoisted_4 = [\"disabled\", \"aria-expanded\", \"aria-controls\"];\nvar _hoisted_5 = [\"id\"];\nvar _hoisted_6 = [\"id\", \"aria-label\"];\nvar _hoisted_7 = [\"id\"];\nvar _hoisted_8 = [\"id\", \"aria-label\", \"aria-selected\", \"aria-disabled\", \"aria-setsize\", \"aria-posinset\", \"onClick\", \"onMousemove\", \"data-p-selected\", \"data-p-focus\", \"data-p-disabled\"];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n var _component_InputText = resolveComponent(\"InputText\");\n var _component_Chip = resolveComponent(\"Chip\");\n var _component_SpinnerIcon = resolveComponent(\"SpinnerIcon\");\n var _component_VirtualScroller = resolveComponent(\"VirtualScroller\");\n var _component_Portal = resolveComponent(\"Portal\");\n var _directive_ripple = resolveDirective(\"ripple\");\n return openBlock(), createElementBlock(\"div\", mergeProps({\n ref: \"container\",\n \"class\": _ctx.cx('root'),\n style: _ctx.sx('root'),\n onClick: _cache[11] || (_cache[11] = function () {\n return $options.onContainerClick && $options.onContainerClick.apply($options, arguments);\n })\n }, _ctx.ptmi('root')), [!_ctx.multiple ? (openBlock(), createBlock(_component_InputText, {\n key: 0,\n ref: \"focusInput\",\n id: _ctx.inputId,\n type: \"text\",\n \"class\": normalizeClass([_ctx.cx('pcInput'), _ctx.inputClass]),\n style: normalizeStyle(_ctx.inputStyle),\n value: $options.inputValue,\n placeholder: _ctx.placeholder,\n tabindex: !_ctx.disabled ? _ctx.tabindex : -1,\n fluid: $options.hasFluid,\n disabled: _ctx.disabled,\n invalid: _ctx.invalid,\n variant: _ctx.variant,\n autocomplete: \"off\",\n role: \"combobox\",\n \"aria-label\": _ctx.ariaLabel,\n \"aria-labelledby\": _ctx.ariaLabelledby,\n \"aria-haspopup\": \"listbox\",\n \"aria-autocomplete\": \"list\",\n \"aria-expanded\": $data.overlayVisible,\n \"aria-controls\": $options.panelId,\n \"aria-activedescendant\": $data.focused ? $options.focusedOptionId : undefined,\n onFocus: $options.onFocus,\n onBlur: $options.onBlur,\n onKeydown: $options.onKeyDown,\n onInput: $options.onInput,\n onChange: $options.onChange,\n unstyled: _ctx.unstyled,\n pt: _ctx.ptm('pcInput')\n }, null, 8, [\"id\", \"class\", \"style\", \"value\", \"placeholder\", \"tabindex\", \"fluid\", \"disabled\", \"invalid\", \"variant\", \"aria-label\", \"aria-labelledby\", \"aria-expanded\", \"aria-controls\", \"aria-activedescendant\", \"onFocus\", \"onBlur\", \"onKeydown\", \"onInput\", \"onChange\", \"unstyled\", \"pt\"])) : createCommentVNode(\"\", true), _ctx.multiple ? (openBlock(), createElementBlock(\"ul\", mergeProps({\n key: 1,\n ref: \"multiContainer\",\n \"class\": _ctx.cx('inputMultiple'),\n tabindex: \"-1\",\n role: \"listbox\",\n \"aria-orientation\": \"horizontal\",\n \"aria-activedescendant\": $data.focused ? $options.focusedMultipleOptionId : undefined,\n onFocus: _cache[5] || (_cache[5] = function () {\n return $options.onMultipleContainerFocus && $options.onMultipleContainerFocus.apply($options, arguments);\n }),\n onBlur: _cache[6] || (_cache[6] = function () {\n return $options.onMultipleContainerBlur && $options.onMultipleContainerBlur.apply($options, arguments);\n }),\n onKeydown: _cache[7] || (_cache[7] = function () {\n return $options.onMultipleContainerKeyDown && $options.onMultipleContainerKeyDown.apply($options, arguments);\n })\n }, _ctx.ptm('inputMultiple')), [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.modelValue, function (option, i) {\n return openBlock(), createElementBlock(\"li\", mergeProps({\n key: \"\".concat(i, \"_\").concat($options.getOptionLabel(option)),\n id: $data.id + '_multiple_option_' + i,\n \"class\": _ctx.cx('chipItem', {\n i: i\n }),\n role: \"option\",\n \"aria-label\": $options.getOptionLabel(option),\n \"aria-selected\": true,\n \"aria-setsize\": _ctx.modelValue.length,\n \"aria-posinset\": i + 1,\n ref_for: true\n }, _ctx.ptm('chipItem')), [renderSlot(_ctx.$slots, \"chip\", mergeProps({\n \"class\": _ctx.cx('pcChip'),\n value: option,\n index: i,\n removeCallback: function removeCallback(event) {\n return $options.removeOption(event, i);\n },\n ref_for: true\n }, _ctx.ptm('pcChip')), function () {\n return [createVNode(_component_Chip, {\n \"class\": normalizeClass(_ctx.cx('pcChip')),\n label: $options.getOptionLabel(option),\n removeIcon: _ctx.chipIcon || _ctx.removeTokenIcon,\n removable: \"\",\n unstyled: _ctx.unstyled,\n onRemove: function onRemove($event) {\n return $options.removeOption($event, i);\n },\n pt: _ctx.ptm('pcChip')\n }, {\n removeicon: withCtx(function () {\n return [renderSlot(_ctx.$slots, _ctx.$slots.chipicon ? 'chipicon' : 'removetokenicon', {\n \"class\": normalizeClass(_ctx.cx('chipIcon')),\n index: i,\n removeCallback: function removeCallback(event) {\n return $options.removeOption(event, i);\n }\n })];\n }),\n _: 2\n }, 1032, [\"class\", \"label\", \"removeIcon\", \"unstyled\", \"onRemove\", \"pt\"])];\n })], 16, _hoisted_2);\n }), 128)), createElementVNode(\"li\", mergeProps({\n \"class\": _ctx.cx('inputChip'),\n role: \"option\"\n }, _ctx.ptm('inputChip')), [createElementVNode(\"input\", mergeProps({\n ref: \"focusInput\",\n id: _ctx.inputId,\n type: \"text\",\n style: _ctx.inputStyle,\n \"class\": _ctx.inputClass,\n placeholder: _ctx.placeholder,\n tabindex: !_ctx.disabled ? _ctx.tabindex : -1,\n disabled: _ctx.disabled,\n autocomplete: \"off\",\n role: \"combobox\",\n \"aria-label\": _ctx.ariaLabel,\n \"aria-labelledby\": _ctx.ariaLabelledby,\n \"aria-haspopup\": \"listbox\",\n \"aria-autocomplete\": \"list\",\n \"aria-expanded\": $data.overlayVisible,\n \"aria-controls\": $data.id + '_list',\n \"aria-activedescendant\": $data.focused ? $options.focusedOptionId : undefined,\n \"aria-invalid\": _ctx.invalid || undefined,\n onFocus: _cache[0] || (_cache[0] = function () {\n return $options.onFocus && $options.onFocus.apply($options, arguments);\n }),\n onBlur: _cache[1] || (_cache[1] = function () {\n return $options.onBlur && $options.onBlur.apply($options, arguments);\n }),\n onKeydown: _cache[2] || (_cache[2] = function () {\n return $options.onKeyDown && $options.onKeyDown.apply($options, arguments);\n }),\n onInput: _cache[3] || (_cache[3] = function () {\n return $options.onInput && $options.onInput.apply($options, arguments);\n }),\n onChange: _cache[4] || (_cache[4] = function () {\n return $options.onChange && $options.onChange.apply($options, arguments);\n })\n }, _ctx.ptm('input')), null, 16, _hoisted_3)], 16)], 16, _hoisted_1)) : createCommentVNode(\"\", true), $data.searching || _ctx.loading ? renderSlot(_ctx.$slots, _ctx.$slots.loader ? 'loader' : 'loadingicon', {\n key: 2,\n \"class\": normalizeClass(_ctx.cx('loader'))\n }, function () {\n return [_ctx.loader || _ctx.loadingIcon ? (openBlock(), createElementBlock(\"i\", mergeProps({\n key: 0,\n \"class\": ['pi-spin', _ctx.cx('loader'), _ctx.loader, _ctx.loadingIcon],\n \"aria-hidden\": \"true\"\n }, _ctx.ptm('loader')), null, 16)) : (openBlock(), createBlock(_component_SpinnerIcon, mergeProps({\n key: 1,\n \"class\": _ctx.cx('loader'),\n spin: \"\",\n \"aria-hidden\": \"true\"\n }, _ctx.ptm('loader')), null, 16, [\"class\"]))];\n }) : createCommentVNode(\"\", true), renderSlot(_ctx.$slots, _ctx.$slots.dropdown ? 'dropdown' : 'dropdownbutton', {\n toggleCallback: function toggleCallback(event) {\n return $options.onDropdownClick(event);\n }\n }, function () {\n return [_ctx.dropdown ? (openBlock(), createElementBlock(\"button\", mergeProps({\n key: 0,\n ref: \"dropdownButton\",\n type: \"button\",\n \"class\": [_ctx.cx('dropdown'), _ctx.dropdownClass],\n disabled: _ctx.disabled,\n \"aria-haspopup\": \"listbox\",\n \"aria-expanded\": $data.overlayVisible,\n \"aria-controls\": $options.panelId,\n onClick: _cache[8] || (_cache[8] = function () {\n return $options.onDropdownClick && $options.onDropdownClick.apply($options, arguments);\n })\n }, _ctx.ptm('dropdown')), [renderSlot(_ctx.$slots, \"dropdownicon\", {\n \"class\": normalizeClass(_ctx.dropdownIcon)\n }, function () {\n return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.dropdownIcon ? 'span' : 'ChevronDownIcon'), mergeProps({\n \"class\": _ctx.dropdownIcon\n }, _ctx.ptm('dropdownIcon')), null, 16, [\"class\"]))];\n })], 16, _hoisted_4)) : createCommentVNode(\"\", true)];\n }), createElementVNode(\"span\", mergeProps({\n role: \"status\",\n \"aria-live\": \"polite\",\n \"class\": \"p-hidden-accessible\"\n }, _ctx.ptm('hiddenSearchResult'), {\n \"data-p-hidden-accessible\": true\n }), toDisplayString($options.searchResultMessageText), 17), createVNode(_component_Portal, {\n appendTo: _ctx.appendTo\n }, {\n \"default\": withCtx(function () {\n return [createVNode(Transition, mergeProps({\n name: \"p-connected-overlay\",\n onEnter: $options.onOverlayEnter,\n onAfterEnter: $options.onOverlayAfterEnter,\n onLeave: $options.onOverlayLeave,\n onAfterLeave: $options.onOverlayAfterLeave\n }, _ctx.ptm('transition')), {\n \"default\": withCtx(function () {\n return [$data.overlayVisible ? (openBlock(), createElementBlock(\"div\", mergeProps({\n key: 0,\n ref: $options.overlayRef,\n id: $options.panelId,\n \"class\": [_ctx.cx('overlay'), _ctx.panelClass, _ctx.overlayClass],\n style: _objectSpread(_objectSpread(_objectSpread({}, _ctx.panelStyle), _ctx.overlayStyle), {}, {\n 'max-height': $options.virtualScrollerDisabled ? _ctx.scrollHeight : ''\n }),\n onClick: _cache[9] || (_cache[9] = function () {\n return $options.onOverlayClick && $options.onOverlayClick.apply($options, arguments);\n }),\n onKeydown: _cache[10] || (_cache[10] = function () {\n return $options.onOverlayKeyDown && $options.onOverlayKeyDown.apply($options, arguments);\n })\n }, _ctx.ptm('overlay')), [renderSlot(_ctx.$slots, \"header\", {\n value: _ctx.modelValue,\n suggestions: $options.visibleOptions\n }), createVNode(_component_VirtualScroller, mergeProps({\n ref: $options.virtualScrollerRef\n }, _ctx.virtualScrollerOptions, {\n style: {\n height: _ctx.scrollHeight\n },\n items: $options.visibleOptions,\n tabindex: -1,\n disabled: $options.virtualScrollerDisabled,\n pt: _ctx.ptm('virtualScroller')\n }), createSlots({\n content: withCtx(function (_ref) {\n var styleClass = _ref.styleClass,\n contentRef = _ref.contentRef,\n items = _ref.items,\n getItemOptions = _ref.getItemOptions,\n contentStyle = _ref.contentStyle,\n itemSize = _ref.itemSize;\n return [createElementVNode(\"ul\", mergeProps({\n ref: function ref(el) {\n return $options.listRef(el, contentRef);\n },\n id: $data.id + '_list',\n \"class\": [_ctx.cx('list'), styleClass],\n style: contentStyle,\n role: \"listbox\",\n \"aria-label\": $options.listAriaLabel\n }, _ctx.ptm('list')), [(openBlock(true), createElementBlock(Fragment, null, renderList(items, function (option, i) {\n return openBlock(), createElementBlock(Fragment, {\n key: $options.getOptionRenderKey(option, $options.getOptionIndex(i, getItemOptions))\n }, [$options.isOptionGroup(option) ? (openBlock(), createElementBlock(\"li\", mergeProps({\n key: 0,\n id: $data.id + '_' + $options.getOptionIndex(i, getItemOptions),\n style: {\n height: itemSize ? itemSize + 'px' : undefined\n },\n \"class\": _ctx.cx('optionGroup'),\n role: \"option\",\n ref_for: true\n }, _ctx.ptm('optionGroup')), [renderSlot(_ctx.$slots, \"optiongroup\", {\n option: option.optionGroup,\n index: $options.getOptionIndex(i, getItemOptions)\n }, function () {\n return [createTextVNode(toDisplayString($options.getOptionGroupLabel(option.optionGroup)), 1)];\n })], 16, _hoisted_7)) : withDirectives((openBlock(), createElementBlock(\"li\", mergeProps({\n key: 1,\n id: $data.id + '_' + $options.getOptionIndex(i, getItemOptions),\n style: {\n height: itemSize ? itemSize + 'px' : undefined\n },\n \"class\": _ctx.cx('option', {\n option: option,\n i: i,\n getItemOptions: getItemOptions\n }),\n role: \"option\",\n \"aria-label\": $options.getOptionLabel(option),\n \"aria-selected\": $options.isSelected(option),\n \"aria-disabled\": $options.isOptionDisabled(option),\n \"aria-setsize\": $options.ariaSetSize,\n \"aria-posinset\": $options.getAriaPosInset($options.getOptionIndex(i, getItemOptions)),\n onClick: function onClick($event) {\n return $options.onOptionSelect($event, option);\n },\n onMousemove: function onMousemove($event) {\n return $options.onOptionMouseMove($event, $options.getOptionIndex(i, getItemOptions));\n },\n \"data-p-selected\": $options.isSelected(option),\n \"data-p-focus\": $data.focusedOptionIndex === $options.getOptionIndex(i, getItemOptions),\n \"data-p-disabled\": $options.isOptionDisabled(option),\n ref_for: true\n }, $options.getPTOptions(option, getItemOptions, i, 'option')), [renderSlot(_ctx.$slots, \"option\", {\n option: option,\n index: $options.getOptionIndex(i, getItemOptions)\n }, function () {\n return [createTextVNode(toDisplayString($options.getOptionLabel(option)), 1)];\n })], 16, _hoisted_8)), [[_directive_ripple]])], 64);\n }), 128)), !items || items && items.length === 0 ? (openBlock(), createElementBlock(\"li\", mergeProps({\n key: 0,\n \"class\": _ctx.cx('emptyMessage'),\n role: \"option\"\n }, _ctx.ptm('emptyMessage')), [renderSlot(_ctx.$slots, \"empty\", {}, function () {\n return [createTextVNode(toDisplayString($options.searchResultMessageText), 1)];\n })], 16)) : createCommentVNode(\"\", true)], 16, _hoisted_6)];\n }),\n _: 2\n }, [_ctx.$slots.loader ? {\n name: \"loader\",\n fn: withCtx(function (_ref2) {\n var options = _ref2.options;\n return [renderSlot(_ctx.$slots, \"loader\", {\n options: options\n })];\n }),\n key: \"0\"\n } : undefined]), 1040, [\"style\", \"items\", \"disabled\", \"pt\"]), renderSlot(_ctx.$slots, \"footer\", {\n value: _ctx.modelValue,\n suggestions: $options.visibleOptions\n }), createElementVNode(\"span\", mergeProps({\n role: \"status\",\n \"aria-live\": \"polite\",\n \"class\": \"p-hidden-accessible\"\n }, _ctx.ptm('hiddenSelectedMessage'), {\n \"data-p-hidden-accessible\": true\n }), toDisplayString($options.selectedMessageText), 17)], 16, _hoisted_5)) : createCommentVNode(\"\", true)];\n }),\n _: 3\n }, 16, [\"onEnter\", \"onAfterEnter\", \"onLeave\", \"onAfterLeave\"])];\n }),\n _: 3\n }, 8, [\"appendTo\"])], 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","\n\n","\n\n\n\n\n","\n\n\n\n\n","// @ts-strict-ignore\nimport type {\n ConnectingLink,\n LGraphNode,\n Vector2,\n INodeInputSlot,\n INodeOutputSlot,\n INodeSlot\n} from '@comfyorg/litegraph'\nimport type { ISlotType } from '@comfyorg/litegraph'\nimport { LiteGraph } from '@comfyorg/litegraph'\n\nexport class ConnectingLinkImpl implements ConnectingLink {\n node: LGraphNode\n slot: number\n input: INodeInputSlot | null\n output: INodeOutputSlot | null\n pos: Vector2\n\n constructor(\n node: LGraphNode,\n slot: number,\n input: INodeInputSlot | null,\n output: INodeOutputSlot | null,\n pos: Vector2\n ) {\n this.node = node\n this.slot = slot\n this.input = input\n this.output = output\n this.pos = pos\n }\n\n static createFromPlainObject(obj: ConnectingLink) {\n return new ConnectingLinkImpl(\n obj.node,\n obj.slot,\n obj.input,\n obj.output,\n obj.pos\n )\n }\n\n get type(): ISlotType | null {\n const result = this.input ? this.input.type : this.output.type\n return result === -1 ? null : result\n }\n\n /**\n * Which slot type is release and need to be reconnected.\n * - 'output' means we need a new node's outputs slot to connect with this link\n */\n get releaseSlotType(): 'input' | 'output' {\n return this.output ? 'input' : 'output'\n }\n\n connectTo(newNode: LGraphNode) {\n const newNodeSlots =\n this.releaseSlotType === 'output' ? newNode.outputs : newNode.inputs\n if (!newNodeSlots) return\n\n const newNodeSlot = newNodeSlots.findIndex((slot: INodeSlot) =>\n LiteGraph.isValidConnection(slot.type, this.type)\n )\n\n if (newNodeSlot === -1) {\n console.warn(\n `Could not find slot with type ${this.type} on node ${newNode.title}. This should never happen`\n )\n return\n }\n\n if (this.releaseSlotType === 'input') {\n this.node.connect(this.slot, newNode, newNodeSlot)\n } else {\n newNode.connect(newNodeSlot, this.node, this.slot)\n }\n }\n}\n\nexport type CanvasDragAndDropData = {\n type: 'add-node'\n data: T\n}\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n","import BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n _ref.dt;\n return \"\\n.p-buttongroup .p-button {\\n margin: 0;\\n}\\n\\n.p-buttongroup .p-button:not(:last-child),\\n.p-buttongroup .p-button:not(:last-child):hover {\\n border-right: 0 none;\\n}\\n\\n.p-buttongroup .p-button:not(:first-of-type):not(:last-of-type) {\\n border-radius: 0;\\n}\\n\\n.p-buttongroup .p-button:first-of-type:not(:only-of-type) {\\n border-top-right-radius: 0;\\n border-bottom-right-radius: 0;\\n}\\n\\n.p-buttongroup .p-button:last-of-type:not(:only-of-type) {\\n border-top-left-radius: 0;\\n border-bottom-left-radius: 0;\\n}\\n\\n.p-buttongroup .p-button:focus {\\n position: relative;\\n z-index: 1;\\n}\\n\";\n};\nvar classes = {\n root: 'p-buttongroup p-component'\n};\nvar ButtonGroupStyle = BaseStyle.extend({\n name: 'buttongroup',\n theme: theme,\n classes: classes\n});\n\nexport { ButtonGroupStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseComponent from '@primevue/core/basecomponent';\nimport ButtonGroupStyle from 'primevue/buttongroup/style';\nimport { openBlock, createElementBlock, mergeProps, renderSlot } from 'vue';\n\nvar script$1 = {\n name: 'BaseButtonGroup',\n \"extends\": BaseComponent,\n style: ButtonGroupStyle,\n provide: function provide() {\n return {\n $pcButtonGroup: this,\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'ButtonGroup',\n \"extends\": script$1,\n inheritAttrs: false\n};\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps({\n \"class\": _ctx.cx('root'),\n role: \"group\"\n }, _ctx.ptmi('root')), [renderSlot(_ctx.$slots, \"default\")], 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","\n\n\n\n\n","\n\n\n","import BaseStyle from '@primevue/core/base/style';\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-toast {\\n width: \".concat(dt('toast.width'), \";\\n white-space: pre-line;\\n word-break: break-word;\\n}\\n\\n.p-toast-message {\\n margin: 0 0 1rem 0;\\n}\\n\\n.p-toast-message-icon {\\n flex-shrink: 0;\\n font-size: \").concat(dt('toast.icon.size'), \";\\n width: \").concat(dt('toast.icon.size'), \";\\n height: \").concat(dt('toast.icon.size'), \";\\n}\\n\\n.p-toast-message-content {\\n display: flex;\\n align-items: flex-start;\\n padding: \").concat(dt('toast.content.padding'), \";\\n gap: \").concat(dt('toast.content.gap'), \";\\n}\\n\\n.p-toast-message-text {\\n flex: 1 1 auto;\\n display: flex;\\n flex-direction: column;\\n gap: \").concat(dt('toast.text.gap'), \";\\n}\\n\\n.p-toast-summary {\\n font-weight: \").concat(dt('toast.summary.font.weight'), \";\\n font-size: \").concat(dt('toast.summary.font.size'), \";\\n}\\n\\n.p-toast-detail {\\n font-weight: \").concat(dt('toast.detail.font.weight'), \";\\n font-size: \").concat(dt('toast.detail.font.size'), \";\\n}\\n\\n.p-toast-close-button {\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n overflow: hidden;\\n position: relative;\\n cursor: pointer;\\n background: transparent;\\n transition: background \").concat(dt('toast.transition.duration'), \", color \").concat(dt('toast.transition.duration'), \", outline-color \").concat(dt('toast.transition.duration'), \", box-shadow \").concat(dt('toast.transition.duration'), \";\\n outline-color: transparent;\\n color: inherit;\\n width: \").concat(dt('toast.close.button.width'), \";\\n height: \").concat(dt('toast.close.button.height'), \";\\n border-radius: \").concat(dt('toast.close.button.border.radius'), \";\\n margin: -25% 0 0 0;\\n right: -25%;\\n padding: 0;\\n border: none;\\n user-select: none;\\n}\\n\\n.p-toast-message-info,\\n.p-toast-message-success,\\n.p-toast-message-warn,\\n.p-toast-message-error,\\n.p-toast-message-secondary,\\n.p-toast-message-contrast {\\n border-width: \").concat(dt('toast.border.width'), \";\\n border-style: solid;\\n backdrop-filter: blur(\").concat(dt('toast.blur'), \");\\n border-radius: \").concat(dt('toast.border.radius'), \";\\n}\\n\\n.p-toast-close-icon {\\n font-size: \").concat(dt('toast.close.icon.size'), \";\\n width: \").concat(dt('toast.close.icon.size'), \";\\n height: \").concat(dt('toast.close.icon.size'), \";\\n}\\n\\n.p-toast-close-button:focus-visible {\\n outline-width: \").concat(dt('focus.ring.width'), \";\\n outline-style: \").concat(dt('focus.ring.style'), \";\\n outline-offset: \").concat(dt('focus.ring.offset'), \";\\n}\\n\\n.p-toast-message-info {\\n background: \").concat(dt('toast.info.background'), \";\\n border-color: \").concat(dt('toast.info.border.color'), \";\\n color: \").concat(dt('toast.info.color'), \";\\n box-shadow: \").concat(dt('toast.info.shadow'), \";\\n}\\n\\n.p-toast-message-info .p-toast-detail {\\n color: \").concat(dt('toast.info.detail.color'), \";\\n}\\n\\n.p-toast-message-info .p-toast-close-button:focus-visible {\\n outline-color: \").concat(dt('toast.info.close.button.focus.ring.color'), \";\\n box-shadow: \").concat(dt('toast.info.close.button.focus.ring.shadow'), \";\\n}\\n\\n.p-toast-message-info .p-toast-close-button:hover {\\n background: \").concat(dt('toast.info.close.button.hover.background'), \";\\n}\\n\\n.p-toast-message-success {\\n background: \").concat(dt('toast.success.background'), \";\\n border-color: \").concat(dt('toast.success.border.color'), \";\\n color: \").concat(dt('toast.success.color'), \";\\n box-shadow: \").concat(dt('toast.success.shadow'), \";\\n}\\n\\n.p-toast-message-success .p-toast-detail {\\n color: \").concat(dt('toast.success.detail.color'), \";\\n}\\n\\n.p-toast-message-success .p-toast-close-button:focus-visible {\\n outline-color: \").concat(dt('toast.success.close.button.focus.ring.color'), \";\\n box-shadow: \").concat(dt('toast.success.close.button.focus.ring.shadow'), \";\\n}\\n\\n.p-toast-message-success .p-toast-close-button:hover {\\n background: \").concat(dt('toast.success.close.button.hover.background'), \";\\n}\\n\\n.p-toast-message-warn {\\n background: \").concat(dt('toast.warn.background'), \";\\n border-color: \").concat(dt('toast.warn.border.color'), \";\\n color: \").concat(dt('toast.warn.color'), \";\\n box-shadow: \").concat(dt('toast.warn.shadow'), \";\\n}\\n\\n.p-toast-message-warn .p-toast-detail {\\n color: \").concat(dt('toast.warn.detail.color'), \";\\n}\\n\\n.p-toast-message-warn .p-toast-close-button:focus-visible {\\n outline-color: \").concat(dt('toast.warn.close.button.focus.ring.color'), \";\\n box-shadow: \").concat(dt('toast.warn.close.button.focus.ring.shadow'), \";\\n}\\n\\n.p-toast-message-warn .p-toast-close-button:hover {\\n background: \").concat(dt('toast.warn.close.button.hover.background'), \";\\n}\\n\\n.p-toast-message-error {\\n background: \").concat(dt('toast.error.background'), \";\\n border-color: \").concat(dt('toast.error.border.color'), \";\\n color: \").concat(dt('toast.error.color'), \";\\n box-shadow: \").concat(dt('toast.error.shadow'), \";\\n}\\n\\n.p-toast-message-error .p-toast-detail {\\n color: \").concat(dt('toast.error.detail.color'), \";\\n}\\n\\n.p-toast-message-error .p-toast-close-button:focus-visible {\\n outline-color: \").concat(dt('toast.error.close.button.focus.ring.color'), \";\\n box-shadow: \").concat(dt('toast.error.close.button.focus.ring.shadow'), \";\\n}\\n\\n.p-toast-message-error .p-toast-close-button:hover {\\n background: \").concat(dt('toast.error.close.button.hover.background'), \";\\n}\\n\\n.p-toast-message-secondary {\\n background: \").concat(dt('toast.secondary.background'), \";\\n border-color: \").concat(dt('toast.secondary.border.color'), \";\\n color: \").concat(dt('toast.secondary.color'), \";\\n box-shadow: \").concat(dt('toast.secondary.shadow'), \";\\n}\\n\\n.p-toast-message-secondary .p-toast-detail {\\n color: \").concat(dt('toast.secondary.detail.color'), \";\\n}\\n\\n.p-toast-message-secondary .p-toast-close-button:focus-visible {\\n outline-color: \").concat(dt('toast.secondary.close.button.focus.ring.color'), \";\\n box-shadow: \").concat(dt('toast.secondary.close.button.focus.ring.shadow'), \";\\n}\\n\\n.p-toast-message-secondary .p-toast-close-button:hover {\\n background: \").concat(dt('toast.secondary.close.button.hover.background'), \";\\n}\\n\\n.p-toast-message-contrast {\\n background: \").concat(dt('toast.contrast.background'), \";\\n border-color: \").concat(dt('toast.contrast.border.color'), \";\\n color: \").concat(dt('toast.contrast.color'), \";\\n box-shadow: \").concat(dt('toast.contrast.shadow'), \";\\n}\\n\\n.p-toast-message-contrast .p-toast-detail {\\n color: \").concat(dt('toast.contrast.detail.color'), \";\\n}\\n\\n.p-toast-message-contrast .p-toast-close-button:focus-visible {\\n outline-color: \").concat(dt('toast.contrast.close.button.focus.ring.color'), \";\\n box-shadow: \").concat(dt('toast.contrast.close.button.focus.ring.shadow'), \";\\n}\\n\\n.p-toast-message-contrast .p-toast-close-button:hover {\\n background: \").concat(dt('toast.contrast.close.button.hover.background'), \";\\n}\\n\\n.p-toast-top-center {\\n transform: translateX(-50%);\\n}\\n\\n.p-toast-bottom-center {\\n transform: translateX(-50%);\\n}\\n\\n.p-toast-center {\\n min-width: 20vw;\\n transform: translate(-50%, -50%);\\n}\\n\\n.p-toast-message-enter-from {\\n opacity: 0;\\n transform: translateY(50%);\\n}\\n\\n.p-toast-message-leave-from {\\n max-height: 1000px;\\n}\\n\\n.p-toast .p-toast-message.p-toast-message-leave-to {\\n max-height: 0;\\n opacity: 0;\\n margin-bottom: 0;\\n overflow: hidden;\\n}\\n\\n.p-toast-message-enter-active {\\n transition: transform 0.3s, opacity 0.3s;\\n}\\n\\n.p-toast-message-leave-active {\\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\\n}\\n\");\n};\n\n// Position\nvar inlineStyles = {\n root: function root(_ref2) {\n var position = _ref2.position;\n return {\n position: 'fixed',\n top: position === 'top-right' || position === 'top-left' || position === 'top-center' ? '20px' : position === 'center' ? '50%' : null,\n right: (position === 'top-right' || position === 'bottom-right') && '20px',\n bottom: (position === 'bottom-left' || position === 'bottom-right' || position === 'bottom-center') && '20px',\n left: position === 'top-left' || position === 'bottom-left' ? '20px' : position === 'center' || position === 'top-center' || position === 'bottom-center' ? '50%' : null\n };\n }\n};\nvar classes = {\n root: function root(_ref3) {\n var props = _ref3.props;\n return ['p-toast p-component p-toast-' + props.position];\n },\n message: function message(_ref4) {\n var props = _ref4.props;\n return ['p-toast-message', {\n 'p-toast-message-info': props.message.severity === 'info' || props.message.severity === undefined,\n 'p-toast-message-warn': props.message.severity === 'warn',\n 'p-toast-message-error': props.message.severity === 'error',\n 'p-toast-message-success': props.message.severity === 'success',\n 'p-toast-message-secondary': props.message.severity === 'secondary',\n 'p-toast-message-contrast': props.message.severity === 'contrast'\n }];\n },\n messageContent: 'p-toast-message-content',\n messageIcon: function messageIcon(_ref5) {\n var props = _ref5.props;\n return ['p-toast-message-icon', _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, props.infoIcon, props.message.severity === 'info'), props.warnIcon, props.message.severity === 'warn'), props.errorIcon, props.message.severity === 'error'), props.successIcon, props.message.severity === 'success')];\n },\n messageText: 'p-toast-message-text',\n summary: 'p-toast-summary',\n detail: 'p-toast-detail',\n closeButton: 'p-toast-close-button',\n closeIcon: 'p-toast-close-icon'\n};\nvar ToastStyle = BaseStyle.extend({\n name: 'toast',\n theme: theme,\n classes: classes,\n inlineStyles: inlineStyles\n});\n\nexport { ToastStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import { setAttribute } from '@primeuix/utils/dom';\nimport { isEmpty } from '@primeuix/utils/object';\nimport { ZIndex } from '@primeuix/utils/zindex';\nimport { UniqueComponentId } from '@primevue/core/utils';\nimport Portal from 'primevue/portal';\nimport ToastEventBus from 'primevue/toasteventbus';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport ToastStyle from 'primevue/toast/style';\nimport CheckIcon from '@primevue/icons/check';\nimport ExclamationTriangleIcon from '@primevue/icons/exclamationtriangle';\nimport InfoCircleIcon from '@primevue/icons/infocircle';\nimport TimesIcon from '@primevue/icons/times';\nimport TimesCircleIcon from '@primevue/icons/timescircle';\nimport Ripple from 'primevue/ripple';\nimport { resolveDirective, openBlock, createElementBlock, mergeProps, createBlock, resolveDynamicComponent, Fragment, createElementVNode, toDisplayString, normalizeProps, withDirectives, createCommentVNode, resolveComponent, withCtx, createVNode, TransitionGroup, renderList } from 'vue';\n\nvar script$2 = {\n name: 'BaseToast',\n \"extends\": BaseComponent,\n props: {\n group: {\n type: String,\n \"default\": null\n },\n position: {\n type: String,\n \"default\": 'top-right'\n },\n autoZIndex: {\n type: Boolean,\n \"default\": true\n },\n baseZIndex: {\n type: Number,\n \"default\": 0\n },\n breakpoints: {\n type: Object,\n \"default\": null\n },\n closeIcon: {\n type: String,\n \"default\": undefined\n },\n infoIcon: {\n type: String,\n \"default\": undefined\n },\n warnIcon: {\n type: String,\n \"default\": undefined\n },\n errorIcon: {\n type: String,\n \"default\": undefined\n },\n successIcon: {\n type: String,\n \"default\": undefined\n },\n closeButtonProps: {\n type: null,\n \"default\": null\n }\n },\n style: ToastStyle,\n provide: function provide() {\n return {\n $pcToast: this,\n $parentInstance: this\n };\n }\n};\n\nvar script$1 = {\n name: 'ToastMessage',\n hostName: 'Toast',\n \"extends\": BaseComponent,\n emits: ['close'],\n closeTimeout: null,\n props: {\n message: {\n type: null,\n \"default\": null\n },\n templates: {\n type: Object,\n \"default\": null\n },\n closeIcon: {\n type: String,\n \"default\": null\n },\n infoIcon: {\n type: String,\n \"default\": null\n },\n warnIcon: {\n type: String,\n \"default\": null\n },\n errorIcon: {\n type: String,\n \"default\": null\n },\n successIcon: {\n type: String,\n \"default\": null\n },\n closeButtonProps: {\n type: null,\n \"default\": null\n }\n },\n mounted: function mounted() {\n var _this = this;\n if (this.message.life) {\n this.closeTimeout = setTimeout(function () {\n _this.close({\n message: _this.message,\n type: 'life-end'\n });\n }, this.message.life);\n }\n },\n beforeUnmount: function beforeUnmount() {\n this.clearCloseTimeout();\n },\n methods: {\n close: function close(params) {\n this.$emit('close', params);\n },\n onCloseClick: function onCloseClick() {\n this.clearCloseTimeout();\n this.close({\n message: this.message,\n type: 'close'\n });\n },\n clearCloseTimeout: function clearCloseTimeout() {\n if (this.closeTimeout) {\n clearTimeout(this.closeTimeout);\n this.closeTimeout = null;\n }\n }\n },\n computed: {\n iconComponent: function iconComponent() {\n return {\n info: !this.infoIcon && InfoCircleIcon,\n success: !this.successIcon && CheckIcon,\n warn: !this.warnIcon && ExclamationTriangleIcon,\n error: !this.errorIcon && TimesCircleIcon\n }[this.message.severity];\n },\n closeAriaLabel: function closeAriaLabel() {\n return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.close : undefined;\n }\n },\n components: {\n TimesIcon: TimesIcon,\n InfoCircleIcon: InfoCircleIcon,\n CheckIcon: CheckIcon,\n ExclamationTriangleIcon: ExclamationTriangleIcon,\n TimesCircleIcon: TimesCircleIcon\n },\n directives: {\n ripple: Ripple\n }\n};\n\nfunction _typeof$1(o) { \"@babel/helpers - typeof\"; return _typeof$1 = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof$1(o); }\nfunction ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty$1(e, r, t) { return (r = _toPropertyKey$1(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey$1(t) { var i = _toPrimitive$1(t, \"string\"); return \"symbol\" == _typeof$1(i) ? i : i + \"\"; }\nfunction _toPrimitive$1(t, r) { if (\"object\" != _typeof$1(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof$1(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nvar _hoisted_1 = [\"aria-label\"];\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n var _directive_ripple = resolveDirective(\"ripple\");\n return openBlock(), createElementBlock(\"div\", mergeProps({\n \"class\": [_ctx.cx('message'), $props.message.styleClass],\n role: \"alert\",\n \"aria-live\": \"assertive\",\n \"aria-atomic\": \"true\"\n }, _ctx.ptm('message')), [$props.templates.container ? (openBlock(), createBlock(resolveDynamicComponent($props.templates.container), {\n key: 0,\n message: $props.message,\n closeCallback: $options.onCloseClick\n }, null, 8, [\"message\", \"closeCallback\"])) : (openBlock(), createElementBlock(\"div\", mergeProps({\n key: 1,\n \"class\": [_ctx.cx('messageContent'), $props.message.contentStyleClass]\n }, _ctx.ptm('messageContent')), [!$props.templates.message ? (openBlock(), createElementBlock(Fragment, {\n key: 0\n }, [(openBlock(), createBlock(resolveDynamicComponent($props.templates.messageicon ? $props.templates.messageicon : $props.templates.icon ? $props.templates.icon : $options.iconComponent && $options.iconComponent.name ? $options.iconComponent : 'span'), mergeProps({\n \"class\": _ctx.cx('messageIcon')\n }, _ctx.ptm('messageIcon')), null, 16, [\"class\"])), createElementVNode(\"div\", mergeProps({\n \"class\": _ctx.cx('messageText')\n }, _ctx.ptm('messageText')), [createElementVNode(\"span\", mergeProps({\n \"class\": _ctx.cx('summary')\n }, _ctx.ptm('summary')), toDisplayString($props.message.summary), 17), createElementVNode(\"div\", mergeProps({\n \"class\": _ctx.cx('detail')\n }, _ctx.ptm('detail')), toDisplayString($props.message.detail), 17)], 16)], 64)) : (openBlock(), createBlock(resolveDynamicComponent($props.templates.message), {\n key: 1,\n message: $props.message\n }, null, 8, [\"message\"])), $props.message.closable !== false ? (openBlock(), createElementBlock(\"div\", normalizeProps(mergeProps({\n key: 2\n }, _ctx.ptm('buttonContainer'))), [withDirectives((openBlock(), createElementBlock(\"button\", mergeProps({\n \"class\": _ctx.cx('closeButton'),\n type: \"button\",\n \"aria-label\": $options.closeAriaLabel,\n onClick: _cache[0] || (_cache[0] = function () {\n return $options.onCloseClick && $options.onCloseClick.apply($options, arguments);\n }),\n autofocus: \"\"\n }, _objectSpread$1(_objectSpread$1({}, $props.closeButtonProps), _ctx.ptm('closeButton'))), [(openBlock(), createBlock(resolveDynamicComponent($props.templates.closeicon || 'TimesIcon'), mergeProps({\n \"class\": [_ctx.cx('closeIcon'), $props.closeIcon]\n }, _ctx.ptm('closeIcon')), null, 16, [\"class\"]))], 16, _hoisted_1)), [[_directive_ripple]])], 16)) : createCommentVNode(\"\", true)], 16))], 16);\n}\n\nscript$1.render = render$1;\n\nfunction _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _iterableToArray(r) { if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r); }\nfunction _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nvar messageIdx = 0;\nvar script = {\n name: 'Toast',\n \"extends\": script$2,\n inheritAttrs: false,\n emits: ['close', 'life-end'],\n data: function data() {\n return {\n messages: []\n };\n },\n styleElement: null,\n mounted: function mounted() {\n ToastEventBus.on('add', this.onAdd);\n ToastEventBus.on('remove', this.onRemove);\n ToastEventBus.on('remove-group', this.onRemoveGroup);\n ToastEventBus.on('remove-all-groups', this.onRemoveAllGroups);\n if (this.breakpoints) {\n this.createStyle();\n }\n },\n beforeUnmount: function beforeUnmount() {\n this.destroyStyle();\n if (this.$refs.container && this.autoZIndex) {\n ZIndex.clear(this.$refs.container);\n }\n ToastEventBus.off('add', this.onAdd);\n ToastEventBus.off('remove', this.onRemove);\n ToastEventBus.off('remove-group', this.onRemoveGroup);\n ToastEventBus.off('remove-all-groups', this.onRemoveAllGroups);\n },\n methods: {\n add: function add(message) {\n if (message.id == null) {\n message.id = messageIdx++;\n }\n this.messages = [].concat(_toConsumableArray(this.messages), [message]);\n },\n remove: function remove(params) {\n var index = this.messages.findIndex(function (m) {\n return m.id === params.message.id;\n });\n if (index !== -1) {\n this.messages.splice(index, 1);\n this.$emit(params.type, {\n message: params.message\n });\n }\n },\n onAdd: function onAdd(message) {\n if (this.group == message.group) {\n this.add(message);\n }\n },\n onRemove: function onRemove(message) {\n this.remove({\n message: message,\n type: 'close'\n });\n },\n onRemoveGroup: function onRemoveGroup(group) {\n if (this.group === group) {\n this.messages = [];\n }\n },\n onRemoveAllGroups: function onRemoveAllGroups() {\n this.messages = [];\n },\n onEnter: function onEnter() {\n this.$refs.container.setAttribute(this.attributeSelector, '');\n if (this.autoZIndex) {\n ZIndex.set('modal', this.$refs.container, this.baseZIndex || this.$primevue.config.zIndex.modal);\n }\n },\n onLeave: function onLeave() {\n var _this = this;\n if (this.$refs.container && this.autoZIndex && isEmpty(this.messages)) {\n setTimeout(function () {\n ZIndex.clear(_this.$refs.container);\n }, 200);\n }\n },\n createStyle: function createStyle() {\n if (!this.styleElement && !this.isUnstyled) {\n var _this$$primevue;\n this.styleElement = document.createElement('style');\n this.styleElement.type = 'text/css';\n setAttribute(this.styleElement, 'nonce', (_this$$primevue = this.$primevue) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.config) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.csp) === null || _this$$primevue === void 0 ? void 0 : _this$$primevue.nonce);\n document.head.appendChild(this.styleElement);\n var innerHTML = '';\n for (var breakpoint in this.breakpoints) {\n var breakpointStyle = '';\n for (var styleProp in this.breakpoints[breakpoint]) {\n breakpointStyle += styleProp + ':' + this.breakpoints[breakpoint][styleProp] + '!important;';\n }\n innerHTML += \"\\n @media screen and (max-width: \".concat(breakpoint, \") {\\n .p-toast[\").concat(this.attributeSelector, \"] {\\n \").concat(breakpointStyle, \"\\n }\\n }\\n \");\n }\n this.styleElement.innerHTML = innerHTML;\n }\n },\n destroyStyle: function destroyStyle() {\n if (this.styleElement) {\n document.head.removeChild(this.styleElement);\n this.styleElement = null;\n }\n }\n },\n computed: {\n attributeSelector: function attributeSelector() {\n return UniqueComponentId();\n }\n },\n components: {\n ToastMessage: script$1,\n Portal: Portal\n }\n};\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n var _component_ToastMessage = resolveComponent(\"ToastMessage\");\n var _component_Portal = resolveComponent(\"Portal\");\n return openBlock(), createBlock(_component_Portal, null, {\n \"default\": withCtx(function () {\n return [createElementVNode(\"div\", mergeProps({\n ref: \"container\",\n \"class\": _ctx.cx('root'),\n style: _ctx.sx('root', true, {\n position: _ctx.position\n })\n }, _ctx.ptmi('root')), [createVNode(TransitionGroup, mergeProps({\n name: \"p-toast-message\",\n tag: \"div\",\n onEnter: $options.onEnter,\n onLeave: $options.onLeave\n }, _objectSpread({}, _ctx.ptm('transition'))), {\n \"default\": withCtx(function () {\n return [(openBlock(true), createElementBlock(Fragment, null, renderList($data.messages, function (msg) {\n return openBlock(), createBlock(_component_ToastMessage, {\n key: msg.id,\n message: msg,\n templates: _ctx.$slots,\n closeIcon: _ctx.closeIcon,\n infoIcon: _ctx.infoIcon,\n warnIcon: _ctx.warnIcon,\n errorIcon: _ctx.errorIcon,\n successIcon: _ctx.successIcon,\n closeButtonProps: _ctx.closeButtonProps,\n unstyled: _ctx.unstyled,\n onClose: _cache[0] || (_cache[0] = function ($event) {\n return $options.remove($event);\n }),\n pt: _ctx.pt\n }, null, 8, [\"message\", \"templates\", \"closeIcon\", \"infoIcon\", \"warnIcon\", \"errorIcon\", \"successIcon\", \"closeButtonProps\", \"unstyled\", \"pt\"]);\n }), 128))];\n }),\n _: 1\n }, 16, [\"onEnter\", \"onLeave\"])], 16)];\n }),\n _: 1\n });\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","\n\n\n","\n\n\n","\n\n\n","\n\n\n\n\n","import BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-menubar {\\n display: flex;\\n align-items: center;\\n background: \".concat(dt('menubar.background'), \";\\n border: 1px solid \").concat(dt('menubar.border.color'), \";\\n border-radius: \").concat(dt('menubar.border.radius'), \";\\n color: \").concat(dt('menubar.color'), \";\\n padding: \").concat(dt('menubar.padding'), \";\\n gap: \").concat(dt('menubar.gap'), \";\\n}\\n\\n.p-menubar-start,\\n.p-megamenu-end {\\n display: flex;\\n align-items: center;\\n}\\n\\n.p-menubar-root-list,\\n.p-menubar-submenu {\\n display: flex;\\n margin: 0;\\n padding: 0;\\n list-style: none;\\n outline: 0 none;\\n}\\n\\n.p-menubar-root-list {\\n align-items: center;\\n flex-wrap: wrap;\\n gap: \").concat(dt('menubar.gap'), \";\\n}\\n\\n.p-menubar-root-list > .p-menubar-item > .p-menubar-item-content {\\n border-radius: \").concat(dt('menubar.base.item.border.radius'), \";\\n}\\n\\n.p-menubar-root-list > .p-menubar-item > .p-menubar-item-content > .p-menubar-item-link {\\n padding: \").concat(dt('menubar.base.item.padding'), \";\\n}\\n\\n.p-menubar-item-content {\\n transition: background \").concat(dt('menubar.transition.duration'), \", color \").concat(dt('menubar.transition.duration'), \";\\n border-radius: \").concat(dt('menubar.item.border.radius'), \";\\n color: \").concat(dt('menubar.item.color'), \";\\n}\\n\\n.p-menubar-item-link {\\n cursor: pointer;\\n display: flex;\\n align-items: center;\\n text-decoration: none;\\n overflow: hidden;\\n position: relative;\\n color: inherit;\\n padding: \").concat(dt('menubar.item.padding'), \";\\n gap: \").concat(dt('menubar.item.gap'), \";\\n user-select: none;\\n outline: 0 none;\\n}\\n\\n.p-menubar-item-label {\\n line-height: 1;\\n}\\n\\n.p-menubar-item-icon {\\n color: \").concat(dt('menubar.item.icon.color'), \";\\n}\\n\\n.p-menubar-submenu-icon {\\n color: \").concat(dt('menubar.submenu.icon.color'), \";\\n margin-left: auto;\\n font-size: \").concat(dt('menubar.submenu.icon.size'), \";\\n width: \").concat(dt('menubar.submenu.icon.size'), \";\\n height: \").concat(dt('menubar.submenu.icon.size'), \";\\n}\\n\\n.p-menubar-item.p-focus > .p-menubar-item-content {\\n color: \").concat(dt('menubar.item.focus.color'), \";\\n background: \").concat(dt('menubar.item.focus.background'), \";\\n}\\n\\n.p-menubar-item.p-focus > .p-menubar-item-content .p-menubar-item-icon {\\n color: \").concat(dt('menubar.item.icon.focus.color'), \";\\n}\\n\\n.p-menubar-item.p-focus > .p-menubar-item-content .p-menubar-submenu-icon {\\n color: \").concat(dt('menubar.submenu.icon.focus.color'), \";\\n}\\n\\n.p-menubar-item:not(.p-disabled) > .p-menubar-item-content:hover {\\n color: \").concat(dt('menubar.item.focus.color'), \";\\n background: \").concat(dt('menubar.item.focus.background'), \";\\n}\\n\\n.p-menubar-item:not(.p-disabled) > .p-menubar-item-content:hover .p-menubar-item-icon {\\n color: \").concat(dt('menubar.item.icon.focus.color'), \";\\n}\\n\\n.p-menubar-item:not(.p-disabled) > .p-menubar-item-content:hover .p-menubar-submenu-icon {\\n color: \").concat(dt('menubar.submenu.icon.focus.color'), \";\\n}\\n\\n.p-menubar-item-active > .p-menubar-item-content {\\n color: \").concat(dt('menubar.item.active.color'), \";\\n background: \").concat(dt('menubar.item.active.background'), \";\\n}\\n\\n.p-menubar-item-active > .p-menubar-item-content .p-menubar-item-icon {\\n color: \").concat(dt('menubar.item.icon.active.color'), \";\\n}\\n\\n.p-menubar-item-active > .p-menubar-item-content .p-menubar-submenu-icon {\\n color: \").concat(dt('menubar.submenu.icon.active.color'), \";\\n}\\n\\n.p-menubar-submenu {\\n display: none;\\n position: absolute;\\n min-width: 12.5rem;\\n z-index: 1;\\n background: \").concat(dt('menubar.submenu.background'), \";\\n border: 1px solid \").concat(dt('menubar.submenu.border.color'), \";\\n border-radius: \").concat(dt('menubar.border.radius'), \";\\n box-shadow: \").concat(dt('menubar.submenu.shadow'), \";\\n color: \").concat(dt('menubar.submenu.color'), \";\\n flex-direction: column;\\n padding: \").concat(dt('menubar.submenu.padding'), \";\\n gap: \").concat(dt('menubar.submenu.gap'), \";\\n}\\n\\n.p-menubar-submenu .p-menubar-separator {\\n border-top: 1px solid \").concat(dt('menubar.separator.border.color'), \";\\n}\\n\\n.p-menubar-submenu .p-menubar-item {\\n position: relative;\\n}\\n\\n .p-menubar-submenu > .p-menubar-item-active > .p-menubar-submenu {\\n display: block;\\n left: 100%;\\n top: 0;\\n}\\n\\n.p-menubar-end {\\n margin-left: auto;\\n align-self: center;\\n}\\n\\n.p-menubar-button {\\n display: none;\\n justify-content: center;\\n align-items: center;\\n cursor: pointer;\\n width: \").concat(dt('menubar.mobile.button.size'), \";\\n height: \").concat(dt('menubar.mobile.button.size'), \";\\n position: relative;\\n color: \").concat(dt('menubar.mobile.button.color'), \";\\n border: 0 none;\\n background: transparent;\\n border-radius: \").concat(dt('menubar.mobile.button.border.radius'), \";\\n transition: background \").concat(dt('menubar.transition.duration'), \", color \").concat(dt('menubar.transition.duration'), \", outline-color \").concat(dt('menubar.transition.duration'), \";\\n outline-color: transparent;\\n}\\n\\n.p-menubar-button:hover {\\n color: \").concat(dt('menubar.mobile.button.hover.color'), \";\\n background: \").concat(dt('menubar.mobile.button.hover.background'), \";\\n}\\n\\n.p-menubar-button:focus-visible {\\n box-shadow: \").concat(dt('menubar.mobile.button.focus.ring.shadow'), \";\\n outline: \").concat(dt('menubar.mobile.button.focus.ring.width'), \" \").concat(dt('menubar.mobile.button.focus.ring.style'), \" \").concat(dt('menubar.mobile.button.focus.ring.color'), \";\\n outline-offset: \").concat(dt('menubar.mobile.button.focus.ring.offset'), \";\\n}\\n\\n.p-menubar-mobile {\\n position: relative;\\n}\\n\\n.p-menubar-mobile .p-menubar-button {\\n display: flex;\\n}\\n\\n.p-menubar-mobile .p-menubar-root-list {\\n position: absolute;\\n display: none;\\n width: 100%;\\n padding: \").concat(dt('menubar.submenu.padding'), \";\\n background: \").concat(dt('menubar.submenu.background'), \";\\n border: 1px solid \").concat(dt('menubar.submenu.border.color'), \";\\n box-shadow: \").concat(dt('menubar.submenu.shadow'), \";\\n}\\n\\n.p-menubar-mobile .p-menubar-root-list > .p-menubar-item > .p-menubar-item-content {\\n border-radius: \").concat(dt('menubar.item.border.radius'), \";\\n}\\n\\n.p-menubar-mobile .p-menubar-root-list > .p-menubar-item > .p-menubar-item-content > .p-menubar-item-link {\\n padding: \").concat(dt('menubar.item.padding'), \";\\n}\\n\\n.p-menubar-mobile-active .p-menubar-root-list {\\n display: flex;\\n flex-direction: column;\\n top: 100%;\\n left: 0;\\n z-index: 1;\\n}\\n\\n.p-menubar-mobile .p-menubar-root-list .p-menubar-item {\\n width: 100%;\\n position: static;\\n}\\n\\n.p-menubar-mobile .p-menubar-root-list .p-menubar-separator {\\n border-top: 1px solid \").concat(dt('menubar.separator.border.color'), \";\\n}\\n\\n.p-menubar-mobile .p-menubar-root-list > .p-menubar-item > .p-menubar-item-content .p-menubar-submenu-icon {\\n margin-left: auto;\\n transition: transform 0.2s;\\n}\\n\\n.p-menubar-mobile .p-menubar-root-list > .p-menubar-item-active > .p-menubar-item-content .p-menubar-submenu-icon {\\n transform: rotate(-180deg);\\n}\\n\\n.p-menubar-mobile .p-menubar-submenu .p-menubar-submenu-icon {\\n transition: transform 0.2s;\\n transform: rotate(90deg);\\n}\\n\\n.p-menubar-mobile .p-menubar-item-active > .p-menubar-item-content .p-menubar-submenu-icon {\\n transform: rotate(-90deg);\\n}\\n\\n.p-menubar-mobile .p-menubar-submenu {\\n width: 100%;\\n position: static;\\n box-shadow: none;\\n border: 0 none;\\n padding-left: \").concat(dt('menubar.submenu.mobile.indent'), \";\\n}\\n\");\n};\nvar inlineStyles = {\n submenu: function submenu(_ref2) {\n var instance = _ref2.instance,\n processedItem = _ref2.processedItem;\n return {\n display: instance.isItemActive(processedItem) ? 'flex' : 'none'\n };\n }\n};\nvar classes = {\n root: function root(_ref3) {\n var instance = _ref3.instance;\n return ['p-menubar p-component', {\n 'p-menubar-mobile': instance.queryMatches,\n 'p-menubar-mobile-active': instance.mobileActive\n }];\n },\n start: 'p-menubar-start',\n button: 'p-menubar-button',\n rootList: 'p-menubar-root-list',\n item: function item(_ref4) {\n var instance = _ref4.instance,\n processedItem = _ref4.processedItem;\n return ['p-menubar-item', {\n 'p-menubar-item-active': instance.isItemActive(processedItem),\n 'p-focus': instance.isItemFocused(processedItem),\n 'p-disabled': instance.isItemDisabled(processedItem)\n }];\n },\n itemContent: 'p-menubar-item-content',\n itemLink: 'p-menubar-item-link',\n itemIcon: 'p-menubar-item-icon',\n itemLabel: 'p-menubar-item-label',\n submenuIcon: 'p-menubar-submenu-icon',\n submenu: 'p-menubar-submenu',\n separator: 'p-menubar-separator',\n end: 'p-menubar-end'\n};\nvar MenubarStyle = BaseStyle.extend({\n name: 'menubar',\n theme: theme,\n classes: classes,\n inlineStyles: inlineStyles\n});\n\nexport { MenubarStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import { UniqueComponentId } from '@primevue/core/utils';\nimport { focus, findSingle, isTouchDevice } from '@primeuix/utils/dom';\nimport { resolve, isNotEmpty, isPrintableCharacter, isEmpty, findLastIndex } from '@primeuix/utils/object';\nimport { ZIndex } from '@primeuix/utils/zindex';\nimport BarsIcon from '@primevue/icons/bars';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport MenubarStyle from 'primevue/menubar/style';\nimport AngleDownIcon from '@primevue/icons/angledown';\nimport AngleRightIcon from '@primevue/icons/angleright';\nimport Ripple from 'primevue/ripple';\nimport { mergeProps, resolveComponent, resolveDirective, openBlock, createElementBlock, Fragment, renderList, createElementVNode, withDirectives, createBlock, resolveDynamicComponent, normalizeClass, createCommentVNode, toDisplayString, normalizeStyle, renderSlot, createVNode, normalizeProps, guardReactiveProps } from 'vue';\n\nvar script$2 = {\n name: 'BaseMenubar',\n \"extends\": BaseComponent,\n props: {\n model: {\n type: Array,\n \"default\": null\n },\n buttonProps: {\n type: null,\n \"default\": null\n },\n breakpoint: {\n type: String,\n \"default\": '960px'\n },\n ariaLabelledby: {\n type: String,\n \"default\": null\n },\n ariaLabel: {\n type: String,\n \"default\": null\n }\n },\n style: MenubarStyle,\n provide: function provide() {\n return {\n $pcMenubar: this,\n $parentInstance: this\n };\n }\n};\n\nvar script$1 = {\n name: 'MenubarSub',\n hostName: 'Menubar',\n \"extends\": BaseComponent,\n emits: ['item-mouseenter', 'item-click', 'item-mousemove'],\n props: {\n items: {\n type: Array,\n \"default\": null\n },\n root: {\n type: Boolean,\n \"default\": false\n },\n popup: {\n type: Boolean,\n \"default\": false\n },\n mobileActive: {\n type: Boolean,\n \"default\": false\n },\n templates: {\n type: Object,\n \"default\": null\n },\n level: {\n type: Number,\n \"default\": 0\n },\n menuId: {\n type: String,\n \"default\": null\n },\n focusedItemId: {\n type: String,\n \"default\": null\n },\n activeItemPath: {\n type: Object,\n \"default\": null\n }\n },\n list: null,\n methods: {\n getItemId: function getItemId(processedItem) {\n return \"\".concat(this.menuId, \"_\").concat(processedItem.key);\n },\n getItemKey: function getItemKey(processedItem) {\n return this.getItemId(processedItem);\n },\n getItemProp: function getItemProp(processedItem, name, params) {\n return processedItem && processedItem.item ? resolve(processedItem.item[name], params) : undefined;\n },\n getItemLabel: function getItemLabel(processedItem) {\n return this.getItemProp(processedItem, 'label');\n },\n getItemLabelId: function getItemLabelId(processedItem) {\n return \"\".concat(this.menuId, \"_\").concat(processedItem.key, \"_label\");\n },\n getPTOptions: function getPTOptions(processedItem, index, key) {\n return this.ptm(key, {\n context: {\n item: processedItem.item,\n index: index,\n active: this.isItemActive(processedItem),\n focused: this.isItemFocused(processedItem),\n disabled: this.isItemDisabled(processedItem),\n level: this.level\n }\n });\n },\n isItemActive: function isItemActive(processedItem) {\n return this.activeItemPath.some(function (path) {\n return path.key === processedItem.key;\n });\n },\n isItemVisible: function isItemVisible(processedItem) {\n return this.getItemProp(processedItem, 'visible') !== false;\n },\n isItemDisabled: function isItemDisabled(processedItem) {\n return this.getItemProp(processedItem, 'disabled');\n },\n isItemFocused: function isItemFocused(processedItem) {\n return this.focusedItemId === this.getItemId(processedItem);\n },\n isItemGroup: function isItemGroup(processedItem) {\n return isNotEmpty(processedItem.items);\n },\n onItemClick: function onItemClick(event, processedItem) {\n this.getItemProp(processedItem, 'command', {\n originalEvent: event,\n item: processedItem.item\n });\n this.$emit('item-click', {\n originalEvent: event,\n processedItem: processedItem,\n isFocus: true\n });\n },\n onItemMouseEnter: function onItemMouseEnter(event, processedItem) {\n this.$emit('item-mouseenter', {\n originalEvent: event,\n processedItem: processedItem\n });\n },\n onItemMouseMove: function onItemMouseMove(event, processedItem) {\n this.$emit('item-mousemove', {\n originalEvent: event,\n processedItem: processedItem\n });\n },\n getAriaPosInset: function getAriaPosInset(index) {\n return index - this.calculateAriaSetSize.slice(0, index).length + 1;\n },\n getMenuItemProps: function getMenuItemProps(processedItem, index) {\n return {\n action: mergeProps({\n \"class\": this.cx('itemLink'),\n tabindex: -1,\n 'aria-hidden': true\n }, this.getPTOptions(processedItem, index, 'itemLink')),\n icon: mergeProps({\n \"class\": [this.cx('itemIcon'), this.getItemProp(processedItem, 'icon')]\n }, this.getPTOptions(processedItem, index, 'itemIcon')),\n label: mergeProps({\n \"class\": this.cx('itemLabel')\n }, this.getPTOptions(processedItem, index, 'itemLabel')),\n submenuicon: mergeProps({\n \"class\": this.cx('submenuIcon')\n }, this.getPTOptions(processedItem, index, 'submenuIcon'))\n };\n }\n },\n computed: {\n calculateAriaSetSize: function calculateAriaSetSize() {\n var _this = this;\n return this.items.filter(function (processedItem) {\n return _this.isItemVisible(processedItem) && _this.getItemProp(processedItem, 'separator');\n });\n },\n getAriaSetSize: function getAriaSetSize() {\n var _this2 = this;\n return this.items.filter(function (processedItem) {\n return _this2.isItemVisible(processedItem) && !_this2.getItemProp(processedItem, 'separator');\n }).length;\n }\n },\n components: {\n AngleRightIcon: AngleRightIcon,\n AngleDownIcon: AngleDownIcon\n },\n directives: {\n ripple: Ripple\n }\n};\n\nvar _hoisted_1$1 = [\"id\", \"aria-label\", \"aria-disabled\", \"aria-expanded\", \"aria-haspopup\", \"aria-level\", \"aria-setsize\", \"aria-posinset\", \"data-p-active\", \"data-p-focused\", \"data-p-disabled\"];\nvar _hoisted_2 = [\"onClick\", \"onMouseenter\", \"onMousemove\"];\nvar _hoisted_3 = [\"href\", \"target\"];\nvar _hoisted_4 = [\"id\"];\nvar _hoisted_5 = [\"id\"];\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n var _component_MenubarSub = resolveComponent(\"MenubarSub\", true);\n var _directive_ripple = resolveDirective(\"ripple\");\n return openBlock(), createElementBlock(\"ul\", mergeProps({\n \"class\": $props.level === 0 ? _ctx.cx('rootList') : _ctx.cx('submenu')\n }, $props.level === 0 ? _ctx.ptm('rootList') : _ctx.ptm('submenu')), [(openBlock(true), createElementBlock(Fragment, null, renderList($props.items, function (processedItem, index) {\n return openBlock(), createElementBlock(Fragment, {\n key: $options.getItemKey(processedItem)\n }, [$options.isItemVisible(processedItem) && !$options.getItemProp(processedItem, 'separator') ? (openBlock(), createElementBlock(\"li\", mergeProps({\n key: 0,\n id: $options.getItemId(processedItem),\n style: $options.getItemProp(processedItem, 'style'),\n \"class\": [_ctx.cx('item', {\n processedItem: processedItem\n }), $options.getItemProp(processedItem, 'class')],\n role: \"menuitem\",\n \"aria-label\": $options.getItemLabel(processedItem),\n \"aria-disabled\": $options.isItemDisabled(processedItem) || undefined,\n \"aria-expanded\": $options.isItemGroup(processedItem) ? $options.isItemActive(processedItem) : undefined,\n \"aria-haspopup\": $options.isItemGroup(processedItem) && !$options.getItemProp(processedItem, 'to') ? 'menu' : undefined,\n \"aria-level\": $props.level + 1,\n \"aria-setsize\": $options.getAriaSetSize,\n \"aria-posinset\": $options.getAriaPosInset(index),\n ref_for: true\n }, $options.getPTOptions(processedItem, index, 'item'), {\n \"data-p-active\": $options.isItemActive(processedItem),\n \"data-p-focused\": $options.isItemFocused(processedItem),\n \"data-p-disabled\": $options.isItemDisabled(processedItem)\n }), [createElementVNode(\"div\", mergeProps({\n \"class\": _ctx.cx('itemContent'),\n onClick: function onClick($event) {\n return $options.onItemClick($event, processedItem);\n },\n onMouseenter: function onMouseenter($event) {\n return $options.onItemMouseEnter($event, processedItem);\n },\n onMousemove: function onMousemove($event) {\n return $options.onItemMouseMove($event, processedItem);\n },\n ref_for: true\n }, $options.getPTOptions(processedItem, index, 'itemContent')), [!$props.templates.item ? withDirectives((openBlock(), createElementBlock(\"a\", mergeProps({\n key: 0,\n href: $options.getItemProp(processedItem, 'url'),\n \"class\": _ctx.cx('itemLink'),\n target: $options.getItemProp(processedItem, 'target'),\n tabindex: \"-1\",\n ref_for: true\n }, $options.getPTOptions(processedItem, index, 'itemLink')), [$props.templates.itemicon ? (openBlock(), createBlock(resolveDynamicComponent($props.templates.itemicon), {\n key: 0,\n item: processedItem.item,\n \"class\": normalizeClass(_ctx.cx('itemIcon'))\n }, null, 8, [\"item\", \"class\"])) : $options.getItemProp(processedItem, 'icon') ? (openBlock(), createElementBlock(\"span\", mergeProps({\n key: 1,\n \"class\": [_ctx.cx('itemIcon'), $options.getItemProp(processedItem, 'icon')],\n ref_for: true\n }, $options.getPTOptions(processedItem, index, 'itemIcon')), null, 16)) : createCommentVNode(\"\", true), createElementVNode(\"span\", mergeProps({\n id: $options.getItemLabelId(processedItem),\n \"class\": _ctx.cx('itemLabel'),\n ref_for: true\n }, $options.getPTOptions(processedItem, index, 'itemLabel')), toDisplayString($options.getItemLabel(processedItem)), 17, _hoisted_4), $options.getItemProp(processedItem, 'items') ? (openBlock(), createElementBlock(Fragment, {\n key: 2\n }, [$props.templates.submenuicon ? (openBlock(), createBlock(resolveDynamicComponent($props.templates.submenuicon), {\n key: 0,\n root: $props.root,\n active: $options.isItemActive(processedItem),\n \"class\": normalizeClass(_ctx.cx('submenuIcon'))\n }, null, 8, [\"root\", \"active\", \"class\"])) : (openBlock(), createBlock(resolveDynamicComponent($props.root ? 'AngleDownIcon' : 'AngleRightIcon'), mergeProps({\n key: 1,\n \"class\": _ctx.cx('submenuIcon'),\n ref_for: true\n }, $options.getPTOptions(processedItem, index, 'submenuIcon')), null, 16, [\"class\"]))], 64)) : createCommentVNode(\"\", true)], 16, _hoisted_3)), [[_directive_ripple]]) : (openBlock(), createBlock(resolveDynamicComponent($props.templates.item), {\n key: 1,\n item: processedItem.item,\n root: $props.root,\n hasSubmenu: $options.getItemProp(processedItem, 'items'),\n label: $options.getItemLabel(processedItem),\n props: $options.getMenuItemProps(processedItem, index)\n }, null, 8, [\"item\", \"root\", \"hasSubmenu\", \"label\", \"props\"]))], 16, _hoisted_2), $options.isItemVisible(processedItem) && $options.isItemGroup(processedItem) ? (openBlock(), createBlock(_component_MenubarSub, {\n key: 0,\n id: $options.getItemId(processedItem) + '_list',\n menuId: $props.menuId,\n role: \"menu\",\n style: normalizeStyle(_ctx.sx('submenu', true, {\n processedItem: processedItem\n })),\n focusedItemId: $props.focusedItemId,\n items: processedItem.items,\n mobileActive: $props.mobileActive,\n activeItemPath: $props.activeItemPath,\n templates: $props.templates,\n level: $props.level + 1,\n \"aria-labelledby\": $options.getItemLabelId(processedItem),\n pt: _ctx.pt,\n unstyled: _ctx.unstyled,\n onItemClick: _cache[0] || (_cache[0] = function ($event) {\n return _ctx.$emit('item-click', $event);\n }),\n onItemMouseenter: _cache[1] || (_cache[1] = function ($event) {\n return _ctx.$emit('item-mouseenter', $event);\n }),\n onItemMousemove: _cache[2] || (_cache[2] = function ($event) {\n return _ctx.$emit('item-mousemove', $event);\n })\n }, null, 8, [\"id\", \"menuId\", \"style\", \"focusedItemId\", \"items\", \"mobileActive\", \"activeItemPath\", \"templates\", \"level\", \"aria-labelledby\", \"pt\", \"unstyled\"])) : createCommentVNode(\"\", true)], 16, _hoisted_1$1)) : createCommentVNode(\"\", true), $options.isItemVisible(processedItem) && $options.getItemProp(processedItem, 'separator') ? (openBlock(), createElementBlock(\"li\", mergeProps({\n key: 1,\n id: $options.getItemId(processedItem),\n \"class\": [_ctx.cx('separator'), $options.getItemProp(processedItem, 'class')],\n style: $options.getItemProp(processedItem, 'style'),\n role: \"separator\",\n ref_for: true\n }, _ctx.ptm('separator')), null, 16, _hoisted_5)) : createCommentVNode(\"\", true)], 64);\n }), 128))], 16);\n}\n\nscript$1.render = render$1;\n\nvar script = {\n name: 'Menubar',\n \"extends\": script$2,\n inheritAttrs: false,\n emits: ['focus', 'blur'],\n matchMediaListener: null,\n data: function data() {\n return {\n id: this.$attrs.id,\n mobileActive: false,\n focused: false,\n focusedItemInfo: {\n index: -1,\n level: 0,\n parentKey: ''\n },\n activeItemPath: [],\n dirty: false,\n query: null,\n queryMatches: false\n };\n },\n watch: {\n '$attrs.id': function $attrsId(newValue) {\n this.id = newValue || UniqueComponentId();\n },\n activeItemPath: function activeItemPath(newPath) {\n if (isNotEmpty(newPath)) {\n this.bindOutsideClickListener();\n this.bindResizeListener();\n } else {\n this.unbindOutsideClickListener();\n this.unbindResizeListener();\n }\n }\n },\n outsideClickListener: null,\n container: null,\n menubar: null,\n mounted: function mounted() {\n this.id = this.id || UniqueComponentId();\n this.bindMatchMediaListener();\n },\n beforeUnmount: function beforeUnmount() {\n this.mobileActive = false;\n this.unbindOutsideClickListener();\n this.unbindResizeListener();\n this.unbindMatchMediaListener();\n if (this.container) {\n ZIndex.clear(this.container);\n }\n this.container = null;\n },\n methods: {\n getItemProp: function getItemProp(item, name) {\n return item ? resolve(item[name]) : undefined;\n },\n getItemLabel: function getItemLabel(item) {\n return this.getItemProp(item, 'label');\n },\n isItemDisabled: function isItemDisabled(item) {\n return this.getItemProp(item, 'disabled');\n },\n isItemVisible: function isItemVisible(item) {\n return this.getItemProp(item, 'visible') !== false;\n },\n isItemGroup: function isItemGroup(item) {\n return isNotEmpty(this.getItemProp(item, 'items'));\n },\n isItemSeparator: function isItemSeparator(item) {\n return this.getItemProp(item, 'separator');\n },\n getProccessedItemLabel: function getProccessedItemLabel(processedItem) {\n return processedItem ? this.getItemLabel(processedItem.item) : undefined;\n },\n isProccessedItemGroup: function isProccessedItemGroup(processedItem) {\n return processedItem && isNotEmpty(processedItem.items);\n },\n toggle: function toggle(event) {\n var _this = this;\n if (this.mobileActive) {\n this.mobileActive = false;\n ZIndex.clear(this.menubar);\n this.hide();\n } else {\n this.mobileActive = true;\n ZIndex.set('menu', this.menubar, this.$primevue.config.zIndex.menu);\n setTimeout(function () {\n _this.show();\n }, 1);\n }\n this.bindOutsideClickListener();\n event.preventDefault();\n },\n show: function show() {\n focus(this.menubar);\n },\n hide: function hide(event, isFocus) {\n var _this2 = this;\n if (this.mobileActive) {\n this.mobileActive = false;\n setTimeout(function () {\n focus(_this2.$refs.menubutton);\n }, 0);\n }\n this.activeItemPath = [];\n this.focusedItemInfo = {\n index: -1,\n level: 0,\n parentKey: ''\n };\n isFocus && focus(this.menubar);\n this.dirty = false;\n },\n onFocus: function onFocus(event) {\n this.focused = true;\n this.focusedItemInfo = this.focusedItemInfo.index !== -1 ? this.focusedItemInfo : {\n index: this.findFirstFocusedItemIndex(),\n level: 0,\n parentKey: ''\n };\n this.$emit('focus', event);\n },\n onBlur: function onBlur(event) {\n this.focused = false;\n this.focusedItemInfo = {\n index: -1,\n level: 0,\n parentKey: ''\n };\n this.searchValue = '';\n this.dirty = false;\n this.$emit('blur', event);\n },\n onKeyDown: function onKeyDown(event) {\n var metaKey = event.metaKey || event.ctrlKey;\n switch (event.code) {\n case 'ArrowDown':\n this.onArrowDownKey(event);\n break;\n case 'ArrowUp':\n this.onArrowUpKey(event);\n break;\n case 'ArrowLeft':\n this.onArrowLeftKey(event);\n break;\n case 'ArrowRight':\n this.onArrowRightKey(event);\n break;\n case 'Home':\n this.onHomeKey(event);\n break;\n case 'End':\n this.onEndKey(event);\n break;\n case 'Space':\n this.onSpaceKey(event);\n break;\n case 'Enter':\n case 'NumpadEnter':\n this.onEnterKey(event);\n break;\n case 'Escape':\n this.onEscapeKey(event);\n break;\n case 'Tab':\n this.onTabKey(event);\n break;\n case 'PageDown':\n case 'PageUp':\n case 'Backspace':\n case 'ShiftLeft':\n case 'ShiftRight':\n //NOOP\n break;\n default:\n if (!metaKey && isPrintableCharacter(event.key)) {\n this.searchItems(event, event.key);\n }\n break;\n }\n },\n onItemChange: function onItemChange(event) {\n var processedItem = event.processedItem,\n isFocus = event.isFocus;\n if (isEmpty(processedItem)) return;\n var index = processedItem.index,\n key = processedItem.key,\n level = processedItem.level,\n parentKey = processedItem.parentKey,\n items = processedItem.items;\n var grouped = isNotEmpty(items);\n var activeItemPath = this.activeItemPath.filter(function (p) {\n return p.parentKey !== parentKey && p.parentKey !== key;\n });\n grouped && activeItemPath.push(processedItem);\n this.focusedItemInfo = {\n index: index,\n level: level,\n parentKey: parentKey\n };\n this.activeItemPath = activeItemPath;\n grouped && (this.dirty = true);\n isFocus && focus(this.menubar);\n },\n onItemClick: function onItemClick(event) {\n var originalEvent = event.originalEvent,\n processedItem = event.processedItem;\n var grouped = this.isProccessedItemGroup(processedItem);\n var root = isEmpty(processedItem.parent);\n var selected = this.isSelected(processedItem);\n if (selected) {\n var index = processedItem.index,\n key = processedItem.key,\n level = processedItem.level,\n parentKey = processedItem.parentKey;\n this.activeItemPath = this.activeItemPath.filter(function (p) {\n return key !== p.key && key.startsWith(p.key);\n });\n this.focusedItemInfo = {\n index: index,\n level: level,\n parentKey: parentKey\n };\n this.dirty = !root;\n focus(this.menubar);\n } else {\n if (grouped) {\n this.onItemChange(event);\n } else {\n var rootProcessedItem = root ? processedItem : this.activeItemPath.find(function (p) {\n return p.parentKey === '';\n });\n this.hide(originalEvent);\n this.changeFocusedItemIndex(originalEvent, rootProcessedItem ? rootProcessedItem.index : -1);\n this.mobileActive = false;\n focus(this.menubar);\n }\n }\n },\n onItemMouseEnter: function onItemMouseEnter(event) {\n if (this.dirty) {\n this.onItemChange(event);\n }\n },\n onItemMouseMove: function onItemMouseMove(event) {\n if (this.focused) {\n this.changeFocusedItemIndex(event, event.processedItem.index);\n }\n },\n menuButtonClick: function menuButtonClick(event) {\n this.toggle(event);\n },\n menuButtonKeydown: function menuButtonKeydown(event) {\n (event.code === 'Enter' || event.code === 'NumpadEnter' || event.code === 'Space') && this.menuButtonClick(event);\n },\n onArrowDownKey: function onArrowDownKey(event) {\n var processedItem = this.visibleItems[this.focusedItemInfo.index];\n var root = processedItem ? isEmpty(processedItem.parent) : null;\n if (root) {\n var grouped = this.isProccessedItemGroup(processedItem);\n if (grouped) {\n this.onItemChange({\n originalEvent: event,\n processedItem: processedItem\n });\n this.focusedItemInfo = {\n index: -1,\n parentKey: processedItem.key\n };\n this.onArrowRightKey(event);\n }\n } else {\n var itemIndex = this.focusedItemInfo.index !== -1 ? this.findNextItemIndex(this.focusedItemInfo.index) : this.findFirstFocusedItemIndex();\n this.changeFocusedItemIndex(event, itemIndex);\n }\n event.preventDefault();\n },\n onArrowUpKey: function onArrowUpKey(event) {\n var _this3 = this;\n var processedItem = this.visibleItems[this.focusedItemInfo.index];\n var root = isEmpty(processedItem.parent);\n if (root) {\n var grouped = this.isProccessedItemGroup(processedItem);\n if (grouped) {\n this.onItemChange({\n originalEvent: event,\n processedItem: processedItem\n });\n this.focusedItemInfo = {\n index: -1,\n parentKey: processedItem.key\n };\n var itemIndex = this.findLastItemIndex();\n this.changeFocusedItemIndex(event, itemIndex);\n }\n } else {\n var parentItem = this.activeItemPath.find(function (p) {\n return p.key === processedItem.parentKey;\n });\n if (this.focusedItemInfo.index === 0) {\n this.focusedItemInfo = {\n index: -1,\n parentKey: parentItem ? parentItem.parentKey : ''\n };\n this.searchValue = '';\n this.onArrowLeftKey(event);\n this.activeItemPath = this.activeItemPath.filter(function (p) {\n return p.parentKey !== _this3.focusedItemInfo.parentKey;\n });\n } else {\n var _itemIndex = this.focusedItemInfo.index !== -1 ? this.findPrevItemIndex(this.focusedItemInfo.index) : this.findLastFocusedItemIndex();\n this.changeFocusedItemIndex(event, _itemIndex);\n }\n }\n event.preventDefault();\n },\n onArrowLeftKey: function onArrowLeftKey(event) {\n var _this4 = this;\n var processedItem = this.visibleItems[this.focusedItemInfo.index];\n var parentItem = processedItem ? this.activeItemPath.find(function (p) {\n return p.key === processedItem.parentKey;\n }) : null;\n if (parentItem) {\n this.onItemChange({\n originalEvent: event,\n processedItem: parentItem\n });\n this.activeItemPath = this.activeItemPath.filter(function (p) {\n return p.parentKey !== _this4.focusedItemInfo.parentKey;\n });\n event.preventDefault();\n } else {\n var itemIndex = this.focusedItemInfo.index !== -1 ? this.findPrevItemIndex(this.focusedItemInfo.index) : this.findLastFocusedItemIndex();\n this.changeFocusedItemIndex(event, itemIndex);\n event.preventDefault();\n }\n },\n onArrowRightKey: function onArrowRightKey(event) {\n var processedItem = this.visibleItems[this.focusedItemInfo.index];\n var parentItem = processedItem ? this.activeItemPath.find(function (p) {\n return p.key === processedItem.parentKey;\n }) : null;\n if (parentItem) {\n var grouped = this.isProccessedItemGroup(processedItem);\n if (grouped) {\n this.onItemChange({\n originalEvent: event,\n processedItem: processedItem\n });\n this.focusedItemInfo = {\n index: -1,\n parentKey: processedItem.key\n };\n this.onArrowDownKey(event);\n }\n } else {\n var itemIndex = this.focusedItemInfo.index !== -1 ? this.findNextItemIndex(this.focusedItemInfo.index) : this.findFirstFocusedItemIndex();\n this.changeFocusedItemIndex(event, itemIndex);\n event.preventDefault();\n }\n },\n onHomeKey: function onHomeKey(event) {\n this.changeFocusedItemIndex(event, this.findFirstItemIndex());\n event.preventDefault();\n },\n onEndKey: function onEndKey(event) {\n this.changeFocusedItemIndex(event, this.findLastItemIndex());\n event.preventDefault();\n },\n onEnterKey: function onEnterKey(event) {\n if (this.focusedItemInfo.index !== -1) {\n var element = findSingle(this.menubar, \"li[id=\\\"\".concat(\"\".concat(this.focusedItemId), \"\\\"]\"));\n var anchorElement = element && findSingle(element, 'a[data-pc-section=\"itemlink\"]');\n anchorElement ? anchorElement.click() : element && element.click();\n var processedItem = this.visibleItems[this.focusedItemInfo.index];\n var grouped = this.isProccessedItemGroup(processedItem);\n !grouped && (this.focusedItemInfo.index = this.findFirstFocusedItemIndex());\n }\n event.preventDefault();\n },\n onSpaceKey: function onSpaceKey(event) {\n this.onEnterKey(event);\n },\n onEscapeKey: function onEscapeKey(event) {\n if (this.focusedItemInfo.level !== 0) {\n var _focusedItemInfo = this.focusedItemInfo;\n this.hide(event, false);\n this.focusedItemInfo = {\n index: Number(_focusedItemInfo.parentKey.split('_')[0]),\n level: 0,\n parentKey: ''\n };\n }\n event.preventDefault();\n },\n onTabKey: function onTabKey(event) {\n if (this.focusedItemInfo.index !== -1) {\n var processedItem = this.visibleItems[this.focusedItemInfo.index];\n var grouped = this.isProccessedItemGroup(processedItem);\n !grouped && this.onItemChange({\n originalEvent: event,\n processedItem: processedItem\n });\n }\n this.hide();\n },\n bindOutsideClickListener: function bindOutsideClickListener() {\n var _this5 = this;\n if (!this.outsideClickListener) {\n this.outsideClickListener = function (event) {\n var isOutsideContainer = _this5.container && !_this5.container.contains(event.target);\n var isOutsideTarget = !(_this5.target && (_this5.target === event.target || _this5.target.contains(event.target)));\n if (isOutsideContainer && isOutsideTarget) {\n _this5.hide();\n }\n };\n document.addEventListener('click', this.outsideClickListener);\n }\n },\n unbindOutsideClickListener: function unbindOutsideClickListener() {\n if (this.outsideClickListener) {\n document.removeEventListener('click', this.outsideClickListener);\n this.outsideClickListener = null;\n }\n },\n bindResizeListener: function bindResizeListener() {\n var _this6 = this;\n if (!this.resizeListener) {\n this.resizeListener = function (event) {\n if (!isTouchDevice()) {\n _this6.hide(event, true);\n }\n _this6.mobileActive = false;\n };\n window.addEventListener('resize', this.resizeListener);\n }\n },\n unbindResizeListener: function unbindResizeListener() {\n if (this.resizeListener) {\n window.removeEventListener('resize', this.resizeListener);\n this.resizeListener = null;\n }\n },\n bindMatchMediaListener: function bindMatchMediaListener() {\n var _this7 = this;\n if (!this.matchMediaListener) {\n var query = matchMedia(\"(max-width: \".concat(this.breakpoint, \")\"));\n this.query = query;\n this.queryMatches = query.matches;\n this.matchMediaListener = function () {\n _this7.queryMatches = query.matches;\n _this7.mobileActive = false;\n };\n this.query.addEventListener('change', this.matchMediaListener);\n }\n },\n unbindMatchMediaListener: function unbindMatchMediaListener() {\n if (this.matchMediaListener) {\n this.query.removeEventListener('change', this.matchMediaListener);\n this.matchMediaListener = null;\n }\n },\n isItemMatched: function isItemMatched(processedItem) {\n var _this$getProccessedIt;\n return this.isValidItem(processedItem) && ((_this$getProccessedIt = this.getProccessedItemLabel(processedItem)) === null || _this$getProccessedIt === void 0 ? void 0 : _this$getProccessedIt.toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase()));\n },\n isValidItem: function isValidItem(processedItem) {\n return !!processedItem && !this.isItemDisabled(processedItem.item) && !this.isItemSeparator(processedItem.item) && this.isItemVisible(processedItem.item);\n },\n isValidSelectedItem: function isValidSelectedItem(processedItem) {\n return this.isValidItem(processedItem) && this.isSelected(processedItem);\n },\n isSelected: function isSelected(processedItem) {\n return this.activeItemPath.some(function (p) {\n return p.key === processedItem.key;\n });\n },\n findFirstItemIndex: function findFirstItemIndex() {\n var _this8 = this;\n return this.visibleItems.findIndex(function (processedItem) {\n return _this8.isValidItem(processedItem);\n });\n },\n findLastItemIndex: function findLastItemIndex() {\n var _this9 = this;\n return findLastIndex(this.visibleItems, function (processedItem) {\n return _this9.isValidItem(processedItem);\n });\n },\n findNextItemIndex: function findNextItemIndex(index) {\n var _this10 = this;\n var matchedItemIndex = index < this.visibleItems.length - 1 ? this.visibleItems.slice(index + 1).findIndex(function (processedItem) {\n return _this10.isValidItem(processedItem);\n }) : -1;\n return matchedItemIndex > -1 ? matchedItemIndex + index + 1 : index;\n },\n findPrevItemIndex: function findPrevItemIndex(index) {\n var _this11 = this;\n var matchedItemIndex = index > 0 ? findLastIndex(this.visibleItems.slice(0, index), function (processedItem) {\n return _this11.isValidItem(processedItem);\n }) : -1;\n return matchedItemIndex > -1 ? matchedItemIndex : index;\n },\n findSelectedItemIndex: function findSelectedItemIndex() {\n var _this12 = this;\n return this.visibleItems.findIndex(function (processedItem) {\n return _this12.isValidSelectedItem(processedItem);\n });\n },\n findFirstFocusedItemIndex: function findFirstFocusedItemIndex() {\n var selectedIndex = this.findSelectedItemIndex();\n return selectedIndex < 0 ? this.findFirstItemIndex() : selectedIndex;\n },\n findLastFocusedItemIndex: function findLastFocusedItemIndex() {\n var selectedIndex = this.findSelectedItemIndex();\n return selectedIndex < 0 ? this.findLastItemIndex() : selectedIndex;\n },\n searchItems: function searchItems(event, _char) {\n var _this13 = this;\n this.searchValue = (this.searchValue || '') + _char;\n var itemIndex = -1;\n var matched = false;\n if (this.focusedItemInfo.index !== -1) {\n itemIndex = this.visibleItems.slice(this.focusedItemInfo.index).findIndex(function (processedItem) {\n return _this13.isItemMatched(processedItem);\n });\n itemIndex = itemIndex === -1 ? this.visibleItems.slice(0, this.focusedItemInfo.index).findIndex(function (processedItem) {\n return _this13.isItemMatched(processedItem);\n }) : itemIndex + this.focusedItemInfo.index;\n } else {\n itemIndex = this.visibleItems.findIndex(function (processedItem) {\n return _this13.isItemMatched(processedItem);\n });\n }\n if (itemIndex !== -1) {\n matched = true;\n }\n if (itemIndex === -1 && this.focusedItemInfo.index === -1) {\n itemIndex = this.findFirstFocusedItemIndex();\n }\n if (itemIndex !== -1) {\n this.changeFocusedItemIndex(event, itemIndex);\n }\n if (this.searchTimeout) {\n clearTimeout(this.searchTimeout);\n }\n this.searchTimeout = setTimeout(function () {\n _this13.searchValue = '';\n _this13.searchTimeout = null;\n }, 500);\n return matched;\n },\n changeFocusedItemIndex: function changeFocusedItemIndex(event, index) {\n if (this.focusedItemInfo.index !== index) {\n this.focusedItemInfo.index = index;\n this.scrollInView();\n }\n },\n scrollInView: function scrollInView() {\n var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;\n var id = index !== -1 ? \"\".concat(this.id, \"_\").concat(index) : this.focusedItemId;\n var element = findSingle(this.menubar, \"li[id=\\\"\".concat(id, \"\\\"]\"));\n if (element) {\n element.scrollIntoView && element.scrollIntoView({\n block: 'nearest',\n inline: 'start'\n });\n }\n },\n createProcessedItems: function createProcessedItems(items) {\n var _this14 = this;\n var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var parent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var parentKey = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';\n var processedItems = [];\n items && items.forEach(function (item, index) {\n var key = (parentKey !== '' ? parentKey + '_' : '') + index;\n var newItem = {\n item: item,\n index: index,\n level: level,\n key: key,\n parent: parent,\n parentKey: parentKey\n };\n newItem['items'] = _this14.createProcessedItems(item.items, level + 1, newItem, key);\n processedItems.push(newItem);\n });\n return processedItems;\n },\n containerRef: function containerRef(el) {\n this.container = el;\n },\n menubarRef: function menubarRef(el) {\n this.menubar = el ? el.$el : undefined;\n }\n },\n computed: {\n processedItems: function processedItems() {\n return this.createProcessedItems(this.model || []);\n },\n visibleItems: function visibleItems() {\n var _this15 = this;\n var processedItem = this.activeItemPath.find(function (p) {\n return p.key === _this15.focusedItemInfo.parentKey;\n });\n return processedItem ? processedItem.items : this.processedItems;\n },\n focusedItemId: function focusedItemId() {\n return this.focusedItemInfo.index !== -1 ? \"\".concat(this.id).concat(isNotEmpty(this.focusedItemInfo.parentKey) ? '_' + this.focusedItemInfo.parentKey : '', \"_\").concat(this.focusedItemInfo.index) : null;\n }\n },\n components: {\n MenubarSub: script$1,\n BarsIcon: BarsIcon\n }\n};\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nvar _hoisted_1 = [\"aria-haspopup\", \"aria-expanded\", \"aria-controls\", \"aria-label\"];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n var _component_BarsIcon = resolveComponent(\"BarsIcon\");\n var _component_MenubarSub = resolveComponent(\"MenubarSub\");\n return openBlock(), createElementBlock(\"div\", mergeProps({\n ref: $options.containerRef,\n \"class\": _ctx.cx('root')\n }, _ctx.ptmi('root')), [_ctx.$slots.start ? (openBlock(), createElementBlock(\"div\", mergeProps({\n key: 0,\n \"class\": _ctx.cx('start')\n }, _ctx.ptm('start')), [renderSlot(_ctx.$slots, \"start\")], 16)) : createCommentVNode(\"\", true), renderSlot(_ctx.$slots, _ctx.$slots.button ? 'button' : 'menubutton', {\n id: $data.id,\n \"class\": normalizeClass(_ctx.cx('button')),\n toggleCallback: function toggleCallback(event) {\n return $options.menuButtonClick(event);\n }\n }, function () {\n var _ctx$$primevue$config;\n return [_ctx.model && _ctx.model.length > 0 ? (openBlock(), createElementBlock(\"a\", mergeProps({\n key: 0,\n ref: \"menubutton\",\n role: \"button\",\n tabindex: \"0\",\n \"class\": _ctx.cx('button'),\n \"aria-haspopup\": _ctx.model.length && _ctx.model.length > 0 ? true : false,\n \"aria-expanded\": $data.mobileActive,\n \"aria-controls\": $data.id,\n \"aria-label\": (_ctx$$primevue$config = _ctx.$primevue.config.locale.aria) === null || _ctx$$primevue$config === void 0 ? void 0 : _ctx$$primevue$config.navigation,\n onClick: _cache[0] || (_cache[0] = function ($event) {\n return $options.menuButtonClick($event);\n }),\n onKeydown: _cache[1] || (_cache[1] = function ($event) {\n return $options.menuButtonKeydown($event);\n })\n }, _objectSpread(_objectSpread({}, _ctx.buttonProps), _ctx.ptm('button'))), [renderSlot(_ctx.$slots, _ctx.$slots.buttonicon ? 'buttonicon' : 'menubuttonicon', {}, function () {\n return [createVNode(_component_BarsIcon, normalizeProps(guardReactiveProps(_ctx.ptm('buttonicon'))), null, 16)];\n })], 16, _hoisted_1)) : createCommentVNode(\"\", true)];\n }), createVNode(_component_MenubarSub, {\n ref: $options.menubarRef,\n id: $data.id + '_list',\n role: \"menubar\",\n items: $options.processedItems,\n templates: _ctx.$slots,\n root: true,\n mobileActive: $data.mobileActive,\n tabindex: \"0\",\n \"aria-activedescendant\": $data.focused ? $options.focusedItemId : undefined,\n menuId: $data.id,\n focusedItemId: $data.focused ? $options.focusedItemId : undefined,\n activeItemPath: $data.activeItemPath,\n level: 0,\n \"aria-labelledby\": _ctx.ariaLabelledby,\n \"aria-label\": _ctx.ariaLabel,\n pt: _ctx.pt,\n unstyled: _ctx.unstyled,\n onFocus: $options.onFocus,\n onBlur: $options.onBlur,\n onKeydown: $options.onKeyDown,\n onItemClick: $options.onItemClick,\n onItemMouseenter: $options.onItemMouseEnter,\n onItemMousemove: $options.onItemMouseMove\n }, null, 8, [\"id\", \"items\", \"templates\", \"mobileActive\", \"aria-activedescendant\", \"menuId\", \"focusedItemId\", \"activeItemPath\", \"aria-labelledby\", \"aria-label\", \"pt\", \"unstyled\", \"onFocus\", \"onBlur\", \"onKeydown\", \"onItemClick\", \"onItemMouseenter\", \"onItemMousemove\"]), _ctx.$slots.end ? (openBlock(), createElementBlock(\"div\", mergeProps({\n key: 1,\n \"class\": _ctx.cx('end')\n }, _ctx.ptm('end')), [renderSlot(_ctx.$slots, \"end\")], 16)) : createCommentVNode(\"\", true)], 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","\n\n\n\n\n","import BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-panel {\\n border: 1px solid \".concat(dt('panel.border.color'), \";\\n border-radius: \").concat(dt('panel.border.radius'), \";\\n background: \").concat(dt('panel.background'), \";\\n color: \").concat(dt('panel.color'), \";\\n}\\n\\n.p-panel-header {\\n display: flex;\\n justify-content: space-between;\\n align-items: center;\\n padding: \").concat(dt('panel.header.padding'), \";\\n background: \").concat(dt('panel.header.background'), \";\\n color: \").concat(dt('panel.header.color'), \";\\n border-style: solid;\\n border-width: \").concat(dt('panel.header.border.width'), \";\\n border-color: \").concat(dt('panel.header.border.color'), \";\\n border-radius: \").concat(dt('panel.header.border.radius'), \";\\n}\\n\\n.p-panel-toggleable .p-panel-header {\\n padding: \").concat(dt('panel.toggleable.header.padding'), \";\\n}\\n\\n.p-panel-title {\\n line-height: 1;\\n font-weight: \").concat(dt('panel.title.font.weight'), \";\\n}\\n\\n.p-panel-content {\\n padding: \").concat(dt('panel.content.padding'), \";\\n}\\n\\n.p-panel-footer {\\n padding: \").concat(dt('panel.footer.padding'), \";\\n}\\n\");\n};\nvar classes = {\n root: function root(_ref2) {\n var props = _ref2.props;\n return ['p-panel p-component', {\n 'p-panel-toggleable': props.toggleable\n }];\n },\n header: 'p-panel-header',\n title: 'p-panel-title',\n headerActions: 'p-panel-header-actions',\n pcToggleButton: 'p-panel-toggle-button',\n contentContainer: 'p-panel-content-container',\n content: 'p-panel-content',\n footer: 'p-panel-footer'\n};\nvar PanelStyle = BaseStyle.extend({\n name: 'panel',\n theme: theme,\n classes: classes\n});\n\nexport { PanelStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import { UniqueComponentId } from '@primevue/core/utils';\nimport MinusIcon from '@primevue/icons/minus';\nimport PlusIcon from '@primevue/icons/plus';\nimport Button from 'primevue/button';\nimport Ripple from 'primevue/ripple';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport PanelStyle from 'primevue/panel/style';\nimport { resolveComponent, openBlock, createElementBlock, mergeProps, createElementVNode, renderSlot, normalizeClass, toDisplayString, createCommentVNode, createBlock, withCtx, resolveDynamicComponent, createVNode, Transition, withDirectives, vShow } from 'vue';\n\nvar script$1 = {\n name: 'BasePanel',\n \"extends\": BaseComponent,\n props: {\n header: String,\n toggleable: Boolean,\n collapsed: Boolean,\n toggleButtonProps: {\n type: Object,\n \"default\": function _default() {\n return {\n severity: 'secondary',\n text: true,\n rounded: true\n };\n }\n }\n },\n style: PanelStyle,\n provide: function provide() {\n return {\n $pcPanel: this,\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'Panel',\n \"extends\": script$1,\n inheritAttrs: false,\n emits: ['update:collapsed', 'toggle'],\n data: function data() {\n return {\n id: this.$attrs.id,\n d_collapsed: this.collapsed\n };\n },\n watch: {\n '$attrs.id': function $attrsId(newValue) {\n this.id = newValue || UniqueComponentId();\n },\n collapsed: function collapsed(newValue) {\n this.d_collapsed = newValue;\n }\n },\n mounted: function mounted() {\n this.id = this.id || UniqueComponentId();\n },\n methods: {\n toggle: function toggle(event) {\n this.d_collapsed = !this.d_collapsed;\n this.$emit('update:collapsed', this.d_collapsed);\n this.$emit('toggle', {\n originalEvent: event,\n value: this.d_collapsed\n });\n },\n onKeyDown: function onKeyDown(event) {\n if (event.code === 'Enter' || event.code === 'NumpadEnter' || event.code === 'Space') {\n this.toggle(event);\n event.preventDefault();\n }\n }\n },\n computed: {\n buttonAriaLabel: function buttonAriaLabel() {\n return this.toggleButtonProps && this.toggleButtonProps.ariaLabel ? this.toggleButtonProps.ariaLabel : this.header;\n }\n },\n components: {\n PlusIcon: PlusIcon,\n MinusIcon: MinusIcon,\n Button: Button\n },\n directives: {\n ripple: Ripple\n }\n};\n\nvar _hoisted_1 = [\"id\"];\nvar _hoisted_2 = [\"id\", \"aria-labelledby\"];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n var _component_Button = resolveComponent(\"Button\");\n return openBlock(), createElementBlock(\"div\", mergeProps({\n \"class\": _ctx.cx('root')\n }, _ctx.ptmi('root')), [createElementVNode(\"div\", mergeProps({\n \"class\": _ctx.cx('header')\n }, _ctx.ptm('header')), [renderSlot(_ctx.$slots, \"header\", {\n id: $data.id + '_header',\n \"class\": normalizeClass(_ctx.cx('title'))\n }, function () {\n return [_ctx.header ? (openBlock(), createElementBlock(\"span\", mergeProps({\n key: 0,\n id: $data.id + '_header',\n \"class\": _ctx.cx('title')\n }, _ctx.ptm('title')), toDisplayString(_ctx.header), 17, _hoisted_1)) : createCommentVNode(\"\", true)];\n }), createElementVNode(\"div\", mergeProps({\n \"class\": _ctx.cx('headerActions')\n }, _ctx.ptm('headerActions')), [renderSlot(_ctx.$slots, \"icons\"), _ctx.toggleable ? (openBlock(), createBlock(_component_Button, mergeProps({\n key: 0,\n id: $data.id + '_header',\n \"class\": _ctx.cx('pcToggleButton'),\n \"aria-label\": $options.buttonAriaLabel,\n \"aria-controls\": $data.id + '_content',\n \"aria-expanded\": !$data.d_collapsed,\n unstyled: _ctx.unstyled,\n onClick: $options.toggle,\n onKeydown: $options.onKeyDown\n }, _ctx.toggleButtonProps, {\n pt: _ctx.ptm('pcToggleButton')\n }), {\n icon: withCtx(function (slotProps) {\n return [renderSlot(_ctx.$slots, _ctx.$slots.toggleicon ? 'toggleicon' : 'togglericon', {\n collapsed: $data.d_collapsed\n }, function () {\n return [(openBlock(), createBlock(resolveDynamicComponent($data.d_collapsed ? 'PlusIcon' : 'MinusIcon'), mergeProps({\n \"class\": slotProps[\"class\"]\n }, _ctx.ptm('pcToggleButton')['icon']), null, 16, [\"class\"]))];\n })];\n }),\n _: 3\n }, 16, [\"id\", \"class\", \"aria-label\", \"aria-controls\", \"aria-expanded\", \"unstyled\", \"onClick\", \"onKeydown\", \"pt\"])) : createCommentVNode(\"\", true)], 16)], 16), createVNode(Transition, mergeProps({\n name: \"p-toggleable-content\"\n }, _ctx.ptm('transition')), {\n \"default\": withCtx(function () {\n return [withDirectives(createElementVNode(\"div\", mergeProps({\n id: $data.id + '_content',\n \"class\": _ctx.cx('contentContainer'),\n role: \"region\",\n \"aria-labelledby\": $data.id + '_header'\n }, _ctx.ptm('contentContainer')), [createElementVNode(\"div\", mergeProps({\n \"class\": _ctx.cx('content')\n }, _ctx.ptm('content')), [renderSlot(_ctx.$slots, \"default\")], 16), _ctx.$slots.footer ? (openBlock(), createElementBlock(\"div\", mergeProps({\n key: 0,\n \"class\": _ctx.cx('footer')\n }, _ctx.ptm('footer')), [renderSlot(_ctx.$slots, \"footer\")], 16)) : createCommentVNode(\"\", true)], 16, _hoisted_2), [[vShow, !$data.d_collapsed]])];\n }),\n _: 3\n }, 16)], 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-tieredmenu {\\n background: \".concat(dt('tieredmenu.background'), \";\\n color: \").concat(dt('tieredmenu.color'), \";\\n border: 1px solid \").concat(dt('tieredmenu.border.color'), \";\\n border-radius: \").concat(dt('tieredmenu.border.radius'), \";\\n min-width: 12.5rem;\\n}\\n\\n.p-tieredmenu-root-list,\\n.p-tieredmenu-submenu {\\n margin: 0;\\n padding: \").concat(dt('tieredmenu.list.padding'), \";\\n list-style: none;\\n outline: 0 none;\\n display: flex;\\n flex-direction: column;\\n gap: \").concat(dt('tieredmenu.list.gap'), \";\\n}\\n\\n.p-tieredmenu-submenu {\\n position: absolute;\\n min-width: 100%;\\n z-index: 1;\\n background: \").concat(dt('tieredmenu.background'), \";\\n color: \").concat(dt('tieredmenu.color'), \";\\n border: 1px solid \").concat(dt('tieredmenu.border.color'), \";\\n border-radius: \").concat(dt('tieredmenu.border.radius'), \";\\n box-shadow: \").concat(dt('tieredmenu.shadow'), \";\\n}\\n\\n.p-tieredmenu-item {\\n position: relative;\\n}\\n\\n.p-tieredmenu-item-content {\\n transition: background \").concat(dt('tieredmenu.transition.duration'), \", color \").concat(dt('tieredmenu.transition.duration'), \";\\n border-radius: \").concat(dt('tieredmenu.item.border.radius'), \";\\n color: \").concat(dt('tieredmenu.item.color'), \";\\n}\\n\\n.p-tieredmenu-item-link {\\n cursor: pointer;\\n display: flex;\\n align-items: center;\\n text-decoration: none;\\n overflow: hidden;\\n position: relative;\\n color: inherit;\\n padding: \").concat(dt('tieredmenu.item.padding'), \";\\n gap: \").concat(dt('tieredmenu.item.gap'), \";\\n user-select: none;\\n outline: 0 none;\\n}\\n\\n.p-tieredmenu-item-label {\\n line-height: 1;\\n}\\n\\n.p-tieredmenu-item-icon {\\n color: \").concat(dt('tieredmenu.item.icon.color'), \";\\n}\\n\\n.p-tieredmenu-submenu-icon {\\n color: \").concat(dt('tieredmenu.submenu.icon.color'), \";\\n margin-left: auto;\\n font-size: \").concat(dt('tieredmenu.submenu.icon.size'), \";\\n width: \").concat(dt('tieredmenu.submenu.icon.size'), \";\\n height: \").concat(dt('tieredmenu.submenu.icon.size'), \";\\n}\\n\\n.p-tieredmenu-item.p-focus > .p-tieredmenu-item-content {\\n color: \").concat(dt('tieredmenu.item.focus.color'), \";\\n background: \").concat(dt('tieredmenu.item.focus.background'), \";\\n}\\n\\n.p-tieredmenu-item.p-focus > .p-tieredmenu-item-content .p-tieredmenu-item-icon {\\n color: \").concat(dt('tieredmenu.item.icon.focus.color'), \";\\n}\\n\\n.p-tieredmenu-item.p-focus > .p-tieredmenu-item-content .p-tieredmenu-submenu-icon {\\n color: \").concat(dt('tieredmenu.submenu.icon.focus.color'), \";\\n}\\n\\n.p-tieredmenu-item:not(.p-disabled) > .p-tieredmenu-item-content:hover {\\n color: \").concat(dt('tieredmenu.item.focus.color'), \";\\n background: \").concat(dt('tieredmenu.item.focus.background'), \";\\n}\\n\\n.p-tieredmenu-item:not(.p-disabled) > .p-tieredmenu-item-content:hover .p-tieredmenu-item-icon {\\n color: \").concat(dt('tieredmenu.item.icon.focus.color'), \";\\n}\\n\\n.p-tieredmenu-item:not(.p-disabled) > .p-tieredmenu-item-content:hover .p-tieredmenu-submenu-icon {\\n color: \").concat(dt('tieredmenu.submenu.icon.focus.color'), \";\\n}\\n\\n.p-tieredmenu-item-active > .p-tieredmenu-item-content {\\n color: \").concat(dt('tieredmenu.item.active.color'), \";\\n background: \").concat(dt('tieredmenu.item.active.background'), \";\\n}\\n\\n.p-tieredmenu-item-active > .p-tieredmenu-item-content .p-tieredmenu-item-icon {\\n color: \").concat(dt('tieredmenu.item.icon.active.color'), \";\\n}\\n\\n.p-tieredmenu-item-active > .p-tieredmenu-item-content .p-tieredmenu-submenu-icon {\\n color: \").concat(dt('tieredmenu.submenu.icon.active.color'), \";\\n}\\n\\n.p-tieredmenu-separator {\\n border-top: 1px solid \").concat(dt('tieredmenu.separator.border.color'), \";\\n}\\n\\n.p-tieredmenu-overlay {\\n box-shadow: \").concat(dt('tieredmenu.shadow'), \";\\n}\\n\\n.p-tieredmenu-enter-from,\\n.p-tieredmenu-leave-active {\\n opacity: 0;\\n}\\n\\n.p-tieredmenu-enter-active {\\n transition: opacity 250ms;\\n}\\n\");\n};\nvar inlineStyles = {\n submenu: function submenu(_ref2) {\n var instance = _ref2.instance,\n processedItem = _ref2.processedItem;\n return {\n display: instance.isItemActive(processedItem) ? 'flex' : 'none'\n };\n }\n};\nvar classes = {\n root: function root(_ref3) {\n _ref3.instance;\n var props = _ref3.props;\n return ['p-tieredmenu p-component', {\n 'p-tieredmenu-overlay': props.popup\n }];\n },\n start: 'p-tieredmenu-start',\n rootList: 'p-tieredmenu-root-list',\n item: function item(_ref4) {\n var instance = _ref4.instance,\n processedItem = _ref4.processedItem;\n return ['p-tieredmenu-item', {\n 'p-tieredmenu-item-active': instance.isItemActive(processedItem),\n 'p-focus': instance.isItemFocused(processedItem),\n 'p-disabled': instance.isItemDisabled(processedItem)\n }];\n },\n itemContent: 'p-tieredmenu-item-content',\n itemLink: 'p-tieredmenu-item-link',\n itemIcon: 'p-tieredmenu-item-icon',\n itemLabel: 'p-tieredmenu-item-label',\n submenuIcon: 'p-tieredmenu-submenu-icon',\n submenu: 'p-tieredmenu-submenu',\n separator: 'p-tieredmenu-separator',\n end: 'p-tieredmenu-end'\n};\nvar TieredMenuStyle = BaseStyle.extend({\n name: 'tieredmenu',\n theme: theme,\n classes: classes,\n inlineStyles: inlineStyles\n});\n\nexport { TieredMenuStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import { UniqueComponentId, ConnectedOverlayScrollHandler } from '@primevue/core/utils';\nimport { nestedPosition, focus, findSingle, addStyle, absolutePosition, getOuterWidth, isTouchDevice } from '@primeuix/utils/dom';\nimport { resolve, isNotEmpty, isPrintableCharacter, isEmpty, findLastIndex } from '@primeuix/utils/object';\nimport { ZIndex } from '@primeuix/utils/zindex';\nimport OverlayEventBus from 'primevue/overlayeventbus';\nimport Portal from 'primevue/portal';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport TieredMenuStyle from 'primevue/tieredmenu/style';\nimport AngleRightIcon from '@primevue/icons/angleright';\nimport Ripple from 'primevue/ripple';\nimport { mergeProps, resolveComponent, resolveDirective, openBlock, createBlock, Transition, withCtx, createElementBlock, Fragment, renderList, createElementVNode, withDirectives, resolveDynamicComponent, normalizeClass, createCommentVNode, toDisplayString, normalizeStyle, createVNode, renderSlot } from 'vue';\n\nvar script$2 = {\n name: 'BaseTieredMenu',\n \"extends\": BaseComponent,\n props: {\n popup: {\n type: Boolean,\n \"default\": false\n },\n model: {\n type: Array,\n \"default\": null\n },\n appendTo: {\n type: [String, Object],\n \"default\": 'body'\n },\n autoZIndex: {\n type: Boolean,\n \"default\": true\n },\n baseZIndex: {\n type: Number,\n \"default\": 0\n },\n disabled: {\n type: Boolean,\n \"default\": false\n },\n tabindex: {\n type: Number,\n \"default\": 0\n },\n ariaLabelledby: {\n type: String,\n \"default\": null\n },\n ariaLabel: {\n type: String,\n \"default\": null\n }\n },\n style: TieredMenuStyle,\n provide: function provide() {\n return {\n $pcTieredMenu: this,\n $parentInstance: this\n };\n }\n};\n\nvar script$1 = {\n name: 'TieredMenuSub',\n hostName: 'TieredMenu',\n \"extends\": BaseComponent,\n emits: ['item-click', 'item-mouseenter', 'item-mousemove'],\n container: null,\n props: {\n menuId: {\n type: String,\n \"default\": null\n },\n focusedItemId: {\n type: String,\n \"default\": null\n },\n items: {\n type: Array,\n \"default\": null\n },\n visible: {\n type: Boolean,\n \"default\": false\n },\n level: {\n type: Number,\n \"default\": 0\n },\n templates: {\n type: Object,\n \"default\": null\n },\n activeItemPath: {\n type: Object,\n \"default\": null\n },\n tabindex: {\n type: Number,\n \"default\": 0\n }\n },\n methods: {\n getItemId: function getItemId(processedItem) {\n return \"\".concat(this.menuId, \"_\").concat(processedItem.key);\n },\n getItemKey: function getItemKey(processedItem) {\n return this.getItemId(processedItem);\n },\n getItemProp: function getItemProp(processedItem, name, params) {\n return processedItem && processedItem.item ? resolve(processedItem.item[name], params) : undefined;\n },\n getItemLabel: function getItemLabel(processedItem) {\n return this.getItemProp(processedItem, 'label');\n },\n getItemLabelId: function getItemLabelId(processedItem) {\n return \"\".concat(this.menuId, \"_\").concat(processedItem.key, \"_label\");\n },\n getPTOptions: function getPTOptions(processedItem, index, key) {\n return this.ptm(key, {\n context: {\n item: processedItem.item,\n index: index,\n active: this.isItemActive(processedItem),\n focused: this.isItemFocused(processedItem),\n disabled: this.isItemDisabled(processedItem)\n }\n });\n },\n isItemActive: function isItemActive(processedItem) {\n return this.activeItemPath.some(function (path) {\n return path.key === processedItem.key;\n });\n },\n isItemVisible: function isItemVisible(processedItem) {\n return this.getItemProp(processedItem, 'visible') !== false;\n },\n isItemDisabled: function isItemDisabled(processedItem) {\n return this.getItemProp(processedItem, 'disabled');\n },\n isItemFocused: function isItemFocused(processedItem) {\n return this.focusedItemId === this.getItemId(processedItem);\n },\n isItemGroup: function isItemGroup(processedItem) {\n return isNotEmpty(processedItem.items);\n },\n onEnter: function onEnter() {\n nestedPosition(this.container, this.level);\n },\n onItemClick: function onItemClick(event, processedItem) {\n this.getItemProp(processedItem, 'command', {\n originalEvent: event,\n item: processedItem.item\n });\n this.$emit('item-click', {\n originalEvent: event,\n processedItem: processedItem,\n isFocus: true\n });\n },\n onItemMouseEnter: function onItemMouseEnter(event, processedItem) {\n this.$emit('item-mouseenter', {\n originalEvent: event,\n processedItem: processedItem\n });\n },\n onItemMouseMove: function onItemMouseMove(event, processedItem) {\n this.$emit('item-mousemove', {\n originalEvent: event,\n processedItem: processedItem\n });\n },\n getAriaSetSize: function getAriaSetSize() {\n var _this = this;\n return this.items.filter(function (processedItem) {\n return _this.isItemVisible(processedItem) && !_this.getItemProp(processedItem, 'separator');\n }).length;\n },\n getAriaPosInset: function getAriaPosInset(index) {\n var _this2 = this;\n return index - this.items.slice(0, index).filter(function (processedItem) {\n return _this2.isItemVisible(processedItem) && _this2.getItemProp(processedItem, 'separator');\n }).length + 1;\n },\n getMenuItemProps: function getMenuItemProps(processedItem, index) {\n return {\n action: mergeProps({\n \"class\": this.cx('itemLink'),\n tabindex: -1,\n 'aria-hidden': true\n }, this.getPTOptions(processedItem, index, 'itemLink')),\n icon: mergeProps({\n \"class\": [this.cx('itemIcon'), this.getItemProp(processedItem, 'icon')]\n }, this.getPTOptions(processedItem, index, 'itemIcon')),\n label: mergeProps({\n \"class\": this.cx('itemLabel')\n }, this.getPTOptions(processedItem, index, 'itemLabel')),\n submenuicon: mergeProps({\n \"class\": this.cx('submenuIcon')\n }, this.getPTOptions(processedItem, index, 'submenuIcon'))\n };\n },\n containerRef: function containerRef(el) {\n this.container = el;\n }\n },\n components: {\n AngleRightIcon: AngleRightIcon\n },\n directives: {\n ripple: Ripple\n }\n};\n\nvar _hoisted_1$1 = [\"tabindex\"];\nvar _hoisted_2 = [\"id\", \"aria-label\", \"aria-disabled\", \"aria-expanded\", \"aria-haspopup\", \"aria-level\", \"aria-setsize\", \"aria-posinset\", \"data-p-active\", \"data-p-focused\", \"data-p-disabled\"];\nvar _hoisted_3 = [\"onClick\", \"onMouseenter\", \"onMousemove\"];\nvar _hoisted_4 = [\"href\", \"target\"];\nvar _hoisted_5 = [\"id\"];\nvar _hoisted_6 = [\"id\"];\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n var _component_AngleRightIcon = resolveComponent(\"AngleRightIcon\");\n var _component_TieredMenuSub = resolveComponent(\"TieredMenuSub\", true);\n var _directive_ripple = resolveDirective(\"ripple\");\n return openBlock(), createBlock(Transition, mergeProps({\n name: \"p-tieredmenu\",\n onEnter: $options.onEnter\n }, _ctx.ptm('menu.transition')), {\n \"default\": withCtx(function () {\n return [($props.level === 0 ? true : $props.visible) ? (openBlock(), createElementBlock(\"ul\", mergeProps({\n key: 0,\n ref: $options.containerRef,\n \"class\": $props.level === 0 ? _ctx.cx('rootList') : _ctx.cx('submenu'),\n tabindex: $props.tabindex\n }, $props.level === 0 ? _ctx.ptm('rootList') : _ctx.ptm('submenu')), [(openBlock(true), createElementBlock(Fragment, null, renderList($props.items, function (processedItem, index) {\n return openBlock(), createElementBlock(Fragment, {\n key: $options.getItemKey(processedItem)\n }, [$options.isItemVisible(processedItem) && !$options.getItemProp(processedItem, 'separator') ? (openBlock(), createElementBlock(\"li\", mergeProps({\n key: 0,\n id: $options.getItemId(processedItem),\n style: $options.getItemProp(processedItem, 'style'),\n \"class\": [_ctx.cx('item', {\n processedItem: processedItem\n }), $options.getItemProp(processedItem, 'class')],\n role: \"menuitem\",\n \"aria-label\": $options.getItemLabel(processedItem),\n \"aria-disabled\": $options.isItemDisabled(processedItem) || undefined,\n \"aria-expanded\": $options.isItemGroup(processedItem) ? $options.isItemActive(processedItem) : undefined,\n \"aria-haspopup\": $options.isItemGroup(processedItem) && !$options.getItemProp(processedItem, 'to') ? 'menu' : undefined,\n \"aria-level\": $props.level + 1,\n \"aria-setsize\": $options.getAriaSetSize(),\n \"aria-posinset\": $options.getAriaPosInset(index),\n ref_for: true\n }, $options.getPTOptions(processedItem, index, 'item'), {\n \"data-p-active\": $options.isItemActive(processedItem),\n \"data-p-focused\": $options.isItemFocused(processedItem),\n \"data-p-disabled\": $options.isItemDisabled(processedItem)\n }), [createElementVNode(\"div\", mergeProps({\n \"class\": _ctx.cx('itemContent'),\n onClick: function onClick($event) {\n return $options.onItemClick($event, processedItem);\n },\n onMouseenter: function onMouseenter($event) {\n return $options.onItemMouseEnter($event, processedItem);\n },\n onMousemove: function onMousemove($event) {\n return $options.onItemMouseMove($event, processedItem);\n },\n ref_for: true\n }, $options.getPTOptions(processedItem, index, 'itemContent')), [!$props.templates.item ? withDirectives((openBlock(), createElementBlock(\"a\", mergeProps({\n key: 0,\n href: $options.getItemProp(processedItem, 'url'),\n \"class\": _ctx.cx('itemLink'),\n target: $options.getItemProp(processedItem, 'target'),\n tabindex: \"-1\",\n ref_for: true\n }, $options.getPTOptions(processedItem, index, 'itemLink')), [$props.templates.itemicon ? (openBlock(), createBlock(resolveDynamicComponent($props.templates.itemicon), {\n key: 0,\n item: processedItem.item,\n \"class\": normalizeClass(_ctx.cx('itemIcon'))\n }, null, 8, [\"item\", \"class\"])) : $options.getItemProp(processedItem, 'icon') ? (openBlock(), createElementBlock(\"span\", mergeProps({\n key: 1,\n \"class\": [_ctx.cx('itemIcon'), $options.getItemProp(processedItem, 'icon')],\n ref_for: true\n }, $options.getPTOptions(processedItem, index, 'itemIcon')), null, 16)) : createCommentVNode(\"\", true), createElementVNode(\"span\", mergeProps({\n id: $options.getItemLabelId(processedItem),\n \"class\": _ctx.cx('itemLabel'),\n ref_for: true\n }, $options.getPTOptions(processedItem, index, 'itemLabel')), toDisplayString($options.getItemLabel(processedItem)), 17, _hoisted_5), $options.getItemProp(processedItem, 'items') ? (openBlock(), createElementBlock(Fragment, {\n key: 2\n }, [$props.templates.submenuicon ? (openBlock(), createBlock(resolveDynamicComponent($props.templates.submenuicon), mergeProps({\n key: 0,\n \"class\": _ctx.cx('submenuIcon'),\n active: $options.isItemActive(processedItem),\n ref_for: true\n }, $options.getPTOptions(processedItem, index, 'submenuIcon')), null, 16, [\"class\", \"active\"])) : (openBlock(), createBlock(_component_AngleRightIcon, mergeProps({\n key: 1,\n \"class\": _ctx.cx('submenuIcon'),\n ref_for: true\n }, $options.getPTOptions(processedItem, index, 'submenuIcon')), null, 16, [\"class\"]))], 64)) : createCommentVNode(\"\", true)], 16, _hoisted_4)), [[_directive_ripple]]) : (openBlock(), createBlock(resolveDynamicComponent($props.templates.item), {\n key: 1,\n item: processedItem.item,\n hasSubmenu: $options.getItemProp(processedItem, 'items'),\n label: $options.getItemLabel(processedItem),\n props: $options.getMenuItemProps(processedItem, index)\n }, null, 8, [\"item\", \"hasSubmenu\", \"label\", \"props\"]))], 16, _hoisted_3), $options.isItemVisible(processedItem) && $options.isItemGroup(processedItem) ? (openBlock(), createBlock(_component_TieredMenuSub, {\n key: 0,\n id: $options.getItemId(processedItem) + '_list',\n style: normalizeStyle(_ctx.sx('submenu', true, {\n processedItem: processedItem\n })),\n \"aria-labelledby\": $options.getItemLabelId(processedItem),\n role: \"menu\",\n menuId: $props.menuId,\n focusedItemId: $props.focusedItemId,\n items: processedItem.items,\n templates: $props.templates,\n activeItemPath: $props.activeItemPath,\n level: $props.level + 1,\n visible: $options.isItemActive(processedItem) && $options.isItemGroup(processedItem),\n pt: _ctx.pt,\n unstyled: _ctx.unstyled,\n onItemClick: _cache[0] || (_cache[0] = function ($event) {\n return _ctx.$emit('item-click', $event);\n }),\n onItemMouseenter: _cache[1] || (_cache[1] = function ($event) {\n return _ctx.$emit('item-mouseenter', $event);\n }),\n onItemMousemove: _cache[2] || (_cache[2] = function ($event) {\n return _ctx.$emit('item-mousemove', $event);\n })\n }, null, 8, [\"id\", \"style\", \"aria-labelledby\", \"menuId\", \"focusedItemId\", \"items\", \"templates\", \"activeItemPath\", \"level\", \"visible\", \"pt\", \"unstyled\"])) : createCommentVNode(\"\", true)], 16, _hoisted_2)) : createCommentVNode(\"\", true), $options.isItemVisible(processedItem) && $options.getItemProp(processedItem, 'separator') ? (openBlock(), createElementBlock(\"li\", mergeProps({\n key: 1,\n id: $options.getItemId(processedItem),\n style: $options.getItemProp(processedItem, 'style'),\n \"class\": [_ctx.cx('separator'), $options.getItemProp(processedItem, 'class')],\n role: \"separator\",\n ref_for: true\n }, _ctx.ptm('separator')), null, 16, _hoisted_6)) : createCommentVNode(\"\", true)], 64);\n }), 128))], 16, _hoisted_1$1)) : createCommentVNode(\"\", true)];\n }),\n _: 1\n }, 16, [\"onEnter\"]);\n}\n\nscript$1.render = render$1;\n\nvar script = {\n name: 'TieredMenu',\n \"extends\": script$2,\n inheritAttrs: false,\n emits: ['focus', 'blur', 'before-show', 'before-hide', 'hide', 'show'],\n outsideClickListener: null,\n scrollHandler: null,\n resizeListener: null,\n target: null,\n container: null,\n menubar: null,\n searchTimeout: null,\n searchValue: null,\n data: function data() {\n return {\n id: this.$attrs.id,\n focused: false,\n focusedItemInfo: {\n index: -1,\n level: 0,\n parentKey: ''\n },\n activeItemPath: [],\n visible: !this.popup,\n submenuVisible: false,\n dirty: false\n };\n },\n watch: {\n '$attrs.id': function $attrsId(newValue) {\n this.id = newValue || UniqueComponentId();\n },\n activeItemPath: function activeItemPath(newPath) {\n if (!this.popup) {\n if (isNotEmpty(newPath)) {\n this.bindOutsideClickListener();\n this.bindResizeListener();\n } else {\n this.unbindOutsideClickListener();\n this.unbindResizeListener();\n }\n }\n }\n },\n mounted: function mounted() {\n this.id = this.id || UniqueComponentId();\n },\n beforeUnmount: function beforeUnmount() {\n this.unbindOutsideClickListener();\n this.unbindResizeListener();\n if (this.scrollHandler) {\n this.scrollHandler.destroy();\n this.scrollHandler = null;\n }\n if (this.container && this.autoZIndex) {\n ZIndex.clear(this.container);\n }\n this.target = null;\n this.container = null;\n },\n methods: {\n getItemProp: function getItemProp(item, name) {\n return item ? resolve(item[name]) : undefined;\n },\n getItemLabel: function getItemLabel(item) {\n return this.getItemProp(item, 'label');\n },\n isItemDisabled: function isItemDisabled(item) {\n return this.getItemProp(item, 'disabled');\n },\n isItemVisible: function isItemVisible(item) {\n return this.getItemProp(item, 'visible') !== false;\n },\n isItemGroup: function isItemGroup(item) {\n return isNotEmpty(this.getItemProp(item, 'items'));\n },\n isItemSeparator: function isItemSeparator(item) {\n return this.getItemProp(item, 'separator');\n },\n getProccessedItemLabel: function getProccessedItemLabel(processedItem) {\n return processedItem ? this.getItemLabel(processedItem.item) : undefined;\n },\n isProccessedItemGroup: function isProccessedItemGroup(processedItem) {\n return processedItem && isNotEmpty(processedItem.items);\n },\n toggle: function toggle(event) {\n this.visible ? this.hide(event, true) : this.show(event);\n },\n show: function show(event, isFocus) {\n if (this.popup) {\n this.$emit('before-show');\n this.visible = true;\n this.target = this.target || event.currentTarget;\n this.relatedTarget = event.relatedTarget || null;\n }\n isFocus && focus(this.menubar);\n },\n hide: function hide(event, isFocus) {\n if (this.popup) {\n this.$emit('before-hide');\n this.visible = false;\n }\n this.activeItemPath = [];\n this.focusedItemInfo = {\n index: -1,\n level: 0,\n parentKey: ''\n };\n isFocus && focus(this.relatedTarget || this.target || this.menubar);\n this.dirty = false;\n },\n onFocus: function onFocus(event) {\n this.focused = true;\n if (!this.popup) {\n this.focusedItemInfo = this.focusedItemInfo.index !== -1 ? this.focusedItemInfo : {\n index: this.findFirstFocusedItemIndex(),\n level: 0,\n parentKey: ''\n };\n }\n this.$emit('focus', event);\n },\n onBlur: function onBlur(event) {\n this.focused = false;\n this.focusedItemInfo = {\n index: -1,\n level: 0,\n parentKey: ''\n };\n this.searchValue = '';\n this.dirty = false;\n this.$emit('blur', event);\n },\n onKeyDown: function onKeyDown(event) {\n if (this.disabled) {\n event.preventDefault();\n return;\n }\n var metaKey = event.metaKey || event.ctrlKey;\n switch (event.code) {\n case 'ArrowDown':\n this.onArrowDownKey(event);\n break;\n case 'ArrowUp':\n this.onArrowUpKey(event);\n break;\n case 'ArrowLeft':\n this.onArrowLeftKey(event);\n break;\n case 'ArrowRight':\n this.onArrowRightKey(event);\n break;\n case 'Home':\n this.onHomeKey(event);\n break;\n case 'End':\n this.onEndKey(event);\n break;\n case 'Space':\n this.onSpaceKey(event);\n break;\n case 'Enter':\n case 'NumpadEnter':\n this.onEnterKey(event);\n break;\n case 'Escape':\n this.onEscapeKey(event);\n break;\n case 'Tab':\n this.onTabKey(event);\n break;\n case 'PageDown':\n case 'PageUp':\n case 'Backspace':\n case 'ShiftLeft':\n case 'ShiftRight':\n //NOOP\n break;\n default:\n if (!metaKey && isPrintableCharacter(event.key)) {\n this.searchItems(event, event.key);\n }\n break;\n }\n },\n onItemChange: function onItemChange(event) {\n var processedItem = event.processedItem,\n isFocus = event.isFocus;\n if (isEmpty(processedItem)) return;\n var index = processedItem.index,\n key = processedItem.key,\n level = processedItem.level,\n parentKey = processedItem.parentKey,\n items = processedItem.items;\n var grouped = isNotEmpty(items);\n var activeItemPath = this.activeItemPath.filter(function (p) {\n return p.parentKey !== parentKey && p.parentKey !== key;\n });\n if (grouped) {\n activeItemPath.push(processedItem);\n this.submenuVisible = true;\n }\n this.focusedItemInfo = {\n index: index,\n level: level,\n parentKey: parentKey\n };\n this.activeItemPath = activeItemPath;\n grouped && (this.dirty = true);\n isFocus && focus(this.menubar);\n },\n onOverlayClick: function onOverlayClick(event) {\n OverlayEventBus.emit('overlay-click', {\n originalEvent: event,\n target: this.target\n });\n },\n onItemClick: function onItemClick(event) {\n var originalEvent = event.originalEvent,\n processedItem = event.processedItem;\n var grouped = this.isProccessedItemGroup(processedItem);\n var root = isEmpty(processedItem.parent);\n var selected = this.isSelected(processedItem);\n if (selected) {\n var index = processedItem.index,\n key = processedItem.key,\n level = processedItem.level,\n parentKey = processedItem.parentKey;\n this.activeItemPath = this.activeItemPath.filter(function (p) {\n return key !== p.key && key.startsWith(p.key);\n });\n this.focusedItemInfo = {\n index: index,\n level: level,\n parentKey: parentKey\n };\n this.dirty = !root;\n focus(this.menubar);\n } else {\n if (grouped) {\n this.onItemChange(event);\n } else {\n var rootProcessedItem = root ? processedItem : this.activeItemPath.find(function (p) {\n return p.parentKey === '';\n });\n this.hide(originalEvent);\n this.changeFocusedItemIndex(originalEvent, rootProcessedItem ? rootProcessedItem.index : -1);\n focus(this.menubar);\n }\n }\n },\n onItemMouseEnter: function onItemMouseEnter(event) {\n if (this.dirty) {\n this.onItemChange(event);\n }\n },\n onItemMouseMove: function onItemMouseMove(event) {\n if (this.focused) {\n this.changeFocusedItemIndex(event, event.processedItem.index);\n }\n },\n onArrowDownKey: function onArrowDownKey(event) {\n var itemIndex = this.focusedItemInfo.index !== -1 ? this.findNextItemIndex(this.focusedItemInfo.index) : this.findFirstFocusedItemIndex();\n this.changeFocusedItemIndex(event, itemIndex);\n event.preventDefault();\n },\n onArrowUpKey: function onArrowUpKey(event) {\n if (event.altKey) {\n if (this.focusedItemInfo.index !== -1) {\n var processedItem = this.visibleItems[this.focusedItemInfo.index];\n var grouped = this.isProccessedItemGroup(processedItem);\n !grouped && this.onItemChange({\n originalEvent: event,\n processedItem: processedItem\n });\n }\n this.popup && this.hide(event, true);\n event.preventDefault();\n } else {\n var itemIndex = this.focusedItemInfo.index !== -1 ? this.findPrevItemIndex(this.focusedItemInfo.index) : this.findLastFocusedItemIndex();\n this.changeFocusedItemIndex(event, itemIndex);\n event.preventDefault();\n }\n },\n onArrowLeftKey: function onArrowLeftKey(event) {\n var _this = this;\n var processedItem = this.visibleItems[this.focusedItemInfo.index];\n var parentItem = this.activeItemPath.find(function (p) {\n return p.key === processedItem.parentKey;\n });\n var root = isEmpty(processedItem.parent);\n if (!root) {\n this.focusedItemInfo = {\n index: -1,\n parentKey: parentItem ? parentItem.parentKey : ''\n };\n this.searchValue = '';\n this.onArrowDownKey(event);\n }\n this.activeItemPath = this.activeItemPath.filter(function (p) {\n return p.parentKey !== _this.focusedItemInfo.parentKey;\n });\n event.preventDefault();\n },\n onArrowRightKey: function onArrowRightKey(event) {\n var processedItem = this.visibleItems[this.focusedItemInfo.index];\n var grouped = this.isProccessedItemGroup(processedItem);\n if (grouped) {\n this.onItemChange({\n originalEvent: event,\n processedItem: processedItem\n });\n this.focusedItemInfo = {\n index: -1,\n parentKey: processedItem.key\n };\n this.searchValue = '';\n this.onArrowDownKey(event);\n }\n event.preventDefault();\n },\n onHomeKey: function onHomeKey(event) {\n this.changeFocusedItemIndex(event, this.findFirstItemIndex());\n event.preventDefault();\n },\n onEndKey: function onEndKey(event) {\n this.changeFocusedItemIndex(event, this.findLastItemIndex());\n event.preventDefault();\n },\n onEnterKey: function onEnterKey(event) {\n if (this.focusedItemInfo.index !== -1) {\n var element = findSingle(this.menubar, \"li[id=\\\"\".concat(\"\".concat(this.focusedItemId), \"\\\"]\"));\n var anchorElement = element && findSingle(element, '[data-pc-section=\"itemlink\"]');\n anchorElement ? anchorElement.click() : element && element.click();\n if (!this.popup) {\n var processedItem = this.visibleItems[this.focusedItemInfo.index];\n var grouped = this.isProccessedItemGroup(processedItem);\n !grouped && (this.focusedItemInfo.index = this.findFirstFocusedItemIndex());\n }\n }\n event.preventDefault();\n },\n onSpaceKey: function onSpaceKey(event) {\n this.onEnterKey(event);\n },\n onEscapeKey: function onEscapeKey(event) {\n if (this.popup || this.focusedItemInfo.level !== 0) {\n var _focusedItemInfo = this.focusedItemInfo;\n this.hide(event, false);\n this.focusedItemInfo = {\n index: Number(_focusedItemInfo.parentKey.split('_')[0]),\n level: 0,\n parentKey: ''\n };\n this.popup && focus(this.target);\n }\n event.preventDefault();\n },\n onTabKey: function onTabKey(event) {\n if (this.focusedItemInfo.index !== -1) {\n var processedItem = this.visibleItems[this.focusedItemInfo.index];\n var grouped = this.isProccessedItemGroup(processedItem);\n !grouped && this.onItemChange({\n originalEvent: event,\n processedItem: processedItem\n });\n }\n this.hide();\n },\n onEnter: function onEnter(el) {\n if (this.autoZIndex) {\n ZIndex.set('menu', el, this.baseZIndex + this.$primevue.config.zIndex.menu);\n }\n addStyle(el, {\n position: 'absolute',\n top: '0',\n left: '0'\n });\n this.alignOverlay();\n focus(this.menubar);\n this.scrollInView();\n },\n onAfterEnter: function onAfterEnter() {\n this.bindOutsideClickListener();\n this.bindScrollListener();\n this.bindResizeListener();\n this.$emit('show');\n },\n onLeave: function onLeave() {\n this.unbindOutsideClickListener();\n this.unbindScrollListener();\n this.unbindResizeListener();\n this.$emit('hide');\n this.container = null;\n this.dirty = false;\n },\n onAfterLeave: function onAfterLeave(el) {\n if (this.autoZIndex) {\n ZIndex.clear(el);\n }\n },\n alignOverlay: function alignOverlay() {\n absolutePosition(this.container, this.target);\n var targetWidth = getOuterWidth(this.target);\n if (targetWidth > getOuterWidth(this.container)) {\n this.container.style.minWidth = getOuterWidth(this.target) + 'px';\n }\n },\n bindOutsideClickListener: function bindOutsideClickListener() {\n var _this2 = this;\n if (!this.outsideClickListener) {\n this.outsideClickListener = function (event) {\n var isOutsideContainer = _this2.container && !_this2.container.contains(event.target);\n var isOutsideTarget = _this2.popup ? !(_this2.target && (_this2.target === event.target || _this2.target.contains(event.target))) : true;\n if (isOutsideContainer && isOutsideTarget) {\n _this2.hide();\n }\n };\n document.addEventListener('click', this.outsideClickListener);\n }\n },\n unbindOutsideClickListener: function unbindOutsideClickListener() {\n if (this.outsideClickListener) {\n document.removeEventListener('click', this.outsideClickListener);\n this.outsideClickListener = null;\n }\n },\n bindScrollListener: function bindScrollListener() {\n var _this3 = this;\n if (!this.scrollHandler) {\n this.scrollHandler = new ConnectedOverlayScrollHandler(this.target, function (event) {\n _this3.hide(event, true);\n });\n }\n this.scrollHandler.bindScrollListener();\n },\n unbindScrollListener: function unbindScrollListener() {\n if (this.scrollHandler) {\n this.scrollHandler.unbindScrollListener();\n }\n },\n bindResizeListener: function bindResizeListener() {\n var _this4 = this;\n if (!this.resizeListener) {\n this.resizeListener = function (event) {\n if (!isTouchDevice()) {\n _this4.hide(event, true);\n }\n };\n window.addEventListener('resize', this.resizeListener);\n }\n },\n unbindResizeListener: function unbindResizeListener() {\n if (this.resizeListener) {\n window.removeEventListener('resize', this.resizeListener);\n this.resizeListener = null;\n }\n },\n isItemMatched: function isItemMatched(processedItem) {\n var _this$getProccessedIt;\n return this.isValidItem(processedItem) && ((_this$getProccessedIt = this.getProccessedItemLabel(processedItem)) === null || _this$getProccessedIt === void 0 ? void 0 : _this$getProccessedIt.toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase()));\n },\n isValidItem: function isValidItem(processedItem) {\n return !!processedItem && !this.isItemDisabled(processedItem.item) && !this.isItemSeparator(processedItem.item) && this.isItemVisible(processedItem.item);\n },\n isValidSelectedItem: function isValidSelectedItem(processedItem) {\n return this.isValidItem(processedItem) && this.isSelected(processedItem);\n },\n isSelected: function isSelected(processedItem) {\n return this.activeItemPath.some(function (p) {\n return p.key === processedItem.key;\n });\n },\n findFirstItemIndex: function findFirstItemIndex() {\n var _this5 = this;\n return this.visibleItems.findIndex(function (processedItem) {\n return _this5.isValidItem(processedItem);\n });\n },\n findLastItemIndex: function findLastItemIndex() {\n var _this6 = this;\n return findLastIndex(this.visibleItems, function (processedItem) {\n return _this6.isValidItem(processedItem);\n });\n },\n findNextItemIndex: function findNextItemIndex(index) {\n var _this7 = this;\n var matchedItemIndex = index < this.visibleItems.length - 1 ? this.visibleItems.slice(index + 1).findIndex(function (processedItem) {\n return _this7.isValidItem(processedItem);\n }) : -1;\n return matchedItemIndex > -1 ? matchedItemIndex + index + 1 : index;\n },\n findPrevItemIndex: function findPrevItemIndex(index) {\n var _this8 = this;\n var matchedItemIndex = index > 0 ? findLastIndex(this.visibleItems.slice(0, index), function (processedItem) {\n return _this8.isValidItem(processedItem);\n }) : -1;\n return matchedItemIndex > -1 ? matchedItemIndex : index;\n },\n findSelectedItemIndex: function findSelectedItemIndex() {\n var _this9 = this;\n return this.visibleItems.findIndex(function (processedItem) {\n return _this9.isValidSelectedItem(processedItem);\n });\n },\n findFirstFocusedItemIndex: function findFirstFocusedItemIndex() {\n var selectedIndex = this.findSelectedItemIndex();\n return selectedIndex < 0 ? this.findFirstItemIndex() : selectedIndex;\n },\n findLastFocusedItemIndex: function findLastFocusedItemIndex() {\n var selectedIndex = this.findSelectedItemIndex();\n return selectedIndex < 0 ? this.findLastItemIndex() : selectedIndex;\n },\n searchItems: function searchItems(event, _char) {\n var _this10 = this;\n this.searchValue = (this.searchValue || '') + _char;\n var itemIndex = -1;\n var matched = false;\n if (this.focusedItemInfo.index !== -1) {\n itemIndex = this.visibleItems.slice(this.focusedItemInfo.index).findIndex(function (processedItem) {\n return _this10.isItemMatched(processedItem);\n });\n itemIndex = itemIndex === -1 ? this.visibleItems.slice(0, this.focusedItemInfo.index).findIndex(function (processedItem) {\n return _this10.isItemMatched(processedItem);\n }) : itemIndex + this.focusedItemInfo.index;\n } else {\n itemIndex = this.visibleItems.findIndex(function (processedItem) {\n return _this10.isItemMatched(processedItem);\n });\n }\n if (itemIndex !== -1) {\n matched = true;\n }\n if (itemIndex === -1 && this.focusedItemInfo.index === -1) {\n itemIndex = this.findFirstFocusedItemIndex();\n }\n if (itemIndex !== -1) {\n this.changeFocusedItemIndex(event, itemIndex);\n }\n if (this.searchTimeout) {\n clearTimeout(this.searchTimeout);\n }\n this.searchTimeout = setTimeout(function () {\n _this10.searchValue = '';\n _this10.searchTimeout = null;\n }, 500);\n return matched;\n },\n changeFocusedItemIndex: function changeFocusedItemIndex(event, index) {\n if (this.focusedItemInfo.index !== index) {\n this.focusedItemInfo.index = index;\n this.scrollInView();\n }\n },\n scrollInView: function scrollInView() {\n var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;\n var id = index !== -1 ? \"\".concat(this.id, \"_\").concat(index) : this.focusedItemId;\n var element = findSingle(this.menubar, \"li[id=\\\"\".concat(id, \"\\\"]\"));\n if (element) {\n element.scrollIntoView && element.scrollIntoView({\n block: 'nearest',\n inline: 'start'\n });\n }\n },\n createProcessedItems: function createProcessedItems(items) {\n var _this11 = this;\n var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var parent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var parentKey = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';\n var processedItems = [];\n items && items.forEach(function (item, index) {\n var key = (parentKey !== '' ? parentKey + '_' : '') + index;\n var newItem = {\n item: item,\n index: index,\n level: level,\n key: key,\n parent: parent,\n parentKey: parentKey\n };\n newItem['items'] = _this11.createProcessedItems(item.items, level + 1, newItem, key);\n processedItems.push(newItem);\n });\n return processedItems;\n },\n containerRef: function containerRef(el) {\n this.container = el;\n },\n menubarRef: function menubarRef(el) {\n this.menubar = el ? el.$el : undefined;\n }\n },\n computed: {\n processedItems: function processedItems() {\n return this.createProcessedItems(this.model || []);\n },\n visibleItems: function visibleItems() {\n var _this12 = this;\n var processedItem = this.activeItemPath.find(function (p) {\n return p.key === _this12.focusedItemInfo.parentKey;\n });\n return processedItem ? processedItem.items : this.processedItems;\n },\n focusedItemId: function focusedItemId() {\n return this.focusedItemInfo.index !== -1 ? \"\".concat(this.id).concat(isNotEmpty(this.focusedItemInfo.parentKey) ? '_' + this.focusedItemInfo.parentKey : '', \"_\").concat(this.focusedItemInfo.index) : null;\n }\n },\n components: {\n TieredMenuSub: script$1,\n Portal: Portal\n }\n};\n\nvar _hoisted_1 = [\"id\"];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n var _component_TieredMenuSub = resolveComponent(\"TieredMenuSub\");\n var _component_Portal = resolveComponent(\"Portal\");\n return openBlock(), createBlock(_component_Portal, {\n appendTo: _ctx.appendTo,\n disabled: !_ctx.popup\n }, {\n \"default\": withCtx(function () {\n return [createVNode(Transition, mergeProps({\n name: \"p-connected-overlay\",\n onEnter: $options.onEnter,\n onAfterEnter: $options.onAfterEnter,\n onLeave: $options.onLeave,\n onAfterLeave: $options.onAfterLeave\n }, _ctx.ptm('transition')), {\n \"default\": withCtx(function () {\n return [$data.visible ? (openBlock(), createElementBlock(\"div\", mergeProps({\n key: 0,\n ref: $options.containerRef,\n id: $data.id,\n \"class\": _ctx.cx('root'),\n onClick: _cache[0] || (_cache[0] = function () {\n return $options.onOverlayClick && $options.onOverlayClick.apply($options, arguments);\n })\n }, _ctx.ptmi('root')), [_ctx.$slots.start ? (openBlock(), createElementBlock(\"div\", mergeProps({\n key: 0,\n \"class\": _ctx.cx('start')\n }, _ctx.ptm('start')), [renderSlot(_ctx.$slots, \"start\")], 16)) : createCommentVNode(\"\", true), createVNode(_component_TieredMenuSub, {\n ref: $options.menubarRef,\n id: $data.id + '_list',\n tabindex: !_ctx.disabled ? _ctx.tabindex : -1,\n role: \"menubar\",\n \"aria-label\": _ctx.ariaLabel,\n \"aria-labelledby\": _ctx.ariaLabelledby,\n \"aria-disabled\": _ctx.disabled || undefined,\n \"aria-orientation\": \"vertical\",\n \"aria-activedescendant\": $data.focused ? $options.focusedItemId : undefined,\n menuId: $data.id,\n focusedItemId: $data.focused ? $options.focusedItemId : undefined,\n items: $options.processedItems,\n templates: _ctx.$slots,\n activeItemPath: $data.activeItemPath,\n level: 0,\n visible: $data.submenuVisible,\n pt: _ctx.pt,\n unstyled: _ctx.unstyled,\n onFocus: $options.onFocus,\n onBlur: $options.onBlur,\n onKeydown: $options.onKeyDown,\n onItemClick: $options.onItemClick,\n onItemMouseenter: $options.onItemMouseEnter,\n onItemMousemove: $options.onItemMouseMove\n }, null, 8, [\"id\", \"tabindex\", \"aria-label\", \"aria-labelledby\", \"aria-disabled\", \"aria-activedescendant\", \"menuId\", \"focusedItemId\", \"items\", \"templates\", \"activeItemPath\", \"visible\", \"pt\", \"unstyled\", \"onFocus\", \"onBlur\", \"onKeydown\", \"onItemClick\", \"onItemMouseenter\", \"onItemMousemove\"]), _ctx.$slots.end ? (openBlock(), createElementBlock(\"div\", mergeProps({\n key: 1,\n \"class\": _ctx.cx('end')\n }, _ctx.ptm('end')), [renderSlot(_ctx.$slots, \"end\")], 16)) : createCommentVNode(\"\", true)], 16, _hoisted_1)) : createCommentVNode(\"\", true)];\n }),\n _: 3\n }, 16, [\"onEnter\", \"onAfterEnter\", \"onLeave\", \"onAfterLeave\"])];\n }),\n _: 3\n }, 8, [\"appendTo\", \"disabled\"]);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-splitbutton {\\n display: inline-flex;\\n position: relative;\\n border-radius: \".concat(dt('splitbutton.border.radius'), \";\\n}\\n\\n.p-splitbutton-button {\\n border-top-right-radius: 0;\\n border-bottom-right-radius: 0;\\n border-right: 0 none;\\n}\\n\\n.p-splitbutton-button:focus-visible,\\n.p-splitbutton-dropdown:focus-visible {\\n z-index: 1;\\n}\\n\\n.p-splitbutton-button:not(:disabled):hover,\\n.p-splitbutton-button:not(:disabled):active {\\n border-right: 0 none;\\n}\\n\\n.p-splitbutton-dropdown {\\n border-top-left-radius: 0;\\n border-bottom-left-radius: 0;\\n}\\n\\n.p-splitbutton .p-menu {\\n min-width: 100%;\\n}\\n\\n.p-splitbutton-fluid {\\n display: flex;\\n}\\n\\n.p-splitbutton-rounded .p-splitbutton-dropdown {\\n border-top-right-radius: \").concat(dt('splitbutton.rounded.border.radius'), \";\\n border-bottom-right-radius: \").concat(dt('splitbutton.rounded.border.radius'), \";\\n}\\n\\n.p-splitbutton-rounded .p-splitbutton-button {\\n border-top-left-radius: \").concat(dt('splitbutton.rounded.border.radius'), \";\\n border-bottom-left-radius: \").concat(dt('splitbutton.rounded.border.radius'), \";\\n}\\n\\n.p-splitbutton-raised {\\n box-shadow: \").concat(dt('splitbutton.raised.shadow'), \";\\n}\\n\");\n};\nvar classes = {\n root: function root(_ref2) {\n var instance = _ref2.instance,\n props = _ref2.props;\n return ['p-splitbutton p-component', {\n 'p-splitbutton-raised': props.raised,\n 'p-splitbutton-rounded': props.rounded,\n 'p-splitbutton-fluid': instance.hasFluid\n }];\n },\n pcButton: 'p-splitbutton-button',\n pcDropdown: 'p-splitbutton-dropdown'\n};\nvar SplitButtonStyle = BaseStyle.extend({\n name: 'splitbutton',\n theme: theme,\n classes: classes\n});\n\nexport { SplitButtonStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import { isEmpty } from '@primeuix/utils/object';\nimport { UniqueComponentId } from '@primevue/core/utils';\nimport ChevronDownIcon from '@primevue/icons/chevrondown';\nimport Button from 'primevue/button';\nimport TieredMenu from 'primevue/tieredmenu';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport SplitButtonStyle from 'primevue/splitbutton/style';\nimport { resolveComponent, openBlock, createElementBlock, mergeProps, createVNode, createSlots, withCtx, renderSlot, normalizeClass, createElementVNode, createBlock, resolveDynamicComponent } from 'vue';\n\nvar script$1 = {\n name: 'BaseSplitButton',\n \"extends\": BaseComponent,\n props: {\n label: {\n type: String,\n \"default\": null\n },\n icon: {\n type: String,\n \"default\": null\n },\n model: {\n type: Array,\n \"default\": null\n },\n autoZIndex: {\n type: Boolean,\n \"default\": true\n },\n baseZIndex: {\n type: Number,\n \"default\": 0\n },\n appendTo: {\n type: [String, Object],\n \"default\": 'body'\n },\n disabled: {\n type: Boolean,\n \"default\": false\n },\n fluid: {\n type: Boolean,\n \"default\": null\n },\n \"class\": {\n type: null,\n \"default\": null\n },\n style: {\n type: null,\n \"default\": null\n },\n buttonProps: {\n type: null,\n \"default\": null\n },\n menuButtonProps: {\n type: null,\n \"default\": null\n },\n menuButtonIcon: {\n type: String,\n \"default\": undefined\n },\n dropdownIcon: {\n type: String,\n \"default\": undefined\n },\n severity: {\n type: String,\n \"default\": null\n },\n raised: {\n type: Boolean,\n \"default\": false\n },\n rounded: {\n type: Boolean,\n \"default\": false\n },\n text: {\n type: Boolean,\n \"default\": false\n },\n outlined: {\n type: Boolean,\n \"default\": false\n },\n size: {\n type: String,\n \"default\": null\n },\n plain: {\n type: Boolean,\n \"default\": false\n }\n },\n style: SplitButtonStyle,\n provide: function provide() {\n return {\n $pcSplitButton: this,\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'SplitButton',\n \"extends\": script$1,\n inheritAttrs: false,\n emits: ['click'],\n inject: {\n $pcFluid: {\n \"default\": null\n }\n },\n data: function data() {\n return {\n id: this.$attrs.id,\n isExpanded: false\n };\n },\n watch: {\n '$attrs.id': function $attrsId(newValue) {\n this.id = newValue || UniqueComponentId();\n }\n },\n mounted: function mounted() {\n var _this = this;\n this.id = this.id || UniqueComponentId();\n this.$watch('$refs.menu.visible', function (newValue) {\n _this.isExpanded = newValue;\n });\n },\n methods: {\n onDropdownButtonClick: function onDropdownButtonClick(event) {\n if (event) {\n event.preventDefault();\n }\n this.$refs.menu.toggle({\n currentTarget: this.$el,\n relatedTarget: this.$refs.button.$el\n });\n this.isExpanded = this.$refs.menu.visible;\n },\n onDropdownKeydown: function onDropdownKeydown(event) {\n if (event.code === 'ArrowDown' || event.code === 'ArrowUp') {\n this.onDropdownButtonClick();\n event.preventDefault();\n }\n },\n onDefaultButtonClick: function onDefaultButtonClick(event) {\n if (this.isExpanded) {\n this.$refs.menu.hide(event);\n }\n this.$emit('click', event);\n }\n },\n computed: {\n containerClass: function containerClass() {\n return [this.cx('root'), this[\"class\"]];\n },\n hasFluid: function hasFluid() {\n return isEmpty(this.fluid) ? !!this.$pcFluid : this.fluid;\n }\n },\n components: {\n PVSButton: Button,\n PVSMenu: TieredMenu,\n ChevronDownIcon: ChevronDownIcon\n }\n};\n\nvar _hoisted_1 = [\"data-p-severity\"];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n var _component_PVSButton = resolveComponent(\"PVSButton\");\n var _component_PVSMenu = resolveComponent(\"PVSMenu\");\n return openBlock(), createElementBlock(\"div\", mergeProps({\n \"class\": $options.containerClass,\n style: _ctx.style\n }, _ctx.ptmi('root'), {\n \"data-p-severity\": _ctx.severity\n }), [createVNode(_component_PVSButton, mergeProps({\n type: \"button\",\n \"class\": _ctx.cx('pcButton'),\n label: _ctx.label,\n disabled: _ctx.disabled,\n severity: _ctx.severity,\n text: _ctx.text,\n icon: _ctx.icon,\n outlined: _ctx.outlined,\n size: _ctx.size,\n fluid: _ctx.fluid,\n \"aria-label\": _ctx.label,\n onClick: $options.onDefaultButtonClick\n }, _ctx.buttonProps, {\n pt: _ctx.ptm('pcButton'),\n unstyled: _ctx.unstyled\n }), createSlots({\n \"default\": withCtx(function () {\n return [renderSlot(_ctx.$slots, \"default\")];\n }),\n _: 2\n }, [_ctx.$slots.icon ? {\n name: \"icon\",\n fn: withCtx(function (slotProps) {\n return [renderSlot(_ctx.$slots, \"icon\", {\n \"class\": normalizeClass(slotProps[\"class\"])\n }, function () {\n return [createElementVNode(\"span\", mergeProps({\n \"class\": [_ctx.icon, slotProps[\"class\"]]\n }, _ctx.ptm('pcButton')['icon'], {\n \"data-pc-section\": \"buttonicon\"\n }), null, 16)];\n })];\n }),\n key: \"0\"\n } : undefined]), 1040, [\"class\", \"label\", \"disabled\", \"severity\", \"text\", \"icon\", \"outlined\", \"size\", \"fluid\", \"aria-label\", \"onClick\", \"pt\", \"unstyled\"]), createVNode(_component_PVSButton, mergeProps({\n ref: \"button\",\n type: \"button\",\n \"class\": _ctx.cx('pcDropdown'),\n disabled: _ctx.disabled,\n \"aria-haspopup\": \"true\",\n \"aria-expanded\": $data.isExpanded,\n \"aria-controls\": $data.id + '_overlay',\n onClick: $options.onDropdownButtonClick,\n onKeydown: $options.onDropdownKeydown,\n severity: _ctx.severity,\n text: _ctx.text,\n outlined: _ctx.outlined,\n size: _ctx.size,\n unstyled: _ctx.unstyled\n }, _ctx.menuButtonProps, {\n pt: _ctx.ptm('pcDropdown')\n }), {\n icon: withCtx(function (slotProps) {\n return [renderSlot(_ctx.$slots, _ctx.$slots.dropdownicon ? 'dropdownicon' : 'menubuttonicon', {\n \"class\": normalizeClass(slotProps[\"class\"])\n }, function () {\n return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.menuButtonIcon || _ctx.dropdownIcon ? 'span' : 'ChevronDownIcon'), mergeProps({\n \"class\": [_ctx.dropdownIcon || _ctx.menuButtonIcon, slotProps[\"class\"]]\n }, _ctx.ptm('pcDropdown')['icon'], {\n \"data-pc-section\": \"menubuttonicon\"\n }), null, 16, [\"class\"]))];\n })];\n }),\n _: 3\n }, 16, [\"class\", \"disabled\", \"aria-expanded\", \"aria-controls\", \"onClick\", \"onKeydown\", \"severity\", \"text\", \"outlined\", \"size\", \"unstyled\", \"pt\"]), createVNode(_component_PVSMenu, {\n ref: \"menu\",\n id: $data.id + '_overlay',\n model: _ctx.model,\n popup: true,\n autoZIndex: _ctx.autoZIndex,\n baseZIndex: _ctx.baseZIndex,\n appendTo: _ctx.appendTo,\n unstyled: _ctx.unstyled,\n pt: _ctx.ptm('pcMenu')\n }, createSlots({\n _: 2\n }, [_ctx.$slots.menuitemicon ? {\n name: \"itemicon\",\n fn: withCtx(function (slotProps) {\n return [renderSlot(_ctx.$slots, \"menuitemicon\", {\n item: slotProps.item,\n \"class\": normalizeClass(slotProps[\"class\"])\n })];\n }),\n key: \"0\"\n } : undefined, _ctx.$slots.item ? {\n name: \"item\",\n fn: withCtx(function (slotProps) {\n return [renderSlot(_ctx.$slots, \"item\", {\n item: slotProps.item,\n hasSubmenu: slotProps.hasSubmenu,\n label: slotProps.label,\n props: slotProps.props\n })];\n }),\n key: \"1\"\n } : undefined]), 1032, [\"id\", \"model\", \"autoZIndex\", \"baseZIndex\", \"appendTo\", \"unstyled\", \"pt\"])], 16, _hoisted_1);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n","\n\n\n\n\n","import {\n useQueueSettingsStore,\n useQueuePendingTaskCountStore\n} from '@/stores/queueStore'\nimport { app } from '@/scripts/app'\nimport { api } from '@/scripts/api'\n\nexport function setupAutoQueueHandler() {\n const queueCountStore = useQueuePendingTaskCountStore()\n const queueSettingsStore = useQueueSettingsStore()\n\n let graphHasChanged = false\n let internalCount = 0 // Use an internal counter here so it is instantly updated when re-queuing\n api.addEventListener('graphChanged', () => {\n if (queueSettingsStore.mode === 'change') {\n if (internalCount) {\n graphHasChanged = true\n } else {\n graphHasChanged = false\n app.queuePrompt(0, queueSettingsStore.batchCount)\n internalCount++\n }\n }\n })\n\n queueCountStore.$subscribe(\n () => {\n internalCount = queueCountStore.count\n if (!internalCount && !app.lastExecutionError) {\n if (\n queueSettingsStore.mode === 'instant' ||\n (queueSettingsStore.mode === 'change' && graphHasChanged)\n ) {\n graphHasChanged = false\n app.queuePrompt(0, queueSettingsStore.batchCount)\n }\n }\n },\n { detached: true }\n )\n}\n","\n\n\n"],"names":["theme","classes","script$1","Badge","provide","script","render","item","BaseComponent","content","showNavigators","ChevronLeftIcon","ChevronRightIcon","_hoisted_1","_hoisted_2","_hoisted_3","createElementVNode","root","inlineStyles","_toConsumableArray","_arrayWithoutHoles","_iterableToArray","_unsupportedIterableToArray","_nonIterableSpread","_arrayLikeToArray","data","mounted","beforeUnmount","panels","onKeydown","getPTOptions","_typeof$1","o","updated","option","_hide","onFocus","onArrowLeftKey","onArrowRightKey","onHomeKey","onEndKey","onPageUpKey","onPageDownKey","onEnterKey","_","scrollInView","id","InputText","VirtualScroller","Portal","ChevronDownIcon","SpinnerIcon","Chip","_typeof","ownKeys","r","_objectSpread","_defineProperty","_toPropertyKey","_toPrimitive","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","onRemove","ref","onClick","_sfc_main","AutoComplete","suggestions","search","comfyApp","repeat","widget","script$2","InfoCircleIcon","CheckIcon","ExclamationTriangleIcon","TimesCircleIcon","TimesIcon","render$1","message","getAriaPosInset","AngleRightIcon","AngleDownIcon","_hoisted_1$1","$attrsId","getItemProp","getItemLabel","isItemDisabled","isItemVisible","isItemGroup","show","hide","onBlur","onKeyDown","activeItemPath","onItemClick","onItemMouseEnter","onItemMouseMove","onArrowDownKey","onArrowUpKey","onEscapeKey","onTabKey","bindOutsideClickListener","unbindOutsideClickListener","bindResizeListener","unbindResizeListener","isSelected","processedItems","BarsIcon","toggle","PlusIcon","MinusIcon","Button","submenu","getItemId","getItemKey","getItemLabelId","isItemActive","isItemFocused","onEnter","getAriaSetSize","getMenuItemProps","containerRef","isItemSeparator","getProccessedItemLabel","isProccessedItemGroup","onItemChange","onOverlayClick","onSpaceKey","onLeave","alignOverlay","bindScrollListener","unbindScrollListener","isItemMatched","isValidItem","isValidSelectedItem","findFirstItemIndex","findLastItemIndex","findNextItemIndex","findPrevItemIndex","findSelectedItemIndex","findFirstFocusedItemIndex","findLastFocusedItemIndex","searchItems","changeFocusedItemIndex","createProcessedItems","menubarRef","visibleItems","focusedItemId","hasFluid","Tiered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AAA,IAAA;AAG3B,UAAM,iBAAiB,6BAAM;AAC3B,YAAM,OAAO,mBAAmB;AAChC,YAAM,IAAI,mBAAmB;AAAA,IAAA,GAFR;AAKvB,UAAM,gBAAgB,6BAAM;AAC1B,YAAM,OAAO,mBAAmB;AAChC,YAAM,IAAI;AAAA,QACR,UAAU;AAAA,QACV,SAAS,EAAE,aAAa;AAAA,QACxB,MAAM;AAAA,MAAA,CACP;AAAA,IAAA,GANmB;AAStB,UAAM,gBAAgB;AACtB,UAAM,wBAAwB;AAC9B,QAAI,gBAAgB,iBAAiB;AACrC,QAAI,gBAAgB,gBAAgB;AACpC,QAAI,gBAAgB,wBAAwB;AAE5C,cAAU,MAAM;AACV,UAAA,iBAAiB,UAAU,QAAQ;AACnC,UAAA,iBAAiB,gBAAgB,cAAc;AAC/C,UAAA,iBAAiB,eAAe,aAAa;AACjD,qBAAe,oBAAoB;AAE/B,UAAA;AACG;eACE,GAAG;AACF,gBAAA,MAAM,mCAAmC,CAAC;AAAA,MACpD;AAAA,IAAA,CACD;AAED,oBAAgB,MAAM;AAChB,UAAA,oBAAoB,UAAU,QAAQ;AACtC,UAAA,oBAAoB,gBAAgB,cAAc;AAClD,UAAA,oBAAoB,eAAe,aAAa;AACpD,qBAAe,sBAAsB;AAAA,IAAA,CACtC;AAED,UAAM,eAAe,6BAAM;AACzB;AAAA,QACE,MAAM;AAGJ,6BAAA,EAAqB;AAGrB,+BAAA,EAAuB;AAKP,4BAAE,kBAAkB,4BAA4B,EAAE;AAGlE,gCAAA,EAAwB;QAC1B;AAAA,QACA,EAAE,SAAS,IAAK;AAAA,MAAA;AAAA,IAClB,GAnBmB;;;;;;;;;;;;","x_google_ignoreList":[1,2,8,9,10,11,13,14,15,16,18,19,27,28,31,32,37,38,40,41,42,43,44,45]} \ No newline at end of file diff --git a/web/assets/GraphView-Cf7ubG48.css b/web/assets/GraphView-CghYAxkP.css similarity index 78% rename from web/assets/GraphView-Cf7ubG48.css rename to web/assets/GraphView-CghYAxkP.css index 959bfde7fa2..43b161bdfea 100644 --- a/web/assets/GraphView-Cf7ubG48.css +++ b/web/assets/GraphView-CghYAxkP.css @@ -45,7 +45,7 @@ --sidebar-icon-size: 1rem; } -.side-tool-bar-container[data-v-37fd2fa4] { +.side-tool-bar-container[data-v-e0812a25] { display: flex; flex-direction: column; align-items: center; @@ -58,28 +58,32 @@ background-color: var(--comfy-menu-bg); color: var(--fg-color); } -.side-tool-bar-end[data-v-37fd2fa4] { +.side-tool-bar-end[data-v-e0812a25] { align-self: flex-end; margin-top: auto; } -[data-v-b49f20b1] .p-splitter-gutter { +[data-v-7c3279c1] .p-splitter-gutter { pointer-events: auto; } -.side-bar-panel[data-v-b49f20b1] { +[data-v-7c3279c1] .p-splitter-gutter:hover,[data-v-7c3279c1] .p-splitter-gutter[data-p-gutter-resizing='true'] { + transition: background-color 0.2s ease 300ms; + background-color: var(--p-primary-color); +} +.side-bar-panel[data-v-7c3279c1] { background-color: var(--bg-color); pointer-events: auto; } -.bottom-panel[data-v-b49f20b1] { +.bottom-panel[data-v-7c3279c1] { background-color: var(--bg-color); pointer-events: auto; } -.splitter-overlay[data-v-b49f20b1] { +.splitter-overlay[data-v-7c3279c1] { pointer-events: none; border-style: none; background-color: transparent; } -.splitter-overlay-root[data-v-b49f20b1] { +.splitter-overlay-root[data-v-7c3279c1] { position: absolute; top: 0px; left: 0px; @@ -146,7 +150,7 @@ align-items: flex-start !important; } -.node-tooltip[data-v-79ec8c53] { +.node-tooltip[data-v-c2e0098f] { background: var(--comfy-input-bg); border-radius: 5px; box-shadow: 0 0 5px rgba(0, 0, 0, 0.4); @@ -162,22 +166,28 @@ z-index: 99999; } -.p-buttongroup-vertical[data-v-444d3768] { +.p-buttongroup-vertical[data-v-94481f39] { display: flex; flex-direction: column; border-radius: var(--p-button-border-radius); overflow: hidden; border: 1px solid var(--p-panel-border-color); } -.p-buttongroup-vertical .p-button[data-v-444d3768] { +.p-buttongroup-vertical .p-button[data-v-94481f39] { margin: 0; border-radius: 0; } -[data-v-84e785b8] .p-togglebutton::before { +.comfy-menu-hamburger[data-v-2ddd26e8] { + pointer-events: auto; + position: fixed; + z-index: 9999; +} + +[data-v-9eb975c3] .p-togglebutton::before { display: none } -[data-v-84e785b8] .p-togglebutton { +[data-v-9eb975c3] .p-togglebutton { position: relative; flex-shrink: 0; border-radius: 0px; @@ -185,14 +195,14 @@ padding-left: 0.5rem; padding-right: 0.5rem } -[data-v-84e785b8] .p-togglebutton.p-togglebutton-checked { +[data-v-9eb975c3] .p-togglebutton.p-togglebutton-checked { border-bottom-width: 2px; border-bottom-color: var(--p-button-text-primary-color) } -[data-v-84e785b8] .p-togglebutton-checked .close-button,[data-v-84e785b8] .p-togglebutton:hover .close-button { +[data-v-9eb975c3] .p-togglebutton-checked .close-button,[data-v-9eb975c3] .p-togglebutton:hover .close-button { visibility: visible } -.status-indicator[data-v-84e785b8] { +.status-indicator[data-v-9eb975c3] { position: absolute; font-weight: 700; font-size: 1.5rem; @@ -200,10 +210,10 @@ left: 50%; transform: translate(-50%, -50%) } -[data-v-84e785b8] .p-togglebutton:hover .status-indicator { +[data-v-9eb975c3] .p-togglebutton:hover .status-indicator { display: none } -[data-v-84e785b8] .p-togglebutton .close-button { +[data-v-9eb975c3] .p-togglebutton .close-button { visibility: hidden } @@ -226,35 +236,35 @@ border-bottom-left-radius: 0; } -.comfyui-queue-button[data-v-2b80bf74] .p-splitbutton-dropdown { +.comfyui-queue-button[data-v-95bc9be0] .p-splitbutton-dropdown { border-top-right-radius: 0; border-bottom-right-radius: 0; } -.actionbar[data-v-2e54db00] { +.actionbar[data-v-eb6e9acf] { pointer-events: all; position: fixed; z-index: 1000; } -.actionbar.is-docked[data-v-2e54db00] { +.actionbar.is-docked[data-v-eb6e9acf] { position: static; border-style: none; background-color: transparent; padding: 0px; } -.actionbar.is-dragging[data-v-2e54db00] { +.actionbar.is-dragging[data-v-eb6e9acf] { -webkit-user-select: none; -moz-user-select: none; user-select: none; } -[data-v-2e54db00] .p-panel-content { +[data-v-eb6e9acf] .p-panel-content { padding: 0.25rem; } -[data-v-2e54db00] .p-panel-header { +[data-v-eb6e9acf] .p-panel-header { display: none; } -.comfyui-menu[data-v-ad2c662b] { +.comfyui-menu[data-v-d84a704d] { width: 100vw; background: var(--comfy-menu-bg); color: var(--fg-color); @@ -266,13 +276,13 @@ grid-column: 1/-1; max-height: 90vh; } -.comfyui-menu.dropzone[data-v-ad2c662b] { +.comfyui-menu.dropzone[data-v-d84a704d] { background: var(--p-highlight-background); } -.comfyui-menu.dropzone-active[data-v-ad2c662b] { +.comfyui-menu.dropzone-active[data-v-d84a704d] { background: var(--p-highlight-background-focus); } -.comfyui-logo[data-v-ad2c662b] { +.comfyui-logo[data-v-d84a704d] { font-size: 1.2em; -webkit-user-select: none; -moz-user-select: none; diff --git a/web/assets/InstallView-BRgBqWtQ.js b/web/assets/InstallView-BRgBqWtQ.js new file mode 100644 index 00000000000..50d489ead74 --- /dev/null +++ b/web/assets/InstallView-BRgBqWtQ.js @@ -0,0 +1,1048 @@ +var __defProp = Object.defineProperty; +var __name = (target, value2) => __defProp(target, "name", { value: value2, configurable: true }); +import { B as BaseStyle, R as script$8, ad as UniqueComponentId, g as openBlock, h as createElementBlock, m as mergeProps, p as renderSlot, j as createCommentVNode, bM as findIndexInList, bN as find, l as resolveComponent, x as createBlock, J as resolveDynamicComponent, y as withCtx, A as createBaseVNode, a6 as toDisplayString, C as normalizeClass, V as findSingle, N as Fragment, au as Transition, v as withDirectives, ab as vShow, d as defineComponent, aD as useI18n, bO as useModel, r as ref, o as onMounted, t as resolveDirective, i as createVNode, z as unref, ao as script$9, bP as script$a, bQ as script$b, D as script$c, aw as createTextVNode, bR as script$d, bL as electronAPI, q as computed, aJ as watchEffect, O as renderList, bi as withModifiers, bS as script$e, bT as script$f, bG as script$g, aH as script$h, bU as useRouter, P as pushScopeId, Q as popScopeId, aK as toRaw, _ as _export_sfc } from "./index-BFF4Dqtc.js"; +import { r } from "./index-B4gmhi99.js"; +var theme = /* @__PURE__ */ __name(function theme2(_ref) { + var dt = _ref.dt; + return "\n.p-steplist {\n position: relative;\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin: 0;\n padding: 0;\n list-style-type: none;\n overflow-x: auto;\n}\n\n.p-step {\n position: relative;\n display: flex;\n flex: 1 1 auto;\n align-items: center;\n gap: ".concat(dt("stepper.step.gap"), ";\n padding: ").concat(dt("stepper.step.padding"), ";\n}\n\n.p-step:last-of-type {\n flex: initial;\n}\n\n.p-step-header {\n border: 0 none;\n display: inline-flex;\n align-items: center;\n text-decoration: none;\n cursor: pointer;\n transition: background ").concat(dt("stepper.transition.duration"), ", color ").concat(dt("stepper.transition.duration"), ", border-color ").concat(dt("stepper.transition.duration"), ", outline-color ").concat(dt("stepper.transition.duration"), ", box-shadow ").concat(dt("stepper.transition.duration"), ";\n border-radius: ").concat(dt("stepper.step.header.border.radius"), ";\n outline-color: transparent;\n background: transparent;\n padding: ").concat(dt("stepper.step.header.padding"), ";\n gap: ").concat(dt("stepper.step.header.gap"), ";\n}\n\n.p-step-header:focus-visible {\n box-shadow: ").concat(dt("stepper.step.header.focus.ring.shadow"), ";\n outline: ").concat(dt("stepper.step.header.focus.ring.width"), " ").concat(dt("stepper.step.header.focus.ring.style"), " ").concat(dt("stepper.step.header.focus.ring.color"), ";\n outline-offset: ").concat(dt("stepper.step.header.focus.ring.offset"), ";\n}\n\n.p-stepper.p-stepper-readonly .p-step {\n cursor: auto;\n}\n\n.p-step-title {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 100%;\n color: ").concat(dt("stepper.step.title.color"), ";\n font-weight: ").concat(dt("stepper.step.title.font.weight"), ";\n transition: background ").concat(dt("stepper.transition.duration"), ", color ").concat(dt("stepper.transition.duration"), ", border-color ").concat(dt("stepper.transition.duration"), ", box-shadow ").concat(dt("stepper.transition.duration"), ", outline-color ").concat(dt("stepper.transition.duration"), ";\n}\n\n.p-step-number {\n display: flex;\n align-items: center;\n justify-content: center;\n color: ").concat(dt("stepper.step.number.color"), ";\n border: 2px solid ").concat(dt("stepper.step.number.border.color"), ";\n background: ").concat(dt("stepper.step.number.background"), ";\n min-width: ").concat(dt("stepper.step.number.size"), ";\n height: ").concat(dt("stepper.step.number.size"), ";\n line-height: ").concat(dt("stepper.step.number.size"), ";\n font-size: ").concat(dt("stepper.step.number.font.size"), ";\n z-index: 1;\n border-radius: ").concat(dt("stepper.step.number.border.radius"), ";\n position: relative;\n font-weight: ").concat(dt("stepper.step.number.font.weight"), ';\n}\n\n.p-step-number::after {\n content: " ";\n position: absolute;\n width: 100%;\n height: 100%;\n border-radius: ').concat(dt("stepper.step.number.border.radius"), ";\n box-shadow: ").concat(dt("stepper.step.number.shadow"), ";\n}\n\n.p-step-active .p-step-header {\n cursor: default;\n}\n\n.p-step-active .p-step-number {\n background: ").concat(dt("stepper.step.number.active.background"), ";\n border-color: ").concat(dt("stepper.step.number.active.border.color"), ";\n color: ").concat(dt("stepper.step.number.active.color"), ";\n}\n\n.p-step-active .p-step-title {\n color: ").concat(dt("stepper.step.title.active.color"), ";\n}\n\n.p-step:not(.p-disabled):focus-visible {\n outline: ").concat(dt("focus.ring.width"), " ").concat(dt("focus.ring.style"), " ").concat(dt("focus.ring.color"), ";\n outline-offset: ").concat(dt("focus.ring.offset"), ";\n}\n\n.p-step:has(~ .p-step-active) .p-stepper-separator {\n background: ").concat(dt("stepper.separator.active.background"), ";\n}\n\n.p-stepper-separator {\n flex: 1 1 0;\n background: ").concat(dt("stepper.separator.background"), ";\n width: 100%;\n height: ").concat(dt("stepper.separator.size"), ";\n transition: background ").concat(dt("stepper.transition.duration"), ", color ").concat(dt("stepper.transition.duration"), ", border-color ").concat(dt("stepper.transition.duration"), ", box-shadow ").concat(dt("stepper.transition.duration"), ", outline-color ").concat(dt("stepper.transition.duration"), ";\n}\n\n.p-steppanels {\n padding: ").concat(dt("stepper.steppanels.padding"), ";\n}\n\n.p-steppanel {\n background: ").concat(dt("stepper.steppanel.background"), ";\n color: ").concat(dt("stepper.steppanel.color"), ";\n}\n\n.p-stepper:has(.p-stepitem) {\n display: flex;\n flex-direction: column;\n}\n\n.p-stepitem {\n display: flex;\n flex-direction: column;\n flex: initial;\n}\n\n.p-stepitem.p-stepitem-active {\n flex: 1 1 auto;\n}\n\n.p-stepitem .p-step {\n flex: initial;\n}\n\n.p-stepitem .p-steppanel-content {\n width: 100%;\n padding: ").concat(dt("stepper.steppanel.padding"), ";\n}\n\n.p-stepitem .p-steppanel {\n display: flex;\n flex: 1 1 auto;\n}\n\n.p-stepitem .p-stepper-separator {\n flex: 0 0 auto;\n width: ").concat(dt("stepper.separator.size"), ";\n height: auto;\n margin: ").concat(dt("stepper.separator.margin"), ";\n position: relative;\n left: calc(-1 * ").concat(dt("stepper.separator.size"), ");\n}\n\n.p-stepitem:has(~ .p-stepitem-active) .p-stepper-separator {\n background: ").concat(dt("stepper.separator.active.background"), ";\n}\n\n.p-stepitem:last-of-type .p-steppanel {\n padding-inline-start: ").concat(dt("stepper.step.number.size"), ";\n}\n"); +}, "theme"); +var classes$4 = { + root: /* @__PURE__ */ __name(function root(_ref2) { + var props = _ref2.props; + return ["p-stepper p-component", { + "p-readonly": props.linear + }]; + }, "root"), + separator: "p-stepper-separator" +}; +var StepperStyle = BaseStyle.extend({ + name: "stepper", + theme, + classes: classes$4 +}); +var script$1$4 = { + name: "BaseStepper", + "extends": script$8, + props: { + value: { + type: [String, Number], + "default": void 0 + }, + linear: { + type: Boolean, + "default": false + } + }, + style: StepperStyle, + provide: /* @__PURE__ */ __name(function provide() { + return { + $pcStepper: this, + $parentInstance: this + }; + }, "provide") +}; +var script$7 = { + name: "Stepper", + "extends": script$1$4, + inheritAttrs: false, + emits: ["update:value"], + data: /* @__PURE__ */ __name(function data() { + return { + id: this.$attrs.id, + d_value: this.value + }; + }, "data"), + watch: { + "$attrs.id": /* @__PURE__ */ __name(function $attrsId(newValue) { + this.id = newValue || UniqueComponentId(); + }, "$attrsId"), + value: /* @__PURE__ */ __name(function value(newValue) { + this.d_value = newValue; + }, "value") + }, + mounted: /* @__PURE__ */ __name(function mounted() { + this.id = this.id || UniqueComponentId(); + }, "mounted"), + methods: { + updateValue: /* @__PURE__ */ __name(function updateValue(newValue) { + if (this.d_value !== newValue) { + this.d_value = newValue; + this.$emit("update:value", newValue); + } + }, "updateValue"), + isStepActive: /* @__PURE__ */ __name(function isStepActive(value2) { + return this.d_value === value2; + }, "isStepActive"), + isStepDisabled: /* @__PURE__ */ __name(function isStepDisabled() { + return this.linear; + }, "isStepDisabled") + } +}; +function render$5(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("root"), + role: "tablist" + }, _ctx.ptmi("root")), [_ctx.$slots.start ? renderSlot(_ctx.$slots, "start", { + key: 0 + }) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default"), _ctx.$slots.end ? renderSlot(_ctx.$slots, "end", { + key: 1 + }) : createCommentVNode("", true)], 16); +} +__name(render$5, "render$5"); +script$7.render = render$5; +var classes$3 = { + root: "p-steplist" +}; +var StepListStyle = BaseStyle.extend({ + name: "steplist", + classes: classes$3 +}); +var script$1$3 = { + name: "BaseStepList", + "extends": script$8, + style: StepListStyle, + provide: /* @__PURE__ */ __name(function provide2() { + return { + $pcStepList: this, + $parentInstance: this + }; + }, "provide") +}; +var script$6 = { + name: "StepList", + "extends": script$1$3, + inheritAttrs: false +}; +function render$4(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("root") + }, _ctx.ptmi("root")), [renderSlot(_ctx.$slots, "default")], 16); +} +__name(render$4, "render$4"); +script$6.render = render$4; +var classes$2 = { + root: "p-steppanels" +}; +var StepPanelsStyle = BaseStyle.extend({ + name: "steppanels", + classes: classes$2 +}); +var script$1$2 = { + name: "BaseStepPanels", + "extends": script$8, + style: StepPanelsStyle, + provide: /* @__PURE__ */ __name(function provide3() { + return { + $pcStepPanels: this, + $parentInstance: this + }; + }, "provide") +}; +var script$5 = { + name: "StepPanels", + "extends": script$1$2, + inheritAttrs: false +}; +function render$3(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("div", mergeProps({ + "class": _ctx.cx("root") + }, _ctx.ptmi("root")), [renderSlot(_ctx.$slots, "default")], 16); +} +__name(render$3, "render$3"); +script$5.render = render$3; +var classes$1 = { + root: /* @__PURE__ */ __name(function root2(_ref) { + var instance = _ref.instance; + return ["p-step", { + "p-step-active": instance.active, + "p-disabled": instance.isStepDisabled + }]; + }, "root"), + header: "p-step-header", + number: "p-step-number", + title: "p-step-title" +}; +var StepStyle = BaseStyle.extend({ + name: "step", + classes: classes$1 +}); +var script$2$1 = { + name: "StepperSeparator", + hostName: "Stepper", + "extends": script$8 +}; +function render$1$1(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("span", mergeProps({ + "class": _ctx.cx("separator") + }, _ctx.ptm("separator")), null, 16); +} +__name(render$1$1, "render$1$1"); +script$2$1.render = render$1$1; +var script$1$1 = { + name: "BaseStep", + "extends": script$8, + props: { + value: { + type: [String, Number], + "default": void 0 + }, + disabled: { + type: Boolean, + "default": false + }, + asChild: { + type: Boolean, + "default": false + }, + as: { + type: [String, Object], + "default": "DIV" + } + }, + style: StepStyle, + provide: /* @__PURE__ */ __name(function provide4() { + return { + $pcStep: this, + $parentInstance: this + }; + }, "provide") +}; +var script$4 = { + name: "Step", + "extends": script$1$1, + inheritAttrs: false, + inject: { + $pcStepper: { + "default": null + }, + $pcStepList: { + "default": null + }, + $pcStepItem: { + "default": null + } + }, + data: /* @__PURE__ */ __name(function data2() { + return { + isSeparatorVisible: false + }; + }, "data"), + mounted: /* @__PURE__ */ __name(function mounted2() { + if (this.$el && this.$pcStepList) { + var index = findIndexInList(this.$el, find(this.$pcStepper.$el, '[data-pc-name="step"]')); + var stepLen = find(this.$pcStepper.$el, '[data-pc-name="step"]').length; + this.isSeparatorVisible = index !== stepLen - 1; + } + }, "mounted"), + methods: { + getPTOptions: /* @__PURE__ */ __name(function getPTOptions(key) { + var _ptm = key === "root" ? this.ptmi : this.ptm; + return _ptm(key, { + context: { + active: this.active, + disabled: this.isStepDisabled + } + }); + }, "getPTOptions"), + onStepClick: /* @__PURE__ */ __name(function onStepClick() { + this.$pcStepper.updateValue(this.activeValue); + }, "onStepClick") + }, + computed: { + active: /* @__PURE__ */ __name(function active() { + return this.$pcStepper.isStepActive(this.activeValue); + }, "active"), + activeValue: /* @__PURE__ */ __name(function activeValue() { + var _this$$pcStepItem; + return !!this.$pcStepItem ? (_this$$pcStepItem = this.$pcStepItem) === null || _this$$pcStepItem === void 0 ? void 0 : _this$$pcStepItem.value : this.value; + }, "activeValue"), + isStepDisabled: /* @__PURE__ */ __name(function isStepDisabled2() { + return !this.active && (this.$pcStepper.isStepDisabled() || this.disabled); + }, "isStepDisabled"), + id: /* @__PURE__ */ __name(function id() { + var _this$$pcStepper; + return "".concat((_this$$pcStepper = this.$pcStepper) === null || _this$$pcStepper === void 0 ? void 0 : _this$$pcStepper.id, "_step_").concat(this.activeValue); + }, "id"), + ariaControls: /* @__PURE__ */ __name(function ariaControls() { + var _this$$pcStepper2; + return "".concat((_this$$pcStepper2 = this.$pcStepper) === null || _this$$pcStepper2 === void 0 ? void 0 : _this$$pcStepper2.id, "_steppanel_").concat(this.activeValue); + }, "ariaControls"), + a11yAttrs: /* @__PURE__ */ __name(function a11yAttrs() { + return { + root: { + role: "presentation", + "aria-current": this.active ? "step" : void 0, + "data-pc-name": "step", + "data-pc-section": "root", + "data-p-disabled": this.disabled, + "data-p-active": this.active + }, + header: { + id: this.id, + role: "tab", + taindex: this.disabled ? -1 : void 0, + "aria-controls": this.ariaControls, + "data-pc-section": "header", + disabled: this.disabled, + onClick: this.onStepClick + } + }; + }, "a11yAttrs") + }, + components: { + StepperSeparator: script$2$1 + } +}; +var _hoisted_1$4 = ["id", "tabindex", "aria-controls", "disabled"]; +function render$2(_ctx, _cache, $props, $setup, $data, $options) { + var _component_StepperSeparator = resolveComponent("StepperSeparator"); + return !_ctx.asChild ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps({ + key: 0, + "class": _ctx.cx("root"), + "aria-current": $options.active ? "step" : void 0, + role: "presentation", + "data-p-active": $options.active, + "data-p-disabled": $options.isStepDisabled + }, $options.getPTOptions("root")), { + "default": withCtx(function() { + return [createBaseVNode("button", mergeProps({ + id: $options.id, + "class": _ctx.cx("header"), + role: "tab", + type: "button", + tabindex: $options.isStepDisabled ? -1 : void 0, + "aria-controls": $options.ariaControls, + disabled: $options.isStepDisabled, + onClick: _cache[0] || (_cache[0] = function() { + return $options.onStepClick && $options.onStepClick.apply($options, arguments); + }) + }, $options.getPTOptions("header")), [createBaseVNode("span", mergeProps({ + "class": _ctx.cx("number") + }, $options.getPTOptions("number")), toDisplayString($options.activeValue), 17), createBaseVNode("span", mergeProps({ + "class": _ctx.cx("title") + }, $options.getPTOptions("title")), [renderSlot(_ctx.$slots, "default")], 16)], 16, _hoisted_1$4), $data.isSeparatorVisible ? (openBlock(), createBlock(_component_StepperSeparator, { + key: 0 + })) : createCommentVNode("", true)]; + }), + _: 3 + }, 16, ["class", "aria-current", "data-p-active", "data-p-disabled"])) : renderSlot(_ctx.$slots, "default", { + key: 1, + "class": normalizeClass(_ctx.cx("root")), + active: $options.active, + value: _ctx.value, + a11yAttrs: $options.a11yAttrs, + activateCallback: $options.onStepClick + }); +} +__name(render$2, "render$2"); +script$4.render = render$2; +var classes = { + root: /* @__PURE__ */ __name(function root3(_ref) { + var instance = _ref.instance; + return ["p-steppanel", { + "p-steppanel-active": instance.isVertical && instance.active + }]; + }, "root"), + content: "p-steppanel-content" +}; +var StepPanelStyle = BaseStyle.extend({ + name: "steppanel", + classes +}); +var script$2 = { + name: "StepperSeparator", + hostName: "Stepper", + "extends": script$8 +}; +function render$1(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("span", mergeProps({ + "class": _ctx.cx("separator") + }, _ctx.ptm("separator")), null, 16); +} +__name(render$1, "render$1"); +script$2.render = render$1; +var script$1 = { + name: "BaseStepPanel", + "extends": script$8, + props: { + value: { + type: [String, Number], + "default": void 0 + }, + asChild: { + type: Boolean, + "default": false + }, + as: { + type: [String, Object], + "default": "DIV" + } + }, + style: StepPanelStyle, + provide: /* @__PURE__ */ __name(function provide5() { + return { + $pcStepPanel: this, + $parentInstance: this + }; + }, "provide") +}; +var script$3 = { + name: "StepPanel", + "extends": script$1, + inheritAttrs: false, + inject: { + $pcStepper: { + "default": null + }, + $pcStepItem: { + "default": null + }, + $pcStepList: { + "default": null + } + }, + data: /* @__PURE__ */ __name(function data3() { + return { + isSeparatorVisible: false + }; + }, "data"), + mounted: /* @__PURE__ */ __name(function mounted3() { + if (this.$el) { + var _this$$pcStepItem, _this$$pcStepList; + var stepElements = find(this.$pcStepper.$el, '[data-pc-name="step"]'); + var stepPanelEl = findSingle(this.isVertical ? (_this$$pcStepItem = this.$pcStepItem) === null || _this$$pcStepItem === void 0 ? void 0 : _this$$pcStepItem.$el : (_this$$pcStepList = this.$pcStepList) === null || _this$$pcStepList === void 0 ? void 0 : _this$$pcStepList.$el, '[data-pc-name="step"]'); + var stepPanelIndex = findIndexInList(stepPanelEl, stepElements); + this.isSeparatorVisible = this.isVertical && stepPanelIndex !== stepElements.length - 1; + } + }, "mounted"), + methods: { + getPTOptions: /* @__PURE__ */ __name(function getPTOptions2(key) { + var _ptm = key === "root" ? this.ptmi : this.ptm; + return _ptm(key, { + context: { + active: this.active + } + }); + }, "getPTOptions"), + updateValue: /* @__PURE__ */ __name(function updateValue2(val) { + this.$pcStepper.updateValue(val); + }, "updateValue") + }, + computed: { + active: /* @__PURE__ */ __name(function active2() { + var _this$$pcStepItem2, _this$$pcStepper; + var activeValue3 = !!this.$pcStepItem ? (_this$$pcStepItem2 = this.$pcStepItem) === null || _this$$pcStepItem2 === void 0 ? void 0 : _this$$pcStepItem2.value : this.value; + return activeValue3 === ((_this$$pcStepper = this.$pcStepper) === null || _this$$pcStepper === void 0 ? void 0 : _this$$pcStepper.d_value); + }, "active"), + isVertical: /* @__PURE__ */ __name(function isVertical() { + return !!this.$pcStepItem; + }, "isVertical"), + activeValue: /* @__PURE__ */ __name(function activeValue2() { + var _this$$pcStepItem3; + return this.isVertical ? (_this$$pcStepItem3 = this.$pcStepItem) === null || _this$$pcStepItem3 === void 0 ? void 0 : _this$$pcStepItem3.value : this.value; + }, "activeValue"), + id: /* @__PURE__ */ __name(function id2() { + var _this$$pcStepper2; + return "".concat((_this$$pcStepper2 = this.$pcStepper) === null || _this$$pcStepper2 === void 0 ? void 0 : _this$$pcStepper2.id, "_steppanel_").concat(this.activeValue); + }, "id"), + ariaControls: /* @__PURE__ */ __name(function ariaControls2() { + var _this$$pcStepper3; + return "".concat((_this$$pcStepper3 = this.$pcStepper) === null || _this$$pcStepper3 === void 0 ? void 0 : _this$$pcStepper3.id, "_step_").concat(this.activeValue); + }, "ariaControls"), + a11yAttrs: /* @__PURE__ */ __name(function a11yAttrs2() { + return { + id: this.id, + role: "tabpanel", + "aria-controls": this.ariaControls, + "data-pc-name": "steppanel", + "data-p-active": this.active + }; + }, "a11yAttrs") + }, + components: { + StepperSeparator: script$2 + } +}; +function render(_ctx, _cache, $props, $setup, $data, $options) { + var _component_StepperSeparator = resolveComponent("StepperSeparator"); + return $options.isVertical ? (openBlock(), createElementBlock(Fragment, { + key: 0 + }, [!_ctx.asChild ? (openBlock(), createBlock(Transition, mergeProps({ + key: 0, + name: "p-toggleable-content" + }, _ctx.ptm("transition")), { + "default": withCtx(function() { + return [withDirectives((openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps({ + id: $options.id, + "class": _ctx.cx("root"), + role: "tabpanel", + "aria-controls": $options.ariaControls + }, $options.getPTOptions("root")), { + "default": withCtx(function() { + return [$data.isSeparatorVisible ? (openBlock(), createBlock(_component_StepperSeparator, { + key: 0 + })) : createCommentVNode("", true), createBaseVNode("div", mergeProps({ + "class": _ctx.cx("content") + }, $options.getPTOptions("content")), [renderSlot(_ctx.$slots, "default", { + active: $options.active, + activateCallback: /* @__PURE__ */ __name(function activateCallback(val) { + return $options.updateValue(val); + }, "activateCallback") + })], 16)]; + }), + _: 3 + }, 16, ["id", "class", "aria-controls"])), [[vShow, $options.active]])]; + }), + _: 3 + }, 16)) : renderSlot(_ctx.$slots, "default", { + key: 1, + active: $options.active, + a11yAttrs: $options.a11yAttrs, + activateCallback: /* @__PURE__ */ __name(function activateCallback(val) { + return $options.updateValue(val); + }, "activateCallback") + })], 64)) : (openBlock(), createElementBlock(Fragment, { + key: 1 + }, [!_ctx.asChild ? withDirectives((openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps({ + key: 0, + id: $options.id, + "class": _ctx.cx("root"), + role: "tabpanel", + "aria-controls": $options.ariaControls + }, $options.getPTOptions("root")), { + "default": withCtx(function() { + return [renderSlot(_ctx.$slots, "default", { + active: $options.active, + activateCallback: /* @__PURE__ */ __name(function activateCallback(val) { + return $options.updateValue(val); + }, "activateCallback") + })]; + }), + _: 3 + }, 16, ["id", "class", "aria-controls"])), [[vShow, $options.active]]) : _ctx.asChild && $options.active ? renderSlot(_ctx.$slots, "default", { + key: 1, + active: $options.active, + a11yAttrs: $options.a11yAttrs, + activateCallback: /* @__PURE__ */ __name(function activateCallback(val) { + return $options.updateValue(val); + }, "activateCallback") + }) : createCommentVNode("", true)], 64)); +} +__name(render, "render"); +script$3.render = render; +const _hoisted_1$3 = { class: "flex flex-col gap-6 w-[600px]" }; +const _hoisted_2$3 = { class: "flex flex-col gap-4" }; +const _hoisted_3$3 = { class: "text-2xl font-semibold text-neutral-100" }; +const _hoisted_4$3 = { class: "text-neutral-400 my-0" }; +const _hoisted_5$2 = { class: "flex gap-2" }; +const _hoisted_6$2 = { class: "bg-neutral-800 p-4 rounded-lg" }; +const _hoisted_7$2 = { class: "text-lg font-medium mt-0 mb-3 text-neutral-100" }; +const _hoisted_8$2 = { class: "flex flex-col gap-2" }; +const _hoisted_9$2 = { class: "flex items-center gap-2" }; +const _hoisted_10$2 = /* @__PURE__ */ createBaseVNode("i", { class: "pi pi-folder text-neutral-400" }, null, -1); +const _hoisted_11$2 = /* @__PURE__ */ createBaseVNode("span", { class: "text-neutral-400" }, "App Data:", -1); +const _hoisted_12$2 = { class: "text-neutral-200" }; +const _hoisted_13$1 = { class: "pi pi-info-circle" }; +const _hoisted_14$1 = { class: "flex items-center gap-2" }; +const _hoisted_15$1 = /* @__PURE__ */ createBaseVNode("i", { class: "pi pi-desktop text-neutral-400" }, null, -1); +const _hoisted_16$1 = /* @__PURE__ */ createBaseVNode("span", { class: "text-neutral-400" }, "App Path:", -1); +const _hoisted_17$1 = { class: "text-neutral-200" }; +const _hoisted_18$1 = { class: "pi pi-info-circle" }; +const _sfc_main$3 = /* @__PURE__ */ defineComponent({ + __name: "InstallLocationPicker", + props: { + "installPath": { required: true }, + "installPathModifiers": {}, + "pathError": { required: true }, + "pathErrorModifiers": {} + }, + emits: ["update:installPath", "update:pathError"], + setup(__props) { + const { t } = useI18n(); + const installPath = useModel(__props, "installPath"); + const pathError = useModel(__props, "pathError"); + const appData = ref(""); + const appPath = ref(""); + const electron = electronAPI(); + onMounted(async () => { + const paths = await electron.getSystemPaths(); + appData.value = paths.appData; + appPath.value = paths.appPath; + installPath.value = paths.defaultInstallPath; + }); + const validatePath = /* @__PURE__ */ __name(async () => { + try { + pathError.value = ""; + const validation = await electron.validateInstallPath(installPath.value); + if (!validation.isValid) { + pathError.value = validation.error; + } + } catch (error) { + pathError.value = t("install.pathValidationFailed"); + } + }, "validatePath"); + const browsePath = /* @__PURE__ */ __name(async () => { + try { + const result = await electron.showDirectoryPicker(); + if (result) { + installPath.value = result; + await validatePath(); + } + } catch (error) { + pathError.value = t("install.failedToSelectDirectory"); + } + }, "browsePath"); + return (_ctx, _cache) => { + const _directive_tooltip = resolveDirective("tooltip"); + return openBlock(), createElementBlock("div", _hoisted_1$3, [ + createBaseVNode("div", _hoisted_2$3, [ + createBaseVNode("h2", _hoisted_3$3, toDisplayString(_ctx.$t("install.chooseInstallationLocation")), 1), + createBaseVNode("p", _hoisted_4$3, toDisplayString(_ctx.$t("install.installLocationDescription")), 1), + createBaseVNode("div", _hoisted_5$2, [ + createVNode(unref(script$b), { class: "flex-1" }, { + default: withCtx(() => [ + createVNode(unref(script$9), { + modelValue: installPath.value, + "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => installPath.value = $event), + class: normalizeClass(["w-full", { "p-invalid": pathError.value }]), + onChange: validatePath + }, null, 8, ["modelValue", "class"]), + withDirectives(createVNode(unref(script$a), { class: "pi pi-info-circle" }, null, 512), [ + [_directive_tooltip, _ctx.$t("install.installLocationTooltip")] + ]) + ]), + _: 1 + }), + createVNode(unref(script$c), { + icon: "pi pi-folder", + onClick: browsePath, + class: "w-12" + }) + ]), + pathError.value ? (openBlock(), createBlock(unref(script$d), { + key: 0, + severity: "error" + }, { + default: withCtx(() => [ + createTextVNode(toDisplayString(pathError.value), 1) + ]), + _: 1 + })) : createCommentVNode("", true) + ]), + createBaseVNode("div", _hoisted_6$2, [ + createBaseVNode("h3", _hoisted_7$2, toDisplayString(_ctx.$t("install.systemLocations")), 1), + createBaseVNode("div", _hoisted_8$2, [ + createBaseVNode("div", _hoisted_9$2, [ + _hoisted_10$2, + _hoisted_11$2, + createBaseVNode("span", _hoisted_12$2, toDisplayString(appData.value), 1), + withDirectives(createBaseVNode("span", _hoisted_13$1, null, 512), [ + [_directive_tooltip, _ctx.$t("install.appDataLocationTooltip")] + ]) + ]), + createBaseVNode("div", _hoisted_14$1, [ + _hoisted_15$1, + _hoisted_16$1, + createBaseVNode("span", _hoisted_17$1, toDisplayString(appPath.value), 1), + withDirectives(createBaseVNode("span", _hoisted_18$1, null, 512), [ + [_directive_tooltip, _ctx.$t("install.appPathLocationTooltip")] + ]) + ]) + ]) + ]) + ]); + }; + } +}); +const _hoisted_1$2 = { class: "flex flex-col gap-6 w-[600px]" }; +const _hoisted_2$2 = { class: "flex flex-col gap-4" }; +const _hoisted_3$2 = { class: "text-2xl font-semibold text-neutral-100" }; +const _hoisted_4$2 = { class: "text-neutral-400 my-0" }; +const _hoisted_5$1 = { class: "flex gap-2" }; +const _hoisted_6$1 = { + key: 0, + class: "flex flex-col gap-4 bg-neutral-800 p-4 rounded-lg" +}; +const _hoisted_7$1 = { class: "text-lg mt-0 font-medium text-neutral-100" }; +const _hoisted_8$1 = { class: "flex flex-col gap-3" }; +const _hoisted_9$1 = ["onClick"]; +const _hoisted_10$1 = ["for"]; +const _hoisted_11$1 = { class: "text-sm text-neutral-400 my-1" }; +const _hoisted_12$1 = { + key: 1, + class: "text-neutral-400 italic" +}; +const _sfc_main$2 = /* @__PURE__ */ defineComponent({ + __name: "MigrationPicker", + props: { + "sourcePath": { required: false }, + "sourcePathModifiers": {}, + "migrationItemIds": { + required: false + }, + "migrationItemIdsModifiers": {} + }, + emits: ["update:sourcePath", "update:migrationItemIds"], + setup(__props) { + const { t } = useI18n(); + const electron = electronAPI(); + const sourcePath = useModel(__props, "sourcePath"); + const migrationItemIds = useModel(__props, "migrationItemIds"); + const migrationItems = ref( + r.map((item) => ({ + ...item, + selected: true + })) + ); + const pathError = ref(""); + const isValidSource = computed( + () => sourcePath.value !== "" && pathError.value === "" + ); + const validateSource = /* @__PURE__ */ __name(async (sourcePath2) => { + if (!sourcePath2) { + pathError.value = ""; + return; + } + try { + pathError.value = ""; + const validation = await electron.validateComfyUISource(sourcePath2); + if (!validation.isValid) pathError.value = validation.error; + } catch (error) { + console.error(error); + pathError.value = t("install.pathValidationFailed"); + } + }, "validateSource"); + const browsePath = /* @__PURE__ */ __name(async () => { + try { + const result = await electron.showDirectoryPicker(); + if (result) { + sourcePath.value = result; + await validateSource(result); + } + } catch (error) { + console.error(error); + pathError.value = t("install.failedToSelectDirectory"); + } + }, "browsePath"); + watchEffect(() => { + migrationItemIds.value = migrationItems.value.filter((item) => item.selected).map((item) => item.id); + }); + return (_ctx, _cache) => { + return openBlock(), createElementBlock("div", _hoisted_1$2, [ + createBaseVNode("div", _hoisted_2$2, [ + createBaseVNode("h2", _hoisted_3$2, toDisplayString(_ctx.$t("install.migrateFromExistingInstallation")), 1), + createBaseVNode("p", _hoisted_4$2, toDisplayString(_ctx.$t("install.migrationSourcePathDescription")), 1), + createBaseVNode("div", _hoisted_5$1, [ + createVNode(unref(script$9), { + modelValue: sourcePath.value, + "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => sourcePath.value = $event), + placeholder: "Select existing ComfyUI installation (optional)", + class: normalizeClass(["flex-1", { "p-invalid": pathError.value }]), + onChange: validateSource + }, null, 8, ["modelValue", "class"]), + createVNode(unref(script$c), { + icon: "pi pi-folder", + onClick: browsePath, + class: "w-12" + }) + ]), + pathError.value ? (openBlock(), createBlock(unref(script$d), { + key: 0, + severity: "error" + }, { + default: withCtx(() => [ + createTextVNode(toDisplayString(pathError.value), 1) + ]), + _: 1 + })) : createCommentVNode("", true) + ]), + isValidSource.value ? (openBlock(), createElementBlock("div", _hoisted_6$1, [ + createBaseVNode("h3", _hoisted_7$1, toDisplayString(_ctx.$t("install.selectItemsToMigrate")), 1), + createBaseVNode("div", _hoisted_8$1, [ + (openBlock(true), createElementBlock(Fragment, null, renderList(migrationItems.value, (item) => { + return openBlock(), createElementBlock("div", { + key: item.id, + class: "flex items-center gap-3 p-2 hover:bg-neutral-700 rounded", + onClick: /* @__PURE__ */ __name(($event) => item.selected = !item.selected, "onClick") + }, [ + createVNode(unref(script$e), { + modelValue: item.selected, + "onUpdate:modelValue": /* @__PURE__ */ __name(($event) => item.selected = $event, "onUpdate:modelValue"), + inputId: item.id, + binary: true, + onClick: _cache[1] || (_cache[1] = withModifiers(() => { + }, ["stop"])) + }, null, 8, ["modelValue", "onUpdate:modelValue", "inputId"]), + createBaseVNode("div", null, [ + createBaseVNode("label", { + for: item.id, + class: "text-neutral-200 font-medium" + }, toDisplayString(item.label), 9, _hoisted_10$1), + createBaseVNode("p", _hoisted_11$1, toDisplayString(item.description), 1) + ]) + ], 8, _hoisted_9$1); + }), 128)) + ]) + ])) : (openBlock(), createElementBlock("div", _hoisted_12$1, toDisplayString(_ctx.$t("install.migrationOptional")), 1)) + ]); + }; + } +}); +var script = { + name: "InputSwitch", + "extends": script$f, + mounted: /* @__PURE__ */ __name(function mounted4() { + console.warn("Deprecated since v4. Use ToggleSwitch component instead."); + }, "mounted") +}; +const _hoisted_1$1 = { class: "flex flex-col gap-6 w-[600px]" }; +const _hoisted_2$1 = { class: "flex flex-col gap-4" }; +const _hoisted_3$1 = { class: "text-2xl font-semibold text-neutral-100" }; +const _hoisted_4$1 = { class: "text-neutral-400 my-0" }; +const _hoisted_5 = { class: "flex flex-col bg-neutral-800 p-4 rounded-lg" }; +const _hoisted_6 = { class: "flex items-center gap-4" }; +const _hoisted_7 = { class: "flex-1" }; +const _hoisted_8 = { class: "text-lg font-medium text-neutral-100" }; +const _hoisted_9 = { class: "text-sm text-neutral-400 mt-1" }; +const _hoisted_10 = { class: "flex items-center gap-4" }; +const _hoisted_11 = { class: "flex-1" }; +const _hoisted_12 = { class: "text-lg font-medium text-neutral-100" }; +const _hoisted_13 = { class: "text-sm text-neutral-400 mt-1" }; +const _hoisted_14 = { class: "text-neutral-300" }; +const _hoisted_15 = { class: "font-medium mb-2" }; +const _hoisted_16 = { class: "list-disc pl-6 space-y-1" }; +const _hoisted_17 = { class: "font-medium mt-4 mb-2" }; +const _hoisted_18 = { class: "list-disc pl-6 space-y-1" }; +const _sfc_main$1 = /* @__PURE__ */ defineComponent({ + __name: "DesktopSettingsConfiguration", + props: { + "autoUpdate": { required: true }, + "autoUpdateModifiers": {}, + "allowMetrics": { required: true }, + "allowMetricsModifiers": {} + }, + emits: ["update:autoUpdate", "update:allowMetrics"], + setup(__props) { + const showDialog = ref(false); + const autoUpdate = useModel(__props, "autoUpdate"); + const allowMetrics = useModel(__props, "allowMetrics"); + const showMetricsInfo = /* @__PURE__ */ __name(() => { + showDialog.value = true; + }, "showMetricsInfo"); + return (_ctx, _cache) => { + return openBlock(), createElementBlock("div", _hoisted_1$1, [ + createBaseVNode("div", _hoisted_2$1, [ + createBaseVNode("h2", _hoisted_3$1, toDisplayString(_ctx.$t("install.desktopAppSettings")), 1), + createBaseVNode("p", _hoisted_4$1, toDisplayString(_ctx.$t("install.desktopAppSettingsDescription")), 1) + ]), + createBaseVNode("div", _hoisted_5, [ + createBaseVNode("div", _hoisted_6, [ + createBaseVNode("div", _hoisted_7, [ + createBaseVNode("h3", _hoisted_8, toDisplayString(_ctx.$t("install.settings.autoUpdate")), 1), + createBaseVNode("p", _hoisted_9, toDisplayString(_ctx.$t("install.settings.autoUpdateDescription")), 1) + ]), + createVNode(unref(script), { + modelValue: autoUpdate.value, + "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => autoUpdate.value = $event) + }, null, 8, ["modelValue"]) + ]), + createVNode(unref(script$g)), + createBaseVNode("div", _hoisted_10, [ + createBaseVNode("div", _hoisted_11, [ + createBaseVNode("h3", _hoisted_12, toDisplayString(_ctx.$t("install.settings.allowMetrics")), 1), + createBaseVNode("p", _hoisted_13, toDisplayString(_ctx.$t("install.settings.allowMetricsDescription")), 1), + createBaseVNode("a", { + href: "#", + class: "text-sm text-blue-400 hover:text-blue-300 mt-1 inline-block", + onClick: withModifiers(showMetricsInfo, ["prevent"]) + }, toDisplayString(_ctx.$t("install.settings.learnMoreAboutData")), 1) + ]), + createVNode(unref(script), { + modelValue: allowMetrics.value, + "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => allowMetrics.value = $event) + }, null, 8, ["modelValue"]) + ]) + ]), + createVNode(unref(script$h), { + visible: showDialog.value, + "onUpdate:visible": _cache[2] || (_cache[2] = ($event) => showDialog.value = $event), + modal: "", + header: _ctx.$t("install.settings.dataCollectionDialog.title") + }, { + default: withCtx(() => [ + createBaseVNode("div", _hoisted_14, [ + createBaseVNode("h4", _hoisted_15, toDisplayString(_ctx.$t("install.settings.dataCollectionDialog.whatWeCollect")), 1), + createBaseVNode("ul", _hoisted_16, [ + createBaseVNode("li", null, toDisplayString(_ctx.$t("install.settings.dataCollectionDialog.errorReports")), 1), + createBaseVNode("li", null, toDisplayString(_ctx.$t("install.settings.dataCollectionDialog.systemInfo")), 1) + ]), + createBaseVNode("h4", _hoisted_17, toDisplayString(_ctx.$t("install.settings.dataCollectionDialog.whatWeDoNotCollect")), 1), + createBaseVNode("ul", _hoisted_18, [ + createBaseVNode("li", null, toDisplayString(_ctx.$t("install.settings.dataCollectionDialog.personalInformation")), 1), + createBaseVNode("li", null, toDisplayString(_ctx.$t("install.settings.dataCollectionDialog.workflowContents")), 1), + createBaseVNode("li", null, toDisplayString(_ctx.$t("install.settings.dataCollectionDialog.fileSystemInformation")), 1), + createBaseVNode("li", null, toDisplayString(_ctx.$t( + "install.settings.dataCollectionDialog.customNodeConfigurations" + )), 1) + ]) + ]) + ]), + _: 1 + }, 8, ["visible", "header"]) + ]); + }; + } +}); +const _withScopeId = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-53e62b05"), n = n(), popScopeId(), n), "_withScopeId"); +const _hoisted_1 = { class: "font-sans flex flex-col items-center h-screen m-0 text-neutral-300 bg-neutral-900 dark-theme pointer-events-auto" }; +const _hoisted_2 = { class: "flex pt-6 justify-end" }; +const _hoisted_3 = { class: "flex pt-6 justify-between" }; +const _hoisted_4 = { class: "flex pt-6 justify-between" }; +const _sfc_main = /* @__PURE__ */ defineComponent({ + __name: "InstallView", + setup(__props) { + const installPath = ref(""); + const pathError = ref(""); + const migrationSourcePath = ref(""); + const migrationItemIds = ref([]); + const autoUpdate = ref(true); + const allowMetrics = ref(true); + const hasError = computed(() => pathError.value !== ""); + const router = useRouter(); + const install = /* @__PURE__ */ __name(() => { + const options = toRaw({ + installPath: installPath.value, + autoUpdate: autoUpdate.value, + allowMetrics: allowMetrics.value, + migrationSourcePath: migrationSourcePath.value, + migrationItemIds: toRaw(migrationItemIds.value) + }); + electronAPI().installComfyUI(options); + router.push("/server-start"); + }, "install"); + return (_ctx, _cache) => { + return openBlock(), createElementBlock("div", _hoisted_1, [ + createVNode(unref(script$7), { + class: "mt-[5vh] 2xl:mt-[20vh]", + value: "1" + }, { + default: withCtx(() => [ + createVNode(unref(script$6), null, { + default: withCtx(() => [ + createVNode(unref(script$4), { + value: "1", + disabled: hasError.value + }, { + default: withCtx(() => [ + createTextVNode(toDisplayString(_ctx.$t("install.installLocation")), 1) + ]), + _: 1 + }, 8, ["disabled"]), + createVNode(unref(script$4), { + value: "2", + disabled: hasError.value + }, { + default: withCtx(() => [ + createTextVNode(toDisplayString(_ctx.$t("install.migration")), 1) + ]), + _: 1 + }, 8, ["disabled"]), + createVNode(unref(script$4), { + value: "3", + disabled: hasError.value + }, { + default: withCtx(() => [ + createTextVNode(toDisplayString(_ctx.$t("install.desktopSettings")), 1) + ]), + _: 1 + }, 8, ["disabled"]) + ]), + _: 1 + }), + createVNode(unref(script$5), null, { + default: withCtx(() => [ + createVNode(unref(script$3), { value: "1" }, { + default: withCtx(({ activateCallback }) => [ + createVNode(_sfc_main$3, { + installPath: installPath.value, + "onUpdate:installPath": _cache[0] || (_cache[0] = ($event) => installPath.value = $event), + pathError: pathError.value, + "onUpdate:pathError": _cache[1] || (_cache[1] = ($event) => pathError.value = $event) + }, null, 8, ["installPath", "pathError"]), + createBaseVNode("div", _hoisted_2, [ + createVNode(unref(script$c), { + label: "Next", + icon: "pi pi-arrow-right", + iconPos: "right", + onClick: /* @__PURE__ */ __name(($event) => activateCallback("2"), "onClick"), + disabled: pathError.value !== "" + }, null, 8, ["onClick", "disabled"]) + ]) + ]), + _: 1 + }), + createVNode(unref(script$3), { value: "2" }, { + default: withCtx(({ activateCallback }) => [ + createVNode(_sfc_main$2, { + sourcePath: migrationSourcePath.value, + "onUpdate:sourcePath": _cache[2] || (_cache[2] = ($event) => migrationSourcePath.value = $event), + migrationItemIds: migrationItemIds.value, + "onUpdate:migrationItemIds": _cache[3] || (_cache[3] = ($event) => migrationItemIds.value = $event) + }, null, 8, ["sourcePath", "migrationItemIds"]), + createBaseVNode("div", _hoisted_3, [ + createVNode(unref(script$c), { + label: "Back", + severity: "secondary", + icon: "pi pi-arrow-left", + onClick: /* @__PURE__ */ __name(($event) => activateCallback("1"), "onClick") + }, null, 8, ["onClick"]), + createVNode(unref(script$c), { + label: "Next", + icon: "pi pi-arrow-right", + iconPos: "right", + onClick: /* @__PURE__ */ __name(($event) => activateCallback("3"), "onClick") + }, null, 8, ["onClick"]) + ]) + ]), + _: 1 + }), + createVNode(unref(script$3), { value: "3" }, { + default: withCtx(({ activateCallback }) => [ + createVNode(_sfc_main$1, { + autoUpdate: autoUpdate.value, + "onUpdate:autoUpdate": _cache[4] || (_cache[4] = ($event) => autoUpdate.value = $event), + allowMetrics: allowMetrics.value, + "onUpdate:allowMetrics": _cache[5] || (_cache[5] = ($event) => allowMetrics.value = $event) + }, null, 8, ["autoUpdate", "allowMetrics"]), + createBaseVNode("div", _hoisted_4, [ + createVNode(unref(script$c), { + label: "Back", + severity: "secondary", + icon: "pi pi-arrow-left", + onClick: /* @__PURE__ */ __name(($event) => activateCallback("2"), "onClick") + }, null, 8, ["onClick"]), + createVNode(unref(script$c), { + label: "Install", + icon: "pi pi-check", + iconPos: "right", + onClick: _cache[6] || (_cache[6] = ($event) => install()) + }) + ]) + ]), + _: 1 + }) + ]), + _: 1 + }) + ]), + _: 1 + }) + ]); + }; + } +}); +const InstallView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-53e62b05"]]); +export { + InstallView as default +}; +//# sourceMappingURL=InstallView-BRgBqWtQ.js.map diff --git a/web/assets/InstallView-BRgBqWtQ.js.map b/web/assets/InstallView-BRgBqWtQ.js.map new file mode 100644 index 00000000000..7f28b6b8642 --- /dev/null +++ b/web/assets/InstallView-BRgBqWtQ.js.map @@ -0,0 +1 @@ +{"version":3,"file":"InstallView-BRgBqWtQ.js","sources":["../../node_modules/primevue/stepper/style/index.mjs","../../node_modules/primevue/stepper/index.mjs","../../node_modules/primevue/steplist/style/index.mjs","../../node_modules/primevue/steplist/index.mjs","../../node_modules/primevue/steppanels/style/index.mjs","../../node_modules/primevue/steppanels/index.mjs","../../node_modules/primevue/step/style/index.mjs","../../node_modules/primevue/step/index.mjs","../../node_modules/primevue/steppanel/style/index.mjs","../../node_modules/primevue/steppanel/index.mjs","../../src/components/install/InstallLocationPicker.vue","../../src/components/install/MigrationPicker.vue","../../node_modules/primevue/inputswitch/index.mjs","../../src/components/install/DesktopSettingsConfiguration.vue","../../src/views/InstallView.vue"],"sourcesContent":["import BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-steplist {\\n position: relative;\\n display: flex;\\n justify-content: space-between;\\n align-items: center;\\n margin: 0;\\n padding: 0;\\n list-style-type: none;\\n overflow-x: auto;\\n}\\n\\n.p-step {\\n position: relative;\\n display: flex;\\n flex: 1 1 auto;\\n align-items: center;\\n gap: \".concat(dt('stepper.step.gap'), \";\\n padding: \").concat(dt('stepper.step.padding'), \";\\n}\\n\\n.p-step:last-of-type {\\n flex: initial;\\n}\\n\\n.p-step-header {\\n border: 0 none;\\n display: inline-flex;\\n align-items: center;\\n text-decoration: none;\\n cursor: pointer;\\n transition: background \").concat(dt('stepper.transition.duration'), \", color \").concat(dt('stepper.transition.duration'), \", border-color \").concat(dt('stepper.transition.duration'), \", outline-color \").concat(dt('stepper.transition.duration'), \", box-shadow \").concat(dt('stepper.transition.duration'), \";\\n border-radius: \").concat(dt('stepper.step.header.border.radius'), \";\\n outline-color: transparent;\\n background: transparent;\\n padding: \").concat(dt('stepper.step.header.padding'), \";\\n gap: \").concat(dt('stepper.step.header.gap'), \";\\n}\\n\\n.p-step-header:focus-visible {\\n box-shadow: \").concat(dt('stepper.step.header.focus.ring.shadow'), \";\\n outline: \").concat(dt('stepper.step.header.focus.ring.width'), \" \").concat(dt('stepper.step.header.focus.ring.style'), \" \").concat(dt('stepper.step.header.focus.ring.color'), \";\\n outline-offset: \").concat(dt('stepper.step.header.focus.ring.offset'), \";\\n}\\n\\n.p-stepper.p-stepper-readonly .p-step {\\n cursor: auto;\\n}\\n\\n.p-step-title {\\n display: block;\\n white-space: nowrap;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n max-width: 100%;\\n color: \").concat(dt('stepper.step.title.color'), \";\\n font-weight: \").concat(dt('stepper.step.title.font.weight'), \";\\n transition: background \").concat(dt('stepper.transition.duration'), \", color \").concat(dt('stepper.transition.duration'), \", border-color \").concat(dt('stepper.transition.duration'), \", box-shadow \").concat(dt('stepper.transition.duration'), \", outline-color \").concat(dt('stepper.transition.duration'), \";\\n}\\n\\n.p-step-number {\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n color: \").concat(dt('stepper.step.number.color'), \";\\n border: 2px solid \").concat(dt('stepper.step.number.border.color'), \";\\n background: \").concat(dt('stepper.step.number.background'), \";\\n min-width: \").concat(dt('stepper.step.number.size'), \";\\n height: \").concat(dt('stepper.step.number.size'), \";\\n line-height: \").concat(dt('stepper.step.number.size'), \";\\n font-size: \").concat(dt('stepper.step.number.font.size'), \";\\n z-index: 1;\\n border-radius: \").concat(dt('stepper.step.number.border.radius'), \";\\n position: relative;\\n font-weight: \").concat(dt('stepper.step.number.font.weight'), \";\\n}\\n\\n.p-step-number::after {\\n content: \\\" \\\";\\n position: absolute;\\n width: 100%;\\n height: 100%;\\n border-radius: \").concat(dt('stepper.step.number.border.radius'), \";\\n box-shadow: \").concat(dt('stepper.step.number.shadow'), \";\\n}\\n\\n.p-step-active .p-step-header {\\n cursor: default;\\n}\\n\\n.p-step-active .p-step-number {\\n background: \").concat(dt('stepper.step.number.active.background'), \";\\n border-color: \").concat(dt('stepper.step.number.active.border.color'), \";\\n color: \").concat(dt('stepper.step.number.active.color'), \";\\n}\\n\\n.p-step-active .p-step-title {\\n color: \").concat(dt('stepper.step.title.active.color'), \";\\n}\\n\\n.p-step:not(.p-disabled):focus-visible {\\n outline: \").concat(dt('focus.ring.width'), \" \").concat(dt('focus.ring.style'), \" \").concat(dt('focus.ring.color'), \";\\n outline-offset: \").concat(dt('focus.ring.offset'), \";\\n}\\n\\n.p-step:has(~ .p-step-active) .p-stepper-separator {\\n background: \").concat(dt('stepper.separator.active.background'), \";\\n}\\n\\n.p-stepper-separator {\\n flex: 1 1 0;\\n background: \").concat(dt('stepper.separator.background'), \";\\n width: 100%;\\n height: \").concat(dt('stepper.separator.size'), \";\\n transition: background \").concat(dt('stepper.transition.duration'), \", color \").concat(dt('stepper.transition.duration'), \", border-color \").concat(dt('stepper.transition.duration'), \", box-shadow \").concat(dt('stepper.transition.duration'), \", outline-color \").concat(dt('stepper.transition.duration'), \";\\n}\\n\\n.p-steppanels {\\n padding: \").concat(dt('stepper.steppanels.padding'), \";\\n}\\n\\n.p-steppanel {\\n background: \").concat(dt('stepper.steppanel.background'), \";\\n color: \").concat(dt('stepper.steppanel.color'), \";\\n}\\n\\n.p-stepper:has(.p-stepitem) {\\n display: flex;\\n flex-direction: column;\\n}\\n\\n.p-stepitem {\\n display: flex;\\n flex-direction: column;\\n flex: initial;\\n}\\n\\n.p-stepitem.p-stepitem-active {\\n flex: 1 1 auto;\\n}\\n\\n.p-stepitem .p-step {\\n flex: initial;\\n}\\n\\n.p-stepitem .p-steppanel-content {\\n width: 100%;\\n padding: \").concat(dt('stepper.steppanel.padding'), \";\\n}\\n\\n.p-stepitem .p-steppanel {\\n display: flex;\\n flex: 1 1 auto;\\n}\\n\\n.p-stepitem .p-stepper-separator {\\n flex: 0 0 auto;\\n width: \").concat(dt('stepper.separator.size'), \";\\n height: auto;\\n margin: \").concat(dt('stepper.separator.margin'), \";\\n position: relative;\\n left: calc(-1 * \").concat(dt('stepper.separator.size'), \");\\n}\\n\\n.p-stepitem:has(~ .p-stepitem-active) .p-stepper-separator {\\n background: \").concat(dt('stepper.separator.active.background'), \";\\n}\\n\\n.p-stepitem:last-of-type .p-steppanel {\\n padding-inline-start: \").concat(dt('stepper.step.number.size'), \";\\n}\\n\");\n};\nvar classes = {\n root: function root(_ref2) {\n var props = _ref2.props;\n return ['p-stepper p-component', {\n 'p-readonly': props.linear\n }];\n },\n separator: 'p-stepper-separator'\n};\nvar StepperStyle = BaseStyle.extend({\n name: 'stepper',\n theme: theme,\n classes: classes\n});\n\nexport { StepperStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import { UniqueComponentId } from '@primevue/core/utils';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport StepperStyle from 'primevue/stepper/style';\nimport { openBlock, createElementBlock, mergeProps, renderSlot, createCommentVNode } from 'vue';\n\nvar script$1 = {\n name: 'BaseStepper',\n \"extends\": BaseComponent,\n props: {\n value: {\n type: [String, Number],\n \"default\": undefined\n },\n linear: {\n type: Boolean,\n \"default\": false\n }\n },\n style: StepperStyle,\n provide: function provide() {\n return {\n $pcStepper: this,\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'Stepper',\n \"extends\": script$1,\n inheritAttrs: false,\n emits: ['update:value'],\n data: function data() {\n return {\n id: this.$attrs.id,\n d_value: this.value\n };\n },\n watch: {\n '$attrs.id': function $attrsId(newValue) {\n this.id = newValue || UniqueComponentId();\n },\n value: function value(newValue) {\n this.d_value = newValue;\n }\n },\n mounted: function mounted() {\n this.id = this.id || UniqueComponentId();\n },\n methods: {\n updateValue: function updateValue(newValue) {\n if (this.d_value !== newValue) {\n this.d_value = newValue;\n this.$emit('update:value', newValue);\n }\n },\n isStepActive: function isStepActive(value) {\n return this.d_value === value;\n },\n isStepDisabled: function isStepDisabled() {\n return this.linear;\n }\n }\n};\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"div\", mergeProps({\n \"class\": _ctx.cx('root'),\n role: \"tablist\"\n }, _ctx.ptmi('root')), [_ctx.$slots.start ? renderSlot(_ctx.$slots, \"start\", {\n key: 0\n }) : createCommentVNode(\"\", true), renderSlot(_ctx.$slots, \"default\"), _ctx.$slots.end ? renderSlot(_ctx.$slots, \"end\", {\n key: 1\n }) : createCommentVNode(\"\", true)], 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseStyle from '@primevue/core/base/style';\n\nvar classes = {\n root: 'p-steplist'\n};\nvar StepListStyle = BaseStyle.extend({\n name: 'steplist',\n classes: classes\n});\n\nexport { StepListStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseComponent from '@primevue/core/basecomponent';\nimport StepListStyle from 'primevue/steplist/style';\nimport { openBlock, createElementBlock, mergeProps, renderSlot } from 'vue';\n\nvar script$1 = {\n name: 'BaseStepList',\n \"extends\": BaseComponent,\n style: StepListStyle,\n provide: function provide() {\n return {\n $pcStepList: this,\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'StepList',\n \"extends\": script$1,\n inheritAttrs: false\n};\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"div\", mergeProps({\n \"class\": _ctx.cx('root')\n }, _ctx.ptmi('root')), [renderSlot(_ctx.$slots, \"default\")], 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseStyle from '@primevue/core/base/style';\n\nvar classes = {\n root: 'p-steppanels'\n};\nvar StepPanelsStyle = BaseStyle.extend({\n name: 'steppanels',\n classes: classes\n});\n\nexport { StepPanelsStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseComponent from '@primevue/core/basecomponent';\nimport StepPanelsStyle from 'primevue/steppanels/style';\nimport { openBlock, createElementBlock, mergeProps, renderSlot } from 'vue';\n\nvar script$1 = {\n name: 'BaseStepPanels',\n \"extends\": BaseComponent,\n style: StepPanelsStyle,\n provide: function provide() {\n return {\n $pcStepPanels: this,\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'StepPanels',\n \"extends\": script$1,\n inheritAttrs: false\n};\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"div\", mergeProps({\n \"class\": _ctx.cx('root')\n }, _ctx.ptmi('root')), [renderSlot(_ctx.$slots, \"default\")], 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseStyle from '@primevue/core/base/style';\n\nvar classes = {\n root: function root(_ref) {\n var instance = _ref.instance;\n return ['p-step', {\n 'p-step-active': instance.active,\n 'p-disabled': instance.isStepDisabled\n }];\n },\n header: 'p-step-header',\n number: 'p-step-number',\n title: 'p-step-title'\n};\nvar StepStyle = BaseStyle.extend({\n name: 'step',\n classes: classes\n});\n\nexport { StepStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import { find } from '@primeuix/utils/dom';\nimport { findIndexInList } from '@primeuix/utils/object';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport { openBlock, createElementBlock, mergeProps, resolveComponent, createBlock, resolveDynamicComponent, withCtx, createElementVNode, toDisplayString, renderSlot, createCommentVNode, normalizeClass } from 'vue';\nimport StepStyle from 'primevue/step/style';\n\nvar script$2 = {\n name: 'StepperSeparator',\n hostName: 'Stepper',\n \"extends\": BaseComponent\n};\n\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps({\n \"class\": _ctx.cx('separator')\n }, _ctx.ptm('separator')), null, 16);\n}\n\nscript$2.render = render$1;\n\nvar script$1 = {\n name: 'BaseStep',\n \"extends\": BaseComponent,\n props: {\n value: {\n type: [String, Number],\n \"default\": undefined\n },\n disabled: {\n type: Boolean,\n \"default\": false\n },\n asChild: {\n type: Boolean,\n \"default\": false\n },\n as: {\n type: [String, Object],\n \"default\": 'DIV'\n }\n },\n style: StepStyle,\n provide: function provide() {\n return {\n $pcStep: this,\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'Step',\n \"extends\": script$1,\n inheritAttrs: false,\n inject: {\n $pcStepper: {\n \"default\": null\n },\n $pcStepList: {\n \"default\": null\n },\n $pcStepItem: {\n \"default\": null\n }\n },\n data: function data() {\n return {\n isSeparatorVisible: false\n };\n },\n mounted: function mounted() {\n if (this.$el && this.$pcStepList) {\n var index = findIndexInList(this.$el, find(this.$pcStepper.$el, '[data-pc-name=\"step\"]'));\n var stepLen = find(this.$pcStepper.$el, '[data-pc-name=\"step\"]').length;\n this.isSeparatorVisible = index !== stepLen - 1;\n }\n },\n methods: {\n getPTOptions: function getPTOptions(key) {\n var _ptm = key === 'root' ? this.ptmi : this.ptm;\n return _ptm(key, {\n context: {\n active: this.active,\n disabled: this.isStepDisabled\n }\n });\n },\n onStepClick: function onStepClick() {\n this.$pcStepper.updateValue(this.activeValue);\n }\n },\n computed: {\n active: function active() {\n return this.$pcStepper.isStepActive(this.activeValue);\n },\n activeValue: function activeValue() {\n var _this$$pcStepItem;\n return !!this.$pcStepItem ? (_this$$pcStepItem = this.$pcStepItem) === null || _this$$pcStepItem === void 0 ? void 0 : _this$$pcStepItem.value : this.value;\n },\n isStepDisabled: function isStepDisabled() {\n return !this.active && (this.$pcStepper.isStepDisabled() || this.disabled);\n },\n id: function id() {\n var _this$$pcStepper;\n return \"\".concat((_this$$pcStepper = this.$pcStepper) === null || _this$$pcStepper === void 0 ? void 0 : _this$$pcStepper.id, \"_step_\").concat(this.activeValue);\n },\n ariaControls: function ariaControls() {\n var _this$$pcStepper2;\n return \"\".concat((_this$$pcStepper2 = this.$pcStepper) === null || _this$$pcStepper2 === void 0 ? void 0 : _this$$pcStepper2.id, \"_steppanel_\").concat(this.activeValue);\n },\n a11yAttrs: function a11yAttrs() {\n return {\n root: {\n role: 'presentation',\n 'aria-current': this.active ? 'step' : undefined,\n 'data-pc-name': 'step',\n 'data-pc-section': 'root',\n 'data-p-disabled': this.disabled,\n 'data-p-active': this.active\n },\n header: {\n id: this.id,\n role: 'tab',\n taindex: this.disabled ? -1 : undefined,\n 'aria-controls': this.ariaControls,\n 'data-pc-section': 'header',\n disabled: this.disabled,\n onClick: this.onStepClick\n }\n };\n }\n },\n components: {\n StepperSeparator: script$2\n }\n};\n\nvar _hoisted_1 = [\"id\", \"tabindex\", \"aria-controls\", \"disabled\"];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n var _component_StepperSeparator = resolveComponent(\"StepperSeparator\");\n return !_ctx.asChild ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps({\n key: 0,\n \"class\": _ctx.cx('root'),\n \"aria-current\": $options.active ? 'step' : undefined,\n role: \"presentation\",\n \"data-p-active\": $options.active,\n \"data-p-disabled\": $options.isStepDisabled\n }, $options.getPTOptions('root')), {\n \"default\": withCtx(function () {\n return [createElementVNode(\"button\", mergeProps({\n id: $options.id,\n \"class\": _ctx.cx('header'),\n role: \"tab\",\n type: \"button\",\n tabindex: $options.isStepDisabled ? -1 : undefined,\n \"aria-controls\": $options.ariaControls,\n disabled: $options.isStepDisabled,\n onClick: _cache[0] || (_cache[0] = function () {\n return $options.onStepClick && $options.onStepClick.apply($options, arguments);\n })\n }, $options.getPTOptions('header')), [createElementVNode(\"span\", mergeProps({\n \"class\": _ctx.cx('number')\n }, $options.getPTOptions('number')), toDisplayString($options.activeValue), 17), createElementVNode(\"span\", mergeProps({\n \"class\": _ctx.cx('title')\n }, $options.getPTOptions('title')), [renderSlot(_ctx.$slots, \"default\")], 16)], 16, _hoisted_1), $data.isSeparatorVisible ? (openBlock(), createBlock(_component_StepperSeparator, {\n key: 0\n })) : createCommentVNode(\"\", true)];\n }),\n _: 3\n }, 16, [\"class\", \"aria-current\", \"data-p-active\", \"data-p-disabled\"])) : renderSlot(_ctx.$slots, \"default\", {\n key: 1,\n \"class\": normalizeClass(_ctx.cx('root')),\n active: $options.active,\n value: _ctx.value,\n a11yAttrs: $options.a11yAttrs,\n activateCallback: $options.onStepClick\n });\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseStyle from '@primevue/core/base/style';\n\nvar classes = {\n root: function root(_ref) {\n var instance = _ref.instance;\n return ['p-steppanel', {\n 'p-steppanel-active': instance.isVertical && instance.active\n }];\n },\n content: 'p-steppanel-content'\n};\nvar StepPanelStyle = BaseStyle.extend({\n name: 'steppanel',\n classes: classes\n});\n\nexport { StepPanelStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import { find, findSingle } from '@primeuix/utils/dom';\nimport { findIndexInList } from '@primeuix/utils/object';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport { openBlock, createElementBlock, mergeProps, resolveComponent, Fragment, createBlock, Transition, withCtx, withDirectives, resolveDynamicComponent, createCommentVNode, createElementVNode, renderSlot, vShow } from 'vue';\nimport StepPanelStyle from 'primevue/steppanel/style';\n\nvar script$2 = {\n name: 'StepperSeparator',\n hostName: 'Stepper',\n \"extends\": BaseComponent\n};\n\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps({\n \"class\": _ctx.cx('separator')\n }, _ctx.ptm('separator')), null, 16);\n}\n\nscript$2.render = render$1;\n\nvar script$1 = {\n name: 'BaseStepPanel',\n \"extends\": BaseComponent,\n props: {\n value: {\n type: [String, Number],\n \"default\": undefined\n },\n asChild: {\n type: Boolean,\n \"default\": false\n },\n as: {\n type: [String, Object],\n \"default\": 'DIV'\n }\n },\n style: StepPanelStyle,\n provide: function provide() {\n return {\n $pcStepPanel: this,\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'StepPanel',\n \"extends\": script$1,\n inheritAttrs: false,\n inject: {\n $pcStepper: {\n \"default\": null\n },\n $pcStepItem: {\n \"default\": null\n },\n $pcStepList: {\n \"default\": null\n }\n },\n data: function data() {\n return {\n isSeparatorVisible: false\n };\n },\n mounted: function mounted() {\n if (this.$el) {\n var _this$$pcStepItem, _this$$pcStepList;\n var stepElements = find(this.$pcStepper.$el, '[data-pc-name=\"step\"]');\n var stepPanelEl = findSingle(this.isVertical ? (_this$$pcStepItem = this.$pcStepItem) === null || _this$$pcStepItem === void 0 ? void 0 : _this$$pcStepItem.$el : (_this$$pcStepList = this.$pcStepList) === null || _this$$pcStepList === void 0 ? void 0 : _this$$pcStepList.$el, '[data-pc-name=\"step\"]');\n var stepPanelIndex = findIndexInList(stepPanelEl, stepElements);\n this.isSeparatorVisible = this.isVertical && stepPanelIndex !== stepElements.length - 1;\n }\n },\n methods: {\n getPTOptions: function getPTOptions(key) {\n var _ptm = key === 'root' ? this.ptmi : this.ptm;\n return _ptm(key, {\n context: {\n active: this.active\n }\n });\n },\n updateValue: function updateValue(val) {\n this.$pcStepper.updateValue(val);\n }\n },\n computed: {\n active: function active() {\n var _this$$pcStepItem2, _this$$pcStepper;\n var activeValue = !!this.$pcStepItem ? (_this$$pcStepItem2 = this.$pcStepItem) === null || _this$$pcStepItem2 === void 0 ? void 0 : _this$$pcStepItem2.value : this.value;\n return activeValue === ((_this$$pcStepper = this.$pcStepper) === null || _this$$pcStepper === void 0 ? void 0 : _this$$pcStepper.d_value);\n },\n isVertical: function isVertical() {\n return !!this.$pcStepItem;\n },\n activeValue: function activeValue() {\n var _this$$pcStepItem3;\n return this.isVertical ? (_this$$pcStepItem3 = this.$pcStepItem) === null || _this$$pcStepItem3 === void 0 ? void 0 : _this$$pcStepItem3.value : this.value;\n },\n id: function id() {\n var _this$$pcStepper2;\n return \"\".concat((_this$$pcStepper2 = this.$pcStepper) === null || _this$$pcStepper2 === void 0 ? void 0 : _this$$pcStepper2.id, \"_steppanel_\").concat(this.activeValue);\n },\n ariaControls: function ariaControls() {\n var _this$$pcStepper3;\n return \"\".concat((_this$$pcStepper3 = this.$pcStepper) === null || _this$$pcStepper3 === void 0 ? void 0 : _this$$pcStepper3.id, \"_step_\").concat(this.activeValue);\n },\n a11yAttrs: function a11yAttrs() {\n return {\n id: this.id,\n role: 'tabpanel',\n 'aria-controls': this.ariaControls,\n 'data-pc-name': 'steppanel',\n 'data-p-active': this.active\n };\n }\n },\n components: {\n StepperSeparator: script$2\n }\n};\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n var _component_StepperSeparator = resolveComponent(\"StepperSeparator\");\n return $options.isVertical ? (openBlock(), createElementBlock(Fragment, {\n key: 0\n }, [!_ctx.asChild ? (openBlock(), createBlock(Transition, mergeProps({\n key: 0,\n name: \"p-toggleable-content\"\n }, _ctx.ptm('transition')), {\n \"default\": withCtx(function () {\n return [withDirectives((openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps({\n id: $options.id,\n \"class\": _ctx.cx('root'),\n role: \"tabpanel\",\n \"aria-controls\": $options.ariaControls\n }, $options.getPTOptions('root')), {\n \"default\": withCtx(function () {\n return [$data.isSeparatorVisible ? (openBlock(), createBlock(_component_StepperSeparator, {\n key: 0\n })) : createCommentVNode(\"\", true), createElementVNode(\"div\", mergeProps({\n \"class\": _ctx.cx('content')\n }, $options.getPTOptions('content')), [renderSlot(_ctx.$slots, \"default\", {\n active: $options.active,\n activateCallback: function activateCallback(val) {\n return $options.updateValue(val);\n }\n })], 16)];\n }),\n _: 3\n }, 16, [\"id\", \"class\", \"aria-controls\"])), [[vShow, $options.active]])];\n }),\n _: 3\n }, 16)) : renderSlot(_ctx.$slots, \"default\", {\n key: 1,\n active: $options.active,\n a11yAttrs: $options.a11yAttrs,\n activateCallback: function activateCallback(val) {\n return $options.updateValue(val);\n }\n })], 64)) : (openBlock(), createElementBlock(Fragment, {\n key: 1\n }, [!_ctx.asChild ? withDirectives((openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps({\n key: 0,\n id: $options.id,\n \"class\": _ctx.cx('root'),\n role: \"tabpanel\",\n \"aria-controls\": $options.ariaControls\n }, $options.getPTOptions('root')), {\n \"default\": withCtx(function () {\n return [renderSlot(_ctx.$slots, \"default\", {\n active: $options.active,\n activateCallback: function activateCallback(val) {\n return $options.updateValue(val);\n }\n })];\n }),\n _: 3\n }, 16, [\"id\", \"class\", \"aria-controls\"])), [[vShow, $options.active]]) : _ctx.asChild && $options.active ? renderSlot(_ctx.$slots, \"default\", {\n key: 1,\n active: $options.active,\n a11yAttrs: $options.a11yAttrs,\n activateCallback: function activateCallback(val) {\n return $options.updateValue(val);\n }\n }) : createCommentVNode(\"\", true)], 64));\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","\n\n\n","\n\n\n","import ToggleSwitch from 'primevue/toggleswitch';\n\nvar script = {\n name: 'InputSwitch',\n \"extends\": ToggleSwitch,\n mounted: function mounted() {\n console.warn('Deprecated since v4. Use ToggleSwitch component instead.');\n }\n};\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","\n\n\n","\n\n\n\n\n"],"names":["theme","classes","script$1","BaseComponent","script","value","render","provide","root","script$2","render$1","data","mounted","isStepDisabled","_hoisted_1","createElementVNode","getPTOptions","updateValue","active","activeValue","id","ariaControls","a11yAttrs","_useModel","MigrationItems","sourcePath","ToggleSwitch"],"mappings":";;;;AAEA,IAAI,QAAQ,gCAASA,OAAM,MAAM;AAC/B,MAAI,KAAK,KAAK;AACd,SAAO,yUAAyU,OAAO,GAAG,kBAAkB,GAAG,kBAAkB,EAAE,OAAO,GAAG,sBAAsB,GAAG,oOAAoO,EAAE,OAAO,GAAG,6BAA6B,GAAG,UAAU,EAAE,OAAO,GAAG,6BAA6B,GAAG,iBAAiB,EAAE,OAAO,GAAG,6BAA6B,GAAG,kBAAkB,EAAE,OAAO,GAAG,6BAA6B,GAAG,eAAe,EAAE,OAAO,GAAG,6BAA6B,GAAG,wBAAwB,EAAE,OAAO,GAAG,mCAAmC,GAAG,iFAAiF,EAAE,OAAO,GAAG,6BAA6B,GAAG,cAAc,EAAE,OAAO,GAAG,yBAAyB,GAAG,0DAA0D,EAAE,OAAO,GAAG,uCAAuC,GAAG,kBAAkB,EAAE,OAAO,GAAG,sCAAsC,GAAG,GAAG,EAAE,OAAO,GAAG,sCAAsC,GAAG,GAAG,EAAE,OAAO,GAAG,sCAAsC,GAAG,yBAAyB,EAAE,OAAO,GAAG,uCAAuC,GAAG,iOAAiO,EAAE,OAAO,GAAG,0BAA0B,GAAG,sBAAsB,EAAE,OAAO,GAAG,gCAAgC,GAAG,gCAAgC,E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ACf,UAAM,UAAU,6BAAM;AACpB,YAAM,UAAU,MAAM;AAAA,QACpB,aAAa,YAAY;AAAA,QACzB,YAAY,WAAW;AAAA,QACvB,cAAc,aAAa;AAAA,QAC3B,qBAAqB,oBAAoB;AAAA,QACzC,kBAAkB,MAAM,iBAAiB,KAAK;AAAA,MAAA,CAC/C;AACW,kBAAA,EAAE,eAAe,OAAO;AACpC,aAAO,KAAK,eAAe;AAAA,IAAA,GATb;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,12]} \ No newline at end of file diff --git a/web/assets/InstallView-CN3CA9Fk.css b/web/assets/InstallView-CN3CA9Fk.css new file mode 100644 index 00000000000..986c3570c15 --- /dev/null +++ b/web/assets/InstallView-CN3CA9Fk.css @@ -0,0 +1,4 @@ + +[data-v-53e62b05] .p-steppanel { + background-color: transparent +} diff --git a/web/assets/KeybindingPanel-BNYKhW1k.css b/web/assets/KeybindingPanel-BNYKhW1k.css deleted file mode 100644 index c14704b83e9..00000000000 --- a/web/assets/KeybindingPanel-BNYKhW1k.css +++ /dev/null @@ -1,8 +0,0 @@ - -[data-v-e5724e4d] .p-datatable-tbody > tr > td { - padding: 1px; - min-height: 2rem; -} -[data-v-e5724e4d] .p-datatable-row-selected .actions,[data-v-e5724e4d] .p-datatable-selectable-row:hover .actions { - visibility: visible; -} diff --git a/web/assets/KeybindingPanel-CB_wEOHl.css b/web/assets/KeybindingPanel-CB_wEOHl.css new file mode 100644 index 00000000000..33356c98aff --- /dev/null +++ b/web/assets/KeybindingPanel-CB_wEOHl.css @@ -0,0 +1,8 @@ + +[data-v-2d8b3a76] .p-datatable-tbody > tr > td { + padding: 0.25rem; + min-height: 2rem +} +[data-v-2d8b3a76] .p-datatable-row-selected .actions,[data-v-2d8b3a76] .p-datatable-selectable-row:hover .actions { + visibility: visible +} diff --git a/web/assets/KeybindingPanel-Dm_3sBT5.js b/web/assets/KeybindingPanel-CU3hu6-Y.js similarity index 88% rename from web/assets/KeybindingPanel-Dm_3sBT5.js rename to web/assets/KeybindingPanel-CU3hu6-Y.js index 74dcd289018..68f1b8d6b01 100644 --- a/web/assets/KeybindingPanel-Dm_3sBT5.js +++ b/web/assets/KeybindingPanel-CU3hu6-Y.js @@ -1,8 +1,8 @@ var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -import { d as defineComponent, q as computed, g as openBlock, h as createElementBlock, N as Fragment, O as renderList, i as createVNode, y as withCtx, aw as createTextVNode, a6 as toDisplayString, z as unref, aA as script, j as createCommentVNode, r as ref, bN as FilterMatchMode, M as useKeybindingStore, F as useCommandStore, aJ as watchEffect, b9 as useToast, t as resolveDirective, bO as SearchBox, A as createBaseVNode, D as script$2, x as createBlock, ao as script$4, be as withModifiers, aH as script$6, v as withDirectives, P as pushScopeId, Q as popScopeId, bJ as KeyComboImpl, bP as KeybindingImpl, _ as _export_sfc } from "./index-BHayQCxv.js"; -import { s as script$1, a as script$3, b as script$5 } from "./index-CwRXxFdA.js"; -import "./index-C_wOqB0f.js"; +import { d as defineComponent, q as computed, g as openBlock, h as createElementBlock, N as Fragment, O as renderList, i as createVNode, y as withCtx, aw as createTextVNode, a6 as toDisplayString, z as unref, aA as script, j as createCommentVNode, r as ref, c3 as FilterMatchMode, M as useKeybindingStore, F as useCommandStore, aJ as watchEffect, be as useToast, t as resolveDirective, c4 as SearchBox, A as createBaseVNode, D as script$2, x as createBlock, ao as script$4, bi as withModifiers, bR as script$5, aH as script$6, v as withDirectives, P as pushScopeId, Q as popScopeId, b$ as KeyComboImpl, c5 as KeybindingImpl, _ as _export_sfc } from "./index-BFF4Dqtc.js"; +import { s as script$1, a as script$3 } from "./index-ovZE3ghJ.js"; +import "./index-DOTKVD24.js"; const _hoisted_1$1 = { key: 0, class: "px-2" @@ -35,10 +35,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({ }; } }); -const _withScopeId = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-e5724e4d"), n = n(), popScopeId(), n), "_withScopeId"); +const _withScopeId = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-2d8b3a76"), n = n(), popScopeId(), n), "_withScopeId"); const _hoisted_1 = { class: "keybinding-panel" }; -const _hoisted_2 = { class: "actions invisible" }; -const _hoisted_3 = { key: 1 }; +const _hoisted_2 = { class: "actions invisible flex flex-row" }; +const _hoisted_3 = ["title"]; +const _hoisted_4 = { key: 1 }; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "KeybindingPanel", setup(__props) { @@ -177,7 +178,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ createVNode(unref(script$1), { field: "id", header: "Command ID", - sortable: "" + sortable: "", + class: "max-w-64 2xl:max-w-full" + }, { + body: withCtx((slotProps) => [ + createBaseVNode("div", { + class: "overflow-hidden text-ellipsis whitespace-nowrap", + title: slotProps.data.id + }, toDisplayString(slotProps.data.id), 9, _hoisted_3) + ]), + _: 1 }), createVNode(unref(script$1), { field: "keybinding", @@ -188,7 +198,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ key: 0, keyCombo: slotProps.data.keybinding.combo, isModified: unref(keybindingStore).isCommandKeybindingModified(slotProps.data.id) - }, null, 8, ["keyCombo", "isModified"])) : (openBlock(), createElementBlock("span", _hoisted_3, "-")) + }, null, 8, ["keyCombo", "isModified"])) : (openBlock(), createElementBlock("span", _hoisted_4, "-")) ]), _: 1 }) @@ -257,8 +267,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ }; } }); -const KeybindingPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e5724e4d"]]); +const KeybindingPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2d8b3a76"]]); export { KeybindingPanel as default }; -//# sourceMappingURL=KeybindingPanel-Dm_3sBT5.js.map +//# sourceMappingURL=KeybindingPanel-CU3hu6-Y.js.map diff --git a/web/assets/KeybindingPanel-CU3hu6-Y.js.map b/web/assets/KeybindingPanel-CU3hu6-Y.js.map new file mode 100644 index 00000000000..045dc09ee35 --- /dev/null +++ b/web/assets/KeybindingPanel-CU3hu6-Y.js.map @@ -0,0 +1 @@ +{"version":3,"file":"KeybindingPanel-CU3hu6-Y.js","sources":["../../src/components/dialog/content/setting/keybinding/KeyComboDisplay.vue","../../src/components/dialog/content/setting/KeybindingPanel.vue"],"sourcesContent":["\n\n\n","\n\n\n\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAgBA,UAAM,QAAQ;AAUd,UAAM,eAAe,SAAS,MAAM,MAAM,SAAS,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC4GpE,UAAM,UAAU,IAAI;AAAA,MAClB,QAAQ,EAAE,OAAO,IAAI,WAAW,gBAAgB,SAAS;AAAA,IAAA,CAC1D;AAED,UAAM,kBAAkB;AACxB,UAAM,eAAe;AAOf,UAAA,eAAe,SAAyB,MAAM;AAClD,aAAO,OAAO,OAAO,aAAa,QAAQ,EAAE,IAAI,CAAC,aAAa;AAAA,QAC5D,IAAI,QAAQ;AAAA,QACZ,YAAY,gBAAgB,yBAAyB,QAAQ,EAAE;AAAA,MAC/D,EAAA;AAAA,IAAA,CACH;AAEK,UAAA,sBAAsB,IAAyB,IAAI;AACnD,UAAA,oBAAoB,IAAI,KAAK;AAC7B,UAAA,qBAAqB,IAAyB,IAAI;AAClD,UAAA,wBAAwB,IAAyB,IAAI;AACrD,UAAA,kBAAkB,IAAI,IAAI;AAE1B,UAAA,4BAA4B,SAAgC,MAAM;AAClE,UAAA,CAAC,sBAAsB,OAAO;AACzB,eAAA;AAAA,MACT;AAIE,UAAA,sBAAsB,MAAM,YAAY,OAAO;AAAA,QAC7C,mBAAmB;AAAA,MAAA,GAErB;AACO,eAAA;AAAA,MACT;AAEI,UAAA,CAAC,mBAAm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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/web/assets/KeybindingPanel-Dm_3sBT5.js.map b/web/assets/KeybindingPanel-Dm_3sBT5.js.map deleted file mode 100644 index 2aab48ef149..00000000000 --- a/web/assets/KeybindingPanel-Dm_3sBT5.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"KeybindingPanel-Dm_3sBT5.js","sources":["../../src/components/dialog/content/setting/keybinding/KeyComboDisplay.vue","../../src/components/dialog/content/setting/KeybindingPanel.vue"],"sourcesContent":["\n\n\n","\n\n\n\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAgBA,UAAM,QAAQ;AAUd,UAAM,eAAe,SAAS,MAAM,MAAM,SAAS,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;AC8FpE,UAAM,UAAU,IAAI;AAAA,MAClB,QAAQ,EAAE,OAAO,IAAI,WAAW,gBAAgB,SAAS;AAAA,IAAA,CAC1D;AAED,UAAM,kBAAkB;AACxB,UAAM,eAAe;AAOf,UAAA,eAAe,SAAyB,MAAM;AAClD,aAAO,OAAO,OAAO,aAAa,QAAQ,EAAE,IAAI,CAAC,aAAa;AAAA,QAC5D,IAAI,QAAQ;AAAA,QACZ,YAAY,gBAAgB,yBAAyB,QAAQ,EAAE;AAAA,MAC/D,EAAA;AAAA,IAAA,CACH;AAEK,UAAA,sBAAsB,IAAyB,IAAI;AACnD,UAAA,oBAAoB,IAAI,KAAK;AAC7B,UAAA,qBAAqB,IAAyB,IAAI;AAClD,UAAA,wBAAwB,IAAyB,IAAI;AACrD,UAAA,kBAAkB,IAAI,IAAI;AAE1B,UAAA,4BAA4B,SAAgC,MAAM;AAClE,UAAA,CAAC,sBAAsB,OAAO;AACzB,eAAA;AAAA,MACT;AAIE,UAAA,sBAAsB,MAAM,YAAY,OAAO;AAA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,MAAM;AAAA,MAAA,CACP;AAAA,IACH;AATe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/web/assets/ServerStartView-DhnQyBxt.js b/web/assets/ServerStartView-DhnQyBxt.js new file mode 100644 index 00000000000..ababe14a500 --- /dev/null +++ b/web/assets/ServerStartView-DhnQyBxt.js @@ -0,0 +1,102 @@ +var __defProp = Object.defineProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +import { d as defineComponent, r as ref, o as onMounted, w as watch, I as onBeforeUnmount, g as openBlock, h as createElementBlock, i as createVNode, y as withCtx, A as createBaseVNode, a6 as toDisplayString, z as unref, bK as script, bL as electronAPI } from "./index-BFF4Dqtc.js"; +import { t, s } from "./index-B4gmhi99.js"; +const _hoisted_1$1 = { class: "p-terminal rounded-none h-full w-full" }; +const _hoisted_2$1 = { class: "px-4 whitespace-pre-wrap" }; +const _sfc_main$1 = /* @__PURE__ */ defineComponent({ + __name: "LogTerminal", + props: { + fetchLogs: { type: Function }, + fetchInterval: {} + }, + setup(__props) { + const props = __props; + const log = ref(""); + const scrollPanelRef = ref(null); + const scrolledToBottom = ref(false); + let intervalId = 0; + onMounted(async () => { + const element = scrollPanelRef.value?.$el; + const scrollContainer = element?.querySelector(".p-scrollpanel-content"); + if (scrollContainer) { + scrollContainer.addEventListener("scroll", () => { + scrolledToBottom.value = scrollContainer.scrollTop + scrollContainer.clientHeight === scrollContainer.scrollHeight; + }); + } + const scrollToBottom = /* @__PURE__ */ __name(() => { + if (scrollContainer) { + scrollContainer.scrollTop = scrollContainer.scrollHeight; + } + }, "scrollToBottom"); + watch(log, () => { + if (scrolledToBottom.value) { + scrollToBottom(); + } + }); + const fetchLogs = /* @__PURE__ */ __name(async () => { + log.value = await props.fetchLogs(); + }, "fetchLogs"); + await fetchLogs(); + scrollToBottom(); + intervalId = window.setInterval(fetchLogs, props.fetchInterval); + }); + onBeforeUnmount(() => { + window.clearInterval(intervalId); + }); + return (_ctx, _cache) => { + return openBlock(), createElementBlock("div", _hoisted_1$1, [ + createVNode(unref(script), { + class: "h-full w-full", + ref_key: "scrollPanelRef", + ref: scrollPanelRef + }, { + default: withCtx(() => [ + createBaseVNode("pre", _hoisted_2$1, toDisplayString(log.value), 1) + ]), + _: 1 + }, 512) + ]); + }; + } +}); +const _hoisted_1 = { class: "font-sans flex flex-col justify-center items-center h-screen m-0 text-neutral-300 bg-neutral-900 dark-theme pointer-events-auto" }; +const _hoisted_2 = { class: "text-2xl font-bold" }; +const _sfc_main = /* @__PURE__ */ defineComponent({ + __name: "ServerStartView", + setup(__props) { + const electron = electronAPI(); + const status = ref(t.INITIAL_STATE); + const logs = ref([]); + const updateProgress = /* @__PURE__ */ __name(({ status: newStatus }) => { + status.value = newStatus; + logs.value = []; + }, "updateProgress"); + const addLogMessage = /* @__PURE__ */ __name((message) => { + logs.value = [...logs.value, message]; + }, "addLogMessage"); + const fetchLogs = /* @__PURE__ */ __name(async () => { + return logs.value.join("\n"); + }, "fetchLogs"); + onMounted(() => { + electron.sendReady(); + electron.onProgressUpdate(updateProgress); + electron.onLogMessage((message) => { + addLogMessage(message); + }); + }); + return (_ctx, _cache) => { + return openBlock(), createElementBlock("div", _hoisted_1, [ + createBaseVNode("h2", _hoisted_2, toDisplayString(unref(s)[status.value]), 1), + createVNode(_sfc_main$1, { + "fetch-logs": fetchLogs, + "fetch-interval": 500 + }) + ]); + }; + } +}); +export { + _sfc_main as default +}; +//# sourceMappingURL=ServerStartView-DhnQyBxt.js.map diff --git a/web/assets/ServerStartView-DhnQyBxt.js.map b/web/assets/ServerStartView-DhnQyBxt.js.map new file mode 100644 index 00000000000..3799956c3f0 --- /dev/null +++ b/web/assets/ServerStartView-DhnQyBxt.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ServerStartView-DhnQyBxt.js","sources":["../../src/components/common/LogTerminal.vue","../../src/views/ServerStartView.vue"],"sourcesContent":["\n\n\n\n","\n\n\n"],"names":["ProgressStatus"],"mappings":";;;;;;;;;;;;;AAaA,UAAM,QAAQ;AAKR,UAAA,MAAM,IAAY,EAAE;AACpB,UAAA,iBAAiB,IAA6C,IAAI;AAMlE,UAAA,mBAAmB,IAAI,KAAK;AAElC,QAAI,aAAqB;AAEzB,cAAU,YAAY;AACd,YAAA,UAAU,eAAe,OAAO;AAChC,YAAA,kBAAkB,SAAS,cAAc,wBAAwB;AAEvE,UAAI,iBAAiB;AACH,wBAAA,iBAAiB,UAAU,MAAM;AAC/C,2BAAiB,QACf,gBAAgB,YAAY,gBAAgB,iBAC5C,gBAAgB;AAAA,QAAA,CACnB;AAAA,MACH;AAEA,YAAM,iBAAiB,6BAAM;AAC3B,YAAI,iBAAiB;AACnB,0BAAgB,YAAY,gBAAgB;AAAA,QAC9C;AAAA,MAAA,GAHqB;AAMvB,YAAM,KAAK,MAAM;AACf,YAAI,iBAAiB,OAAO;AACX;QACjB;AAAA,MAAA,CACD;AAED,YAAM,YAAY,mCAAY;AACxB,YAAA,QAAQ,MAAM,MAAM,UAAU;AAAA,MAAA,GADlB;AAIlB,YAAM,UAAU;AACD;AACf,mBAAa,OAAO,YAAY,WAAW,MAAM,aAAa;AAAA,IAAA,CAC/D;AAED,oBAAgB,MAAM;AACpB,aAAO,cAAc,UAAU;AAAA,IAAA,CAChC;;;;;;;;;;;;;;;;;;;;;;AC9CD,UAAM,WAAW;AAEX,UAAA,SAAS,IAAoBA,EAAe,aAAa;AACzD,UAAA,OAAO,IAAc,CAAA,CAAE;AAE7B,UAAM,iBAAiB,wBAAC,EAAE,QAAQ,gBAA4C;AAC5E,aAAO,QAAQ;AACf,WAAK,QAAQ;IAAC,GAFO;AAKjB,UAAA,gBAAgB,wBAAC,YAAoB;AACzC,WAAK,QAAQ,CAAC,GAAG,KAAK,OAAO,OAAO;AAAA,IAAA,GADhB;AAItB,UAAM,YAAY,mCAAY;AACrB,aAAA,KAAK,MAAM,KAAK,IAAI;AAAA,IAAA,GADX;AAIlB,cAAU,MAAM;AACd,eAAS,UAAU;AACnB,eAAS,iBAAiB,cAAc;AAC/B,eAAA,aAAa,CAAC,YAAoB;AACzC,sBAAc,OAAO;AAAA,MAAA,CACtB;AAAA,IAAA,CACF;;;;;;;;;;;;"} \ No newline at end of file diff --git a/web/assets/WelcomeView-DQQgHnsr.css b/web/assets/WelcomeView-DQQgHnsr.css new file mode 100644 index 00000000000..897c837baae --- /dev/null +++ b/web/assets/WelcomeView-DQQgHnsr.css @@ -0,0 +1,36 @@ + +.animated-gradient-text[data-v-12b8b11b] { + font-weight: 700; + font-size: clamp(2rem, 8vw, 4rem); + background: linear-gradient(to right, #12c2e9, #c471ed, #f64f59, #12c2e9); + background-size: 300% auto; + background-clip: text; + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + animation: gradient-12b8b11b 8s linear infinite; +} +.text-glow[data-v-12b8b11b] { + filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3)); +} +@keyframes gradient-12b8b11b { +0% { + background-position: 0% center; +} +100% { + background-position: 300% center; +} +} +.fade-in-up[data-v-12b8b11b] { + animation: fadeInUp-12b8b11b 1.5s ease-out; + animation-fill-mode: both; +} +@keyframes fadeInUp-12b8b11b { +0% { + opacity: 0; + transform: translateY(20px); +} +100% { + opacity: 1; + transform: translateY(0); +} +} diff --git a/web/assets/WelcomeView-DcG41PQw.js b/web/assets/WelcomeView-DcG41PQw.js new file mode 100644 index 00000000000..edec4e0ce73 --- /dev/null +++ b/web/assets/WelcomeView-DcG41PQw.js @@ -0,0 +1,33 @@ +var __defProp = Object.defineProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +import { d as defineComponent, g as openBlock, h as createElementBlock, A as createBaseVNode, a6 as toDisplayString, i as createVNode, z as unref, D as script, P as pushScopeId, Q as popScopeId, _ as _export_sfc } from "./index-BFF4Dqtc.js"; +const _withScopeId = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-12b8b11b"), n = n(), popScopeId(), n), "_withScopeId"); +const _hoisted_1 = { class: "font-sans flex flex-col justify-center items-center h-screen m-0 text-neutral-300 bg-neutral-900 dark-theme pointer-events-auto" }; +const _hoisted_2 = { class: "flex flex-col items-center justify-center gap-8 p-8" }; +const _hoisted_3 = { class: "animated-gradient-text text-glow select-none" }; +const _sfc_main = /* @__PURE__ */ defineComponent({ + __name: "WelcomeView", + setup(__props) { + return (_ctx, _cache) => { + return openBlock(), createElementBlock("div", _hoisted_1, [ + createBaseVNode("div", _hoisted_2, [ + createBaseVNode("h1", _hoisted_3, toDisplayString(_ctx.$t("welcome.title")), 1), + createVNode(unref(script), { + label: _ctx.$t("welcome.getStarted"), + icon: "pi pi-arrow-right", + iconPos: "right", + size: "large", + rounded: "", + onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$router.push("/install")), + class: "p-4 text-lg fade-in-up" + }, null, 8, ["label"]) + ]) + ]); + }; + } +}); +const WelcomeView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-12b8b11b"]]); +export { + WelcomeView as default +}; +//# sourceMappingURL=WelcomeView-DcG41PQw.js.map diff --git a/web/assets/WelcomeView-DcG41PQw.js.map b/web/assets/WelcomeView-DcG41PQw.js.map new file mode 100644 index 00000000000..41207f2146c --- /dev/null +++ b/web/assets/WelcomeView-DcG41PQw.js.map @@ -0,0 +1 @@ +{"version":3,"file":"WelcomeView-DcG41PQw.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/web/assets/index-B4gmhi99.js b/web/assets/index-B4gmhi99.js new file mode 100644 index 00000000000..2735c1b7ac7 --- /dev/null +++ b/web/assets/index-B4gmhi99.js @@ -0,0 +1,62 @@ +const o = { + LOADING_PROGRESS: "loading-progress", + IS_PACKAGED: "is-packaged", + RENDERER_READY: "renderer-ready", + RESTART_APP: "restart-app", + REINSTALL: "reinstall", + LOG_MESSAGE: "log-message", + OPEN_DIALOG: "open-dialog", + DOWNLOAD_PROGRESS: "download-progress", + START_DOWNLOAD: "start-download", + PAUSE_DOWNLOAD: "pause-download", + RESUME_DOWNLOAD: "resume-download", + CANCEL_DOWNLOAD: "cancel-download", + DELETE_MODEL: "delete-model", + GET_ALL_DOWNLOADS: "get-all-downloads", + GET_ELECTRON_VERSION: "get-electron-version", + SEND_ERROR_TO_SENTRY: "send-error-to-sentry", + GET_BASE_PATH: "get-base-path", + GET_MODEL_CONFIG_PATH: "get-model-config-path", + OPEN_PATH: "open-path", + OPEN_LOGS_PATH: "open-logs-path", + OPEN_DEV_TOOLS: "open-dev-tools", + IS_FIRST_TIME_SETUP: "is-first-time-setup", + GET_SYSTEM_PATHS: "get-system-paths", + VALIDATE_INSTALL_PATH: "validate-install-path", + VALIDATE_COMFYUI_SOURCE: "validate-comfyui-source", + SHOW_DIRECTORY_PICKER: "show-directory-picker", + INSTALL_COMFYUI: "install-comfyui" +}; +var t = /* @__PURE__ */ ((e) => (e.INITIAL_STATE = "initial-state", e.PYTHON_SETUP = "python-setup", e.STARTING_SERVER = "starting-server", e.READY = "ready", e.ERROR = "error", e.ERROR_INSTALL_PATH = "error-install-path", e))(t || {}); +const s = { + "initial-state": "Loading...", + "python-setup": "Setting up Python Environment...", + "starting-server": "Starting ComfyUI server...", + ready: "Finishing...", + error: "Was not able to start ComfyUI. Please check the logs for more details. You can open it from the Help menu. Please report issues to: https://forum.comfy.org", + "error-install-path": "Installation path does not exist. Please reset the installation location." +}, a = "electronAPI", n = "https://942cadba58d247c9cab96f45221aa813@o4507954455314432.ingest.us.sentry.io/4508007940685824", r = [ + { + id: "user_files", + label: "User Files", + description: "Settings and user-created workflows" + }, + { + id: "models", + label: "Models", + description: "Reference model files from existing ComfyUI installations. (No copy)" + } + // TODO: Decide whether we want to auto-migrate custom nodes, and install their dependencies. + // huchenlei: This is a very essential thing for migration experience. + // { + // id: 'custom_nodes', + // label: 'Custom Nodes', + // description: 'Reference custom node files from existing ComfyUI installations. (No copy)', + // }, +]; +export { + r, + s, + t +}; +//# sourceMappingURL=index-B4gmhi99.js.map diff --git a/web/assets/index-B4gmhi99.js.map b/web/assets/index-B4gmhi99.js.map new file mode 100644 index 00000000000..780ebacc93e --- /dev/null +++ b/web/assets/index-B4gmhi99.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index-B4gmhi99.js","sources":["../../node_modules/@comfyorg/comfyui-electron-types/index.mjs"],"sourcesContent":["const o = {\n LOADING_PROGRESS: \"loading-progress\",\n IS_PACKAGED: \"is-packaged\",\n RENDERER_READY: \"renderer-ready\",\n RESTART_APP: \"restart-app\",\n REINSTALL: \"reinstall\",\n LOG_MESSAGE: \"log-message\",\n OPEN_DIALOG: \"open-dialog\",\n DOWNLOAD_PROGRESS: \"download-progress\",\n START_DOWNLOAD: \"start-download\",\n PAUSE_DOWNLOAD: \"pause-download\",\n RESUME_DOWNLOAD: \"resume-download\",\n CANCEL_DOWNLOAD: \"cancel-download\",\n DELETE_MODEL: \"delete-model\",\n GET_ALL_DOWNLOADS: \"get-all-downloads\",\n GET_ELECTRON_VERSION: \"get-electron-version\",\n SEND_ERROR_TO_SENTRY: \"send-error-to-sentry\",\n GET_BASE_PATH: \"get-base-path\",\n GET_MODEL_CONFIG_PATH: \"get-model-config-path\",\n OPEN_PATH: \"open-path\",\n OPEN_LOGS_PATH: \"open-logs-path\",\n OPEN_DEV_TOOLS: \"open-dev-tools\",\n IS_FIRST_TIME_SETUP: \"is-first-time-setup\",\n GET_SYSTEM_PATHS: \"get-system-paths\",\n VALIDATE_INSTALL_PATH: \"validate-install-path\",\n VALIDATE_COMFYUI_SOURCE: \"validate-comfyui-source\",\n SHOW_DIRECTORY_PICKER: \"show-directory-picker\",\n INSTALL_COMFYUI: \"install-comfyui\"\n};\nvar t = /* @__PURE__ */ ((e) => (e.INITIAL_STATE = \"initial-state\", e.PYTHON_SETUP = \"python-setup\", e.STARTING_SERVER = \"starting-server\", e.READY = \"ready\", e.ERROR = \"error\", e.ERROR_INSTALL_PATH = \"error-install-path\", e))(t || {});\nconst s = {\n \"initial-state\": \"Loading...\",\n \"python-setup\": \"Setting up Python Environment...\",\n \"starting-server\": \"Starting ComfyUI server...\",\n ready: \"Finishing...\",\n error: \"Was not able to start ComfyUI. Please check the logs for more details. You can open it from the Help menu. Please report issues to: https://forum.comfy.org\",\n \"error-install-path\": \"Installation path does not exist. Please reset the installation location.\"\n}, a = \"electronAPI\", n = \"https://942cadba58d247c9cab96f45221aa813@o4507954455314432.ingest.us.sentry.io/4508007940685824\", r = [\n {\n id: \"user_files\",\n label: \"User Files\",\n description: \"Settings and user-created workflows\"\n },\n {\n id: \"models\",\n label: \"Models\",\n description: \"Reference model files from existing ComfyUI installations. (No copy)\"\n }\n // TODO: Decide whether we want to auto-migrate custom nodes, and install their dependencies.\n // huchenlei: This is a very essential thing for migration experience.\n // {\n // id: 'custom_nodes',\n // label: 'Custom Nodes',\n // description: 'Reference custom node files from existing ComfyUI installations. (No copy)',\n // },\n];\nexport {\n a as ELECTRON_BRIDGE_API,\n o as IPC_CHANNELS,\n r as MigrationItems,\n s as ProgressMessages,\n t as ProgressStatus,\n n as SENTRY_URL_ENDPOINT\n};\n"],"names":[],"mappings":"AAAA,MAAM,IAAI;AAAA,EACR,kBAAkB;AAAA,EAClB,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,aAAa;AAAA,EACb,WAAW;AAAA,EACX,aAAa;AAAA,EACb,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,sBAAsB;AAAA,EACtB,sBAAsB;AAAA,EACtB,eAAe;AAAA,EACf,uBAAuB;AAAA,EACvB,WAAW;AAAA,EACX,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,qBAAqB;AAAA,EACrB,kBAAkB;AAAA,EAClB,uBAAuB;AAAA,EACvB,yBAAyB;AAAA,EACzB,uBAAuB;AAAA,EACvB,iBAAiB;AACnB;AACG,IAAC,IAAqB,kBAAC,OAAO,EAAE,gBAAgB,iBAAiB,EAAE,eAAe,gBAAgB,EAAE,kBAAkB,mBAAmB,EAAE,QAAQ,SAAS,EAAE,QAAQ,SAAS,EAAE,qBAAqB,sBAAsB,IAAI,KAAK,CAAA,CAAE;AACrO,MAAC,IAAI;AAAA,EACR,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,mBAAmB;AAAA,EACnB,OAAO;AAAA,EACP,OAAO;AAAA,EACP,sBAAsB;AACxB,GAAG,IAAI,eAAe,IAAI,mGAAmG,IAAI;AAAA,EAC/H;AAAA,IACE,IAAI;AAAA,IACJ,OAAO;AAAA,IACP,aAAa;AAAA,EACd;AAAA,EACD;AAAA,IACE,IAAI;AAAA,IACJ,OAAO;AAAA,IACP,aAAa;AAAA,EACd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQH;","x_google_ignoreList":[0]} \ No newline at end of file diff --git a/web/assets/index-BReiUkk9.js b/web/assets/index-B9D1gTH5.js similarity index 97% rename from web/assets/index-BReiUkk9.js rename to web/assets/index-B9D1gTH5.js index 396a3414906..768a0c49ee7 100644 --- a/web/assets/index-BReiUkk9.js +++ b/web/assets/index-B9D1gTH5.js @@ -1,7 +1,7 @@ var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -import { bF as ComfyDialog, bG as $el, bH as ComfyApp, c as app, k as LiteGraph, b0 as LGraphCanvas, bI as DraggableList, ba as useToastStore, aE as useNodeDefStore, bC as api, L as LGraphGroup, bJ as KeyComboImpl, M as useKeybindingStore, F as useCommandStore, e as LGraphNode, bK as ComfyWidgets, bL as applyTextReplacements } from "./index-BHayQCxv.js"; -import { mergeIfValid, getWidgetConfig, setWidgetConfig } from "./widgetInputs-DdecKYqd.js"; +import { bV as ComfyDialog, bW as $el, bX as ComfyApp, c as app, k as LiteGraph, b2 as LGraphCanvas, bY as DraggableList, bf as useToastStore, bZ as serialise, aE as useNodeDefStore, b_ as deserialiseAndCreate, bH as api, L as LGraphGroup, b$ as KeyComboImpl, M as useKeybindingStore, F as useCommandStore, e as LGraphNode, c0 as ComfyWidgets, c1 as applyTextReplacements } from "./index-BFF4Dqtc.js"; +import { mergeIfValid, getWidgetConfig, setWidgetConfig } from "./widgetInputs-D2xBWAwv.js"; class ClipspaceDialog extends ComfyDialog { static { __name(this, "ClipspaceDialog"); @@ -160,7 +160,7 @@ app.registerExtension({ window.comfyAPI = window.comfyAPI || {}; window.comfyAPI.clipspace = window.comfyAPI.clipspace || {}; window.comfyAPI.clipspace.ClipspaceDialog = ClipspaceDialog; -const ext$2 = { +const ext$1 = { name: "Comfy.ContextMenuFilter", init() { const ctxMenu = LiteGraph.ContextMenu; @@ -178,7 +178,7 @@ const ext$2 = { let itemCount = displayedItems.length; requestAnimationFrame(() => { const currentNode = LGraphCanvas.active_canvas.current_node; - const clickedComboValue = currentNode.widgets?.filter( + const clickedComboValue = currentNode?.widgets?.filter( (w) => w.type === "combo" && w.options.values?.length === values.length ).find( (w) => w.options.values?.every((v, i) => v === values[i]) @@ -284,7 +284,7 @@ const ext$2 = { LiteGraph.ContextMenu.prototype = ctxMenu.prototype; } }; -app.registerExtension(ext$2); +app.registerExtension(ext$1); function stripComments(str) { return str.replace(/\/\*[\s\S]*?\*\/|\/\/.*/g, ""); } @@ -966,17 +966,13 @@ class GroupNodeBuilder { } } }, "storeExternalLinks"); - const backup = localStorage.getItem("litegrapheditor_clipboard"); try { - app.canvas.copyToClipboard(this.nodes); - const config = JSON.parse( - localStorage.getItem("litegrapheditor_clipboard") - ); + const serialised = serialise(this.nodes, app.canvas.graph); + const config = JSON.parse(serialised); storeLinkTypes(config); storeExternalLinks(config); return config; } finally { - localStorage.setItem("litegrapheditor_clipboard", backup); } } } @@ -1517,7 +1513,6 @@ class GroupNodeHandler { }; this.node.convertToNodes = () => { const addInnerNodes = /* @__PURE__ */ __name(() => { - const backup = localStorage.getItem("litegrapheditor_clipboard"); const c = { ...this.groupData.nodeData }; c.nodes = [...c.nodes]; const innerNodes = this.node.getInnerNodes(); @@ -1531,9 +1526,7 @@ class GroupNodeHandler { } c.nodes[i] = { ...c.nodes[i], id: id2 }; } - localStorage.setItem("litegrapheditor_clipboard", JSON.stringify(c)); - app.canvas.pasteFromClipboard(); - localStorage.setItem("litegrapheditor_clipboard", backup); + deserialiseAndCreate(JSON.stringify(c), app.canvas); const [x, y] = this.node.pos; let top; let left; @@ -1580,10 +1573,8 @@ class GroupNodeHandler { } } for (const newNode of newNodes2) { - newNode.pos = [ - newNode.pos[0] - (left - x), - newNode.pos[1] - (top - y) - ]; + newNode.pos[0] -= left - x; + newNode.pos[1] -= top - y; } return { newNodes: newNodes2, selectedIds: selectedIds2 }; }, "addInnerNodes"); @@ -1618,10 +1609,12 @@ class GroupNodeHandler { } } }, "reconnectOutputs"); + app.canvas.emitBeforeChange(); const { newNodes, selectedIds } = addInnerNodes(); reconnectInputs(selectedIds); reconnectOutputs(selectedIds); app.graph.remove(this.node); + app.canvas.emitAfterChange(); return newNodes; }; const getExtraMenuOptions = this.node.getExtraMenuOptions; @@ -2030,10 +2023,10 @@ function manageGroupNodes() { new ManageGroupDialog(app).show(); } __name(manageGroupNodes, "manageGroupNodes"); -const id$3 = "Comfy.GroupNode"; +const id$2 = "Comfy.GroupNode"; let globalDefs; -const ext$1 = { - name: id$3, +const ext = { + name: id$2, commands: [ { id: "Comfy.GroupNode.ConvertSelectedNodesToGroupNode", @@ -2103,56 +2096,18 @@ const ext$1 = { } } }; -app.registerExtension(ext$1); +app.registerExtension(ext); window.comfyAPI = window.comfyAPI || {}; window.comfyAPI.groupNode = window.comfyAPI.groupNode || {}; window.comfyAPI.groupNode.GroupNodeConfig = GroupNodeConfig; window.comfyAPI.groupNode.GroupNodeHandler = GroupNodeHandler; function setNodeMode(node, mode) { node.mode = mode; - node.graph.change(); + node.graph?.change(); } __name(setNodeMode, "setNodeMode"); -function addNodesToGroup(group, nodes = []) { - var x1, y1, x2, y2; - var nx1, ny1, nx2, ny2; - var node; - x1 = y1 = x2 = y2 = -1; - nx1 = ny1 = nx2 = ny2 = -1; - for (var n of [group.nodes, nodes]) { - for (var i in n) { - node = n[i]; - nx1 = node.pos[0]; - ny1 = node.pos[1]; - nx2 = node.pos[0] + node.size[0]; - ny2 = node.pos[1] + node.size[1]; - if (node.type != "Reroute") { - ny1 -= LiteGraph.NODE_TITLE_HEIGHT; - } - if (node.flags?.collapsed) { - ny2 = ny1 + LiteGraph.NODE_TITLE_HEIGHT; - if (node?._collapsed_width) { - nx2 = nx1 + Math.round(node._collapsed_width); - } - } - if (x1 == -1 || nx1 < x1) { - x1 = nx1; - } - if (y1 == -1 || ny1 < y1) { - y1 = ny1; - } - if (x2 == -1 || nx2 > x2) { - x2 = nx2; - } - if (y2 == -1 || ny2 > y2) { - y2 = ny2; - } - } - } - var padding = 10; - y1 = y1 - Math.round(group.font_size * 1.4); - group.pos = [x1 - padding, y1 - padding]; - group.size = [x2 - x1 + padding * 2, y2 - y1 + padding * 2]; +function addNodesToGroup(group, items) { + group.resizeTo([...group.children, ...items]); } __name(addNodesToGroup, "addNodesToGroup"); app.registerExtension({ @@ -2168,11 +2123,11 @@ app.registerExtension({ if (!group) { options.push({ content: "Add Group For Selected Nodes", - disabled: !Object.keys(app.canvas.selected_nodes || {}).length, + disabled: !this.selectedItems?.size, callback: /* @__PURE__ */ __name(() => { const group2 = new LGraphGroup(); - addNodesToGroup(group2, this.selected_nodes); - app.canvas.graph.add(group2); + addNodesToGroup(group2, this.selectedItems); + this.graph.add(group2); this.graph.change(); }, "callback") }); @@ -2182,9 +2137,9 @@ app.registerExtension({ const nodesInGroup = group.nodes; options.push({ content: "Add Selected Nodes To Group", - disabled: !Object.keys(app.canvas.selected_nodes || {}).length, + disabled: !this.selectedItems?.size, callback: /* @__PURE__ */ __name(() => { - addNodesToGroup(group, this.selected_nodes); + addNodesToGroup(group, this.selectedItems); this.graph.change(); }, "callback") }); @@ -2203,7 +2158,8 @@ app.registerExtension({ options.push({ content: "Fit Group To Nodes", callback: /* @__PURE__ */ __name(() => { - addNodesToGroup(group); + group.recomputeInsideNodes(); + group.resizeTo(group.children); this.graph.change(); }, "callback") }); @@ -2329,9 +2285,9 @@ app.registerExtension({ }; } }); -const id$2 = "Comfy.InvertMenuScrolling"; +const id$1 = "Comfy.InvertMenuScrolling"; app.registerExtension({ - name: id$2, + name: id$1, init() { const ctxMenu = LiteGraph.ContextMenu; const replace = /* @__PURE__ */ __name(() => { @@ -2347,7 +2303,7 @@ app.registerExtension({ LiteGraph.ContextMenu.prototype = ctxMenu.prototype; }, "replace"); app.ui.settings.addSetting({ - id: id$2, + id: id$1, category: ["Comfy", "Graph", "InvertMenuScrolling"], name: "Invert Context Menu Scrolling", type: "boolean", @@ -2379,8 +2335,8 @@ app.registerExtension({ const commandStore = useCommandStore(); const keybinding = keybindingStore.getKeybinding(keyCombo); if (keybinding && keybinding.targetSelector !== "#graph-canvas") { - await commandStore.execute(keybinding.commandId); event.preventDefault(); + await commandStore.execute(keybinding.commandId); return; } if (event.ctrlKey || event.altKey || event.metaKey) { @@ -2403,35 +2359,6 @@ app.registerExtension({ window.addEventListener("keydown", keybindListener); } }); -const id$1 = "Comfy.LinkRenderMode"; -const ext = { - name: id$1, - async setup(app2) { - app2.ui.settings.addSetting({ - id: id$1, - category: ["Comfy", "Graph", "LinkRenderMode"], - name: "Link Render Mode", - defaultValue: 2, - type: "combo", - options: [ - { value: LiteGraph.STRAIGHT_LINK.toString(), text: "Straight" }, - { value: LiteGraph.LINEAR_LINK.toString(), text: "Linear" }, - { value: LiteGraph.SPLINE_LINK.toString(), text: "Spline" }, - { value: LiteGraph.HIDDEN_LINK.toString(), text: "Hidden" } - ], - onChange(value) { - app2.canvas.links_render_mode = +value; - app2.canvas.setDirty( - /* fg */ - false, - /* bg */ - true - ); - } - }); - } -}; -app.registerExtension(ext); function dataURLToBlob(dataURL) { const parts = dataURL.split(";base64,"); const contentType = parts[0].split(":")[1]; @@ -3714,8 +3641,12 @@ app.registerExtension({ clipboardAction(async () => { const data = JSON.parse(t.data); await GroupNodeConfig.registerFromWorkflow(data.groupNodes, {}); - localStorage.setItem("litegrapheditor_clipboard", t.data); - app.canvas.pasteFromClipboard(); + if (!data.reroutes) { + deserialiseAndCreate(t.data, app.canvas); + } else { + localStorage.setItem("litegrapheditor_clipboard", t.data); + app.canvas.pasteFromClipboard(); + } }); }, "callback") }; @@ -4049,9 +3980,10 @@ let touchCount = 0; app.registerExtension({ name: "Comfy.SimpleTouchSupport", setup() { - let zoomPos; + let touchDist; let touchTime; let lastTouch; + let lastScale; function getMultiTouchPos(e) { return Math.hypot( e.touches[0].clientX - e.touches[1].clientX, @@ -4059,63 +3991,90 @@ app.registerExtension({ ); } __name(getMultiTouchPos, "getMultiTouchPos"); - app.canvasEl.addEventListener( + function getMultiTouchCenter(e) { + return { + clientX: (e.touches[0].clientX + e.touches[1].clientX) / 2, + clientY: (e.touches[0].clientY + e.touches[1].clientY) / 2 + }; + } + __name(getMultiTouchCenter, "getMultiTouchCenter"); + app.canvasEl.parentElement.addEventListener( "touchstart", (e) => { touchCount++; lastTouch = null; + lastScale = null; if (e.touches?.length === 1) { touchTime = /* @__PURE__ */ new Date(); lastTouch = e.touches[0]; } else { touchTime = null; if (e.touches?.length === 2) { - zoomPos = getMultiTouchPos(e); + lastScale = app.canvas.ds.scale; + lastTouch = getMultiTouchCenter(e); + touchDist = getMultiTouchPos(e); app.canvas.pointer_is_down = false; } } }, true ); - app.canvasEl.addEventListener("touchend", (e) => { - touchZooming = false; - touchCount = e.touches?.length ?? touchCount - 1; + app.canvasEl.parentElement.addEventListener("touchend", (e) => { + touchCount--; + if (e.touches?.length !== 1) touchZooming = false; if (touchTime && !e.touches?.length) { if ((/* @__PURE__ */ new Date()).getTime() - touchTime > 600) { - try { - e.constructor = CustomEvent; - } catch (error) { + if (e.target === app.canvasEl) { + app.canvasEl.dispatchEvent( + new PointerEvent("pointerdown", { + button: 2, + clientX: e.changedTouches[0].clientX, + clientY: e.changedTouches[0].clientY + }) + ); + e.preventDefault(); } - e.clientX = lastTouch.clientX; - e.clientY = lastTouch.clientY; - app.canvas.pointer_is_down = true; - app.canvas._mousedown_callback(e); } touchTime = null; } }); - app.canvasEl.addEventListener( + app.canvasEl.parentElement.addEventListener( "touchmove", (e) => { touchTime = null; - if (e.touches?.length === 2) { + if (e.touches?.length === 2 && lastTouch && !e.ctrlKey && !e.shiftKey) { + e.preventDefault(); app.canvas.pointer_is_down = false; touchZooming = true; - LiteGraph.closeAllContextMenus(); + LiteGraph.closeAllContextMenus(window); app.canvas.search_box?.close(); - const newZoomPos = getMultiTouchPos(e); - const midX = (e.touches[0].clientX + e.touches[1].clientX) / 2; - const midY = (e.touches[0].clientY + e.touches[1].clientY) / 2; - let scale = app.canvas.ds.scale; - const diff = zoomPos - newZoomPos; - if (diff > 0.5) { - scale *= 1 / 1.07; - } else if (diff < -0.5) { - scale *= 1.07; + const newTouchDist = getMultiTouchPos(e); + const center = getMultiTouchCenter(e); + let scale = lastScale * newTouchDist / touchDist; + const newX = (center.clientX - lastTouch.clientX) / scale; + const newY = (center.clientY - lastTouch.clientY) / scale; + if (scale < app.canvas.ds.min_scale) { + scale = app.canvas.ds.min_scale; + } else if (scale > app.canvas.ds.max_scale) { + scale = app.canvas.ds.max_scale; + } + const oldScale = app.canvas.ds.scale; + app.canvas.ds.scale = scale; + if (Math.abs(app.canvas.ds.scale - 1) < 0.01) { + app.canvas.ds.scale = 1; } - app.canvas.ds.changeScale(scale, [midX, midY]); + const newScale = app.canvas.ds.scale; + const convertScaleToOffset = /* @__PURE__ */ __name((scale2) => [ + center.clientX / scale2 - app.canvas.ds.offset[0], + center.clientY / scale2 - app.canvas.ds.offset[1] + ], "convertScaleToOffset"); + var oldCenter = convertScaleToOffset(oldScale); + var newCenter = convertScaleToOffset(newScale); + app.canvas.ds.offset[0] += newX + newCenter[0] - oldCenter[0]; + app.canvas.ds.offset[1] += newY + newCenter[1] - oldCenter[1]; + lastTouch.clientX = center.clientX; + lastTouch.clientY = center.clientY; app.canvas.setDirty(true, true); - zoomPos = newZoomPos; } }, true @@ -4127,6 +4086,7 @@ LGraphCanvas.prototype.processMouseDown = function(e) { if (touchZooming || touchCount) { return; } + app.canvas.pointer_is_down = false; return processMouseDown.apply(this, arguments); }; const processMouseMove = LGraphCanvas.prototype.processMouseMove; @@ -4539,7 +4499,9 @@ app.registerExtension({ /* name=*/ "audioUI", audio, - { serialize: false } + { + serialize: false + } ); const isOutputNode = node.constructor.nodeData.output_node; if (isOutputNode) { @@ -4633,4 +4595,4 @@ app.registerExtension({ }; } }); -//# sourceMappingURL=index-BReiUkk9.js.map +//# sourceMappingURL=index-B9D1gTH5.js.map diff --git a/web/assets/index-B9D1gTH5.js.map b/web/assets/index-B9D1gTH5.js.map new file mode 100644 index 00000000000..60298c89a0f --- /dev/null +++ b/web/assets/index-B9D1gTH5.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index-B9D1gTH5.js","sources":["../../src/extensions/core/clipspace.ts","../../src/extensions/core/contextMenuFilter.ts","../../src/extensions/core/dynamicPrompts.ts","../../src/extensions/core/editAttention.ts","../../src/extensions/core/groupNodeManage.ts","../../src/extensions/core/groupNode.ts","../../src/extensions/core/groupOptions.ts","../../src/extensions/core/invertMenuScrolling.ts","../../src/extensions/core/keybinds.ts","../../src/extensions/core/maskeditor.ts","../../src/extensions/core/nodeTemplates.ts","../../src/extensions/core/noteNode.ts","../../src/extensions/core/rerouteNode.ts","../../src/extensions/core/saveImageExtraOutput.ts","../../src/extensions/core/simpleTouchSupport.ts","../../src/extensions/core/slotDefaults.ts","../../src/extensions/core/snapToGrid.ts","../../src/extensions/core/uploadImage.ts","../../src/extensions/core/webcamCapture.ts","../../src/extensions/core/uploadAudio.ts"],"sourcesContent":["import { app } from '../../scripts/app'\nimport { ComfyDialog, $el } from '../../scripts/ui'\nimport { ComfyApp } from '../../scripts/app'\n\nexport class ClipspaceDialog extends ComfyDialog {\n static items: Array<\n HTMLButtonElement & {\n contextPredicate?: () => boolean\n }\n > = []\n static instance: ClipspaceDialog | null = null\n\n static registerButton(\n name: string,\n contextPredicate: () => boolean,\n callback: () => void\n ) {\n const item = $el('button', {\n type: 'button',\n textContent: name,\n contextPredicate: contextPredicate,\n onclick: callback\n })\n\n ClipspaceDialog.items.push(item)\n }\n\n static invalidatePreview() {\n if (\n ComfyApp.clipspace &&\n ComfyApp.clipspace.imgs &&\n ComfyApp.clipspace.imgs.length > 0\n ) {\n const img_preview = document.getElementById(\n 'clipspace_preview'\n ) as HTMLImageElement\n if (img_preview) {\n img_preview.src =\n ComfyApp.clipspace.imgs[ComfyApp.clipspace['selectedIndex']].src\n img_preview.style.maxHeight = '100%'\n img_preview.style.maxWidth = '100%'\n }\n }\n }\n\n static invalidate() {\n if (ClipspaceDialog.instance) {\n const self = ClipspaceDialog.instance\n // allow reconstruct controls when copying from non-image to image content.\n const children = $el('div.comfy-modal-content', [\n self.createImgSettings(),\n ...self.createButtons()\n ])\n\n if (self.element) {\n // update\n if (self.element.firstChild) {\n self.element.removeChild(self.element.firstChild)\n }\n self.element.appendChild(children)\n } else {\n // new\n self.element = $el('div.comfy-modal', { parent: document.body }, [\n children\n ])\n }\n\n if (self.element.children[0].children.length <= 1) {\n self.element.children[0].appendChild(\n $el('p', {}, [\n 'Unable to find the features to edit content of a format stored in the current Clipspace.'\n ])\n )\n }\n\n ClipspaceDialog.invalidatePreview()\n }\n }\n\n constructor() {\n super()\n }\n\n createButtons() {\n const buttons = []\n\n for (let idx in ClipspaceDialog.items) {\n const item = ClipspaceDialog.items[idx]\n if (!item.contextPredicate || item.contextPredicate())\n buttons.push(ClipspaceDialog.items[idx])\n }\n\n buttons.push(\n $el('button', {\n type: 'button',\n textContent: 'Close',\n onclick: () => {\n this.close()\n }\n })\n )\n\n return buttons\n }\n\n createImgSettings() {\n if (ComfyApp.clipspace?.imgs) {\n const combo_items = []\n const imgs = ComfyApp.clipspace.imgs\n\n for (let i = 0; i < imgs.length; i++) {\n combo_items.push($el('option', { value: i }, [`${i}`]))\n }\n\n const combo1 = $el(\n 'select',\n {\n id: 'clipspace_img_selector',\n onchange: (event: Event) => {\n if (event.target && ComfyApp.clipspace) {\n ComfyApp.clipspace['selectedIndex'] = (\n event.target as HTMLSelectElement\n ).selectedIndex\n ClipspaceDialog.invalidatePreview()\n }\n }\n },\n combo_items\n )\n\n const row1 = $el('tr', {}, [\n $el('td', {}, [$el('font', { color: 'white' }, ['Select Image'])]),\n $el('td', {}, [combo1])\n ])\n\n const combo2 = $el(\n 'select',\n {\n id: 'clipspace_img_paste_mode',\n onchange: (event: Event) => {\n if (event.target && ComfyApp.clipspace) {\n ComfyApp.clipspace['img_paste_mode'] = (\n event.target as HTMLSelectElement\n ).value\n }\n }\n },\n [\n $el('option', { value: 'selected' }, 'selected'),\n $el('option', { value: 'all' }, 'all')\n ]\n ) as HTMLSelectElement\n combo2.value = ComfyApp.clipspace['img_paste_mode']\n\n const row2 = $el('tr', {}, [\n $el('td', {}, [$el('font', { color: 'white' }, ['Paste Mode'])]),\n $el('td', {}, [combo2])\n ])\n\n const td = $el(\n 'td',\n { align: 'center', width: '100px', height: '100px', colSpan: '2' },\n [$el('img', { id: 'clipspace_preview', ondragstart: () => false }, [])]\n )\n\n const row3 = $el('tr', {}, [td])\n\n return $el('table', {}, [row1, row2, row3])\n } else {\n return []\n }\n }\n\n createImgPreview() {\n if (ComfyApp.clipspace?.imgs) {\n return $el('img', { id: 'clipspace_preview', ondragstart: () => false })\n } else return []\n }\n\n show() {\n const img_preview = document.getElementById('clipspace_preview')\n ClipspaceDialog.invalidate()\n\n this.element.style.display = 'block'\n }\n}\n\napp.registerExtension({\n name: 'Comfy.Clipspace',\n init(app) {\n app.openClipspace = function () {\n if (!ClipspaceDialog.instance) {\n ClipspaceDialog.instance = new ClipspaceDialog()\n ComfyApp.clipspace_invalidate_handler = ClipspaceDialog.invalidate\n }\n\n if (ComfyApp.clipspace) {\n ClipspaceDialog.instance.show()\n } else app.ui.dialog.show('Clipspace is Empty!')\n }\n }\n})\n","import { LiteGraph, LGraphCanvas } from '@comfyorg/litegraph'\nimport { app } from '../../scripts/app'\n\n// Adds filtering to combo context menus\n\nconst ext = {\n name: 'Comfy.ContextMenuFilter',\n init() {\n const ctxMenu = LiteGraph.ContextMenu\n\n // @ts-expect-error TODO Very hacky way to modify Litegraph behaviour. Fix ctx later.\n LiteGraph.ContextMenu = function (values, options) {\n const ctx = new ctxMenu(values, options)\n\n // If we are a dark menu (only used for combo boxes) then add a filter input\n if (options?.className === 'dark' && values?.length > 4) {\n const filter = document.createElement('input')\n filter.classList.add('comfy-context-menu-filter')\n filter.placeholder = 'Filter list'\n\n ctx.root.prepend(filter)\n\n const items = Array.from(\n ctx.root.querySelectorAll('.litemenu-entry')\n ) as HTMLElement[]\n let displayedItems = [...items]\n let itemCount = displayedItems.length\n\n // We must request an animation frame for the current node of the active canvas to update.\n requestAnimationFrame(() => {\n const currentNode = LGraphCanvas.active_canvas.current_node\n const clickedComboValue = currentNode?.widgets\n ?.filter(\n (w) =>\n w.type === 'combo' && w.options.values?.length === values.length\n )\n .find((w) =>\n w.options.values?.every((v, i) => v === values[i])\n )?.value\n\n let selectedIndex = clickedComboValue\n ? values.findIndex((v: string) => v === clickedComboValue)\n : 0\n if (selectedIndex < 0) {\n selectedIndex = 0\n }\n let selectedItem = displayedItems[selectedIndex]\n updateSelected()\n\n // Apply highlighting to the selected item\n function updateSelected() {\n selectedItem?.style.setProperty('background-color', '')\n selectedItem?.style.setProperty('color', '')\n selectedItem = displayedItems[selectedIndex]\n selectedItem?.style.setProperty(\n 'background-color',\n '#ccc',\n 'important'\n )\n selectedItem?.style.setProperty('color', '#000', 'important')\n }\n\n const positionList = () => {\n const rect = ctx.root.getBoundingClientRect()\n\n // If the top is off-screen then shift the element with scaling applied\n if (rect.top < 0) {\n const scale =\n 1 -\n ctx.root.getBoundingClientRect().height / ctx.root.clientHeight\n\n const shift = (ctx.root.clientHeight * scale) / 2\n\n ctx.root.style.top = -shift + 'px'\n }\n }\n\n // Arrow up/down to select items\n filter.addEventListener('keydown', (event) => {\n switch (event.key) {\n case 'ArrowUp':\n event.preventDefault()\n if (selectedIndex === 0) {\n selectedIndex = itemCount - 1\n } else {\n selectedIndex--\n }\n updateSelected()\n break\n case 'ArrowRight':\n event.preventDefault()\n selectedIndex = itemCount - 1\n updateSelected()\n break\n case 'ArrowDown':\n event.preventDefault()\n if (selectedIndex === itemCount - 1) {\n selectedIndex = 0\n } else {\n selectedIndex++\n }\n updateSelected()\n break\n case 'ArrowLeft':\n event.preventDefault()\n selectedIndex = 0\n updateSelected()\n break\n case 'Enter':\n selectedItem?.click()\n break\n case 'Escape':\n ctx.close()\n break\n }\n })\n\n filter.addEventListener('input', () => {\n // Hide all items that don't match our filter\n const term = filter.value.toLocaleLowerCase()\n // When filtering, recompute which items are visible for arrow up/down and maintain selection.\n displayedItems = items.filter((item) => {\n const isVisible =\n !term || item.textContent?.toLocaleLowerCase().includes(term)\n item.style.display = isVisible ? 'block' : 'none'\n return isVisible\n })\n\n selectedIndex = 0\n if (displayedItems.includes(selectedItem)) {\n selectedIndex = displayedItems.findIndex(\n (d) => d === selectedItem\n )\n }\n itemCount = displayedItems.length\n\n updateSelected()\n\n // If we have an event then we can try and position the list under the source\n if (options.event) {\n let top = options.event.clientY - 10\n\n const bodyRect = document.body.getBoundingClientRect()\n\n const rootRect = ctx.root.getBoundingClientRect()\n if (\n bodyRect.height &&\n top > bodyRect.height - rootRect.height - 10\n ) {\n top = Math.max(0, bodyRect.height - rootRect.height - 10)\n }\n\n ctx.root.style.top = top + 'px'\n positionList()\n }\n })\n\n requestAnimationFrame(() => {\n // Focus the filter box when opening\n filter.focus()\n\n positionList()\n })\n })\n }\n\n return ctx\n }\n\n LiteGraph.ContextMenu.prototype = ctxMenu.prototype\n }\n}\n\napp.registerExtension(ext)\n","// @ts-strict-ignore\nimport { app } from '../../scripts/app'\n\n// Allows for simple dynamic prompt replacement\n// Inputs in the format {a|b} will have a random value of a or b chosen when the prompt is queued.\n\n/*\n * Strips C-style line and block comments from a string\n */\nfunction stripComments(str) {\n return str.replace(/\\/\\*[\\s\\S]*?\\*\\/|\\/\\/.*/g, '')\n}\n\napp.registerExtension({\n name: 'Comfy.DynamicPrompts',\n nodeCreated(node) {\n if (node.widgets) {\n // Locate dynamic prompt text widgets\n // Include any widgets with dynamicPrompts set to true, and customtext\n const widgets = node.widgets.filter((n) => n.dynamicPrompts)\n for (const widget of widgets) {\n // Override the serialization of the value to resolve dynamic prompts for all widgets supporting it in this node\n widget.serializeValue = (workflowNode, widgetIndex) => {\n let prompt = stripComments(widget.value)\n while (\n prompt.replace('\\\\{', '').includes('{') &&\n prompt.replace('\\\\}', '').includes('}')\n ) {\n const startIndex = prompt.replace('\\\\{', '00').indexOf('{')\n const endIndex = prompt.replace('\\\\}', '00').indexOf('}')\n\n const optionsString = prompt.substring(startIndex + 1, endIndex)\n const options = optionsString.split('|')\n\n const randomIndex = Math.floor(Math.random() * options.length)\n const randomOption = options[randomIndex]\n\n prompt =\n prompt.substring(0, startIndex) +\n randomOption +\n prompt.substring(endIndex + 1)\n }\n\n // Overwrite the value in the serialized workflow pnginfo\n if (workflowNode?.widgets_values)\n workflowNode.widgets_values[widgetIndex] = prompt\n\n return prompt\n }\n }\n }\n }\n})\n","import { app } from '../../scripts/app'\n\n// Allows you to edit the attention weight by holding ctrl (or cmd) and using the up/down arrow keys\n\napp.registerExtension({\n name: 'Comfy.EditAttention',\n init() {\n const editAttentionDelta = app.ui.settings.addSetting({\n id: 'Comfy.EditAttention.Delta',\n name: 'Ctrl+up/down precision',\n type: 'slider',\n attrs: {\n min: 0.01,\n max: 0.5,\n step: 0.01\n },\n defaultValue: 0.05\n })\n\n function incrementWeight(weight: string, delta: number): string {\n const floatWeight = parseFloat(weight)\n if (isNaN(floatWeight)) return weight\n const newWeight = floatWeight + delta\n return String(Number(newWeight.toFixed(10)))\n }\n\n type Enclosure = {\n start: number\n end: number\n }\n\n function findNearestEnclosure(\n text: string,\n cursorPos: number\n ): Enclosure | null {\n let start = cursorPos,\n end = cursorPos\n let openCount = 0,\n closeCount = 0\n\n // Find opening parenthesis before cursor\n while (start >= 0) {\n start--\n if (text[start] === '(' && openCount === closeCount) break\n if (text[start] === '(') openCount++\n if (text[start] === ')') closeCount++\n }\n if (start < 0) return null\n\n openCount = 0\n closeCount = 0\n\n // Find closing parenthesis after cursor\n while (end < text.length) {\n if (text[end] === ')' && openCount === closeCount) break\n if (text[end] === '(') openCount++\n if (text[end] === ')') closeCount++\n end++\n }\n if (end === text.length) return null\n\n return { start: start + 1, end: end }\n }\n\n function addWeightToParentheses(text: string): string {\n const parenRegex = /^\\((.*)\\)$/\n const parenMatch = text.match(parenRegex)\n\n const floatRegex = /:([+-]?(\\d*\\.)?\\d+([eE][+-]?\\d+)?)/\n const floatMatch = text.match(floatRegex)\n\n if (parenMatch && !floatMatch) {\n return `(${parenMatch[1]}:1.0)`\n } else {\n return text\n }\n }\n\n function editAttention(event: KeyboardEvent) {\n // @ts-expect-error Runtime narrowing not impl.\n const inputField: HTMLTextAreaElement = event.composedPath()[0]\n const delta = parseFloat(editAttentionDelta.value)\n\n if (inputField.tagName !== 'TEXTAREA') return\n if (!(event.key === 'ArrowUp' || event.key === 'ArrowDown')) return\n if (!event.ctrlKey && !event.metaKey) return\n\n event.preventDefault()\n\n let start = inputField.selectionStart\n let end = inputField.selectionEnd\n let selectedText = inputField.value.substring(start, end)\n\n // If there is no selection, attempt to find the nearest enclosure, or select the current word\n if (!selectedText) {\n const nearestEnclosure = findNearestEnclosure(inputField.value, start)\n if (nearestEnclosure) {\n start = nearestEnclosure.start\n end = nearestEnclosure.end\n selectedText = inputField.value.substring(start, end)\n } else {\n // Select the current word, find the start and end of the word\n const delimiters = ' .,\\\\/!?%^*;:{}=-_`~()\\r\\n\\t'\n\n while (\n !delimiters.includes(inputField.value[start - 1]) &&\n start > 0\n ) {\n start--\n }\n\n while (\n !delimiters.includes(inputField.value[end]) &&\n end < inputField.value.length\n ) {\n end++\n }\n\n selectedText = inputField.value.substring(start, end)\n if (!selectedText) return\n }\n }\n\n // If the selection ends with a space, remove it\n if (selectedText[selectedText.length - 1] === ' ') {\n selectedText = selectedText.substring(0, selectedText.length - 1)\n end -= 1\n }\n\n // If there are parentheses left and right of the selection, select them\n if (\n inputField.value[start - 1] === '(' &&\n inputField.value[end] === ')'\n ) {\n start -= 1\n end += 1\n selectedText = inputField.value.substring(start, end)\n }\n\n // If the selection is not enclosed in parentheses, add them\n if (\n selectedText[0] !== '(' ||\n selectedText[selectedText.length - 1] !== ')'\n ) {\n selectedText = `(${selectedText})`\n }\n\n // If the selection does not have a weight, add a weight of 1.0\n selectedText = addWeightToParentheses(selectedText)\n\n // Increment the weight\n const weightDelta = event.key === 'ArrowUp' ? delta : -delta\n const updatedText = selectedText.replace(\n /\\((.*):([+-]?\\d+(?:\\.\\d+)?)\\)/,\n (match, text, weight) => {\n weight = incrementWeight(weight, weightDelta)\n if (weight == 1) {\n return text\n } else {\n return `(${text}:${weight})`\n }\n }\n )\n\n inputField.setSelectionRange(start, end)\n // Intentional use of deprecated: https://developer.mozilla.org/docs/Web/API/Document/execCommand#using_inserttext\n document.execCommand('insertText', false, updatedText)\n inputField.setSelectionRange(start, start + updatedText.length)\n }\n window.addEventListener('keydown', editAttention)\n }\n})\n","// @ts-strict-ignore\nimport { $el, ComfyDialog } from '../../scripts/ui'\nimport { DraggableList } from '../../scripts/ui/draggableList'\nimport { GroupNodeConfig, GroupNodeHandler } from './groupNode'\nimport './groupNodeManage.css'\nimport { app, type ComfyApp } from '../../scripts/app'\nimport {\n LiteGraph,\n type LGraphNode,\n type LGraphNodeConstructor\n} from '@comfyorg/litegraph'\nimport { useToastStore } from '@/stores/toastStore'\n\nconst ORDER: symbol = Symbol()\nconst PREFIX = 'workflow'\nconst SEPARATOR = '>'\n\nfunction merge(target, source) {\n if (typeof target === 'object' && typeof source === 'object') {\n for (const key in source) {\n const sv = source[key]\n if (typeof sv === 'object') {\n let tv = target[key]\n if (!tv) tv = target[key] = {}\n merge(tv, source[key])\n } else {\n target[key] = sv\n }\n }\n }\n\n return target\n}\n\nexport class ManageGroupDialog extends ComfyDialog {\n tabs: Record<\n 'Inputs' | 'Outputs' | 'Widgets',\n { tab: HTMLAnchorElement; page: HTMLElement }\n >\n selectedNodeIndex: number | null | undefined\n selectedTab: keyof ManageGroupDialog['tabs'] = 'Inputs'\n selectedGroup: string | undefined\n modifications: Record<\n string,\n Record<\n string,\n Record<\n string,\n { name?: string | undefined; visible?: boolean | undefined }\n >\n >\n > = {}\n nodeItems: any[]\n app: ComfyApp\n groupNodeType: LGraphNodeConstructor\n groupNodeDef: any\n groupData: any\n\n innerNodesList: HTMLUListElement\n widgetsPage: HTMLElement\n inputsPage: HTMLElement\n outputsPage: HTMLElement\n draggable: any\n\n get selectedNodeInnerIndex() {\n return +this.nodeItems[this.selectedNodeIndex].dataset.nodeindex\n }\n\n constructor(app) {\n super()\n this.app = app\n this.element = $el('dialog.comfy-group-manage', {\n parent: document.body\n }) as HTMLDialogElement\n }\n\n changeTab(tab) {\n this.tabs[this.selectedTab].tab.classList.remove('active')\n this.tabs[this.selectedTab].page.classList.remove('active')\n this.tabs[tab].tab.classList.add('active')\n this.tabs[tab].page.classList.add('active')\n this.selectedTab = tab\n }\n\n changeNode(index, force?) {\n if (!force && this.selectedNodeIndex === index) return\n\n if (this.selectedNodeIndex != null) {\n this.nodeItems[this.selectedNodeIndex].classList.remove('selected')\n }\n this.nodeItems[index].classList.add('selected')\n this.selectedNodeIndex = index\n\n if (!this.buildInputsPage() && this.selectedTab === 'Inputs') {\n this.changeTab('Widgets')\n }\n if (!this.buildWidgetsPage() && this.selectedTab === 'Widgets') {\n this.changeTab('Outputs')\n }\n if (!this.buildOutputsPage() && this.selectedTab === 'Outputs') {\n this.changeTab('Inputs')\n }\n\n this.changeTab(this.selectedTab)\n }\n\n getGroupData() {\n this.groupNodeType =\n LiteGraph.registered_node_types[\n `${PREFIX}${SEPARATOR}` + this.selectedGroup\n ]\n this.groupNodeDef = this.groupNodeType.nodeData\n this.groupData = GroupNodeHandler.getGroupData(this.groupNodeType)\n }\n\n changeGroup(group, reset = true) {\n this.selectedGroup = group\n this.getGroupData()\n\n const nodes = this.groupData.nodeData.nodes\n this.nodeItems = nodes.map((n, i) =>\n $el(\n 'li.draggable-item',\n {\n dataset: {\n nodeindex: n.index + ''\n },\n onclick: () => {\n this.changeNode(i)\n }\n },\n [\n $el('span.drag-handle'),\n $el(\n 'div',\n {\n textContent: n.title ?? n.type\n },\n n.title\n ? $el('span', {\n textContent: n.type\n })\n : []\n )\n ]\n )\n )\n\n this.innerNodesList.replaceChildren(...this.nodeItems)\n\n if (reset) {\n this.selectedNodeIndex = null\n this.changeNode(0)\n } else {\n const items = this.draggable.getAllItems()\n let index = items.findIndex((item) => item.classList.contains('selected'))\n if (index === -1) index = this.selectedNodeIndex\n this.changeNode(index, true)\n }\n\n const ordered = [...nodes]\n this.draggable?.dispose()\n this.draggable = new DraggableList(this.innerNodesList, 'li')\n this.draggable.addEventListener(\n 'dragend',\n ({ detail: { oldPosition, newPosition } }) => {\n if (oldPosition === newPosition) return\n ordered.splice(newPosition, 0, ordered.splice(oldPosition, 1)[0])\n for (let i = 0; i < ordered.length; i++) {\n this.storeModification({\n nodeIndex: ordered[i].index,\n section: ORDER,\n prop: 'order',\n value: i\n })\n }\n }\n )\n }\n\n storeModification(props: {\n nodeIndex?: number\n section: symbol\n prop: string\n value: any\n }) {\n const { nodeIndex, section, prop, value } = props\n const groupMod = (this.modifications[this.selectedGroup] ??= {})\n const nodesMod = (groupMod.nodes ??= {})\n const nodeMod = (nodesMod[nodeIndex ?? this.selectedNodeInnerIndex] ??= {})\n const typeMod = (nodeMod[section] ??= {})\n if (typeof value === 'object') {\n const objMod = (typeMod[prop] ??= {})\n Object.assign(objMod, value)\n } else {\n typeMod[prop] = value\n }\n }\n\n getEditElement(section, prop, value, placeholder, checked, checkable = true) {\n if (value === placeholder) value = ''\n\n const mods =\n this.modifications[this.selectedGroup]?.nodes?.[\n this.selectedNodeInnerIndex\n ]?.[section]?.[prop]\n if (mods) {\n if (mods.name != null) {\n value = mods.name\n }\n if (mods.visible != null) {\n checked = mods.visible\n }\n }\n\n return $el('div', [\n $el('input', {\n value,\n placeholder,\n type: 'text',\n onchange: (e) => {\n this.storeModification({\n section,\n prop,\n value: { name: e.target.value }\n })\n }\n }),\n $el('label', { textContent: 'Visible' }, [\n $el('input', {\n type: 'checkbox',\n checked,\n disabled: !checkable,\n onchange: (e) => {\n this.storeModification({\n section,\n prop,\n value: { visible: !!e.target.checked }\n })\n }\n })\n ])\n ])\n }\n\n buildWidgetsPage() {\n const widgets =\n this.groupData.oldToNewWidgetMap[this.selectedNodeInnerIndex]\n const items = Object.keys(widgets ?? {})\n const type = app.graph.extra.groupNodes[this.selectedGroup]\n const config = type.config?.[this.selectedNodeInnerIndex]?.input\n this.widgetsPage.replaceChildren(\n ...items.map((oldName) => {\n return this.getEditElement(\n 'input',\n oldName,\n widgets[oldName],\n oldName,\n config?.[oldName]?.visible !== false\n )\n })\n )\n return !!items.length\n }\n\n buildInputsPage() {\n const inputs = this.groupData.nodeInputs[this.selectedNodeInnerIndex]\n const items = Object.keys(inputs ?? {})\n const type = app.graph.extra.groupNodes[this.selectedGroup]\n const config = type.config?.[this.selectedNodeInnerIndex]?.input\n this.inputsPage.replaceChildren(\n ...items\n .map((oldName) => {\n let value = inputs[oldName]\n if (!value) {\n return\n }\n\n return this.getEditElement(\n 'input',\n oldName,\n value,\n oldName,\n config?.[oldName]?.visible !== false\n )\n })\n .filter(Boolean)\n )\n return !!items.length\n }\n\n buildOutputsPage() {\n const nodes = this.groupData.nodeData.nodes\n const innerNodeDef = this.groupData.getNodeDef(\n nodes[this.selectedNodeInnerIndex]\n )\n const outputs = innerNodeDef?.output ?? []\n const groupOutputs =\n this.groupData.oldToNewOutputMap[this.selectedNodeInnerIndex]\n\n const type = app.graph.extra.groupNodes[this.selectedGroup]\n const config = type.config?.[this.selectedNodeInnerIndex]?.output\n const node = this.groupData.nodeData.nodes[this.selectedNodeInnerIndex]\n const checkable = node.type !== 'PrimitiveNode'\n this.outputsPage.replaceChildren(\n ...outputs\n .map((type, slot) => {\n const groupOutputIndex = groupOutputs?.[slot]\n const oldName = innerNodeDef.output_name?.[slot] ?? type\n let value = config?.[slot]?.name\n const visible = config?.[slot]?.visible || groupOutputIndex != null\n if (!value || value === oldName) {\n value = ''\n }\n return this.getEditElement(\n 'output',\n slot,\n value,\n oldName,\n visible,\n checkable\n )\n })\n .filter(Boolean)\n )\n return !!outputs.length\n }\n\n show(type?) {\n const groupNodes = Object.keys(app.graph.extra?.groupNodes ?? {}).sort(\n (a, b) => a.localeCompare(b)\n )\n\n this.innerNodesList = $el(\n 'ul.comfy-group-manage-list-items'\n ) as HTMLUListElement\n this.widgetsPage = $el('section.comfy-group-manage-node-page')\n this.inputsPage = $el('section.comfy-group-manage-node-page')\n this.outputsPage = $el('section.comfy-group-manage-node-page')\n const pages = $el('div', [\n this.widgetsPage,\n this.inputsPage,\n this.outputsPage\n ])\n\n this.tabs = [\n ['Inputs', this.inputsPage],\n ['Widgets', this.widgetsPage],\n ['Outputs', this.outputsPage]\n ].reduce((p, [name, page]: [string, HTMLElement]) => {\n p[name] = {\n tab: $el('a', {\n onclick: () => {\n this.changeTab(name)\n },\n textContent: name\n }),\n page\n }\n return p\n }, {}) as any\n\n const outer = $el('div.comfy-group-manage-outer', [\n $el('header', [\n $el('h2', 'Group Nodes'),\n $el(\n 'select',\n {\n onchange: (e) => {\n this.changeGroup(e.target.value)\n }\n },\n groupNodes.map((g) =>\n $el('option', {\n textContent: g,\n selected: `${PREFIX}${SEPARATOR}` + g === type,\n value: g\n })\n )\n )\n ]),\n $el('main', [\n $el('section.comfy-group-manage-list', this.innerNodesList),\n $el('section.comfy-group-manage-node', [\n $el(\n 'header',\n Object.values(this.tabs).map((t) => t.tab)\n ),\n pages\n ])\n ]),\n $el('footer', [\n $el(\n 'button.comfy-btn',\n {\n onclick: (e) => {\n const node = app.graph.nodes.find(\n (n) => n.type === `${PREFIX}${SEPARATOR}` + this.selectedGroup\n )\n if (node) {\n useToastStore().addAlert(\n 'This group node is in use in the current workflow, please first remove these.'\n )\n return\n }\n if (\n confirm(\n `Are you sure you want to remove the node: \"${this.selectedGroup}\"`\n )\n ) {\n delete app.graph.extra.groupNodes[this.selectedGroup]\n LiteGraph.unregisterNodeType(\n `${PREFIX}${SEPARATOR}` + this.selectedGroup\n )\n }\n this.show()\n }\n },\n 'Delete Group Node'\n ),\n $el(\n 'button.comfy-btn',\n {\n onclick: async () => {\n let nodesByType\n let recreateNodes = []\n const types = {}\n for (const g in this.modifications) {\n const type = app.graph.extra.groupNodes[g]\n let config = (type.config ??= {})\n\n let nodeMods = this.modifications[g]?.nodes\n if (nodeMods) {\n const keys = Object.keys(nodeMods)\n if (nodeMods[keys[0]][ORDER]) {\n // If any node is reordered, they will all need sequencing\n const orderedNodes = []\n const orderedMods = {}\n const orderedConfig = {}\n\n for (const n of keys) {\n const order = nodeMods[n][ORDER].order\n orderedNodes[order] = type.nodes[+n]\n orderedMods[order] = nodeMods[n]\n orderedNodes[order].index = order\n }\n\n // Rewrite links\n for (const l of type.links) {\n if (l[0] != null) l[0] = type.nodes[l[0]].index\n if (l[2] != null) l[2] = type.nodes[l[2]].index\n }\n\n // Rewrite externals\n if (type.external) {\n for (const ext of type.external) {\n ext[0] = type.nodes[ext[0]]\n }\n }\n\n // Rewrite modifications\n for (const id of keys) {\n if (config[id]) {\n orderedConfig[type.nodes[id].index] = config[id]\n }\n delete config[id]\n }\n\n type.nodes = orderedNodes\n nodeMods = orderedMods\n type.config = config = orderedConfig\n }\n\n merge(config, nodeMods)\n }\n\n types[g] = type\n\n if (!nodesByType) {\n nodesByType = app.graph.nodes.reduce((p, n) => {\n p[n.type] ??= []\n p[n.type].push(n)\n return p\n }, {})\n }\n\n const nodes = nodesByType[`${PREFIX}${SEPARATOR}` + g]\n if (nodes) recreateNodes.push(...nodes)\n }\n\n await GroupNodeConfig.registerFromWorkflow(types, {})\n\n for (const node of recreateNodes) {\n node.recreate()\n }\n\n this.modifications = {}\n this.app.graph.setDirtyCanvas(true, true)\n this.changeGroup(this.selectedGroup, false)\n }\n },\n 'Save'\n ),\n $el(\n 'button.comfy-btn',\n { onclick: () => this.element.close() },\n 'Close'\n )\n ])\n ])\n\n this.element.replaceChildren(outer)\n this.changeGroup(\n type\n ? groupNodes.find((g) => `${PREFIX}${SEPARATOR}` + g === type)\n : groupNodes[0]\n )\n this.element.showModal()\n\n this.element.addEventListener('close', () => {\n this.draggable?.dispose()\n })\n }\n}\n","// @ts-strict-ignore\nimport { app } from '../../scripts/app'\nimport { api } from '../../scripts/api'\nimport { mergeIfValid } from './widgetInputs'\nimport { ManageGroupDialog } from './groupNodeManage'\nimport { LGraphCanvas, LiteGraph, type LGraph } from '@comfyorg/litegraph'\nimport { LGraphNode, type NodeId } from '@comfyorg/litegraph/dist/LGraphNode'\nimport { useNodeDefStore } from '@/stores/nodeDefStore'\nimport { ComfyLink, ComfyNode, ComfyWorkflowJSON } from '@/types/comfyWorkflow'\nimport { useToastStore } from '@/stores/toastStore'\nimport { ComfyExtension } from '@/types/comfy'\nimport {\n deserialiseAndCreate,\n serialise\n} from '@/extensions/core/vintageClipboard'\n\ntype GroupNodeWorkflowData = {\n external: ComfyLink[]\n links: ComfyLink[]\n nodes: ComfyNode[]\n}\n\nconst GROUP = Symbol()\n\n// v1 Prefix + Separator: workflow/\n// v2 Prefix + Separator: workflow> (ComfyUI_frontend v1.2.63)\nconst PREFIX = 'workflow'\nconst SEPARATOR = '>'\n\nconst Workflow = {\n InUse: {\n Free: 0,\n Registered: 1,\n InWorkflow: 2\n },\n isInUseGroupNode(name) {\n const id = `${PREFIX}${SEPARATOR}${name}`\n // Check if lready registered/in use in this workflow\n if (app.graph.extra?.groupNodes?.[name]) {\n if (app.graph.nodes.find((n) => n.type === id)) {\n return Workflow.InUse.InWorkflow\n } else {\n return Workflow.InUse.Registered\n }\n }\n return Workflow.InUse.Free\n },\n storeGroupNode(name: string, data: GroupNodeWorkflowData) {\n let extra = app.graph.extra\n if (!extra) app.graph.extra = extra = {}\n let groupNodes = extra.groupNodes\n if (!groupNodes) extra.groupNodes = groupNodes = {}\n groupNodes[name] = data\n }\n}\n\nclass GroupNodeBuilder {\n nodes: LGraphNode[]\n nodeData: any\n\n constructor(nodes: LGraphNode[]) {\n this.nodes = nodes\n }\n\n build() {\n const name = this.getName()\n if (!name) return\n\n // Sort the nodes so they are in execution order\n // this allows for widgets to be in the correct order when reconstructing\n this.sortNodes()\n\n this.nodeData = this.getNodeData()\n Workflow.storeGroupNode(name, this.nodeData)\n\n return { name, nodeData: this.nodeData }\n }\n\n getName() {\n const name = prompt('Enter group name')\n if (!name) return\n const used = Workflow.isInUseGroupNode(name)\n switch (used) {\n case Workflow.InUse.InWorkflow:\n useToastStore().addAlert(\n 'An in use group node with this name already exists embedded in this workflow, please remove any instances or use a new name.'\n )\n return\n case Workflow.InUse.Registered:\n if (\n !confirm(\n 'A group node with this name already exists embedded in this workflow, are you sure you want to overwrite it?'\n )\n ) {\n return\n }\n break\n }\n return name\n }\n\n sortNodes() {\n // Gets the builders nodes in graph execution order\n const nodesInOrder = app.graph.computeExecutionOrder(false)\n this.nodes = this.nodes\n .map((node) => ({ index: nodesInOrder.indexOf(node), node }))\n // @ts-expect-error id might be string\n .sort((a, b) => a.index - b.index || a.node.id - b.node.id)\n .map(({ node }) => node)\n }\n\n getNodeData() {\n const storeLinkTypes = (config) => {\n // Store link types for dynamically typed nodes e.g. reroutes\n for (const link of config.links) {\n const origin = app.graph.getNodeById(link[4])\n const type = origin.outputs[link[1]].type\n link.push(type)\n }\n }\n\n const storeExternalLinks = (config) => {\n // Store any external links to the group in the config so when rebuilding we add extra slots\n config.external = []\n for (let i = 0; i < this.nodes.length; i++) {\n const node = this.nodes[i]\n if (!node.outputs?.length) continue\n for (let slot = 0; slot < node.outputs.length; slot++) {\n let hasExternal = false\n const output = node.outputs[slot]\n let type = output.type\n if (!output.links?.length) continue\n for (const l of output.links) {\n const link = app.graph.links[l]\n if (!link) continue\n if (type === '*') type = link.type\n\n if (!app.canvas.selected_nodes[link.target_id]) {\n hasExternal = true\n break\n }\n }\n if (hasExternal) {\n config.external.push([i, slot, type])\n }\n }\n }\n }\n\n // Use the built in copyToClipboard function to generate the node data we need\n try {\n const serialised = serialise(this.nodes, app.canvas.graph)\n const config = JSON.parse(serialised)\n\n storeLinkTypes(config)\n storeExternalLinks(config)\n\n return config\n } finally {\n }\n }\n}\n\nexport class GroupNodeConfig {\n name: string\n nodeData: any\n inputCount: number\n oldToNewOutputMap: {}\n newToOldOutputMap: {}\n oldToNewInputMap: {}\n oldToNewWidgetMap: {}\n newToOldWidgetMap: {}\n primitiveDefs: {}\n widgetToPrimitive: {}\n primitiveToWidget: {}\n nodeInputs: {}\n outputVisibility: any[]\n nodeDef: any\n inputs: any[]\n linksFrom: {}\n linksTo: {}\n externalFrom: {}\n\n constructor(name, nodeData) {\n this.name = name\n this.nodeData = nodeData\n this.getLinks()\n\n this.inputCount = 0\n this.oldToNewOutputMap = {}\n this.newToOldOutputMap = {}\n this.oldToNewInputMap = {}\n this.oldToNewWidgetMap = {}\n this.newToOldWidgetMap = {}\n this.primitiveDefs = {}\n this.widgetToPrimitive = {}\n this.primitiveToWidget = {}\n this.nodeInputs = {}\n this.outputVisibility = []\n }\n\n async registerType(source = PREFIX) {\n this.nodeDef = {\n output: [],\n output_name: [],\n output_is_list: [],\n output_is_hidden: [],\n name: source + SEPARATOR + this.name,\n display_name: this.name,\n category: 'group nodes' + (SEPARATOR + source),\n input: { required: {} },\n description: `Group node combining ${this.nodeData.nodes\n .map((n) => n.type)\n .join(', ')}`,\n python_module: 'custom_nodes.' + this.name,\n\n [GROUP]: this\n }\n\n this.inputs = []\n const seenInputs = {}\n const seenOutputs = {}\n for (let i = 0; i < this.nodeData.nodes.length; i++) {\n const node = this.nodeData.nodes[i]\n node.index = i\n this.processNode(node, seenInputs, seenOutputs)\n }\n\n for (const p of this.#convertedToProcess) {\n p()\n }\n this.#convertedToProcess = null\n await app.registerNodeDef(`${PREFIX}${SEPARATOR}` + this.name, this.nodeDef)\n useNodeDefStore().addNodeDef(this.nodeDef)\n }\n\n getLinks() {\n this.linksFrom = {}\n this.linksTo = {}\n this.externalFrom = {}\n\n // Extract links for easy lookup\n for (const l of this.nodeData.links) {\n const [sourceNodeId, sourceNodeSlot, targetNodeId, targetNodeSlot] = l\n\n // Skip links outside the copy config\n if (sourceNodeId == null) continue\n\n if (!this.linksFrom[sourceNodeId]) {\n this.linksFrom[sourceNodeId] = {}\n }\n if (!this.linksFrom[sourceNodeId][sourceNodeSlot]) {\n this.linksFrom[sourceNodeId][sourceNodeSlot] = []\n }\n this.linksFrom[sourceNodeId][sourceNodeSlot].push(l)\n\n if (!this.linksTo[targetNodeId]) {\n this.linksTo[targetNodeId] = {}\n }\n this.linksTo[targetNodeId][targetNodeSlot] = l\n }\n\n if (this.nodeData.external) {\n for (const ext of this.nodeData.external) {\n if (!this.externalFrom[ext[0]]) {\n this.externalFrom[ext[0]] = { [ext[1]]: ext[2] }\n } else {\n this.externalFrom[ext[0]][ext[1]] = ext[2]\n }\n }\n }\n }\n\n processNode(node, seenInputs, seenOutputs) {\n const def = this.getNodeDef(node)\n if (!def) return\n\n const inputs = { ...def.input?.required, ...def.input?.optional }\n\n this.inputs.push(this.processNodeInputs(node, seenInputs, inputs))\n if (def.output?.length) this.processNodeOutputs(node, seenOutputs, def)\n }\n\n getNodeDef(node) {\n const def = globalDefs[node.type]\n if (def) return def\n\n const linksFrom = this.linksFrom[node.index]\n if (node.type === 'PrimitiveNode') {\n // Skip as its not linked\n if (!linksFrom) return\n\n let type = linksFrom['0'][0][5]\n if (type === 'COMBO') {\n // Use the array items\n const source = node.outputs[0].widget.name\n const fromTypeName = this.nodeData.nodes[linksFrom['0'][0][2]].type\n const fromType = globalDefs[fromTypeName]\n const input =\n fromType.input.required[source] ?? fromType.input.optional[source]\n type = input[0]\n }\n\n const def = (this.primitiveDefs[node.index] = {\n input: {\n required: {\n value: [type, {}]\n }\n },\n output: [type],\n output_name: [],\n output_is_list: []\n })\n return def\n } else if (node.type === 'Reroute') {\n const linksTo = this.linksTo[node.index]\n if (linksTo && linksFrom && !this.externalFrom[node.index]?.[0]) {\n // Being used internally\n return null\n }\n\n let config = {}\n let rerouteType = '*'\n if (linksFrom) {\n for (const [, , id, slot] of linksFrom['0']) {\n const node = this.nodeData.nodes[id]\n const input = node.inputs[slot]\n if (rerouteType === '*') {\n rerouteType = input.type\n }\n if (input.widget) {\n const targetDef = globalDefs[node.type]\n const targetWidget =\n targetDef.input.required[input.widget.name] ??\n targetDef.input.optional[input.widget.name]\n\n const widget = [targetWidget[0], config]\n const res = mergeIfValid(\n {\n widget\n },\n targetWidget,\n false,\n null,\n widget\n )\n config = res?.customConfig ?? config\n }\n }\n } else if (linksTo) {\n const [id, slot] = linksTo['0']\n rerouteType = this.nodeData.nodes[id].outputs[slot].type\n } else {\n // Reroute used as a pipe\n for (const l of this.nodeData.links) {\n if (l[2] === node.index) {\n rerouteType = l[5]\n break\n }\n }\n if (rerouteType === '*') {\n // Check for an external link\n const t = this.externalFrom[node.index]?.[0]\n if (t) {\n rerouteType = t\n }\n }\n }\n\n // @ts-expect-error\n config.forceInput = true\n return {\n input: {\n required: {\n [rerouteType]: [rerouteType, config]\n }\n },\n output: [rerouteType],\n output_name: [],\n output_is_list: []\n }\n }\n\n console.warn(\n 'Skipping virtual node ' +\n node.type +\n ' when building group node ' +\n this.name\n )\n }\n\n getInputConfig(node, inputName, seenInputs, config, extra?) {\n const customConfig = this.nodeData.config?.[node.index]?.input?.[inputName]\n let name =\n customConfig?.name ??\n node.inputs?.find((inp) => inp.name === inputName)?.label ??\n inputName\n let key = name\n let prefix = ''\n // Special handling for primitive to include the title if it is set rather than just \"value\"\n if ((node.type === 'PrimitiveNode' && node.title) || name in seenInputs) {\n prefix = `${node.title ?? node.type} `\n key = name = `${prefix}${inputName}`\n if (name in seenInputs) {\n name = `${prefix}${seenInputs[name]} ${inputName}`\n }\n }\n seenInputs[key] = (seenInputs[key] ?? 1) + 1\n\n if (inputName === 'seed' || inputName === 'noise_seed') {\n if (!extra) extra = {}\n extra.control_after_generate = `${prefix}control_after_generate`\n }\n if (config[0] === 'IMAGEUPLOAD') {\n if (!extra) extra = {}\n extra.widget =\n this.oldToNewWidgetMap[node.index]?.[config[1]?.widget ?? 'image'] ??\n 'image'\n }\n\n if (extra) {\n config = [config[0], { ...config[1], ...extra }]\n }\n\n return { name, config, customConfig }\n }\n\n processWidgetInputs(inputs, node, inputNames, seenInputs) {\n const slots = []\n const converted = new Map()\n const widgetMap = (this.oldToNewWidgetMap[node.index] = {})\n for (const inputName of inputNames) {\n let widgetType = app.getWidgetType(inputs[inputName], inputName)\n if (widgetType) {\n const convertedIndex = node.inputs?.findIndex(\n (inp) => inp.name === inputName && inp.widget?.name === inputName\n )\n if (convertedIndex > -1) {\n // This widget has been converted to a widget\n // We need to store this in the correct position so link ids line up\n converted.set(convertedIndex, inputName)\n widgetMap[inputName] = null\n } else {\n // Normal widget\n const { name, config } = this.getInputConfig(\n node,\n inputName,\n seenInputs,\n inputs[inputName]\n )\n this.nodeDef.input.required[name] = config\n widgetMap[inputName] = name\n this.newToOldWidgetMap[name] = { node, inputName }\n }\n } else {\n // Normal input\n slots.push(inputName)\n }\n }\n return { converted, slots }\n }\n\n checkPrimitiveConnection(link, inputName, inputs) {\n const sourceNode = this.nodeData.nodes[link[0]]\n if (sourceNode.type === 'PrimitiveNode') {\n // Merge link configurations\n const [sourceNodeId, _, targetNodeId, __] = link\n const primitiveDef = this.primitiveDefs[sourceNodeId]\n const targetWidget = inputs[inputName]\n const primitiveConfig = primitiveDef.input.required.value\n const output = { widget: primitiveConfig }\n const config = mergeIfValid(\n output,\n targetWidget,\n false,\n null,\n primitiveConfig\n )\n primitiveConfig[1] =\n config?.customConfig ?? inputs[inputName][1]\n ? { ...inputs[inputName][1] }\n : {}\n\n let name = this.oldToNewWidgetMap[sourceNodeId]['value']\n name = name.substr(0, name.length - 6)\n primitiveConfig[1].control_after_generate = true\n primitiveConfig[1].control_prefix = name\n\n let toPrimitive = this.widgetToPrimitive[targetNodeId]\n if (!toPrimitive) {\n toPrimitive = this.widgetToPrimitive[targetNodeId] = {}\n }\n if (toPrimitive[inputName]) {\n toPrimitive[inputName].push(sourceNodeId)\n }\n toPrimitive[inputName] = sourceNodeId\n\n let toWidget = this.primitiveToWidget[sourceNodeId]\n if (!toWidget) {\n toWidget = this.primitiveToWidget[sourceNodeId] = []\n }\n toWidget.push({ nodeId: targetNodeId, inputName })\n }\n }\n\n processInputSlots(inputs, node, slots, linksTo, inputMap, seenInputs) {\n this.nodeInputs[node.index] = {}\n for (let i = 0; i < slots.length; i++) {\n const inputName = slots[i]\n if (linksTo[i]) {\n this.checkPrimitiveConnection(linksTo[i], inputName, inputs)\n // This input is linked so we can skip it\n continue\n }\n\n const { name, config, customConfig } = this.getInputConfig(\n node,\n inputName,\n seenInputs,\n inputs[inputName]\n )\n\n this.nodeInputs[node.index][inputName] = name\n if (customConfig?.visible === false) continue\n\n this.nodeDef.input.required[name] = config\n inputMap[i] = this.inputCount++\n }\n }\n\n processConvertedWidgets(\n inputs,\n node,\n slots,\n converted,\n linksTo,\n inputMap,\n seenInputs\n ) {\n // Add converted widgets sorted into their index order (ordered as they were converted) so link ids match up\n const convertedSlots = [...converted.keys()]\n .sort()\n .map((k) => converted.get(k))\n for (let i = 0; i < convertedSlots.length; i++) {\n const inputName = convertedSlots[i]\n if (linksTo[slots.length + i]) {\n this.checkPrimitiveConnection(\n linksTo[slots.length + i],\n inputName,\n inputs\n )\n // This input is linked so we can skip it\n continue\n }\n\n const { name, config } = this.getInputConfig(\n node,\n inputName,\n seenInputs,\n inputs[inputName],\n {\n defaultInput: true\n }\n )\n\n this.nodeDef.input.required[name] = config\n this.newToOldWidgetMap[name] = { node, inputName }\n\n if (!this.oldToNewWidgetMap[node.index]) {\n this.oldToNewWidgetMap[node.index] = {}\n }\n this.oldToNewWidgetMap[node.index][inputName] = name\n\n inputMap[slots.length + i] = this.inputCount++\n }\n }\n\n #convertedToProcess = []\n processNodeInputs(node, seenInputs, inputs) {\n const inputMapping = []\n\n const inputNames = Object.keys(inputs)\n if (!inputNames.length) return\n\n const { converted, slots } = this.processWidgetInputs(\n inputs,\n node,\n inputNames,\n seenInputs\n )\n const linksTo = this.linksTo[node.index] ?? {}\n const inputMap = (this.oldToNewInputMap[node.index] = {})\n this.processInputSlots(inputs, node, slots, linksTo, inputMap, seenInputs)\n\n // Converted inputs have to be processed after all other nodes as they'll be at the end of the list\n this.#convertedToProcess.push(() =>\n this.processConvertedWidgets(\n inputs,\n node,\n slots,\n converted,\n linksTo,\n inputMap,\n seenInputs\n )\n )\n\n return inputMapping\n }\n\n processNodeOutputs(node, seenOutputs, def) {\n const oldToNew = (this.oldToNewOutputMap[node.index] = {})\n\n // Add outputs\n for (let outputId = 0; outputId < def.output.length; outputId++) {\n const linksFrom = this.linksFrom[node.index]\n // If this output is linked internally we flag it to hide\n const hasLink =\n linksFrom?.[outputId] && !this.externalFrom[node.index]?.[outputId]\n const customConfig =\n this.nodeData.config?.[node.index]?.output?.[outputId]\n const visible = customConfig?.visible ?? !hasLink\n this.outputVisibility.push(visible)\n if (!visible) {\n continue\n }\n\n oldToNew[outputId] = this.nodeDef.output.length\n this.newToOldOutputMap[this.nodeDef.output.length] = {\n node,\n slot: outputId\n }\n this.nodeDef.output.push(def.output[outputId])\n this.nodeDef.output_is_list.push(def.output_is_list[outputId])\n\n let label = customConfig?.name\n if (!label) {\n label = def.output_name?.[outputId] ?? def.output[outputId]\n const output = node.outputs.find((o) => o.name === label)\n if (output?.label) {\n label = output.label\n }\n }\n\n let name = label\n if (name in seenOutputs) {\n const prefix = `${node.title ?? node.type} `\n name = `${prefix}${label}`\n if (name in seenOutputs) {\n name = `${prefix}${node.index} ${label}`\n }\n }\n seenOutputs[name] = 1\n\n this.nodeDef.output_name.push(name)\n }\n }\n\n static async registerFromWorkflow(groupNodes, missingNodeTypes) {\n for (const g in groupNodes) {\n const groupData = groupNodes[g]\n\n let hasMissing = false\n for (const n of groupData.nodes) {\n // Find missing node types\n if (!(n.type in LiteGraph.registered_node_types)) {\n missingNodeTypes.push({\n type: n.type,\n hint: ` (In group node '${PREFIX}${SEPARATOR}${g}')`\n })\n\n missingNodeTypes.push({\n type: `${PREFIX}${SEPARATOR}` + g,\n action: {\n text: 'Remove from workflow',\n callback: (e) => {\n delete groupNodes[g]\n e.target.textContent = 'Removed'\n e.target.style.pointerEvents = 'none'\n e.target.style.opacity = 0.7\n }\n }\n })\n\n hasMissing = true\n }\n }\n\n if (hasMissing) continue\n\n const config = new GroupNodeConfig(g, groupData)\n await config.registerType()\n }\n }\n}\n\nexport class GroupNodeHandler {\n node\n groupData\n innerNodes: any\n\n constructor(node) {\n this.node = node\n this.groupData = node.constructor?.nodeData?.[GROUP]\n\n this.node.setInnerNodes = (innerNodes) => {\n this.innerNodes = innerNodes\n\n for (\n let innerNodeIndex = 0;\n innerNodeIndex < this.innerNodes.length;\n innerNodeIndex++\n ) {\n const innerNode = this.innerNodes[innerNodeIndex]\n\n for (const w of innerNode.widgets ?? []) {\n if (w.type === 'converted-widget') {\n w.serializeValue = w.origSerializeValue\n }\n }\n\n innerNode.index = innerNodeIndex\n innerNode.getInputNode = (slot) => {\n // Check if this input is internal or external\n const externalSlot =\n this.groupData.oldToNewInputMap[innerNode.index]?.[slot]\n if (externalSlot != null) {\n return this.node.getInputNode(externalSlot)\n }\n\n // Internal link\n const innerLink = this.groupData.linksTo[innerNode.index]?.[slot]\n if (!innerLink) return null\n\n const inputNode = innerNodes[innerLink[0]]\n // Primitives will already apply their values\n if (inputNode.type === 'PrimitiveNode') return null\n\n return inputNode\n }\n\n innerNode.getInputLink = (slot) => {\n const externalSlot =\n this.groupData.oldToNewInputMap[innerNode.index]?.[slot]\n if (externalSlot != null) {\n // The inner node is connected via the group node inputs\n const linkId = this.node.inputs[externalSlot].link\n let link = app.graph.links[linkId]\n\n // Use the outer link, but update the target to the inner node\n // @ts-expect-error\n // TODO: Fix this\n link = {\n ...link,\n target_id: innerNode.id,\n target_slot: +slot\n }\n return link\n }\n\n let link = this.groupData.linksTo[innerNode.index]?.[slot]\n if (!link) return null\n // Use the inner link, but update the origin node to be inner node id\n link = {\n origin_id: innerNodes[link[0]].id,\n origin_slot: link[1],\n target_id: innerNode.id,\n target_slot: +slot\n }\n return link\n }\n }\n }\n\n this.node.updateLink = (link) => {\n // Replace the group node reference with the internal node\n link = { ...link }\n const output = this.groupData.newToOldOutputMap[link.origin_slot]\n let innerNode = this.innerNodes[output.node.index]\n let l\n while (innerNode?.type === 'Reroute') {\n l = innerNode.getInputLink(0)\n innerNode = innerNode.getInputNode(0)\n }\n\n if (!innerNode) {\n return null\n }\n\n if (l && GroupNodeHandler.isGroupNode(innerNode)) {\n return innerNode.updateLink(l)\n }\n\n link.origin_id = innerNode.id\n link.origin_slot = l?.origin_slot ?? output.slot\n return link\n }\n\n this.node.getInnerNodes = () => {\n if (!this.innerNodes) {\n this.node.setInnerNodes(\n this.groupData.nodeData.nodes.map((n, i) => {\n const innerNode = LiteGraph.createNode(n.type)\n innerNode.configure(n)\n innerNode.id = `${this.node.id}:${i}`\n return innerNode\n })\n )\n }\n\n this.updateInnerWidgets()\n\n return this.innerNodes\n }\n\n this.node.recreate = async () => {\n const id = this.node.id\n const sz = this.node.size\n const nodes = this.node.convertToNodes()\n\n const groupNode = LiteGraph.createNode(this.node.type)\n groupNode.id = id\n\n // Reuse the existing nodes for this instance\n groupNode.setInnerNodes(nodes)\n groupNode[GROUP].populateWidgets()\n app.graph.add(groupNode)\n groupNode.size = [\n Math.max(groupNode.size[0], sz[0]),\n Math.max(groupNode.size[1], sz[1])\n ]\n\n // Remove all converted nodes and relink them\n const builder = new GroupNodeBuilder(nodes)\n const nodeData = builder.getNodeData()\n groupNode[GROUP].groupData.nodeData.links = nodeData.links\n groupNode[GROUP].replaceNodes(nodes)\n return groupNode\n }\n\n this.node.convertToNodes = () => {\n const addInnerNodes = () => {\n // Clone the node data so we dont mutate it for other nodes\n const c = { ...this.groupData.nodeData }\n c.nodes = [...c.nodes]\n const innerNodes = this.node.getInnerNodes()\n let ids = []\n for (let i = 0; i < c.nodes.length; i++) {\n let id = innerNodes?.[i]?.id\n // Use existing IDs if they are set on the inner nodes\n if (id == null || isNaN(id)) {\n id = undefined\n } else {\n ids.push(id)\n }\n c.nodes[i] = { ...c.nodes[i], id }\n }\n deserialiseAndCreate(JSON.stringify(c), app.canvas)\n\n const [x, y] = this.node.pos\n let top\n let left\n // Configure nodes with current widget data\n const selectedIds = ids.length\n ? ids\n : Object.keys(app.canvas.selected_nodes)\n const newNodes = []\n for (let i = 0; i < selectedIds.length; i++) {\n const id = selectedIds[i]\n const newNode = app.graph.getNodeById(id)\n const innerNode = innerNodes[i]\n newNodes.push(newNode)\n\n if (left == null || newNode.pos[0] < left) {\n left = newNode.pos[0]\n }\n if (top == null || newNode.pos[1] < top) {\n top = newNode.pos[1]\n }\n\n if (!newNode.widgets) continue\n\n const map = this.groupData.oldToNewWidgetMap[innerNode.index]\n if (map) {\n const widgets = Object.keys(map)\n\n for (const oldName of widgets) {\n const newName = map[oldName]\n if (!newName) continue\n\n const widgetIndex = this.node.widgets.findIndex(\n (w) => w.name === newName\n )\n if (widgetIndex === -1) continue\n\n // Populate the main and any linked widgets\n if (innerNode.type === 'PrimitiveNode') {\n for (let i = 0; i < newNode.widgets.length; i++) {\n newNode.widgets[i].value =\n this.node.widgets[widgetIndex + i].value\n }\n } else {\n const outerWidget = this.node.widgets[widgetIndex]\n const newWidget = newNode.widgets.find(\n (w) => w.name === oldName\n )\n if (!newWidget) continue\n\n newWidget.value = outerWidget.value\n for (let w = 0; w < outerWidget.linkedWidgets?.length; w++) {\n newWidget.linkedWidgets[w].value =\n outerWidget.linkedWidgets[w].value\n }\n }\n }\n }\n }\n\n // Shift each node\n for (const newNode of newNodes) {\n newNode.pos[0] -= left - x\n newNode.pos[1] -= top - y\n }\n\n return { newNodes, selectedIds }\n }\n\n const reconnectInputs = (selectedIds) => {\n for (const innerNodeIndex in this.groupData.oldToNewInputMap) {\n const id = selectedIds[innerNodeIndex]\n const newNode = app.graph.getNodeById(id)\n const map = this.groupData.oldToNewInputMap[innerNodeIndex]\n for (const innerInputId in map) {\n const groupSlotId = map[innerInputId]\n if (groupSlotId == null) continue\n const slot = node.inputs[groupSlotId]\n if (slot.link == null) continue\n const link = app.graph.links[slot.link]\n if (!link) continue\n // connect this node output to the input of another node\n const originNode = app.graph.getNodeById(link.origin_id)\n originNode.connect(link.origin_slot, newNode, +innerInputId)\n }\n }\n }\n\n const reconnectOutputs = (selectedIds) => {\n for (\n let groupOutputId = 0;\n groupOutputId < node.outputs?.length;\n groupOutputId++\n ) {\n const output = node.outputs[groupOutputId]\n if (!output.links) continue\n const links = [...output.links]\n for (const l of links) {\n const slot = this.groupData.newToOldOutputMap[groupOutputId]\n const link = app.graph.links[l]\n const targetNode = app.graph.getNodeById(link.target_id)\n const newNode = app.graph.getNodeById(selectedIds[slot.node.index])\n newNode.connect(slot.slot, targetNode, link.target_slot)\n }\n }\n }\n\n app.canvas.emitBeforeChange()\n\n const { newNodes, selectedIds } = addInnerNodes()\n reconnectInputs(selectedIds)\n reconnectOutputs(selectedIds)\n app.graph.remove(this.node)\n\n app.canvas.emitAfterChange()\n\n return newNodes\n }\n\n const getExtraMenuOptions = this.node.getExtraMenuOptions\n this.node.getExtraMenuOptions = function (_, options) {\n getExtraMenuOptions?.apply(this, arguments)\n\n let optionIndex = options.findIndex((o) => o.content === 'Outputs')\n if (optionIndex === -1) optionIndex = options.length\n else optionIndex++\n options.splice(\n optionIndex,\n 0,\n null,\n {\n content: 'Convert to nodes',\n callback: () => {\n return this.convertToNodes()\n }\n },\n {\n content: 'Manage Group Node',\n callback: manageGroupNodes\n }\n )\n }\n\n // Draw custom collapse icon to identity this as a group\n const onDrawTitleBox = this.node.onDrawTitleBox\n this.node.onDrawTitleBox = function (ctx, height, size, scale) {\n onDrawTitleBox?.apply(this, arguments)\n\n const fill = ctx.fillStyle\n ctx.beginPath()\n ctx.rect(11, -height + 11, 2, 2)\n ctx.rect(14, -height + 11, 2, 2)\n ctx.rect(17, -height + 11, 2, 2)\n ctx.rect(11, -height + 14, 2, 2)\n ctx.rect(14, -height + 14, 2, 2)\n ctx.rect(17, -height + 14, 2, 2)\n ctx.rect(11, -height + 17, 2, 2)\n ctx.rect(14, -height + 17, 2, 2)\n ctx.rect(17, -height + 17, 2, 2)\n\n ctx.fillStyle = this.boxcolor || LiteGraph.NODE_DEFAULT_BOXCOLOR\n ctx.fill()\n ctx.fillStyle = fill\n }\n\n // Draw progress label\n const onDrawForeground = node.onDrawForeground\n const groupData = this.groupData.nodeData\n node.onDrawForeground = function (ctx) {\n const r = onDrawForeground?.apply?.(this, arguments)\n if (\n +app.runningNodeId === this.id &&\n this.runningInternalNodeId !== null\n ) {\n const n = groupData.nodes[this.runningInternalNodeId]\n if (!n) return\n const message = `Running ${n.title || n.type} (${this.runningInternalNodeId}/${groupData.nodes.length})`\n ctx.save()\n ctx.font = '12px sans-serif'\n const sz = ctx.measureText(message)\n ctx.fillStyle = node.boxcolor || LiteGraph.NODE_DEFAULT_BOXCOLOR\n ctx.beginPath()\n ctx.roundRect(\n 0,\n -LiteGraph.NODE_TITLE_HEIGHT - 20,\n sz.width + 12,\n 20,\n 5\n )\n ctx.fill()\n\n ctx.fillStyle = '#fff'\n ctx.fillText(message, 6, -LiteGraph.NODE_TITLE_HEIGHT - 6)\n ctx.restore()\n }\n }\n\n // Flag this node as needing to be reset\n const onExecutionStart = this.node.onExecutionStart\n this.node.onExecutionStart = function () {\n this.resetExecution = true\n return onExecutionStart?.apply(this, arguments)\n }\n\n const self = this\n const onNodeCreated = this.node.onNodeCreated\n this.node.onNodeCreated = function () {\n if (!this.widgets) {\n return\n }\n const config = self.groupData.nodeData.config\n if (config) {\n for (const n in config) {\n const inputs = config[n]?.input\n for (const w in inputs) {\n if (inputs[w].visible !== false) continue\n const widgetName = self.groupData.oldToNewWidgetMap[n][w]\n const widget = this.widgets.find((w) => w.name === widgetName)\n if (widget) {\n widget.type = 'hidden'\n widget.computeSize = () => [0, -4]\n }\n }\n }\n }\n\n return onNodeCreated?.apply(this, arguments)\n }\n\n function handleEvent(type, getId, getEvent) {\n const handler = ({ detail }) => {\n const id = getId(detail)\n if (!id) return\n const node = app.graph.getNodeById(id)\n if (node) return\n\n const innerNodeIndex = this.innerNodes?.findIndex((n) => n.id == id)\n if (innerNodeIndex > -1) {\n this.node.runningInternalNodeId = innerNodeIndex\n api.dispatchEvent(\n new CustomEvent(type, {\n detail: getEvent(detail, this.node.id + '', this.node)\n })\n )\n }\n }\n api.addEventListener(type, handler)\n return handler\n }\n\n const executing = handleEvent.call(\n this,\n 'executing',\n (d) => d,\n (d, id, node) => id\n )\n\n const executed = handleEvent.call(\n this,\n 'executed',\n (d) => d?.display_node || d?.node,\n (d, id, node) => ({\n ...d,\n node: id,\n display_node: id,\n merge: !node.resetExecution\n })\n )\n\n const onRemoved = node.onRemoved\n this.node.onRemoved = function () {\n onRemoved?.apply(this, arguments)\n api.removeEventListener('executing', executing)\n api.removeEventListener('executed', executed)\n }\n\n this.node.refreshComboInNode = (defs) => {\n // Update combo widget options\n for (const widgetName in this.groupData.newToOldWidgetMap) {\n const widget = this.node.widgets.find((w) => w.name === widgetName)\n if (widget?.type === 'combo') {\n const old = this.groupData.newToOldWidgetMap[widgetName]\n const def = defs[old.node.type]\n const input =\n def?.input?.required?.[old.inputName] ??\n def?.input?.optional?.[old.inputName]\n if (!input) continue\n\n widget.options.values = input[0]\n\n if (\n old.inputName !== 'image' &&\n !widget.options.values.includes(widget.value)\n ) {\n widget.value = widget.options.values[0]\n widget.callback(widget.value)\n }\n }\n }\n }\n }\n\n updateInnerWidgets() {\n for (const newWidgetName in this.groupData.newToOldWidgetMap) {\n const newWidget = this.node.widgets.find((w) => w.name === newWidgetName)\n if (!newWidget) continue\n\n const newValue = newWidget.value\n const old = this.groupData.newToOldWidgetMap[newWidgetName]\n let innerNode = this.innerNodes[old.node.index]\n\n if (innerNode.type === 'PrimitiveNode') {\n innerNode.primitiveValue = newValue\n const primitiveLinked = this.groupData.primitiveToWidget[old.node.index]\n for (const linked of primitiveLinked ?? []) {\n const node = this.innerNodes[linked.nodeId]\n const widget = node.widgets.find((w) => w.name === linked.inputName)\n\n if (widget) {\n widget.value = newValue\n }\n }\n continue\n } else if (innerNode.type === 'Reroute') {\n const rerouteLinks = this.groupData.linksFrom[old.node.index]\n if (rerouteLinks) {\n for (const [_, , targetNodeId, targetSlot] of rerouteLinks['0']) {\n const node = this.innerNodes[targetNodeId]\n const input = node.inputs[targetSlot]\n if (input.widget) {\n const widget = node.widgets?.find(\n (w) => w.name === input.widget.name\n )\n if (widget) {\n widget.value = newValue\n }\n }\n }\n }\n }\n\n const widget = innerNode.widgets?.find((w) => w.name === old.inputName)\n if (widget) {\n widget.value = newValue\n }\n }\n }\n\n populatePrimitive(node, nodeId, oldName, i, linkedShift) {\n // Converted widget, populate primitive if linked\n const primitiveId = this.groupData.widgetToPrimitive[nodeId]?.[oldName]\n if (primitiveId == null) return\n const targetWidgetName =\n this.groupData.oldToNewWidgetMap[primitiveId]['value']\n const targetWidgetIndex = this.node.widgets.findIndex(\n (w) => w.name === targetWidgetName\n )\n if (targetWidgetIndex > -1) {\n const primitiveNode = this.innerNodes[primitiveId]\n let len = primitiveNode.widgets.length\n if (\n len - 1 !==\n this.node.widgets[targetWidgetIndex].linkedWidgets?.length\n ) {\n // Fallback handling for if some reason the primitive has a different number of widgets\n // we dont want to overwrite random widgets, better to leave blank\n len = 1\n }\n for (let i = 0; i < len; i++) {\n this.node.widgets[targetWidgetIndex + i].value =\n primitiveNode.widgets[i].value\n }\n }\n return true\n }\n\n populateReroute(node, nodeId, map) {\n if (node.type !== 'Reroute') return\n\n const link = this.groupData.linksFrom[nodeId]?.[0]?.[0]\n if (!link) return\n const [, , targetNodeId, targetNodeSlot] = link\n const targetNode = this.groupData.nodeData.nodes[targetNodeId]\n const inputs = targetNode.inputs\n const targetWidget = inputs?.[targetNodeSlot]?.widget\n if (!targetWidget) return\n\n const offset = inputs.length - (targetNode.widgets_values?.length ?? 0)\n const v = targetNode.widgets_values?.[targetNodeSlot - offset]\n if (v == null) return\n\n const widgetName = Object.values(map)[0]\n const widget = this.node.widgets.find((w) => w.name === widgetName)\n if (widget) {\n widget.value = v\n }\n }\n\n populateWidgets() {\n if (!this.node.widgets) return\n\n for (\n let nodeId = 0;\n nodeId < this.groupData.nodeData.nodes.length;\n nodeId++\n ) {\n const node = this.groupData.nodeData.nodes[nodeId]\n const map = this.groupData.oldToNewWidgetMap[nodeId] ?? {}\n const widgets = Object.keys(map)\n\n if (!node.widgets_values?.length) {\n // special handling for populating values into reroutes\n // this allows primitives connect to them to pick up the correct value\n this.populateReroute(node, nodeId, map)\n continue\n }\n\n let linkedShift = 0\n for (let i = 0; i < widgets.length; i++) {\n const oldName = widgets[i]\n const newName = map[oldName]\n const widgetIndex = this.node.widgets.findIndex(\n (w) => w.name === newName\n )\n const mainWidget = this.node.widgets[widgetIndex]\n if (\n this.populatePrimitive(node, nodeId, oldName, i, linkedShift) ||\n widgetIndex === -1\n ) {\n // Find the inner widget and shift by the number of linked widgets as they will have been removed too\n const innerWidget = this.innerNodes[nodeId].widgets?.find(\n (w) => w.name === oldName\n )\n linkedShift += innerWidget?.linkedWidgets?.length ?? 0\n }\n if (widgetIndex === -1) {\n continue\n }\n\n // Populate the main and any linked widget\n mainWidget.value = node.widgets_values[i + linkedShift]\n for (let w = 0; w < mainWidget.linkedWidgets?.length; w++) {\n this.node.widgets[widgetIndex + w + 1].value =\n node.widgets_values[i + ++linkedShift]\n }\n }\n }\n }\n\n replaceNodes(nodes) {\n let top\n let left\n\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i]\n if (left == null || node.pos[0] < left) {\n left = node.pos[0]\n }\n if (top == null || node.pos[1] < top) {\n top = node.pos[1]\n }\n\n this.linkOutputs(node, i)\n app.graph.remove(node)\n }\n\n this.linkInputs()\n this.node.pos = [left, top]\n }\n\n linkOutputs(originalNode, nodeId) {\n if (!originalNode.outputs) return\n\n for (const output of originalNode.outputs) {\n if (!output.links) continue\n // Clone the links as they'll be changed if we reconnect\n const links = [...output.links]\n for (const l of links) {\n const link = app.graph.links[l]\n if (!link) continue\n\n const targetNode = app.graph.getNodeById(link.target_id)\n const newSlot =\n this.groupData.oldToNewOutputMap[nodeId]?.[link.origin_slot]\n if (newSlot != null) {\n this.node.connect(newSlot, targetNode, link.target_slot)\n }\n }\n }\n }\n\n linkInputs() {\n for (const link of this.groupData.nodeData.links ?? []) {\n const [, originSlot, targetId, targetSlot, actualOriginId] = link\n const originNode = app.graph.getNodeById(actualOriginId)\n if (!originNode) continue // this node is in the group\n originNode.connect(\n originSlot,\n this.node.id,\n this.groupData.oldToNewInputMap[targetId][targetSlot]\n )\n }\n }\n\n static getGroupData(node) {\n return (node.nodeData ?? node.constructor?.nodeData)?.[GROUP]\n }\n\n static isGroupNode(node: LGraphNode) {\n return !!node.constructor?.nodeData?.[GROUP]\n }\n\n static async fromNodes(nodes: LGraphNode[]) {\n // Process the nodes into the stored workflow group node data\n const builder = new GroupNodeBuilder(nodes)\n const res = builder.build()\n if (!res) return\n\n const { name, nodeData } = res\n\n // Convert this data into a LG node definition and register it\n const config = new GroupNodeConfig(name, nodeData)\n await config.registerType()\n\n const groupNode = LiteGraph.createNode(`${PREFIX}${SEPARATOR}${name}`)\n // Reuse the existing nodes for this instance\n groupNode.setInnerNodes(builder.nodes)\n groupNode[GROUP].populateWidgets()\n app.graph.add(groupNode)\n\n // Remove all converted nodes and relink them\n groupNode[GROUP].replaceNodes(builder.nodes)\n return groupNode\n }\n}\n\nfunction addConvertToGroupOptions() {\n function addConvertOption(options, index) {\n const selected = Object.values(app.canvas.selected_nodes ?? {})\n const disabled =\n selected.length < 2 ||\n selected.find((n) => GroupNodeHandler.isGroupNode(n))\n options.splice(index + 1, null, {\n content: `Convert to Group Node`,\n disabled,\n callback: convertSelectedNodesToGroupNode\n })\n }\n\n function addManageOption(options, index) {\n const groups = app.graph.extra?.groupNodes\n const disabled = !groups || !Object.keys(groups).length\n options.splice(index + 1, null, {\n content: `Manage Group Nodes`,\n disabled,\n callback: manageGroupNodes\n })\n }\n\n // Add to canvas\n const getCanvasMenuOptions = LGraphCanvas.prototype.getCanvasMenuOptions\n LGraphCanvas.prototype.getCanvasMenuOptions = function () {\n const options = getCanvasMenuOptions.apply(this, arguments)\n const index =\n options.findIndex((o) => o?.content === 'Add Group') + 1 || options.length\n addConvertOption(options, index)\n addManageOption(options, index + 1)\n return options\n }\n\n // Add to nodes\n const getNodeMenuOptions = LGraphCanvas.prototype.getNodeMenuOptions\n LGraphCanvas.prototype.getNodeMenuOptions = function (node) {\n const options = getNodeMenuOptions.apply(this, arguments)\n if (!GroupNodeHandler.isGroupNode(node)) {\n const index =\n options.findIndex((o) => o?.content === 'Outputs') + 1 ||\n options.length - 1\n addConvertOption(options, index)\n }\n return options\n }\n}\n\nconst replaceLegacySeparators = (nodes: ComfyNode[]): void => {\n for (const node of nodes) {\n if (typeof node.type === 'string' && node.type.startsWith('workflow/')) {\n node.type = node.type.replace(/^workflow\\//, `${PREFIX}${SEPARATOR}`)\n }\n }\n}\n\n/**\n * Convert selected nodes to a group node\n * @throws {Error} if no nodes are selected\n * @throws {Error} if a group node is already selected\n * @throws {Error} if a group node is selected\n *\n * The context menu item should not be available if any of the above conditions are met.\n * The error is automatically handled by the commandStore when the command is executed.\n */\nasync function convertSelectedNodesToGroupNode() {\n const nodes = Object.values(app.canvas.selected_nodes ?? {})\n if (nodes.length === 0) {\n throw new Error('No nodes selected')\n }\n if (nodes.length === 1) {\n throw new Error('Please select multiple nodes to convert to group node')\n }\n if (nodes.some((n) => GroupNodeHandler.isGroupNode(n))) {\n throw new Error('Selected nodes contain a group node')\n }\n return await GroupNodeHandler.fromNodes(nodes)\n}\n\nfunction ungroupSelectedGroupNodes() {\n const nodes = Object.values(app.canvas.selected_nodes ?? {})\n for (const node of nodes) {\n if (GroupNodeHandler.isGroupNode(node)) {\n node['convertToNodes']?.()\n }\n }\n}\n\nfunction manageGroupNodes() {\n new ManageGroupDialog(app).show()\n}\n\nconst id = 'Comfy.GroupNode'\nlet globalDefs\nconst ext: ComfyExtension = {\n name: id,\n commands: [\n {\n id: 'Comfy.GroupNode.ConvertSelectedNodesToGroupNode',\n label: 'Convert selected nodes to group node',\n icon: 'pi pi-sitemap',\n versionAdded: '1.3.17',\n function: convertSelectedNodesToGroupNode\n },\n {\n id: 'Comfy.GroupNode.UngroupSelectedGroupNodes',\n label: 'Ungroup selected group nodes',\n icon: 'pi pi-sitemap',\n versionAdded: '1.3.17',\n function: ungroupSelectedGroupNodes\n },\n {\n id: 'Comfy.GroupNode.ManageGroupNodes',\n label: 'Manage group nodes',\n icon: 'pi pi-cog',\n versionAdded: '1.3.17',\n function: manageGroupNodes\n }\n ],\n keybindings: [\n {\n commandId: 'Comfy.GroupNode.ConvertSelectedNodesToGroupNode',\n combo: {\n alt: true,\n key: 'g'\n }\n },\n {\n commandId: 'Comfy.GroupNode.UngroupSelectedGroupNodes',\n combo: {\n alt: true,\n shift: true,\n key: 'G'\n }\n }\n ],\n setup() {\n addConvertToGroupOptions()\n },\n async beforeConfigureGraph(\n graphData: ComfyWorkflowJSON,\n missingNodeTypes: string[]\n ) {\n const nodes = graphData?.extra?.groupNodes\n if (nodes) {\n replaceLegacySeparators(graphData.nodes)\n await GroupNodeConfig.registerFromWorkflow(nodes, missingNodeTypes)\n }\n },\n addCustomNodeDefs(defs) {\n // Store this so we can mutate it later with group nodes\n globalDefs = defs\n },\n nodeCreated(node) {\n if (GroupNodeHandler.isGroupNode(node)) {\n node[GROUP] = new GroupNodeHandler(node)\n\n // Ensure group nodes pasted from other workflows are stored\n if (node.title && node[GROUP]?.groupData?.nodeData) {\n Workflow.storeGroupNode(node.title, node[GROUP].groupData.nodeData)\n }\n }\n },\n async refreshComboInNodes(defs) {\n // Re-register group nodes so new ones are created with the correct options\n Object.assign(globalDefs, defs)\n const nodes = app.graph.extra?.groupNodes\n if (nodes) {\n await GroupNodeConfig.registerFromWorkflow(nodes, {})\n }\n }\n}\n\napp.registerExtension(ext)\n","// @ts-strict-ignore\nimport { LGraphGroup } from '@comfyorg/litegraph'\nimport { app } from '../../scripts/app'\nimport { LGraphCanvas } from '@comfyorg/litegraph'\nimport type { Positionable } from '@comfyorg/litegraph/dist/interfaces'\nimport type { LGraphNode } from '@comfyorg/litegraph'\n\nfunction setNodeMode(node: LGraphNode, mode: number) {\n node.mode = mode\n node.graph?.change()\n}\n\nfunction addNodesToGroup(group: LGraphGroup, items: Iterable) {\n group.resizeTo([...group.children, ...items])\n}\n\napp.registerExtension({\n name: 'Comfy.GroupOptions',\n setup() {\n const orig = LGraphCanvas.prototype.getCanvasMenuOptions\n // graph_mouse\n LGraphCanvas.prototype.getCanvasMenuOptions = function (\n this: LGraphCanvas\n ) {\n const options = orig.apply(this, arguments)\n const group = this.graph.getGroupOnPos(\n this.graph_mouse[0],\n this.graph_mouse[1]\n )\n if (!group) {\n options.push({\n content: 'Add Group For Selected Nodes',\n disabled: !this.selectedItems?.size,\n callback: () => {\n const group = new LGraphGroup()\n addNodesToGroup(group, this.selectedItems)\n this.graph.add(group)\n this.graph.change()\n }\n })\n\n return options\n }\n\n // Group nodes aren't recomputed until the group is moved, this ensures the nodes are up-to-date\n group.recomputeInsideNodes()\n const nodesInGroup = group.nodes\n\n options.push({\n content: 'Add Selected Nodes To Group',\n disabled: !this.selectedItems?.size,\n callback: () => {\n addNodesToGroup(group, this.selectedItems)\n this.graph.change()\n }\n })\n\n // No nodes in group, return default options\n if (nodesInGroup.length === 0) {\n return options\n } else {\n // Add a separator between the default options and the group options\n options.push(null)\n }\n\n // Check if all nodes are the same mode\n let allNodesAreSameMode = true\n for (let i = 1; i < nodesInGroup.length; i++) {\n if (nodesInGroup[i].mode !== nodesInGroup[0].mode) {\n allNodesAreSameMode = false\n break\n }\n }\n\n options.push({\n content: 'Fit Group To Nodes',\n callback: () => {\n group.recomputeInsideNodes()\n group.resizeTo(group.children)\n this.graph.change()\n }\n })\n\n options.push({\n content: 'Select Nodes',\n callback: () => {\n this.selectNodes(nodesInGroup)\n this.graph.change()\n this.canvas.focus()\n }\n })\n\n // Modes\n // 0: Always\n // 1: On Event\n // 2: Never\n // 3: On Trigger\n // 4: Bypass\n // If all nodes are the same mode, add a menu option to change the mode\n if (allNodesAreSameMode) {\n const mode = nodesInGroup[0].mode\n switch (mode) {\n case 0:\n // All nodes are always, option to disable, and bypass\n options.push({\n content: 'Set Group Nodes to Never',\n callback: () => {\n for (const node of nodesInGroup) {\n setNodeMode(node, 2)\n }\n }\n })\n options.push({\n content: 'Bypass Group Nodes',\n callback: () => {\n for (const node of nodesInGroup) {\n setNodeMode(node, 4)\n }\n }\n })\n break\n case 2:\n // All nodes are never, option to enable, and bypass\n options.push({\n content: 'Set Group Nodes to Always',\n callback: () => {\n for (const node of nodesInGroup) {\n setNodeMode(node, 0)\n }\n }\n })\n options.push({\n content: 'Bypass Group Nodes',\n callback: () => {\n for (const node of nodesInGroup) {\n setNodeMode(node, 4)\n }\n }\n })\n break\n case 4:\n // All nodes are bypass, option to enable, and disable\n options.push({\n content: 'Set Group Nodes to Always',\n callback: () => {\n for (const node of nodesInGroup) {\n setNodeMode(node, 0)\n }\n }\n })\n options.push({\n content: 'Set Group Nodes to Never',\n callback: () => {\n for (const node of nodesInGroup) {\n setNodeMode(node, 2)\n }\n }\n })\n break\n default:\n // All nodes are On Trigger or On Event(Or other?), option to disable, set to always, or bypass\n options.push({\n content: 'Set Group Nodes to Always',\n callback: () => {\n for (const node of nodesInGroup) {\n setNodeMode(node, 0)\n }\n }\n })\n options.push({\n content: 'Set Group Nodes to Never',\n callback: () => {\n for (const node of nodesInGroup) {\n setNodeMode(node, 2)\n }\n }\n })\n options.push({\n content: 'Bypass Group Nodes',\n callback: () => {\n for (const node of nodesInGroup) {\n setNodeMode(node, 4)\n }\n }\n })\n break\n }\n } else {\n // Nodes are not all the same mode, add a menu option to change the mode to always, never, or bypass\n options.push({\n content: 'Set Group Nodes to Always',\n callback: () => {\n for (const node of nodesInGroup) {\n setNodeMode(node, 0)\n }\n }\n })\n options.push({\n content: 'Set Group Nodes to Never',\n callback: () => {\n for (const node of nodesInGroup) {\n setNodeMode(node, 2)\n }\n }\n })\n options.push({\n content: 'Bypass Group Nodes',\n callback: () => {\n for (const node of nodesInGroup) {\n setNodeMode(node, 4)\n }\n }\n })\n }\n\n return options\n }\n }\n})\n","// @ts-strict-ignore\nimport { LiteGraph } from '@comfyorg/litegraph'\nimport { app } from '../../scripts/app'\n\n// Inverts the scrolling of context menus\n\nconst id = 'Comfy.InvertMenuScrolling'\napp.registerExtension({\n name: id,\n init() {\n const ctxMenu = LiteGraph.ContextMenu\n const replace = () => {\n // @ts-expect-error\n LiteGraph.ContextMenu = function (values, options) {\n options = options || {}\n if (options.scroll_speed) {\n options.scroll_speed *= -1\n } else {\n options.scroll_speed = -0.1\n }\n return ctxMenu.call(this, values, options)\n }\n LiteGraph.ContextMenu.prototype = ctxMenu.prototype\n }\n app.ui.settings.addSetting({\n id,\n category: ['Comfy', 'Graph', 'InvertMenuScrolling'],\n name: 'Invert Context Menu Scrolling',\n type: 'boolean',\n defaultValue: false,\n onChange(value) {\n if (value) {\n replace()\n } else {\n LiteGraph.ContextMenu = ctxMenu\n }\n }\n })\n }\n})\n","import { app } from '../../scripts/app'\nimport { KeyComboImpl, useKeybindingStore } from '@/stores/keybindingStore'\nimport { useCommandStore } from '@/stores/commandStore'\n\napp.registerExtension({\n name: 'Comfy.Keybinds',\n init() {\n const keybindListener = async function (event: KeyboardEvent) {\n // Ignore keybindings for legacy jest tests as jest tests don't have\n // a Vue app instance or pinia stores.\n if (!app.vueAppReady) return\n\n const keyCombo = KeyComboImpl.fromEvent(event)\n if (keyCombo.isModifier) {\n return\n }\n\n // Ignore non-modifier keybindings if typing in input fields\n const target = event.composedPath()[0] as HTMLElement\n if (\n !keyCombo.hasModifier &&\n (target.tagName === 'TEXTAREA' ||\n target.tagName === 'INPUT' ||\n (target.tagName === 'SPAN' &&\n target.classList.contains('property_value')))\n ) {\n return\n }\n\n const keybindingStore = useKeybindingStore()\n const commandStore = useCommandStore()\n const keybinding = keybindingStore.getKeybinding(keyCombo)\n if (keybinding && keybinding.targetSelector !== '#graph-canvas') {\n // Prevent default browser behavior first, then execute the command\n event.preventDefault()\n await commandStore.execute(keybinding.commandId)\n return\n }\n\n // Finished Handling all modifier keybinds, now handle the rest\n if (event.ctrlKey || event.altKey || event.metaKey) {\n return\n }\n\n // Close out of modals using escape\n if (event.key === 'Escape') {\n const modals = document.querySelectorAll('.comfy-modal')\n const modal = Array.from(modals).find(\n (modal) =>\n window.getComputedStyle(modal).getPropertyValue('display') !==\n 'none'\n )\n if (modal) {\n modal.style.display = 'none'\n }\n\n ;[...document.querySelectorAll('dialog')].forEach((d) => {\n d.close()\n })\n }\n }\n\n window.addEventListener('keydown', keybindListener)\n }\n})\n","// @ts-strict-ignore\nimport { app } from '../../scripts/app'\nimport { ComfyDialog, $el } from '../../scripts/ui'\nimport { ComfyApp } from '../../scripts/app'\nimport { api } from '../../scripts/api'\nimport { ClipspaceDialog } from './clipspace'\n\n// Helper function to convert a data URL to a Blob object\nfunction dataURLToBlob(dataURL) {\n const parts = dataURL.split(';base64,')\n const contentType = parts[0].split(':')[1]\n const byteString = atob(parts[1])\n const arrayBuffer = new ArrayBuffer(byteString.length)\n const uint8Array = new Uint8Array(arrayBuffer)\n for (let i = 0; i < byteString.length; i++) {\n uint8Array[i] = byteString.charCodeAt(i)\n }\n return new Blob([arrayBuffer], { type: contentType })\n}\n\nfunction loadedImageToBlob(image) {\n const canvas = document.createElement('canvas')\n\n canvas.width = image.width\n canvas.height = image.height\n\n const ctx = canvas.getContext('2d')\n\n ctx.drawImage(image, 0, 0)\n\n const dataURL = canvas.toDataURL('image/png', 1)\n const blob = dataURLToBlob(dataURL)\n\n return blob\n}\n\nfunction loadImage(imagePath) {\n return new Promise((resolve, reject) => {\n const image = new Image()\n\n image.onload = function () {\n resolve(image)\n }\n\n image.src = imagePath\n })\n}\n\nasync function uploadMask(filepath, formData) {\n await api\n .fetchApi('/upload/mask', {\n method: 'POST',\n body: formData\n })\n .then((response) => {})\n .catch((error) => {\n console.error('Error:', error)\n })\n\n ComfyApp.clipspace.imgs[ComfyApp.clipspace['selectedIndex']] = new Image()\n ComfyApp.clipspace.imgs[ComfyApp.clipspace['selectedIndex']].src = api.apiURL(\n '/view?' +\n new URLSearchParams(filepath).toString() +\n app.getPreviewFormatParam() +\n app.getRandParam()\n )\n\n if (ComfyApp.clipspace.images)\n ComfyApp.clipspace.images[ComfyApp.clipspace['selectedIndex']] = filepath\n\n ClipspaceDialog.invalidatePreview()\n}\n\nfunction prepare_mask(image, maskCanvas, maskCtx, maskColor) {\n // paste mask data into alpha channel\n maskCtx.drawImage(image, 0, 0, maskCanvas.width, maskCanvas.height)\n const maskData = maskCtx.getImageData(\n 0,\n 0,\n maskCanvas.width,\n maskCanvas.height\n )\n\n // invert mask\n for (let i = 0; i < maskData.data.length; i += 4) {\n if (maskData.data[i + 3] == 255) maskData.data[i + 3] = 0\n else maskData.data[i + 3] = 255\n\n maskData.data[i] = maskColor.r\n maskData.data[i + 1] = maskColor.g\n maskData.data[i + 2] = maskColor.b\n }\n\n maskCtx.globalCompositeOperation = 'source-over'\n maskCtx.putImageData(maskData, 0, 0)\n}\n\n// Define the PointerType enum\nenum PointerType {\n Arc = 'arc',\n Rect = 'rect'\n}\n\nenum CompositionOperation {\n SourceOver = 'source-over',\n DestinationOut = 'destination-out'\n}\n\nclass MaskEditorDialog extends ComfyDialog {\n static instance = null\n static mousedown_x: number | null = null\n static mousedown_y: number | null = null\n\n brush: HTMLDivElement\n maskCtx: any\n maskCanvas: HTMLCanvasElement\n brush_size_slider: HTMLDivElement\n brush_opacity_slider: HTMLDivElement\n colorButton: HTMLButtonElement\n saveButton: HTMLButtonElement\n zoom_ratio: number\n pan_x: number\n pan_y: number\n imgCanvas: HTMLCanvasElement\n last_display_style: string\n is_visible: boolean\n image: HTMLImageElement\n handler_registered: boolean\n brush_slider_input: HTMLInputElement\n cursorX: number\n cursorY: number\n mousedown_pan_x: number\n mousedown_pan_y: number\n last_pressure: number\n pointer_type: PointerType\n brush_pointer_type_select: HTMLDivElement\n\n static getInstance() {\n if (!MaskEditorDialog.instance) {\n MaskEditorDialog.instance = new MaskEditorDialog()\n }\n\n return MaskEditorDialog.instance\n }\n\n is_layout_created = false\n\n constructor() {\n super()\n this.element = $el('div.comfy-modal', { parent: document.body }, [\n $el('div.comfy-modal-content', [...this.createButtons()])\n ])\n }\n\n createButtons() {\n return []\n }\n\n createButton(name, callback): HTMLButtonElement {\n var button = document.createElement('button')\n button.style.pointerEvents = 'auto'\n button.innerText = name\n button.addEventListener('click', callback)\n return button\n }\n\n createLeftButton(name, callback) {\n var button = this.createButton(name, callback)\n button.style.cssFloat = 'left'\n button.style.marginRight = '4px'\n return button\n }\n\n createRightButton(name, callback) {\n var button = this.createButton(name, callback)\n button.style.cssFloat = 'right'\n button.style.marginLeft = '4px'\n return button\n }\n\n createLeftSlider(self, name, callback): HTMLDivElement {\n const divElement = document.createElement('div')\n divElement.id = 'maskeditor-slider'\n divElement.style.cssFloat = 'left'\n divElement.style.fontFamily = 'sans-serif'\n divElement.style.marginRight = '4px'\n divElement.style.color = 'var(--input-text)'\n divElement.style.backgroundColor = 'var(--comfy-input-bg)'\n divElement.style.borderRadius = '8px'\n divElement.style.borderColor = 'var(--border-color)'\n divElement.style.borderStyle = 'solid'\n divElement.style.fontSize = '15px'\n divElement.style.height = '25px'\n divElement.style.padding = '1px 6px'\n divElement.style.display = 'flex'\n divElement.style.position = 'relative'\n divElement.style.top = '2px'\n divElement.style.pointerEvents = 'auto'\n self.brush_slider_input = document.createElement('input')\n self.brush_slider_input.setAttribute('type', 'range')\n self.brush_slider_input.setAttribute('min', '1')\n self.brush_slider_input.setAttribute('max', '100')\n self.brush_slider_input.setAttribute('value', '10')\n const labelElement = document.createElement('label')\n labelElement.textContent = name\n\n divElement.appendChild(labelElement)\n divElement.appendChild(self.brush_slider_input)\n\n self.brush_slider_input.addEventListener('change', callback)\n\n return divElement\n }\n\n createOpacitySlider(self, name, callback): HTMLDivElement {\n const divElement = document.createElement('div')\n divElement.id = 'maskeditor-opacity-slider'\n divElement.style.cssFloat = 'left'\n divElement.style.fontFamily = 'sans-serif'\n divElement.style.marginRight = '4px'\n divElement.style.color = 'var(--input-text)'\n divElement.style.backgroundColor = 'var(--comfy-input-bg)'\n divElement.style.borderRadius = '8px'\n divElement.style.borderColor = 'var(--border-color)'\n divElement.style.borderStyle = 'solid'\n divElement.style.fontSize = '15px'\n divElement.style.height = '25px'\n divElement.style.padding = '1px 6px'\n divElement.style.display = 'flex'\n divElement.style.position = 'relative'\n divElement.style.top = '2px'\n divElement.style.pointerEvents = 'auto'\n self.opacity_slider_input = document.createElement('input')\n self.opacity_slider_input.setAttribute('type', 'range')\n self.opacity_slider_input.setAttribute('min', '0.1')\n self.opacity_slider_input.setAttribute('max', '1.0')\n self.opacity_slider_input.setAttribute('step', '0.01')\n self.opacity_slider_input.setAttribute('value', '0.7')\n const labelElement = document.createElement('label')\n labelElement.textContent = name\n\n divElement.appendChild(labelElement)\n divElement.appendChild(self.opacity_slider_input)\n\n self.opacity_slider_input.addEventListener('input', callback)\n\n return divElement\n }\n\n createPointerTypeSelect(self: any): HTMLDivElement {\n const divElement = document.createElement('div')\n divElement.id = 'maskeditor-pointer-type'\n divElement.style.cssFloat = 'left'\n divElement.style.fontFamily = 'sans-serif'\n divElement.style.marginRight = '4px'\n divElement.style.color = 'var(--input-text)'\n divElement.style.backgroundColor = 'var(--comfy-input-bg)'\n divElement.style.borderRadius = '8px'\n divElement.style.borderColor = 'var(--border-color)'\n divElement.style.borderStyle = 'solid'\n divElement.style.fontSize = '15px'\n divElement.style.height = '25px'\n divElement.style.padding = '1px 6px'\n divElement.style.display = 'flex'\n divElement.style.position = 'relative'\n divElement.style.top = '2px'\n divElement.style.pointerEvents = 'auto'\n\n const labelElement = document.createElement('label')\n labelElement.textContent = 'Pointer Type:'\n\n const selectElement = document.createElement('select')\n selectElement.style.borderRadius = '0'\n selectElement.style.borderColor = 'transparent'\n selectElement.style.borderStyle = 'unset'\n selectElement.style.fontSize = '0.9em'\n\n const optionArc = document.createElement('option')\n optionArc.value = 'arc'\n optionArc.text = 'Circle'\n optionArc.selected = true // Fix for TypeScript, \"selected\" should be boolean\n\n const optionRect = document.createElement('option')\n optionRect.value = 'rect'\n optionRect.text = 'Square'\n\n selectElement.appendChild(optionArc)\n selectElement.appendChild(optionRect)\n\n selectElement.addEventListener('change', (event: Event) => {\n const target = event.target as HTMLSelectElement\n self.pointer_type = target.value\n this.setBrushBorderRadius(self)\n })\n\n divElement.appendChild(labelElement)\n divElement.appendChild(selectElement)\n\n return divElement\n }\n\n setBrushBorderRadius(self: any): void {\n if (self.pointer_type === PointerType.Rect) {\n this.brush.style.borderRadius = '0%'\n // @ts-expect-error\n this.brush.style.MozBorderRadius = '0%'\n // @ts-expect-error\n this.brush.style.WebkitBorderRadius = '0%'\n } else {\n this.brush.style.borderRadius = '50%'\n // @ts-expect-error\n this.brush.style.MozBorderRadius = '50%'\n // @ts-expect-error\n this.brush.style.WebkitBorderRadius = '50%'\n }\n }\n\n setlayout(imgCanvas: HTMLCanvasElement, maskCanvas: HTMLCanvasElement) {\n const self = this\n self.pointer_type = PointerType.Arc\n\n // If it is specified as relative, using it only as a hidden placeholder for padding is recommended\n // to prevent anomalies where it exceeds a certain size and goes outside of the window.\n var bottom_panel = document.createElement('div')\n bottom_panel.style.position = 'absolute'\n bottom_panel.style.bottom = '0px'\n bottom_panel.style.left = '20px'\n bottom_panel.style.right = '20px'\n bottom_panel.style.height = '50px'\n bottom_panel.style.pointerEvents = 'none'\n\n var brush = document.createElement('div')\n brush.id = 'brush'\n brush.style.backgroundColor = 'transparent'\n brush.style.outline = '1px dashed black'\n brush.style.boxShadow = '0 0 0 1px white'\n brush.style.position = 'absolute'\n brush.style.zIndex = '8889'\n brush.style.pointerEvents = 'none'\n this.brush = brush\n this.setBrushBorderRadius(self)\n this.element.appendChild(imgCanvas)\n this.element.appendChild(maskCanvas)\n this.element.appendChild(bottom_panel)\n document.body.appendChild(brush)\n\n var clearButton = this.createLeftButton('Clear', () => {\n self.maskCtx.clearRect(\n 0,\n 0,\n self.maskCanvas.width,\n self.maskCanvas.height\n )\n })\n\n this.brush_size_slider = this.createLeftSlider(\n self,\n 'Thickness',\n (event) => {\n self.brush_size = event.target.value\n self.updateBrushPreview(self)\n }\n )\n\n this.brush_opacity_slider = this.createOpacitySlider(\n self,\n 'Opacity',\n (event) => {\n self.brush_opacity = event.target.value\n if (self.brush_color_mode !== 'negative') {\n self.maskCanvas.style.opacity = self.brush_opacity.toString()\n }\n }\n )\n\n this.brush_pointer_type_select = this.createPointerTypeSelect(self)\n this.colorButton = this.createLeftButton(this.getColorButtonText(), () => {\n if (self.brush_color_mode === 'black') {\n self.brush_color_mode = 'white'\n } else if (self.brush_color_mode === 'white') {\n self.brush_color_mode = 'negative'\n } else {\n self.brush_color_mode = 'black'\n }\n\n self.updateWhenBrushColorModeChanged()\n })\n\n var cancelButton = this.createRightButton('Cancel', () => {\n document.removeEventListener('keydown', MaskEditorDialog.handleKeyDown)\n self.close()\n })\n\n this.saveButton = this.createRightButton('Save', () => {\n document.removeEventListener('keydown', MaskEditorDialog.handleKeyDown)\n self.save()\n })\n\n this.element.appendChild(imgCanvas)\n this.element.appendChild(maskCanvas)\n this.element.appendChild(bottom_panel)\n\n bottom_panel.appendChild(clearButton)\n bottom_panel.appendChild(this.saveButton)\n bottom_panel.appendChild(cancelButton)\n bottom_panel.appendChild(this.brush_size_slider)\n bottom_panel.appendChild(this.brush_opacity_slider)\n bottom_panel.appendChild(this.brush_pointer_type_select)\n bottom_panel.appendChild(this.colorButton)\n\n imgCanvas.style.position = 'absolute'\n maskCanvas.style.position = 'absolute'\n\n imgCanvas.style.top = '200'\n imgCanvas.style.left = '0'\n\n maskCanvas.style.top = imgCanvas.style.top\n maskCanvas.style.left = imgCanvas.style.left\n\n const maskCanvasStyle = this.getMaskCanvasStyle()\n maskCanvas.style.mixBlendMode = maskCanvasStyle.mixBlendMode\n maskCanvas.style.opacity = maskCanvasStyle.opacity.toString()\n }\n\n async show() {\n this.zoom_ratio = 1.0\n this.pan_x = 0\n this.pan_y = 0\n\n if (!this.is_layout_created) {\n // layout\n const imgCanvas = document.createElement('canvas')\n const maskCanvas = document.createElement('canvas')\n\n imgCanvas.id = 'imageCanvas'\n maskCanvas.id = 'maskCanvas'\n\n this.setlayout(imgCanvas, maskCanvas)\n\n // prepare content\n this.imgCanvas = imgCanvas\n this.maskCanvas = maskCanvas\n this.maskCtx = maskCanvas.getContext('2d', { willReadFrequently: true })\n\n this.setEventHandler(maskCanvas)\n\n this.is_layout_created = true\n\n // replacement of onClose hook since close is not real close\n const self = this\n const observer = new MutationObserver(function (mutations) {\n mutations.forEach(function (mutation) {\n if (\n mutation.type === 'attributes' &&\n mutation.attributeName === 'style'\n ) {\n if (\n self.last_display_style &&\n self.last_display_style != 'none' &&\n self.element.style.display == 'none'\n ) {\n self.brush.style.display = 'none'\n ComfyApp.onClipspaceEditorClosed()\n }\n\n self.last_display_style = self.element.style.display\n }\n })\n })\n\n const config = { attributes: true }\n observer.observe(this.element, config)\n }\n\n // The keydown event needs to be reconfigured when closing the dialog as it gets removed.\n document.addEventListener('keydown', MaskEditorDialog.handleKeyDown)\n\n if (ComfyApp.clipspace_return_node) {\n this.saveButton.innerText = 'Save to node'\n } else {\n this.saveButton.innerText = 'Save'\n }\n this.saveButton.disabled = false\n\n this.element.style.display = 'block'\n this.element.style.width = '85%'\n this.element.style.margin = '0 7.5%'\n this.element.style.height = '100vh'\n this.element.style.top = '50%'\n this.element.style.left = '42%'\n this.element.style.zIndex = '8888' // NOTE: alert dialog must be high priority.\n\n await this.setImages(this.imgCanvas)\n\n this.is_visible = true\n }\n\n isOpened() {\n return this.element.style.display == 'block'\n }\n\n invalidateCanvas(orig_image, mask_image) {\n this.imgCanvas.width = orig_image.width\n this.imgCanvas.height = orig_image.height\n\n this.maskCanvas.width = orig_image.width\n this.maskCanvas.height = orig_image.height\n\n let imgCtx = this.imgCanvas.getContext('2d', { willReadFrequently: true })\n let maskCtx = this.maskCanvas.getContext('2d', {\n willReadFrequently: true\n })\n\n imgCtx.drawImage(orig_image, 0, 0, orig_image.width, orig_image.height)\n prepare_mask(mask_image, this.maskCanvas, maskCtx, this.getMaskColor())\n }\n\n async setImages(imgCanvas) {\n let self = this\n\n const imgCtx = imgCanvas.getContext('2d', { willReadFrequently: true })\n const maskCtx = this.maskCtx\n const maskCanvas = this.maskCanvas\n\n imgCtx.clearRect(0, 0, this.imgCanvas.width, this.imgCanvas.height)\n maskCtx.clearRect(0, 0, this.maskCanvas.width, this.maskCanvas.height)\n\n // image load\n const filepath = ComfyApp.clipspace.images\n\n const alpha_url = new URL(\n ComfyApp.clipspace.imgs[ComfyApp.clipspace['selectedIndex']].src\n )\n alpha_url.searchParams.delete('channel')\n alpha_url.searchParams.delete('preview')\n alpha_url.searchParams.set('channel', 'a')\n let mask_image = await loadImage(alpha_url)\n\n // original image load\n const rgb_url = new URL(\n ComfyApp.clipspace.imgs[ComfyApp.clipspace['selectedIndex']].src\n )\n rgb_url.searchParams.delete('channel')\n rgb_url.searchParams.set('channel', 'rgb')\n this.image = new Image()\n this.image.onload = function () {\n maskCanvas.width = self.image.width\n maskCanvas.height = self.image.height\n\n self.invalidateCanvas(self.image, mask_image)\n self.initializeCanvasPanZoom()\n }\n this.image.src = rgb_url.toString()\n }\n\n initializeCanvasPanZoom() {\n // set initialize\n let drawWidth = this.image.width\n let drawHeight = this.image.height\n\n let width = this.element.clientWidth\n let height = this.element.clientHeight\n\n if (this.image.width > width) {\n drawWidth = width\n drawHeight = (drawWidth / this.image.width) * this.image.height\n }\n\n if (drawHeight > height) {\n drawHeight = height\n drawWidth = (drawHeight / this.image.height) * this.image.width\n }\n\n this.zoom_ratio = drawWidth / this.image.width\n\n const canvasX = (width - drawWidth) / 2\n const canvasY = (height - drawHeight) / 2\n this.pan_x = canvasX\n this.pan_y = canvasY\n\n this.invalidatePanZoom()\n }\n\n invalidatePanZoom() {\n let raw_width = this.image.width * this.zoom_ratio\n let raw_height = this.image.height * this.zoom_ratio\n\n if (this.pan_x + raw_width < 10) {\n this.pan_x = 10 - raw_width\n }\n\n if (this.pan_y + raw_height < 10) {\n this.pan_y = 10 - raw_height\n }\n\n let width = `${raw_width}px`\n let height = `${raw_height}px`\n\n let left = `${this.pan_x}px`\n let top = `${this.pan_y}px`\n\n this.maskCanvas.style.width = width\n this.maskCanvas.style.height = height\n this.maskCanvas.style.left = left\n this.maskCanvas.style.top = top\n\n this.imgCanvas.style.width = width\n this.imgCanvas.style.height = height\n this.imgCanvas.style.left = left\n this.imgCanvas.style.top = top\n }\n\n setEventHandler(maskCanvas) {\n const self = this\n\n if (!this.handler_registered) {\n maskCanvas.addEventListener('contextmenu', (event) => {\n event.preventDefault()\n })\n\n this.element.addEventListener('wheel', (event) =>\n this.handleWheelEvent(self, event)\n )\n this.element.addEventListener('pointermove', (event) =>\n this.pointMoveEvent(self, event)\n )\n this.element.addEventListener('touchmove', (event) =>\n this.pointMoveEvent(self, event)\n )\n\n this.element.addEventListener('dragstart', (event) => {\n if (event.ctrlKey) {\n event.preventDefault()\n }\n })\n\n maskCanvas.addEventListener('pointerdown', (event) =>\n this.handlePointerDown(self, event)\n )\n maskCanvas.addEventListener('pointermove', (event) =>\n this.draw_move(self, event)\n )\n maskCanvas.addEventListener('touchmove', (event) =>\n this.draw_move(self, event)\n )\n maskCanvas.addEventListener('pointerover', (event) => {\n this.brush.style.display = 'block'\n })\n maskCanvas.addEventListener('pointerleave', (event) => {\n this.brush.style.display = 'none'\n })\n\n document.addEventListener('pointerup', MaskEditorDialog.handlePointerUp)\n\n this.handler_registered = true\n }\n }\n\n getMaskCanvasStyle() {\n if (this.brush_color_mode === 'negative') {\n return {\n mixBlendMode: 'difference',\n opacity: '1'\n }\n } else {\n return {\n mixBlendMode: 'initial',\n opacity: this.brush_opacity\n }\n }\n }\n\n getMaskColor() {\n if (this.brush_color_mode === 'black') {\n return { r: 0, g: 0, b: 0 }\n }\n if (this.brush_color_mode === 'white') {\n return { r: 255, g: 255, b: 255 }\n }\n if (this.brush_color_mode === 'negative') {\n // negative effect only works with white color\n return { r: 255, g: 255, b: 255 }\n }\n\n return { r: 0, g: 0, b: 0 }\n }\n\n getMaskFillStyle() {\n const maskColor = this.getMaskColor()\n\n return 'rgb(' + maskColor.r + ',' + maskColor.g + ',' + maskColor.b + ')'\n }\n\n getColorButtonText() {\n let colorCaption = 'unknown'\n\n if (this.brush_color_mode === 'black') {\n colorCaption = 'black'\n } else if (this.brush_color_mode === 'white') {\n colorCaption = 'white'\n } else if (this.brush_color_mode === 'negative') {\n colorCaption = 'negative'\n }\n\n return 'Color: ' + colorCaption\n }\n\n updateWhenBrushColorModeChanged() {\n this.colorButton.innerText = this.getColorButtonText()\n\n // update mask canvas css styles\n\n const maskCanvasStyle = this.getMaskCanvasStyle()\n this.maskCanvas.style.mixBlendMode = maskCanvasStyle.mixBlendMode\n this.maskCanvas.style.opacity = maskCanvasStyle.opacity.toString()\n\n // update mask canvas rgb colors\n\n const maskColor = this.getMaskColor()\n\n const maskData = this.maskCtx.getImageData(\n 0,\n 0,\n this.maskCanvas.width,\n this.maskCanvas.height\n )\n\n for (let i = 0; i < maskData.data.length; i += 4) {\n maskData.data[i] = maskColor.r\n maskData.data[i + 1] = maskColor.g\n maskData.data[i + 2] = maskColor.b\n }\n\n this.maskCtx.putImageData(maskData, 0, 0)\n }\n\n brush_opacity = 0.7\n brush_size = 10\n brush_color_mode = 'black'\n drawing_mode = false\n lastx = -1\n lasty = -1\n lasttime = 0\n\n static handleKeyDown(event) {\n const self = MaskEditorDialog.instance\n if (event.key === ']') {\n self.brush_size = Math.min(self.brush_size + 2, 100)\n self.brush_slider_input.value = self.brush_size\n } else if (event.key === '[') {\n self.brush_size = Math.max(self.brush_size - 2, 1)\n self.brush_slider_input.value = self.brush_size\n } else if (event.key === 'Enter') {\n self.save()\n }\n\n self.updateBrushPreview(self)\n }\n\n static handlePointerUp(event) {\n event.preventDefault()\n\n this.mousedown_x = null\n this.mousedown_y = null\n\n MaskEditorDialog.instance.drawing_mode = false\n }\n\n updateBrushPreview(self) {\n const brush = self.brush\n\n var centerX = self.cursorX\n var centerY = self.cursorY\n\n brush.style.width = self.brush_size * 2 * this.zoom_ratio + 'px'\n brush.style.height = self.brush_size * 2 * this.zoom_ratio + 'px'\n brush.style.left = centerX - self.brush_size * this.zoom_ratio + 'px'\n brush.style.top = centerY - self.brush_size * this.zoom_ratio + 'px'\n }\n\n handleWheelEvent(self, event) {\n event.preventDefault()\n\n if (event.ctrlKey) {\n // zoom canvas\n if (event.deltaY < 0) {\n this.zoom_ratio = Math.min(10.0, this.zoom_ratio + 0.2)\n } else {\n this.zoom_ratio = Math.max(0.2, this.zoom_ratio - 0.2)\n }\n\n this.invalidatePanZoom()\n } else {\n // adjust brush size\n if (event.deltaY < 0) this.brush_size = Math.min(this.brush_size + 2, 100)\n else this.brush_size = Math.max(this.brush_size - 2, 1)\n\n this.brush_slider_input.value = this.brush_size.toString()\n\n this.updateBrushPreview(this)\n }\n }\n\n pointMoveEvent(self, event) {\n this.cursorX = event.pageX\n this.cursorY = event.pageY\n\n self.updateBrushPreview(self)\n\n if (event.ctrlKey) {\n event.preventDefault()\n self.pan_move(self, event)\n }\n\n let left_button_down =\n (window.TouchEvent && event instanceof TouchEvent) || event.buttons == 1\n\n if (event.shiftKey && left_button_down) {\n self.drawing_mode = false\n\n const y = event.clientY\n let delta = (self.zoom_lasty - y) * 0.005\n self.zoom_ratio = Math.max(\n Math.min(10.0, self.last_zoom_ratio - delta),\n 0.2\n )\n\n this.invalidatePanZoom()\n return\n }\n }\n\n pan_move(self, event) {\n if (event.buttons == 1) {\n if (MaskEditorDialog.mousedown_x) {\n let deltaX = MaskEditorDialog.mousedown_x - event.clientX\n let deltaY = MaskEditorDialog.mousedown_y - event.clientY\n\n self.pan_x = this.mousedown_pan_x - deltaX\n self.pan_y = this.mousedown_pan_y - deltaY\n\n self.invalidatePanZoom()\n }\n }\n }\n\n draw_move(self, event) {\n if (event.ctrlKey || event.shiftKey) {\n return\n }\n\n event.preventDefault()\n\n this.cursorX = event.pageX\n this.cursorY = event.pageY\n\n self.updateBrushPreview(self)\n\n let left_button_down =\n (window.TouchEvent && event instanceof TouchEvent) || event.buttons == 1\n let right_button_down = [2, 5, 32].includes(event.buttons)\n\n if (!event.altKey && left_button_down) {\n var diff = performance.now() - self.lasttime\n\n const maskRect = self.maskCanvas.getBoundingClientRect()\n\n var x = event.offsetX\n var y = event.offsetY\n\n if (event.offsetX == null) {\n x = event.targetTouches[0].clientX - maskRect.left\n }\n\n if (event.offsetY == null) {\n y = event.targetTouches[0].clientY - maskRect.top\n }\n\n x /= self.zoom_ratio\n y /= self.zoom_ratio\n\n var brush_size = this.brush_size\n if (event instanceof PointerEvent && event.pointerType == 'pen') {\n brush_size *= event.pressure\n this.last_pressure = event.pressure\n } else if (\n window.TouchEvent &&\n event instanceof TouchEvent &&\n diff < 20\n ) {\n // The firing interval of PointerEvents in Pen is unreliable, so it is supplemented by TouchEvents.\n brush_size *= this.last_pressure\n } else {\n brush_size = this.brush_size\n }\n\n if (diff > 20 && !this.drawing_mode)\n requestAnimationFrame(() => {\n self.init_shape(self, CompositionOperation.SourceOver)\n self.draw_shape(self, x, y, brush_size)\n self.lastx = x\n self.lasty = y\n })\n else\n requestAnimationFrame(() => {\n self.init_shape(self, CompositionOperation.SourceOver)\n\n var dx = x - self.lastx\n var dy = y - self.lasty\n\n var distance = Math.sqrt(dx * dx + dy * dy)\n var directionX = dx / distance\n var directionY = dy / distance\n\n for (var i = 0; i < distance; i += 5) {\n var px = self.lastx + directionX * i\n var py = self.lasty + directionY * i\n self.draw_shape(self, px, py, brush_size)\n }\n self.lastx = x\n self.lasty = y\n })\n\n self.lasttime = performance.now()\n } else if ((event.altKey && left_button_down) || right_button_down) {\n const maskRect = self.maskCanvas.getBoundingClientRect()\n const x =\n (event.offsetX || event.targetTouches[0].clientX - maskRect.left) /\n self.zoom_ratio\n const y =\n (event.offsetY || event.targetTouches[0].clientY - maskRect.top) /\n self.zoom_ratio\n\n var brush_size = this.brush_size\n if (event instanceof PointerEvent && event.pointerType == 'pen') {\n brush_size *= event.pressure\n this.last_pressure = event.pressure\n } else if (\n window.TouchEvent &&\n event instanceof TouchEvent &&\n diff < 20\n ) {\n brush_size *= this.last_pressure\n } else {\n brush_size = this.brush_size\n }\n\n if (diff > 20 && !this.drawing_mode)\n // cannot tracking drawing_mode for touch event\n requestAnimationFrame(() => {\n self.init_shape(self, CompositionOperation.DestinationOut)\n self.draw_shape(self, x, y, brush_size)\n self.lastx = x\n self.lasty = y\n })\n else\n requestAnimationFrame(() => {\n self.init_shape(self, CompositionOperation.DestinationOut)\n\n var dx = x - self.lastx\n var dy = y - self.lasty\n\n var distance = Math.sqrt(dx * dx + dy * dy)\n var directionX = dx / distance\n var directionY = dy / distance\n\n for (var i = 0; i < distance; i += 5) {\n var px = self.lastx + directionX * i\n var py = self.lasty + directionY * i\n self.draw_shape(self, px, py, brush_size)\n }\n self.lastx = x\n self.lasty = y\n })\n\n self.lasttime = performance.now()\n }\n }\n\n handlePointerDown(self, event) {\n if (event.ctrlKey) {\n if (event.buttons == 1) {\n MaskEditorDialog.mousedown_x = event.clientX\n MaskEditorDialog.mousedown_y = event.clientY\n\n this.mousedown_pan_x = this.pan_x\n this.mousedown_pan_y = this.pan_y\n }\n return\n }\n\n var brush_size = this.brush_size\n if (event instanceof PointerEvent && event.pointerType == 'pen') {\n brush_size *= event.pressure\n this.last_pressure = event.pressure\n }\n\n if ([0, 2, 5].includes(event.button)) {\n self.drawing_mode = true\n\n event.preventDefault()\n\n if (event.shiftKey) {\n self.zoom_lasty = event.clientY\n self.last_zoom_ratio = self.zoom_ratio\n return\n }\n\n const maskRect = self.maskCanvas.getBoundingClientRect()\n const x =\n (event.offsetX || event.targetTouches[0].clientX - maskRect.left) /\n self.zoom_ratio\n const y =\n (event.offsetY || event.targetTouches[0].clientY - maskRect.top) /\n self.zoom_ratio\n\n if (!event.altKey && event.button == 0) {\n self.init_shape(self, CompositionOperation.SourceOver)\n } else {\n self.init_shape(self, CompositionOperation.DestinationOut)\n }\n self.draw_shape(self, x, y, brush_size)\n self.lastx = x\n self.lasty = y\n self.lasttime = performance.now()\n }\n }\n\n init_shape(self, compositionOperation) {\n self.maskCtx.beginPath()\n if (compositionOperation == CompositionOperation.SourceOver) {\n self.maskCtx.fillStyle = this.getMaskFillStyle()\n self.maskCtx.globalCompositeOperation = CompositionOperation.SourceOver\n } else if (compositionOperation == CompositionOperation.DestinationOut) {\n self.maskCtx.globalCompositeOperation =\n CompositionOperation.DestinationOut\n }\n }\n\n draw_shape(self, x, y, brush_size) {\n if (self.pointer_type === PointerType.Rect) {\n self.maskCtx.rect(\n x - brush_size,\n y - brush_size,\n brush_size * 2,\n brush_size * 2\n )\n } else {\n self.maskCtx.arc(x, y, brush_size, 0, Math.PI * 2, false)\n }\n self.maskCtx.fill()\n }\n\n async save() {\n const backupCanvas = document.createElement('canvas')\n const backupCtx = backupCanvas.getContext('2d', {\n willReadFrequently: true\n })\n backupCanvas.width = this.image.width\n backupCanvas.height = this.image.height\n\n backupCtx.clearRect(0, 0, backupCanvas.width, backupCanvas.height)\n backupCtx.drawImage(\n this.maskCanvas,\n 0,\n 0,\n this.maskCanvas.width,\n this.maskCanvas.height,\n 0,\n 0,\n backupCanvas.width,\n backupCanvas.height\n )\n\n // paste mask data into alpha channel\n const backupData = backupCtx.getImageData(\n 0,\n 0,\n backupCanvas.width,\n backupCanvas.height\n )\n\n // refine mask image\n for (let i = 0; i < backupData.data.length; i += 4) {\n if (backupData.data[i + 3] == 255) backupData.data[i + 3] = 0\n else backupData.data[i + 3] = 255\n\n backupData.data[i] = 0\n backupData.data[i + 1] = 0\n backupData.data[i + 2] = 0\n }\n\n backupCtx.globalCompositeOperation = CompositionOperation.SourceOver\n backupCtx.putImageData(backupData, 0, 0)\n\n const formData = new FormData()\n const filename = 'clipspace-mask-' + performance.now() + '.png'\n\n const item = {\n filename: filename,\n subfolder: 'clipspace',\n type: 'input'\n }\n\n if (ComfyApp.clipspace.images) ComfyApp.clipspace.images[0] = item\n\n if (ComfyApp.clipspace.widgets) {\n const index = ComfyApp.clipspace.widgets.findIndex(\n (obj) => obj.name === 'image'\n )\n\n if (index >= 0) ComfyApp.clipspace.widgets[index].value = item\n }\n\n const dataURL = backupCanvas.toDataURL()\n const blob = dataURLToBlob(dataURL)\n\n let original_url = new URL(this.image.src)\n\n type Ref = { filename: string; subfolder?: string; type?: string }\n\n const original_ref: Ref = {\n filename: original_url.searchParams.get('filename')\n }\n\n let original_subfolder = original_url.searchParams.get('subfolder')\n if (original_subfolder) original_ref.subfolder = original_subfolder\n\n let original_type = original_url.searchParams.get('type')\n if (original_type) original_ref.type = original_type\n\n formData.append('image', blob, filename)\n formData.append('original_ref', JSON.stringify(original_ref))\n formData.append('type', 'input')\n formData.append('subfolder', 'clipspace')\n\n this.saveButton.innerText = 'Saving...'\n this.saveButton.disabled = true\n await uploadMask(item, formData)\n ComfyApp.onClipspaceEditorSave()\n this.close()\n }\n}\n\napp.registerExtension({\n name: 'Comfy.MaskEditor',\n init(app) {\n ComfyApp.open_maskeditor = function () {\n const dlg = MaskEditorDialog.getInstance()\n if (!dlg.isOpened()) {\n dlg.show()\n }\n }\n\n const context_predicate = () =>\n ComfyApp.clipspace &&\n ComfyApp.clipspace.imgs &&\n ComfyApp.clipspace.imgs.length > 0\n ClipspaceDialog.registerButton(\n 'MaskEditor',\n context_predicate,\n ComfyApp.open_maskeditor\n )\n }\n})\n","// @ts-strict-ignore\nimport { app } from '../../scripts/app'\nimport { api } from '../../scripts/api'\nimport { ComfyDialog, $el } from '../../scripts/ui'\nimport { GroupNodeConfig, GroupNodeHandler } from './groupNode'\nimport { LGraphCanvas } from '@comfyorg/litegraph'\nimport { useToastStore } from '@/stores/toastStore'\nimport { deserialiseAndCreate } from '@/extensions/core/vintageClipboard'\n\n// Adds the ability to save and add multiple nodes as a template\n// To save:\n// Select multiple nodes (ctrl + drag to select a region or ctrl+click individual nodes)\n// Right click the canvas\n// Save Node Template -> give it a name\n//\n// To add:\n// Right click the canvas\n// Node templates -> click the one to add\n//\n// To delete/rename:\n// Right click the canvas\n// Node templates -> Manage\n//\n// To rearrange:\n// Open the manage dialog and Drag and drop elements using the \"Name:\" label as handle\n\nconst id = 'Comfy.NodeTemplates'\nconst file = 'comfy.templates.json'\n\nclass ManageTemplates extends ComfyDialog {\n templates: any[]\n draggedEl: HTMLElement | null\n saveVisualCue: number | null\n emptyImg: HTMLImageElement\n importInput: HTMLInputElement\n\n constructor() {\n super()\n this.load().then((v) => {\n this.templates = v\n })\n\n this.element.classList.add('comfy-manage-templates')\n this.draggedEl = null\n this.saveVisualCue = null\n this.emptyImg = new Image()\n this.emptyImg.src =\n 'data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs='\n\n this.importInput = $el('input', {\n type: 'file',\n accept: '.json',\n multiple: true,\n style: { display: 'none' },\n parent: document.body,\n onchange: () => this.importAll()\n }) as HTMLInputElement\n }\n\n createButtons() {\n const btns = super.createButtons()\n btns[0].textContent = 'Close'\n btns[0].onclick = (e) => {\n clearTimeout(this.saveVisualCue)\n this.close()\n }\n btns.unshift(\n $el('button', {\n type: 'button',\n textContent: 'Export',\n onclick: () => this.exportAll()\n })\n )\n btns.unshift(\n $el('button', {\n type: 'button',\n textContent: 'Import',\n onclick: () => {\n this.importInput.click()\n }\n })\n )\n return btns\n }\n\n async load() {\n let templates = []\n if (app.storageLocation === 'server') {\n if (app.isNewUserSession) {\n // New user so migrate existing templates\n const json = localStorage.getItem(id)\n if (json) {\n templates = JSON.parse(json)\n }\n await api.storeUserData(file, json, { stringify: false })\n } else {\n const res = await api.getUserData(file)\n if (res.status === 200) {\n try {\n templates = await res.json()\n } catch (error) {}\n } else if (res.status !== 404) {\n console.error(res.status + ' ' + res.statusText)\n }\n }\n } else {\n const json = localStorage.getItem(id)\n if (json) {\n templates = JSON.parse(json)\n }\n }\n\n return templates ?? []\n }\n\n async store() {\n if (app.storageLocation === 'server') {\n const templates = JSON.stringify(this.templates, undefined, 4)\n localStorage.setItem(id, templates) // Backwards compatibility\n try {\n await api.storeUserData(file, templates, { stringify: false })\n } catch (error) {\n console.error(error)\n useToastStore().addAlert(error.message)\n }\n } else {\n localStorage.setItem(id, JSON.stringify(this.templates))\n }\n }\n\n async importAll() {\n for (const file of this.importInput.files) {\n if (file.type === 'application/json' || file.name.endsWith('.json')) {\n const reader = new FileReader()\n reader.onload = async () => {\n const importFile = JSON.parse(reader.result as string)\n if (importFile?.templates) {\n for (const template of importFile.templates) {\n if (template?.name && template?.data) {\n this.templates.push(template)\n }\n }\n await this.store()\n }\n }\n await reader.readAsText(file)\n }\n }\n\n this.importInput.value = null\n\n this.close()\n }\n\n exportAll() {\n if (this.templates.length == 0) {\n useToastStore().addAlert('No templates to export.')\n return\n }\n\n const json = JSON.stringify({ templates: this.templates }, null, 2) // convert the data to a JSON string\n const blob = new Blob([json], { type: 'application/json' })\n const url = URL.createObjectURL(blob)\n const a = $el('a', {\n href: url,\n download: 'node_templates.json',\n style: { display: 'none' },\n parent: document.body\n })\n a.click()\n setTimeout(function () {\n a.remove()\n window.URL.revokeObjectURL(url)\n }, 0)\n }\n\n show() {\n // Show list of template names + delete button\n super.show(\n $el(\n 'div',\n {},\n this.templates.flatMap((t, i) => {\n let nameInput\n return [\n $el(\n 'div',\n {\n dataset: { id: i.toString() },\n className: 'templateManagerRow',\n style: {\n display: 'grid',\n gridTemplateColumns: '1fr auto',\n border: '1px dashed transparent',\n gap: '5px',\n backgroundColor: 'var(--comfy-menu-bg)'\n },\n ondragstart: (e) => {\n this.draggedEl = e.currentTarget\n e.currentTarget.style.opacity = '0.6'\n e.currentTarget.style.border = '1px dashed yellow'\n e.dataTransfer.effectAllowed = 'move'\n e.dataTransfer.setDragImage(this.emptyImg, 0, 0)\n },\n ondragend: (e) => {\n e.target.style.opacity = '1'\n e.currentTarget.style.border = '1px dashed transparent'\n e.currentTarget.removeAttribute('draggable')\n\n // rearrange the elements\n this.element\n .querySelectorAll('.templateManagerRow')\n .forEach((el: HTMLElement, i) => {\n var prev_i = Number.parseInt(el.dataset.id)\n\n if (el == this.draggedEl && prev_i != i) {\n this.templates.splice(\n i,\n 0,\n this.templates.splice(prev_i, 1)[0]\n )\n }\n el.dataset.id = i.toString()\n })\n this.store()\n },\n ondragover: (e) => {\n e.preventDefault()\n if (e.currentTarget == this.draggedEl) return\n\n let rect = e.currentTarget.getBoundingClientRect()\n if (e.clientY > rect.top + rect.height / 2) {\n e.currentTarget.parentNode.insertBefore(\n this.draggedEl,\n e.currentTarget.nextSibling\n )\n } else {\n e.currentTarget.parentNode.insertBefore(\n this.draggedEl,\n e.currentTarget\n )\n }\n }\n },\n [\n $el(\n 'label',\n {\n textContent: 'Name: ',\n style: {\n cursor: 'grab'\n },\n onmousedown: (e) => {\n // enable dragging only from the label\n if (e.target.localName == 'label')\n e.currentTarget.parentNode.draggable = 'true'\n }\n },\n [\n $el('input', {\n value: t.name,\n dataset: { name: t.name },\n style: {\n transitionProperty: 'background-color',\n transitionDuration: '0s'\n },\n onchange: (e) => {\n clearTimeout(this.saveVisualCue)\n var el = e.target\n var row = el.parentNode.parentNode\n this.templates[row.dataset.id].name =\n el.value.trim() || 'untitled'\n this.store()\n el.style.backgroundColor = 'rgb(40, 95, 40)'\n el.style.transitionDuration = '0s'\n // @ts-expect-error\n // In browser env the return value is number.\n this.saveVisualCue = setTimeout(function () {\n el.style.transitionDuration = '.7s'\n el.style.backgroundColor = 'var(--comfy-input-bg)'\n }, 15)\n },\n onkeypress: (e) => {\n var el = e.target\n clearTimeout(this.saveVisualCue)\n el.style.transitionDuration = '0s'\n el.style.backgroundColor = 'var(--comfy-input-bg)'\n },\n $: (el) => (nameInput = el)\n })\n ]\n ),\n $el('div', {}, [\n $el('button', {\n textContent: 'Export',\n style: {\n fontSize: '12px',\n fontWeight: 'normal'\n },\n onclick: (e) => {\n const json = JSON.stringify({ templates: [t] }, null, 2) // convert the data to a JSON string\n const blob = new Blob([json], {\n type: 'application/json'\n })\n const url = URL.createObjectURL(blob)\n const a = $el('a', {\n href: url,\n download: (nameInput.value || t.name) + '.json',\n style: { display: 'none' },\n parent: document.body\n })\n a.click()\n setTimeout(function () {\n a.remove()\n window.URL.revokeObjectURL(url)\n }, 0)\n }\n }),\n $el('button', {\n textContent: 'Delete',\n style: {\n fontSize: '12px',\n color: 'red',\n fontWeight: 'normal'\n },\n onclick: (e) => {\n const item = e.target.parentNode.parentNode\n item.parentNode.removeChild(item)\n this.templates.splice(item.dataset.id * 1, 1)\n this.store()\n // update the rows index, setTimeout ensures that the list is updated\n var that = this\n setTimeout(function () {\n that.element\n .querySelectorAll('.templateManagerRow')\n .forEach((el: HTMLElement, i) => {\n el.dataset.id = i.toString()\n })\n }, 0)\n }\n })\n ])\n ]\n )\n ]\n })\n )\n )\n }\n}\n\napp.registerExtension({\n name: id,\n setup() {\n const manage = new ManageTemplates()\n\n const clipboardAction = async (cb) => {\n // We use the clipboard functions but dont want to overwrite the current user clipboard\n // Restore it after we've run our callback\n const old = localStorage.getItem('litegrapheditor_clipboard')\n await cb()\n localStorage.setItem('litegrapheditor_clipboard', old)\n }\n\n const orig = LGraphCanvas.prototype.getCanvasMenuOptions\n LGraphCanvas.prototype.getCanvasMenuOptions = function () {\n const options = orig.apply(this, arguments)\n\n options.push(null)\n options.push({\n content: `Save Selected as Template`,\n disabled: !Object.keys(app.canvas.selected_nodes || {}).length,\n callback: () => {\n const name = prompt('Enter name')\n if (!name?.trim()) return\n\n clipboardAction(() => {\n app.canvas.copyToClipboard()\n let data = localStorage.getItem('litegrapheditor_clipboard')\n data = JSON.parse(data)\n const nodeIds = Object.keys(app.canvas.selected_nodes)\n for (let i = 0; i < nodeIds.length; i++) {\n const node = app.graph.getNodeById(nodeIds[i])\n const nodeData = node?.constructor.nodeData\n\n let groupData = GroupNodeHandler.getGroupData(node)\n if (groupData) {\n groupData = groupData.nodeData\n // @ts-expect-error\n if (!data.groupNodes) {\n // @ts-expect-error\n data.groupNodes = {}\n }\n // @ts-expect-error\n data.groupNodes[nodeData.name] = groupData\n // @ts-expect-error\n data.nodes[i].type = nodeData.name\n }\n }\n\n manage.templates.push({\n name,\n data: JSON.stringify(data)\n })\n manage.store()\n })\n }\n })\n\n // Map each template to a menu item\n const subItems = manage.templates.map((t) => {\n return {\n content: t.name,\n callback: () => {\n clipboardAction(async () => {\n const data = JSON.parse(t.data)\n await GroupNodeConfig.registerFromWorkflow(data.groupNodes, {})\n\n // Check for old clipboard format\n if (!data.reroutes) {\n deserialiseAndCreate(t.data, app.canvas)\n } else {\n localStorage.setItem('litegrapheditor_clipboard', t.data)\n app.canvas.pasteFromClipboard()\n }\n })\n }\n }\n })\n\n subItems.push(null, {\n content: 'Manage',\n callback: () => manage.show()\n })\n\n options.push({\n content: 'Node Templates',\n submenu: {\n options: subItems\n }\n })\n\n return options\n }\n }\n})\n","// @ts-strict-ignore\nimport { LiteGraph, LGraphCanvas } from '@comfyorg/litegraph'\nimport { app } from '../../scripts/app'\nimport { ComfyWidgets } from '../../scripts/widgets'\nimport { LGraphNode } from '@comfyorg/litegraph'\n// Node that add notes to your project\n\napp.registerExtension({\n name: 'Comfy.NoteNode',\n registerCustomNodes() {\n class NoteNode extends LGraphNode {\n static category: string\n\n color = LGraphCanvas.node_colors.yellow.color\n bgcolor = LGraphCanvas.node_colors.yellow.bgcolor\n groupcolor = LGraphCanvas.node_colors.yellow.groupcolor\n isVirtualNode: boolean\n collapsable: boolean\n title_mode: number\n\n constructor(title?: string) {\n super(title)\n if (!this.properties) {\n this.properties = { text: '' }\n }\n ComfyWidgets.STRING(\n // Should we extends LGraphNode? Yesss\n this,\n '',\n ['', { default: this.properties.text, multiline: true }],\n app\n )\n\n this.serialize_widgets = true\n this.isVirtualNode = true\n }\n }\n\n // Load default visibility\n\n LiteGraph.registerNodeType(\n 'Note',\n Object.assign(NoteNode, {\n title_mode: LiteGraph.NORMAL_TITLE,\n title: 'Note',\n collapsable: true\n })\n )\n\n NoteNode.category = 'utils'\n }\n})\n","// @ts-strict-ignore\nimport type { IContextMenuValue } from '@comfyorg/litegraph'\nimport { app } from '../../scripts/app'\nimport { mergeIfValid, getWidgetConfig, setWidgetConfig } from './widgetInputs'\nimport { LiteGraph, LGraphCanvas, LGraphNode } from '@comfyorg/litegraph'\n\n// Node that allows you to redirect connections for cleaner graphs\n\napp.registerExtension({\n name: 'Comfy.RerouteNode',\n registerCustomNodes(app) {\n interface RerouteNode extends LGraphNode {\n __outputType?: string\n }\n\n class RerouteNode extends LGraphNode {\n static category: string | undefined\n static defaultVisibility = false\n\n constructor(title?: string) {\n super(title)\n if (!this.properties) {\n this.properties = {}\n }\n this.properties.showOutputText = RerouteNode.defaultVisibility\n this.properties.horizontal = false\n\n this.addInput('', '*')\n this.addOutput(this.properties.showOutputText ? '*' : '', '*')\n\n this.onAfterGraphConfigured = function () {\n requestAnimationFrame(() => {\n this.onConnectionsChange(LiteGraph.INPUT, null, true, null)\n })\n }\n\n this.onConnectionsChange = (type, index, connected, link_info) => {\n this.applyOrientation()\n\n // Prevent multiple connections to different types when we have no input\n if (connected && type === LiteGraph.OUTPUT) {\n // Ignore wildcard nodes as these will be updated to real types\n const types = new Set(\n this.outputs[0].links\n .map((l) => app.graph.links[l].type)\n .filter((t) => t !== '*')\n )\n if (types.size > 1) {\n const linksToDisconnect = []\n for (let i = 0; i < this.outputs[0].links.length - 1; i++) {\n const linkId = this.outputs[0].links[i]\n const link = app.graph.links[linkId]\n linksToDisconnect.push(link)\n }\n for (const link of linksToDisconnect) {\n const node = app.graph.getNodeById(link.target_id)\n node.disconnectInput(link.target_slot)\n }\n }\n }\n\n // Find root input\n let currentNode: LGraphNode | null = this\n let updateNodes = []\n let inputType = null\n let inputNode = null\n while (currentNode) {\n updateNodes.unshift(currentNode)\n const linkId = currentNode.inputs[0].link\n if (linkId !== null) {\n const link = app.graph.links[linkId]\n if (!link) return\n const node = app.graph.getNodeById(link.origin_id)\n const type = node.constructor.type\n if (type === 'Reroute') {\n if (node === this) {\n // We've found a circle\n currentNode.disconnectInput(link.target_slot)\n currentNode = null\n } else {\n // Move the previous node\n currentNode = node\n }\n } else {\n // We've found the end\n inputNode = currentNode\n inputType = node.outputs[link.origin_slot]?.type ?? null\n break\n }\n } else {\n // This path has no input node\n currentNode = null\n break\n }\n }\n\n // Find all outputs\n const nodes: LGraphNode[] = [this]\n let outputType = null\n while (nodes.length) {\n currentNode = nodes.pop()\n const outputs =\n (currentNode.outputs ? currentNode.outputs[0].links : []) || []\n if (outputs.length) {\n for (const linkId of outputs) {\n const link = app.graph.links[linkId]\n\n // When disconnecting sometimes the link is still registered\n if (!link) continue\n\n const node = app.graph.getNodeById(link.target_id)\n const type = node.constructor.type\n\n if (type === 'Reroute') {\n // Follow reroute nodes\n nodes.push(node)\n updateNodes.push(node)\n } else {\n // We've found an output\n const nodeOutType =\n node.inputs &&\n node.inputs[link?.target_slot] &&\n node.inputs[link.target_slot].type\n ? node.inputs[link.target_slot].type\n : null\n if (\n inputType &&\n !LiteGraph.isValidConnection(inputType, nodeOutType)\n ) {\n // The output doesnt match our input so disconnect it\n node.disconnectInput(link.target_slot)\n } else {\n outputType = nodeOutType\n }\n }\n }\n } else {\n // No more outputs for this path\n }\n }\n\n const displayType = inputType || outputType || '*'\n const color = LGraphCanvas.link_type_colors[displayType]\n\n let widgetConfig\n let targetWidget\n let widgetType\n // Update the types of each node\n for (const node of updateNodes) {\n // If we dont have an input type we are always wildcard but we'll show the output type\n // This lets you change the output link to a different type and all nodes will update\n node.outputs[0].type = inputType || '*'\n node.__outputType = displayType\n node.outputs[0].name = node.properties.showOutputText\n ? displayType\n : ''\n node.size = node.computeSize()\n node.applyOrientation()\n\n for (const l of node.outputs[0].links || []) {\n const link = app.graph.links[l]\n if (link) {\n link.color = color\n\n if (app.configuringGraph) continue\n const targetNode = app.graph.getNodeById(link.target_id)\n const targetInput = targetNode.inputs?.[link.target_slot]\n if (targetInput?.widget) {\n const config = getWidgetConfig(targetInput)\n if (!widgetConfig) {\n widgetConfig = config[1] ?? {}\n widgetType = config[0]\n }\n if (!targetWidget) {\n targetWidget = targetNode.widgets?.find(\n (w) => w.name === (targetInput.widget as any).name\n )\n }\n\n const merged = mergeIfValid(targetInput, [\n config[0],\n widgetConfig\n ])\n if (merged.customConfig) {\n widgetConfig = merged.customConfig\n }\n }\n }\n }\n }\n\n for (const node of updateNodes) {\n if (widgetConfig && outputType) {\n node.inputs[0].widget = { name: 'value' }\n setWidgetConfig(\n node.inputs[0],\n [widgetType ?? displayType, widgetConfig],\n targetWidget\n )\n } else {\n setWidgetConfig(node.inputs[0], null)\n }\n }\n\n if (inputNode) {\n const link = app.graph.links[inputNode.inputs[0].link]\n if (link) {\n link.color = color\n }\n }\n }\n\n this.clone = function () {\n const cloned = RerouteNode.prototype.clone.apply(this)\n cloned.removeOutput(0)\n cloned.addOutput(this.properties.showOutputText ? '*' : '', '*')\n cloned.size = cloned.computeSize()\n return cloned\n }\n\n // This node is purely frontend and does not impact the resulting prompt so should not be serialized\n this.isVirtualNode = true\n }\n\n getExtraMenuOptions(_, options): IContextMenuValue[] {\n options.unshift(\n {\n content:\n (this.properties.showOutputText ? 'Hide' : 'Show') + ' Type',\n callback: () => {\n this.properties.showOutputText = !this.properties.showOutputText\n if (this.properties.showOutputText) {\n this.outputs[0].name =\n this.__outputType || (this.outputs[0].type as string)\n } else {\n this.outputs[0].name = ''\n }\n this.size = this.computeSize()\n this.applyOrientation()\n app.graph.setDirtyCanvas(true, true)\n }\n },\n {\n content:\n (RerouteNode.defaultVisibility ? 'Hide' : 'Show') +\n ' Type By Default',\n callback: () => {\n RerouteNode.setDefaultTextVisibility(\n !RerouteNode.defaultVisibility\n )\n }\n },\n {\n // naming is inverted with respect to LiteGraphNode.horizontal\n // LiteGraphNode.horizontal == true means that\n // each slot in the inputs and outputs are laid out horizontally,\n // which is the opposite of the visual orientation of the inputs and outputs as a node\n content:\n 'Set ' + (this.properties.horizontal ? 'Horizontal' : 'Vertical'),\n callback: () => {\n this.properties.horizontal = !this.properties.horizontal\n this.applyOrientation()\n }\n }\n )\n return []\n }\n applyOrientation() {\n this.horizontal = this.properties.horizontal\n if (this.horizontal) {\n // we correct the input position, because LiteGraphNode.horizontal\n // doesn't account for title presence\n // which reroute nodes don't have\n this.inputs[0].pos = [this.size[0] / 2, 0]\n } else {\n delete this.inputs[0].pos\n }\n app.graph.setDirtyCanvas(true, true)\n }\n\n computeSize(): [number, number] {\n return [\n this.properties.showOutputText && this.outputs && this.outputs.length\n ? Math.max(\n 75,\n LiteGraph.NODE_TEXT_SIZE * this.outputs[0].name.length * 0.6 +\n 40\n )\n : 75,\n 26\n ]\n }\n\n static setDefaultTextVisibility(visible) {\n RerouteNode.defaultVisibility = visible\n if (visible) {\n localStorage['Comfy.RerouteNode.DefaultVisibility'] = 'true'\n } else {\n delete localStorage['Comfy.RerouteNode.DefaultVisibility']\n }\n }\n }\n\n // Load default visibility\n RerouteNode.setDefaultTextVisibility(\n !!localStorage['Comfy.RerouteNode.DefaultVisibility']\n )\n\n LiteGraph.registerNodeType(\n 'Reroute',\n Object.assign(RerouteNode, {\n title_mode: LiteGraph.NO_TITLE,\n title: 'Reroute',\n collapsable: false\n })\n )\n\n RerouteNode.category = 'utils'\n }\n})\n","// @ts-strict-ignore\nimport { app } from '../../scripts/app'\nimport { applyTextReplacements } from '../../scripts/utils'\n// Use widget values and dates in output filenames\n\napp.registerExtension({\n name: 'Comfy.SaveImageExtraOutput',\n async beforeRegisterNodeDef(nodeType, nodeData, app) {\n if (nodeData.name === 'SaveImage' || nodeData.name === 'SaveAnimatedWEBP') {\n const onNodeCreated = nodeType.prototype.onNodeCreated\n // When the SaveImage node is created we want to override the serialization of the output name widget to run our S&R\n nodeType.prototype.onNodeCreated = function () {\n const r = onNodeCreated\n ? onNodeCreated.apply(this, arguments)\n : undefined\n\n const widget = this.widgets.find((w) => w.name === 'filename_prefix')\n widget.serializeValue = () => {\n return applyTextReplacements(app, widget.value)\n }\n\n return r\n }\n } else {\n // When any other node is created add a property to alias the node\n const onNodeCreated = nodeType.prototype.onNodeCreated\n nodeType.prototype.onNodeCreated = function () {\n const r = onNodeCreated\n ? onNodeCreated.apply(this, arguments)\n : undefined\n\n if (!this.properties || !('Node name for S&R' in this.properties)) {\n this.addProperty('Node name for S&R', this.constructor.type, 'string')\n }\n\n return r\n }\n }\n }\n})\n","// @ts-strict-ignore\nimport { app } from '../../scripts/app'\nimport { LGraphCanvas, LiteGraph } from '@comfyorg/litegraph'\n\nlet touchZooming\nlet touchCount = 0\n\napp.registerExtension({\n name: 'Comfy.SimpleTouchSupport',\n setup() {\n let touchDist\n let touchTime\n let lastTouch\n let lastScale\n function getMultiTouchPos(e) {\n return Math.hypot(\n e.touches[0].clientX - e.touches[1].clientX,\n e.touches[0].clientY - e.touches[1].clientY\n )\n }\n\n function getMultiTouchCenter(e) {\n return {\n clientX: (e.touches[0].clientX + e.touches[1].clientX) / 2,\n clientY: (e.touches[0].clientY + e.touches[1].clientY) / 2\n }\n }\n\n app.canvasEl.parentElement.addEventListener(\n 'touchstart',\n (e: TouchEvent) => {\n touchCount++\n lastTouch = null\n lastScale = null\n if (e.touches?.length === 1) {\n // Store start time for press+hold for context menu\n touchTime = new Date()\n lastTouch = e.touches[0]\n } else {\n touchTime = null\n if (e.touches?.length === 2) {\n // Store center pos for zoom\n lastScale = app.canvas.ds.scale\n lastTouch = getMultiTouchCenter(e)\n\n touchDist = getMultiTouchPos(e)\n app.canvas.pointer_is_down = false\n }\n }\n },\n true\n )\n\n app.canvasEl.parentElement.addEventListener('touchend', (e: TouchEvent) => {\n touchCount--\n\n if (e.touches?.length !== 1) touchZooming = false\n if (touchTime && !e.touches?.length) {\n if (new Date().getTime() - touchTime > 600) {\n if (e.target === app.canvasEl) {\n app.canvasEl.dispatchEvent(\n new PointerEvent('pointerdown', {\n button: 2,\n clientX: e.changedTouches[0].clientX,\n clientY: e.changedTouches[0].clientY\n })\n )\n e.preventDefault()\n }\n }\n touchTime = null\n }\n })\n\n app.canvasEl.parentElement.addEventListener(\n 'touchmove',\n (e) => {\n touchTime = null\n if (e.touches?.length === 2 && lastTouch && !e.ctrlKey && !e.shiftKey) {\n e.preventDefault() // Prevent browser from zooming when two textareas are touched\n app.canvas.pointer_is_down = false\n touchZooming = true\n\n LiteGraph.closeAllContextMenus(window)\n // @ts-expect-error\n app.canvas.search_box?.close()\n const newTouchDist = getMultiTouchPos(e)\n\n const center = getMultiTouchCenter(e)\n\n let scale = (lastScale * newTouchDist) / touchDist\n\n const newX = (center.clientX - lastTouch.clientX) / scale\n const newY = (center.clientY - lastTouch.clientY) / scale\n\n // Code from LiteGraph\n if (scale < app.canvas.ds.min_scale) {\n scale = app.canvas.ds.min_scale\n } else if (scale > app.canvas.ds.max_scale) {\n scale = app.canvas.ds.max_scale\n }\n\n const oldScale = app.canvas.ds.scale\n\n app.canvas.ds.scale = scale\n\n // Code from LiteGraph\n if (Math.abs(app.canvas.ds.scale - 1) < 0.01) {\n app.canvas.ds.scale = 1\n }\n\n const newScale = app.canvas.ds.scale\n\n const convertScaleToOffset = (scale) => [\n center.clientX / scale - app.canvas.ds.offset[0],\n center.clientY / scale - app.canvas.ds.offset[1]\n ]\n var oldCenter = convertScaleToOffset(oldScale)\n var newCenter = convertScaleToOffset(newScale)\n\n app.canvas.ds.offset[0] += newX + newCenter[0] - oldCenter[0]\n app.canvas.ds.offset[1] += newY + newCenter[1] - oldCenter[1]\n\n lastTouch.clientX = center.clientX\n lastTouch.clientY = center.clientY\n\n app.canvas.setDirty(true, true)\n }\n },\n true\n )\n }\n})\n\nconst processMouseDown = LGraphCanvas.prototype.processMouseDown\nLGraphCanvas.prototype.processMouseDown = function (e) {\n if (touchZooming || touchCount) {\n return\n }\n app.canvas.pointer_is_down = false // Prevent context menu from opening on second tap\n return processMouseDown.apply(this, arguments)\n}\n\nconst processMouseMove = LGraphCanvas.prototype.processMouseMove\nLGraphCanvas.prototype.processMouseMove = function (e) {\n if (touchZooming || touchCount > 1) {\n return\n }\n return processMouseMove.apply(this, arguments)\n}\n","import { app } from '../../scripts/app'\nimport { ComfyWidgets } from '../../scripts/widgets'\nimport { LiteGraph } from '@comfyorg/litegraph'\n// Adds defaults for quickly adding nodes with middle click on the input/output\n\napp.registerExtension({\n name: 'Comfy.SlotDefaults',\n suggestionsNumber: null,\n init() {\n LiteGraph.search_filter_enabled = true\n LiteGraph.middle_click_slot_add_default_node = true\n this.suggestionsNumber = app.ui.settings.addSetting({\n id: 'Comfy.NodeSuggestions.number',\n category: ['Comfy', 'Node Search Box', 'NodeSuggestions'],\n name: 'Number of nodes suggestions',\n tooltip: 'Only for litegraph searchbox/context menu',\n type: 'slider',\n attrs: {\n min: 1,\n max: 100,\n step: 1\n },\n defaultValue: 5,\n onChange: (newVal, oldVal) => {\n this.setDefaults(newVal)\n }\n })\n },\n slot_types_default_out: {},\n slot_types_default_in: {},\n async beforeRegisterNodeDef(nodeType, nodeData, app) {\n var nodeId = nodeData.name\n const inputs = nodeData['input']?.['required'] //only show required inputs to reduce the mess also not logical to create node with optional inputs\n for (const inputKey in inputs) {\n var input = inputs[inputKey]\n if (typeof input[0] !== 'string') continue\n\n var type = input[0]\n if (type in ComfyWidgets) {\n var customProperties = input[1]\n if (!customProperties?.forceInput) continue //ignore widgets that don't force input\n }\n\n if (!(type in this.slot_types_default_out)) {\n this.slot_types_default_out[type] = ['Reroute']\n }\n if (this.slot_types_default_out[type].includes(nodeId)) continue\n this.slot_types_default_out[type].push(nodeId)\n\n // Input types have to be stored as lower case\n // Store each node that can handle this input type\n const lowerType = type.toLocaleLowerCase()\n if (!(lowerType in LiteGraph.registered_slot_in_types)) {\n LiteGraph.registered_slot_in_types[lowerType] = { nodes: [] }\n }\n LiteGraph.registered_slot_in_types[lowerType].nodes.push(\n nodeType.comfyClass\n )\n }\n\n var outputs = nodeData['output'] ?? []\n for (const el of outputs) {\n const type = el as string\n if (!(type in this.slot_types_default_in)) {\n this.slot_types_default_in[type] = ['Reroute'] // [\"Reroute\", \"Primitive\"]; primitive doesn't always work :'()\n }\n\n this.slot_types_default_in[type].push(nodeId)\n\n // Store each node that can handle this output type\n if (!(type in LiteGraph.registered_slot_out_types)) {\n LiteGraph.registered_slot_out_types[type] = { nodes: [] }\n }\n LiteGraph.registered_slot_out_types[type].nodes.push(nodeType.comfyClass)\n\n if (!LiteGraph.slot_types_out.includes(type)) {\n LiteGraph.slot_types_out.push(type)\n }\n }\n\n var maxNum = this.suggestionsNumber.value\n this.setDefaults(maxNum)\n },\n setDefaults(maxNum?: number | null) {\n LiteGraph.slot_types_default_out = {}\n LiteGraph.slot_types_default_in = {}\n\n for (const type in this.slot_types_default_out) {\n LiteGraph.slot_types_default_out[type] = this.slot_types_default_out[\n type\n ].slice(0, maxNum)\n }\n for (const type in this.slot_types_default_in) {\n LiteGraph.slot_types_default_in[type] = this.slot_types_default_in[\n type\n ].slice(0, maxNum)\n }\n }\n})\n","// @ts-strict-ignore\nimport type { SettingParams } from '@/types/settingTypes'\nimport { app } from '../../scripts/app'\nimport {\n LGraphCanvas,\n LGraphNode,\n LGraphGroup,\n LiteGraph\n} from '@comfyorg/litegraph'\n\n// Shift + drag/resize to snap to grid\n\n/** Rounds a Vector2 in-place to the current CANVAS_GRID_SIZE. */\nfunction roundVectorToGrid(vec) {\n vec[0] =\n LiteGraph.CANVAS_GRID_SIZE * Math.round(vec[0] / LiteGraph.CANVAS_GRID_SIZE)\n vec[1] =\n LiteGraph.CANVAS_GRID_SIZE * Math.round(vec[1] / LiteGraph.CANVAS_GRID_SIZE)\n return vec\n}\n\napp.registerExtension({\n name: 'Comfy.SnapToGrid',\n init() {\n // Add setting to control grid size\n app.ui.settings.addSetting({\n id: 'Comfy.SnapToGrid.GridSize',\n category: ['Comfy', 'Graph', 'GridSize'],\n name: 'Snap to grid size',\n type: 'slider',\n attrs: {\n min: 1,\n max: 500\n },\n tooltip:\n 'When dragging and resizing nodes while holding shift they will be aligned to the grid, this controls the size of that grid.',\n defaultValue: LiteGraph.CANVAS_GRID_SIZE,\n onChange(value) {\n LiteGraph.CANVAS_GRID_SIZE = +value || 10\n }\n })\n // Keep the 'pysssss.SnapToGrid' setting id so we don't need to migrate setting values.\n // Using a new setting id can cause existing users to lose their existing settings.\n const alwaysSnapToGrid = app.ui.settings.addSetting({\n id: 'pysssss.SnapToGrid',\n category: ['Comfy', 'Graph', 'AlwaysSnapToGrid'],\n name: 'Always snap to grid',\n type: 'boolean',\n defaultValue: false,\n versionAdded: '1.3.13'\n } as SettingParams)\n\n const shouldSnapToGrid = () => app.shiftDown || alwaysSnapToGrid.value\n\n // After moving a node, if the shift key is down align it to grid\n const onNodeMoved = app.canvas.onNodeMoved\n app.canvas.onNodeMoved = function (node) {\n const r = onNodeMoved?.apply(this, arguments)\n\n if (shouldSnapToGrid()) {\n // Ensure all selected nodes are realigned\n for (const id in this.selected_nodes) {\n this.selected_nodes[id].alignToGrid()\n }\n }\n\n return r\n }\n\n // When a node is added, add a resize handler to it so we can fix align the size with the grid\n const onNodeAdded = app.graph.onNodeAdded\n app.graph.onNodeAdded = function (node) {\n const onResize = node.onResize\n node.onResize = function () {\n if (shouldSnapToGrid()) {\n roundVectorToGrid(node.size)\n }\n return onResize?.apply(this, arguments)\n }\n return onNodeAdded?.apply(this, arguments)\n }\n\n // Draw a preview of where the node will go if holding shift and the node is selected\n const origDrawNode = LGraphCanvas.prototype.drawNode\n LGraphCanvas.prototype.drawNode = function (node, ctx) {\n if (\n shouldSnapToGrid() &&\n this.node_dragged &&\n node.id in this.selected_nodes\n ) {\n const [x, y] = roundVectorToGrid([...node.pos])\n const shiftX = x - node.pos[0]\n let shiftY = y - node.pos[1]\n\n let w, h\n if (node.flags.collapsed) {\n w = node._collapsed_width\n h = LiteGraph.NODE_TITLE_HEIGHT\n shiftY -= LiteGraph.NODE_TITLE_HEIGHT\n } else {\n w = node.size[0]\n h = node.size[1]\n const titleMode = node.constructor.title_mode\n if (\n titleMode !== LiteGraph.TRANSPARENT_TITLE &&\n titleMode !== LiteGraph.NO_TITLE\n ) {\n h += LiteGraph.NODE_TITLE_HEIGHT\n shiftY -= LiteGraph.NODE_TITLE_HEIGHT\n }\n }\n const f = ctx.fillStyle\n ctx.fillStyle = 'rgba(100, 100, 100, 0.5)'\n ctx.fillRect(shiftX, shiftY, w, h)\n ctx.fillStyle = f\n }\n\n return origDrawNode.apply(this, arguments)\n }\n\n /**\n * The currently moving, selected group only. Set after the `selected_group` has actually started\n * moving.\n */\n let selectedAndMovingGroup: LGraphGroup | null = null\n\n /**\n * Handles moving a group; tracking when a group has been moved (to show the ghost in `drawGroups`\n * below) as well as handle the last move call from LiteGraph's `processMouseUp`.\n */\n const groupMove = LGraphGroup.prototype.move\n LGraphGroup.prototype.move = function (deltax, deltay, ignore_nodes) {\n const v = groupMove.apply(this, arguments)\n // When we've started moving, set `selectedAndMovingGroup` as LiteGraph sets `selected_group`\n // too eagerly and we don't want to behave like we're moving until we get a delta.\n if (\n !selectedAndMovingGroup &&\n app.canvas.selected_group === this &&\n (deltax || deltay)\n ) {\n selectedAndMovingGroup = this\n }\n\n // LiteGraph will call group.move both on mouse-move as well as mouse-up though we only want\n // to snap on a mouse-up which we can determine by checking if `app.canvas.last_mouse_dragging`\n // has been set to `false`. Essentially, this check here is the equivalent to calling an\n // `LGraphGroup.prototype.onNodeMoved` if it had existed.\n if (app.canvas.last_mouse_dragging === false && shouldSnapToGrid()) {\n // After moving a group (while shouldSnapToGrid()), snap all the child nodes and, finally,\n // align the group itself.\n this.recomputeInsideNodes()\n for (const node of this.nodes) {\n node.alignToGrid()\n }\n LGraphNode.prototype.alignToGrid.apply(this)\n }\n return v\n }\n\n /**\n * Handles drawing a group when, snapping the size when one is actively being resized tracking and/or\n * drawing a ghost box when one is actively being moved. This mimics the node snapping behavior for\n * both.\n */\n const drawGroups = LGraphCanvas.prototype.drawGroups\n LGraphCanvas.prototype.drawGroups = function (canvas, ctx) {\n if (this.selected_group && shouldSnapToGrid()) {\n if (this.selected_group_resizing) {\n roundVectorToGrid(this.selected_group.size)\n } else if (selectedAndMovingGroup) {\n const [x, y] = roundVectorToGrid([...selectedAndMovingGroup.pos])\n const f = ctx.fillStyle\n const s = ctx.strokeStyle\n ctx.fillStyle = 'rgba(100, 100, 100, 0.33)'\n ctx.strokeStyle = 'rgba(100, 100, 100, 0.66)'\n ctx.rect(x, y, ...(selectedAndMovingGroup.size as [number, number]))\n ctx.fill()\n ctx.stroke()\n ctx.fillStyle = f\n ctx.strokeStyle = s\n }\n } else if (!this.selected_group) {\n selectedAndMovingGroup = null\n }\n return drawGroups.apply(this, arguments)\n }\n\n /** Handles adding a group in a snapping-enabled state. */\n const onGroupAdd = LGraphCanvas.onGroupAdd\n LGraphCanvas.onGroupAdd = function () {\n const v = onGroupAdd.apply(app.canvas, arguments)\n if (shouldSnapToGrid()) {\n const lastGroup = app.graph.groups[app.graph.groups.length - 1]\n if (lastGroup) {\n roundVectorToGrid(lastGroup.pos)\n roundVectorToGrid(lastGroup.size)\n }\n }\n return v\n }\n }\n})\n","import { app } from '../../scripts/app'\nimport { ComfyNodeDef } from '@/types/apiTypes'\n\n// Adds an upload button to the nodes\n\napp.registerExtension({\n name: 'Comfy.UploadImage',\n beforeRegisterNodeDef(nodeType, nodeData: ComfyNodeDef) {\n if (nodeData?.input?.required?.image?.[1]?.image_upload === true) {\n nodeData.input.required.upload = ['IMAGEUPLOAD']\n }\n }\n})\n","// @ts-strict-ignore\nimport { app } from '../../scripts/app'\nimport { api } from '../../scripts/api'\nimport { useToastStore } from '@/stores/toastStore'\n\nconst WEBCAM_READY = Symbol()\n\napp.registerExtension({\n name: 'Comfy.WebcamCapture',\n getCustomWidgets(app) {\n return {\n WEBCAM(node, inputName) {\n let res\n node[WEBCAM_READY] = new Promise((resolve) => (res = resolve))\n\n const container = document.createElement('div')\n container.style.background = 'rgba(0,0,0,0.25)'\n container.style.textAlign = 'center'\n\n const video = document.createElement('video')\n video.style.height = video.style.width = '100%'\n\n const loadVideo = async () => {\n try {\n const stream = await navigator.mediaDevices.getUserMedia({\n video: true,\n audio: false\n })\n container.replaceChildren(video)\n\n setTimeout(() => res(video), 500) // Fallback as loadedmetadata doesnt fire sometimes?\n video.addEventListener('loadedmetadata', () => res(video), false)\n video.srcObject = stream\n video.play()\n } catch (error) {\n const label = document.createElement('div')\n label.style.color = 'red'\n label.style.overflow = 'auto'\n label.style.maxHeight = '100%'\n label.style.whiteSpace = 'pre-wrap'\n\n if (window.isSecureContext) {\n label.textContent =\n 'Unable to load webcam, please ensure access is granted:\\n' +\n error.message\n } else {\n label.textContent =\n 'Unable to load webcam. A secure context is required, if you are not accessing ComfyUI on localhost (127.0.0.1) you will have to enable TLS (https)\\n\\n' +\n error.message\n }\n\n container.replaceChildren(label)\n }\n }\n\n loadVideo()\n\n return { widget: node.addDOMWidget(inputName, 'WEBCAM', container) }\n }\n }\n },\n nodeCreated(node) {\n if ((node.type, node.constructor.comfyClass !== 'WebcamCapture')) return\n\n let video\n const camera = node.widgets.find((w) => w.name === 'image')\n const w = node.widgets.find((w) => w.name === 'width')\n const h = node.widgets.find((w) => w.name === 'height')\n const captureOnQueue = node.widgets.find(\n (w) => w.name === 'capture_on_queue'\n )\n\n const canvas = document.createElement('canvas')\n\n const capture = () => {\n canvas.width = w.value\n canvas.height = h.value\n const ctx = canvas.getContext('2d')\n ctx.drawImage(video, 0, 0, w.value, h.value)\n const data = canvas.toDataURL('image/png')\n\n const img = new Image()\n img.onload = () => {\n node.imgs = [img]\n app.graph.setDirtyCanvas(true)\n requestAnimationFrame(() => {\n node.setSizeForImage?.()\n })\n }\n img.src = data\n }\n\n const btn = node.addWidget(\n 'button',\n 'waiting for camera...',\n 'capture',\n capture\n )\n btn.disabled = true\n btn.serializeValue = () => undefined\n\n camera.serializeValue = async () => {\n if (captureOnQueue.value) {\n capture()\n } else if (!node.imgs?.length) {\n const err = `No webcam image captured`\n useToastStore().addAlert(err)\n throw new Error(err)\n }\n\n // Upload image to temp storage\n const blob = await new Promise((r) => canvas.toBlob(r))\n const name = `${+new Date()}.png`\n const file = new File([blob], name)\n const body = new FormData()\n body.append('image', file)\n body.append('subfolder', 'webcam')\n body.append('type', 'temp')\n const resp = await api.fetchApi('/upload/image', {\n method: 'POST',\n body\n })\n if (resp.status !== 200) {\n const err = `Error uploading camera image: ${resp.status} - ${resp.statusText}`\n useToastStore().addAlert(err)\n throw new Error(err)\n }\n return `webcam/${name} [temp]`\n }\n\n node[WEBCAM_READY].then((v) => {\n video = v\n // If width isnt specified then use video output resolution\n if (!w.value) {\n w.value = video.videoWidth || 640\n h.value = video.videoHeight || 480\n }\n btn.disabled = false\n btn.label = 'capture'\n })\n }\n})\n","// @ts-strict-ignore\nimport { app } from '../../scripts/app'\nimport { api } from '../../scripts/api'\nimport type { IWidget } from '@comfyorg/litegraph'\nimport type { DOMWidget } from '@/scripts/domWidget'\nimport { ComfyNodeDef } from '@/types/apiTypes'\nimport { useToastStore } from '@/stores/toastStore'\n\ntype FolderType = 'input' | 'output' | 'temp'\n\nfunction splitFilePath(path: string): [string, string] {\n const folder_separator = path.lastIndexOf('/')\n if (folder_separator === -1) {\n return ['', path]\n }\n return [\n path.substring(0, folder_separator),\n path.substring(folder_separator + 1)\n ]\n}\n\nfunction getResourceURL(\n subfolder: string,\n filename: string,\n type: FolderType = 'input'\n): string {\n const params = [\n 'filename=' + encodeURIComponent(filename),\n 'type=' + type,\n 'subfolder=' + subfolder,\n app.getRandParam().substring(1)\n ].join('&')\n\n return `/view?${params}`\n}\n\nasync function uploadFile(\n audioWidget: IWidget,\n audioUIWidget: DOMWidget,\n file: File,\n updateNode: boolean,\n pasted: boolean = false\n) {\n try {\n // Wrap file in formdata so it includes filename\n const body = new FormData()\n body.append('image', file)\n if (pasted) body.append('subfolder', 'pasted')\n const resp = await api.fetchApi('/upload/image', {\n method: 'POST',\n body\n })\n\n if (resp.status === 200) {\n const data = await resp.json()\n // Add the file to the dropdown list and update the widget value\n let path = data.name\n if (data.subfolder) path = data.subfolder + '/' + path\n\n if (!audioWidget.options.values.includes(path)) {\n audioWidget.options.values.push(path)\n }\n\n if (updateNode) {\n audioUIWidget.element.src = api.apiURL(\n getResourceURL(...splitFilePath(path))\n )\n audioWidget.value = path\n }\n } else {\n useToastStore().addAlert(resp.status + ' - ' + resp.statusText)\n }\n } catch (error) {\n useToastStore().addAlert(error)\n }\n}\n\n// AudioWidget MUST be registered first, as AUDIOUPLOAD depends on AUDIO_UI to be\n// present.\napp.registerExtension({\n name: 'Comfy.AudioWidget',\n async beforeRegisterNodeDef(nodeType, nodeData) {\n if (\n ['LoadAudio', 'SaveAudio', 'PreviewAudio'].includes(nodeType.comfyClass)\n ) {\n nodeData.input.required.audioUI = ['AUDIO_UI']\n }\n },\n getCustomWidgets() {\n return {\n AUDIO_UI(node, inputName: string) {\n const audio = document.createElement('audio')\n audio.controls = true\n audio.classList.add('comfy-audio')\n audio.setAttribute('name', 'media')\n\n const audioUIWidget: DOMWidget =\n node.addDOMWidget(inputName, /* name=*/ 'audioUI', audio, {\n serialize: false\n })\n\n const isOutputNode = node.constructor.nodeData.output_node\n if (isOutputNode) {\n // Hide the audio widget when there is no audio initially.\n audioUIWidget.element.classList.add('empty-audio-widget')\n // Populate the audio widget UI on node execution.\n const onExecuted = node.onExecuted\n node.onExecuted = function (message: any) {\n onExecuted?.apply(this, arguments)\n const audios = message.audio\n if (!audios) return\n const audio = audios[0]\n audioUIWidget.element.src = api.apiURL(\n getResourceURL(audio.subfolder, audio.filename, audio.type)\n )\n audioUIWidget.element.classList.remove('empty-audio-widget')\n }\n }\n return { widget: audioUIWidget }\n }\n }\n },\n onNodeOutputsUpdated(nodeOutputs: Record) {\n for (const [nodeId, output] of Object.entries(nodeOutputs)) {\n const node = app.graph.getNodeById(nodeId)\n if ('audio' in output) {\n const audioUIWidget = node.widgets.find(\n (w) => w.name === 'audioUI'\n ) as unknown as DOMWidget\n const audio = output.audio[0]\n audioUIWidget.element.src = api.apiURL(\n getResourceURL(audio.subfolder, audio.filename, audio.type)\n )\n audioUIWidget.element.classList.remove('empty-audio-widget')\n }\n }\n }\n})\n\napp.registerExtension({\n name: 'Comfy.UploadAudio',\n async beforeRegisterNodeDef(nodeType, nodeData: ComfyNodeDef) {\n if (nodeData?.input?.required?.audio?.[1]?.audio_upload === true) {\n nodeData.input.required.upload = ['AUDIOUPLOAD']\n }\n },\n getCustomWidgets() {\n return {\n AUDIOUPLOAD(node, inputName: string) {\n // The widget that allows user to select file.\n const audioWidget: IWidget = node.widgets.find(\n (w: IWidget) => w.name === 'audio'\n )\n const audioUIWidget = node.widgets.find(\n (w: IWidget) => w.name === 'audioUI'\n ) as unknown as DOMWidget\n\n const onAudioWidgetUpdate = () => {\n audioUIWidget.element.src = api.apiURL(\n getResourceURL(...splitFilePath(audioWidget.value as string))\n )\n }\n // Initially load default audio file to audioUIWidget.\n if (audioWidget.value) {\n onAudioWidgetUpdate()\n }\n audioWidget.callback = onAudioWidgetUpdate\n\n // Load saved audio file widget values if restoring from workflow\n const onGraphConfigured = node.onGraphConfigured\n node.onGraphConfigured = function () {\n onGraphConfigured?.apply(this, arguments)\n if (audioWidget.value) {\n onAudioWidgetUpdate()\n }\n }\n\n const fileInput = document.createElement('input')\n fileInput.type = 'file'\n fileInput.accept = 'audio/*'\n fileInput.style.display = 'none'\n fileInput.onchange = () => {\n if (fileInput.files.length) {\n uploadFile(audioWidget, audioUIWidget, fileInput.files[0], true)\n }\n }\n // The widget to pop up the upload dialog.\n const uploadWidget = node.addWidget(\n 'button',\n inputName,\n /* value=*/ '',\n () => {\n fileInput.click()\n },\n { serialize: false }\n )\n uploadWidget.label = 'choose file to upload'\n\n return { widget: uploadWidget }\n }\n }\n }\n})\n"],"names":["app","ext","prompt","PREFIX","SEPARATOR","type","id","def","node","link","selectedIds","newNodes","i","w","widget","group","modal","PointerType","CompositionOperation","x","y","file","scale","audio"],"mappings":";;;;AAIO,MAAM,wBAAwB,YAAY;AAAA,SAAA;AAAA;AAAA;AAAA,EAC/C,OAAO,QAIH,CAAA;AAAA,EACJ,OAAO,WAAmC;AAAA,EAE1C,OAAO,eACL,MACA,kBACA,UACA;AACM,UAAA,OAAO,IAAI,UAAU;AAAA,MACzB,MAAM;AAAA,MACN,aAAa;AAAA,MACb;AAAA,MACA,SAAS;AAAA,IAAA,CACV;AAEe,oBAAA,MAAM,KAAK,IAAI;AAAA,EACjC;AAAA,EAEA,OAAO,oBAAoB;AAEvB,QAAA,SAAS,aACT,SAAS,UAAU,QACnB,SAAS,UAAU,KAAK,SAAS,GACjC;AACA,YAAM,cAAc,SAAS;AAAA,QAC3B;AAAA,MAAA;AAEF,UAAI,aAAa;AACH,oBAAA,MACV,SAAS,UAAU,KAAK,SAAS,UAAU,eAAe,CAAC,EAAE;AAC/D,oBAAY,MAAM,YAAY;AAC9B,oBAAY,MAAM,WAAW;AAAA,MAC/B;AAAA,IACF;AAAA,EACF;AAAA,EAEA,OAAO,aAAa;AAClB,QAAI,gBAAgB,UAAU;AAC5B,YAAM,OAAO,gBAAgB;AAEvB,YAAA,WAAW,IAAI,2BAA2B;AAAA,QAC9C,KAAK,kBAAkB;AAAA,QACvB,GAAG,KAAK,cAAc;AAAA,MAAA,CACvB;AAED,UAAI,KAAK,SAAS;AAEZ,YAAA,KAAK,QAAQ,YAAY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B,kBAAU,MAAM,UAAU;AAC1B,kBAAU,WAAW,MAAM;AACrB,cAAA,UAAU,MAAM,QAAQ;AAC1B,uBAAW,aAAa,eAAe,UAAU,MAAM,CAAC,GAAG,IAAI;AAAA,UACjE;AAAA,QAAA;AAGF,cAAM,eAAe,KAAK;AAAA,UACxB;AAAA,UACA;AAAA;AAAA,UACY;AAAA,UACZ,MAAM;AACJ,sBAAU,MAAM;AAAA,UAClB;AAAA,UACA,EAAE,WAAW,MAAM;AAAA,QAAA;AAErB,qBAAa,QAAQ;AAEd,eAAA,EAAE,QAAQ;MACnB;AAAA,IAAA;AAAA,EAEJ;AACF,CAAC;"} \ No newline at end of file diff --git a/web/assets/index-BHayQCxv.js b/web/assets/index-BFF4Dqtc.js similarity index 83% rename from web/assets/index-BHayQCxv.js rename to web/assets/index-BFF4Dqtc.js index 89b8a571d1f..e29d57edbe4 100644 --- a/web/assets/index-BHayQCxv.js +++ b/web/assets/index-BFF4Dqtc.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./KeybindingPanel-Dm_3sBT5.js","./index-CwRXxFdA.js","./index-C_wOqB0f.js","./KeybindingPanel-BNYKhW1k.css","./ExtensionPanel-BmKi_NKS.js","./index-BReiUkk9.js","./widgetInputs-DdecKYqd.js","./index-BRhY6FpL.css","./userSelection-DITGVoWz.js","./userSelection-CmI-fOSC.css","./GraphView-C4blCugc.js","./GraphView-Cf7ubG48.css"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./KeybindingPanel-CU3hu6-Y.js","./index-ovZE3ghJ.js","./index-DOTKVD24.js","./KeybindingPanel-CB_wEOHl.css","./ExtensionPanel-BMUX-f2y.js","./index-B9D1gTH5.js","./widgetInputs-D2xBWAwv.js","./index-BRhY6FpL.css","./userSelection-C0hDRcEZ.js","./userSelection-CmI-fOSC.css","./GraphView-BpJuETRI.js","./GraphView-CghYAxkP.css","./ServerStartView-DhnQyBxt.js","./index-B4gmhi99.js","./InstallView-BRgBqWtQ.js","./InstallView-CN3CA9Fk.css","./WelcomeView-DcG41PQw.js","./WelcomeView-DQQgHnsr.css"])))=>i.map(i=>d[i]); var __defProp2 = Object.defineProperty; var __name = (target, value3) => __defProp2(target, "name", { value: value3, configurable: true }); (/* @__PURE__ */ __name(function polyfill() { @@ -1132,7 +1132,7 @@ const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler( const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); const toShallow = /* @__PURE__ */ __name((value3) => value3, "toShallow"); const getProto = /* @__PURE__ */ __name((v2) => Reflect.getPrototypeOf(v2), "getProto"); -function get$2(target, key, isReadonly2 = false, isShallow2 = false) { +function get$3(target, key, isReadonly2 = false, isShallow2 = false) { target = target["__v_raw"]; const rawTarget = toRaw(target); const rawKey = toRaw(key); @@ -1152,7 +1152,7 @@ function get$2(target, key, isReadonly2 = false, isShallow2 = false) { target.get(key); } } -__name(get$2, "get$2"); +__name(get$3, "get$3"); function has(key, isReadonly2 = false) { const target = this["__v_raw"]; const rawTarget = toRaw(target); @@ -1294,7 +1294,7 @@ __name(createReadonlyMethod, "createReadonlyMethod"); function createInstrumentations() { const mutableInstrumentations2 = { get(key) { - return get$2(this, key); + return get$3(this, key); }, get size() { return size(this); @@ -1308,7 +1308,7 @@ function createInstrumentations() { }; const shallowInstrumentations2 = { get(key) { - return get$2(this, key, false, true); + return get$3(this, key, false, true); }, get size() { return size(this); @@ -1322,7 +1322,7 @@ function createInstrumentations() { }; const readonlyInstrumentations2 = { get(key) { - return get$2(this, key, true); + return get$3(this, key, true); }, get size() { return size(this, true); @@ -1338,7 +1338,7 @@ function createInstrumentations() { }; const shallowReadonlyInstrumentations2 = { get(key) { - return get$2(this, key, true, true); + return get$3(this, key, true, true); }, get size() { return size(this, true); @@ -1926,8 +1926,8 @@ function formatTraceEntry({ vnode, recurseCount }) { vnode.type, isRoot )}`; - const close3 = `>` + postfix; - return vnode.props ? [open2, ...formatProps(vnode.props), close3] : [open2 + close3]; + const close4 = `>` + postfix; + return vnode.props ? [open2, ...formatProps(vnode.props), close4] : [open2 + close4]; } __name(formatTraceEntry, "formatTraceEntry"); function formatProps(props) { @@ -2238,12 +2238,12 @@ function flushPostFlushCbs(seen2) { __name(flushPostFlushCbs, "flushPostFlushCbs"); const getId = /* @__PURE__ */ __name((job) => job.id == null ? Infinity : job.id, "getId"); const comparator = /* @__PURE__ */ __name((a, b) => { - const diff = getId(a) - getId(b); - if (diff === 0) { + const diff2 = getId(a) - getId(b); + if (diff2 === 0) { if (a.pre && !b.pre) return -1; if (b.pre && !a.pre) return 1; } - return diff; + return diff2; }, "comparator"); function flushJobs(seen2) { isFlushPending = false; @@ -2468,7 +2468,7 @@ __name(setDevtoolsHook$1, "setDevtoolsHook$1"); function devtoolsInitApp(app2, version2) { emit$1("app:init", app2, version2, { Fragment, - Text, + Text: Text$1, Comment, Static }); @@ -2740,7 +2740,7 @@ function renderComponentRoot(instance) { render: render2, renderCache, props, - data: data21, + data: data22, setupState, ctx, inheritAttrs @@ -2771,7 +2771,7 @@ function renderComponentRoot(instance) { renderCache, false ? shallowReadonly(props) : props, setupState, - data21, + data22, ctx ) ); @@ -2804,14 +2804,14 @@ function renderComponentRoot(instance) { handleError(err, instance, 1); result = createVNode(Comment); } - let root21 = result; + let root23 = result; let setRoot = void 0; if (false) { - [root21, setRoot] = getChildRoot(result); + [root23, setRoot] = getChildRoot(result); } if (fallthroughAttrs && inheritAttrs !== false) { const keys2 = Object.keys(fallthroughAttrs); - const { shapeFlag } = root21; + const { shapeFlag } = root23; if (keys2.length) { if (shapeFlag & (1 | 6)) { if (propsOptions && keys2.some(isModelListener)) { @@ -2820,7 +2820,7 @@ function renderComponentRoot(instance) { propsOptions ); } - root21 = cloneVNode(root21, fallthroughAttrs, false, true); + root23 = cloneVNode(root23, fallthroughAttrs, false, true); } else if (false) { const allAttrs = Object.keys(attrs3); const eventAttrs = []; @@ -2854,8 +2854,8 @@ function renderComponentRoot(instance) { `Runtime directive used on component with non-element root node. The directives will not function as intended.` ); } - root21 = cloneVNode(root21, null, false, true); - root21.dirs = root21.dirs ? root21.dirs.concat(vnode.dirs) : vnode.dirs; + root23 = cloneVNode(root23, null, false, true); + root23.dirs = root23.dirs ? root23.dirs.concat(vnode.dirs) : vnode.dirs; } if (vnode.transition) { if (false) { @@ -2863,12 +2863,12 @@ function renderComponentRoot(instance) { `Component inside renders non-element root node that cannot be animated.` ); } - root21.transition = vnode.transition; + root23.transition = vnode.transition; } if (false) { - setRoot(root21); + setRoot(root23); } else { - result = root21; + result = root23; } setCurrentRenderingInstance(prev2); return result; @@ -3004,11 +3004,11 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) { __name(hasPropsChanged, "hasPropsChanged"); function updateHOCHostEl({ vnode, parent }, el) { while (parent) { - const root21 = parent.subTree; - if (root21.suspense && root21.suspense.activeBranch === vnode) { - root21.el = vnode.el; + const root23 = parent.subTree; + if (root23.suspense && root23.suspense.activeBranch === vnode) { + root23.el = vnode.el; } - if (root21 === vnode) { + if (root23 === vnode) { (vnode = parent.vnode).el = el; parent = parent.parent; } else { @@ -3130,7 +3130,7 @@ function triggerEvent(vnode, name) { __name(triggerEvent, "triggerEvent"); function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { const { - p: patch, + p: patch2, o: { createElement: createElement2 } } = rendererInternals; const hiddenContainer = createElement2("div"); @@ -3146,7 +3146,7 @@ function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense optimized, rendererInternals ); - patch( + patch2( null, suspense.pendingBranch = vnode.ssContent, hiddenContainer, @@ -3159,7 +3159,7 @@ function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense if (suspense.deps > 0) { triggerEvent(vnode, "onPending"); triggerEvent(vnode, "onFallback"); - patch( + patch2( null, vnode.ssFallback, container, @@ -3176,7 +3176,7 @@ function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense } } __name(mountSuspense, "mountSuspense"); -function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement: createElement2 } }) { +function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch2, um: unmount, o: { createElement: createElement2 } }) { const suspense = n2.suspense = n1.suspense; suspense.vnode = n2; n2.el = n1.el; @@ -3186,7 +3186,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl if (pendingBranch) { suspense.pendingBranch = newBranch; if (isSameVNodeType(newBranch, pendingBranch)) { - patch( + patch2( pendingBranch, newBranch, suspense.hiddenContainer, @@ -3201,7 +3201,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl suspense.resolve(); } else if (isInFallback) { if (!isHydrating) { - patch( + patch2( activeBranch, newFallback, container, @@ -3228,7 +3228,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl suspense.effects.length = 0; suspense.hiddenContainer = createElement2("div"); if (isInFallback) { - patch( + patch2( null, newBranch, suspense.hiddenContainer, @@ -3242,7 +3242,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl if (suspense.deps <= 0) { suspense.resolve(); } else { - patch( + patch2( activeBranch, newFallback, container, @@ -3257,7 +3257,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl setActiveBranch(suspense, newFallback); } } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - patch( + patch2( activeBranch, newBranch, container, @@ -3270,7 +3270,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl ); suspense.resolve(true); } else { - patch( + patch2( null, newBranch, suspense.hiddenContainer, @@ -3288,7 +3288,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl } } else { if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - patch( + patch2( activeBranch, newBranch, container, @@ -3308,7 +3308,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl } else { suspense.pendingId = suspenseId++; } - patch( + patch2( null, newBranch, suspense.hiddenContainer, @@ -3346,7 +3346,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe ); } const { - p: patch, + p: patch2, m: move, um: unmount, n: next2, @@ -3469,7 +3469,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe if (!suspense.isInFallback) { return; } - patch( + patch2( null, fallbackVNode, container2, @@ -4083,7 +4083,7 @@ const PublicInstanceProxyHandlers = { if (key === "__v_skip") { return true; } - const { ctx, setupState, data: data21, props, accessCache, type, appContext } = instance; + const { ctx, setupState, data: data22, props, accessCache, type, appContext } = instance; if (false) { return true; } @@ -4095,7 +4095,7 @@ const PublicInstanceProxyHandlers = { case 1: return setupState[key]; case 2: - return data21[key]; + return data22[key]; case 4: return ctx[key]; case 3: @@ -4104,9 +4104,9 @@ const PublicInstanceProxyHandlers = { } else if (hasSetupBinding(setupState, key)) { accessCache[key] = 1; return setupState[key]; - } else if (data21 !== EMPTY_OBJ && hasOwn$3(data21, key)) { + } else if (data22 !== EMPTY_OBJ && hasOwn$3(data22, key)) { accessCache[key] = 2; - return data21[key]; + return data22[key]; } else if ( // only cache other properties when instance has declared (thus stable) // props @@ -4146,7 +4146,7 @@ const PublicInstanceProxyHandlers = { return globalProperties[key]; } } else if (false) { - if (data21 !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn$3(data21, key)) { + if (data22 !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn$3(data22, key)) { warn$1$1( `Property ${JSON.stringify( key @@ -4160,15 +4160,15 @@ const PublicInstanceProxyHandlers = { } }, set({ _: instance }, key, value3) { - const { data: data21, setupState, ctx } = instance; + const { data: data22, setupState, ctx } = instance; if (hasSetupBinding(setupState, key)) { setupState[key] = value3; return true; } else if (false) { warn$1$1(`Cannot mutate \n\n\n","\n\n\n\n\n","import { onMounted, ref } from 'vue'\n\nexport function useDownload(url: string, fileName?: string) {\n const fileSize = ref(null)\n\n const fetchFileSize = async (): Promise => {\n try {\n const response = await fetch(url, { method: 'HEAD' })\n if (!response.ok) throw new Error('Failed to fetch file size')\n\n const size = response.headers.get('content-length')\n if (size) {\n return parseInt(size)\n } else {\n console.error('\"content-length\" header not found')\n return null\n }\n } catch (e) {\n console.error('Error fetching file size:', e)\n return null\n }\n }\n\n /**\n * Trigger browser download\n */\n const triggerBrowserDownload = () => {\n const link = document.createElement('a')\n link.href = url\n link.download = fileName || url.split('/').pop() || 'download'\n link.target = '_blank' // Opens in new tab if download attribute is not supported\n link.rel = 'noopener noreferrer' // Security best practice for _blank links\n link.click()\n }\n\n onMounted(async () => {\n fileSize.value = await fetchFileSize()\n })\n\n return {\n triggerBrowserDownload,\n fileSize\n }\n}\n","import BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-progressbar {\\n position: relative;\\n overflow: hidden;\\n height: \".concat(dt('progressbar.height'), \";\\n background: \").concat(dt('progressbar.background'), \";\\n border-radius: \").concat(dt('progressbar.border.radius'), \";\\n}\\n\\n.p-progressbar-value {\\n margin: 0;\\n background: \").concat(dt('progressbar.value.background'), \";\\n}\\n\\n.p-progressbar-label {\\n color: \").concat(dt('progressbar.label.color'), \";\\n font-size: \").concat(dt('progressbar.label.font.size'), \";\\n font-weight: \").concat(dt('progressbar.label.font.weight'), \";\\n}\\n\\n.p-progressbar-determinate .p-progressbar-value {\\n height: 100%;\\n width: 0%;\\n position: absolute;\\n display: none;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n overflow: hidden;\\n transition: width 1s ease-in-out;\\n}\\n\\n.p-progressbar-determinate .p-progressbar-label {\\n display: inline-flex;\\n}\\n\\n.p-progressbar-indeterminate .p-progressbar-value::before {\\n content: \\\"\\\";\\n position: absolute;\\n background: inherit;\\n top: 0;\\n left: 0;\\n bottom: 0;\\n will-change: left, right;\\n animation: p-progressbar-indeterminate-anim 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\\n}\\n\\n.p-progressbar-indeterminate .p-progressbar-value::after {\\n content: \\\"\\\";\\n position: absolute;\\n background: inherit;\\n top: 0;\\n left: 0;\\n bottom: 0;\\n will-change: left, right;\\n animation: p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\\n animation-delay: 1.15s;\\n}\\n\\n@-webkit-keyframes p-progressbar-indeterminate-anim {\\n 0% {\\n left: -35%;\\n right: 100%;\\n }\\n 60% {\\n left: 100%;\\n right: -90%;\\n }\\n 100% {\\n left: 100%;\\n right: -90%;\\n }\\n}\\n@keyframes p-progressbar-indeterminate-anim {\\n 0% {\\n left: -35%;\\n right: 100%;\\n }\\n 60% {\\n left: 100%;\\n right: -90%;\\n }\\n 100% {\\n left: 100%;\\n right: -90%;\\n }\\n}\\n@-webkit-keyframes p-progressbar-indeterminate-anim-short {\\n 0% {\\n left: -200%;\\n right: 100%;\\n }\\n 60% {\\n left: 107%;\\n right: -8%;\\n }\\n 100% {\\n left: 107%;\\n right: -8%;\\n }\\n}\\n@keyframes p-progressbar-indeterminate-anim-short {\\n 0% {\\n left: -200%;\\n right: 100%;\\n }\\n 60% {\\n left: 107%;\\n right: -8%;\\n }\\n 100% {\\n left: 107%;\\n right: -8%;\\n }\\n}\\n\");\n};\nvar classes = {\n root: function root(_ref2) {\n var instance = _ref2.instance;\n return ['p-progressbar p-component', {\n 'p-progressbar-determinate': instance.determinate,\n 'p-progressbar-indeterminate': instance.indeterminate\n }];\n },\n value: 'p-progressbar-value',\n label: 'p-progressbar-label'\n};\nvar ProgressBarStyle = BaseStyle.extend({\n name: 'progressbar',\n theme: theme,\n classes: classes\n});\n\nexport { ProgressBarStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseComponent from '@primevue/core/basecomponent';\nimport ProgressBarStyle from 'primevue/progressbar/style';\nimport { openBlock, createElementBlock, mergeProps, renderSlot, createTextVNode, toDisplayString, createCommentVNode } from 'vue';\n\nvar script$1 = {\n name: 'BaseProgressBar',\n \"extends\": BaseComponent,\n props: {\n value: {\n type: Number,\n \"default\": null\n },\n mode: {\n type: String,\n \"default\": 'determinate'\n },\n showValue: {\n type: Boolean,\n \"default\": true\n }\n },\n style: ProgressBarStyle,\n provide: function provide() {\n return {\n $pcProgressBar: this,\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'ProgressBar',\n \"extends\": script$1,\n inheritAttrs: false,\n computed: {\n progressStyle: function progressStyle() {\n return {\n width: this.value + '%',\n display: 'flex'\n };\n },\n indeterminate: function indeterminate() {\n return this.mode === 'indeterminate';\n },\n determinate: function determinate() {\n return this.mode === 'determinate';\n }\n }\n};\n\nvar _hoisted_1 = [\"aria-valuenow\"];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"div\", mergeProps({\n role: \"progressbar\",\n \"class\": _ctx.cx('root'),\n \"aria-valuemin\": \"0\",\n \"aria-valuenow\": _ctx.value,\n \"aria-valuemax\": \"100\"\n }, _ctx.ptmi('root')), [$options.determinate ? (openBlock(), createElementBlock(\"div\", mergeProps({\n key: 0,\n \"class\": _ctx.cx('value'),\n style: $options.progressStyle\n }, _ctx.ptm('value')), [_ctx.value != null && _ctx.value !== 0 && _ctx.showValue ? (openBlock(), createElementBlock(\"div\", mergeProps({\n key: 0,\n \"class\": _ctx.cx('label')\n }, _ctx.ptm('label')), [renderSlot(_ctx.$slots, \"default\", {}, function () {\n return [createTextVNode(toDisplayString(_ctx.value + '%'), 1)];\n })], 16)) : createCommentVNode(\"\", true)], 16)) : $options.indeterminate ? (openBlock(), createElementBlock(\"div\", mergeProps({\n key: 1,\n \"class\": _ctx.cx('value')\n }, _ctx.ptm('value')), null, 16)) : createCommentVNode(\"\", true)], 16, _hoisted_1);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","export function formatCamelCase(str: string): string {\n // Check if the string is camel case\n const isCamelCase = /^([A-Z][a-z]*)+$/.test(str)\n\n if (!isCamelCase) {\n return str // Return original string if not camel case\n }\n\n // Split the string into words, keeping acronyms together\n const words = str.split(/(?=[A-Z][a-z])|\\d+/)\n\n // Process each word\n const processedWords = words.map((word) => {\n // If the word is all uppercase and longer than one character, it's likely an acronym\n if (word.length > 1 && word === word.toUpperCase()) {\n return word // Keep acronyms as is\n }\n // For other words, ensure the first letter is capitalized\n return word.charAt(0).toUpperCase() + word.slice(1)\n })\n\n // Join the words with spaces\n return processedWords.join(' ')\n}\n\nexport function appendJsonExt(path: string) {\n if (!path.toLowerCase().endsWith('.json')) {\n path += '.json'\n }\n return path\n}\n\nexport function trimJsonExt(path?: string) {\n return path?.replace(/\\.json$/, '')\n}\n\nexport function highlightQuery(text: string, query: string) {\n if (!query) return text\n const regex = new RegExp(`(${query})`, 'gi')\n return text.replace(regex, '$1')\n}\n\nexport function formatNumberWithSuffix(\n num: number,\n {\n precision = 1,\n roundToInt = false\n }: { precision?: number; roundToInt?: boolean } = {}\n): string {\n const suffixes = ['', 'k', 'm', 'b', 't']\n const absNum = Math.abs(num)\n\n if (absNum < 1000) {\n return roundToInt ? Math.round(num).toString() : num.toFixed(precision)\n }\n\n const exp = Math.min(Math.floor(Math.log10(absNum) / 3), suffixes.length - 1)\n const formattedNum = (num / Math.pow(1000, exp)).toFixed(precision)\n\n return `${formattedNum}${suffixes[exp]}`\n}\n\nexport function formatSize(value?: number) {\n if (value === null || value === undefined) {\n return '-'\n }\n\n const bytes = value\n if (bytes === 0) return '0 B'\n const k = 1024\n const sizes = ['B', 'KB', 'MB', 'GB']\n const i = Math.floor(Math.log(bytes) / Math.log(k))\n return `${parseFloat((bytes / Math.pow(k, i)).toFixed(2))} ${sizes[i]}`\n}\n\n/**\n * Finds the common directory prefix between two paths\n * @example\n * findCommonPrefix('a/b/c', 'a/b/d') // returns 'a/b'\n * findCommonPrefix('x/y/z', 'a/b/c') // returns ''\n * findCommonPrefix('a/b/c', 'a/b/c/d') // returns 'a/b/c'\n */\nexport function findCommonPrefix(path1: string, path2: string): string {\n const parts1 = path1.split('/')\n const parts2 = path2.split('/')\n\n const commonParts: string[] = []\n for (let i = 0; i < Math.min(parts1.length, parts2.length); i++) {\n if (parts1[i] === parts2[i]) {\n commonParts.push(parts1[i])\n } else {\n break\n }\n }\n return commonParts.join('/')\n}\n\n/**\n * Returns various filename components.\n * Example:\n * - fullFilename: 'file.txt'\n * - filename: 'file'\n * - suffix: 'txt'\n */\nexport function getFilenameDetails(fullFilename: string) {\n if (fullFilename.includes('.')) {\n return {\n filename: fullFilename.split('.').slice(0, -1).join('.'),\n suffix: fullFilename.split('.').pop() ?? null\n }\n } else {\n return { filename: fullFilename, suffix: null }\n }\n}\n\n/**\n * Returns various path components.\n * Example:\n * - path: 'dir/file.txt'\n * - directory: 'dir'\n * - fullFilename: 'file.txt'\n * - filename: 'file'\n * - suffix: 'txt'\n */\nexport function getPathDetails(path: string) {\n const directory = path.split('/').slice(0, -1).join('/')\n const fullFilename = path.split('/').pop() ?? path\n return { directory, fullFilename, ...getFilenameDetails(fullFilename) }\n}\n","/*!\n * shared v9.13.1\n * (c) 2024 kazuya kawaguchi\n * Released under the MIT License.\n */\n/**\n * Original Utilities\n * written by kazuya kawaguchi\n */\nconst inBrowser = typeof window !== 'undefined';\nlet mark;\nlet measure;\nif ((process.env.NODE_ENV !== 'production')) {\n const perf = inBrowser && window.performance;\n if (perf &&\n perf.mark &&\n perf.measure &&\n perf.clearMarks &&\n // @ts-ignore browser compat\n perf.clearMeasures) {\n mark = (tag) => {\n perf.mark(tag);\n };\n measure = (name, startTag, endTag) => {\n perf.measure(name, startTag, endTag);\n perf.clearMarks(startTag);\n perf.clearMarks(endTag);\n };\n }\n}\nconst RE_ARGS = /\\{([0-9a-zA-Z]+)\\}/g;\n/* eslint-disable */\nfunction format(message, ...args) {\n if (args.length === 1 && isObject(args[0])) {\n args = args[0];\n }\n if (!args || !args.hasOwnProperty) {\n args = {};\n }\n return message.replace(RE_ARGS, (match, identifier) => {\n return args.hasOwnProperty(identifier) ? args[identifier] : '';\n });\n}\nconst makeSymbol = (name, shareable = false) => !shareable ? Symbol(name) : Symbol.for(name);\nconst generateFormatCacheKey = (locale, key, source) => friendlyJSONstringify({ l: locale, k: key, s: source });\nconst friendlyJSONstringify = (json) => JSON.stringify(json)\n .replace(/\\u2028/g, '\\\\u2028')\n .replace(/\\u2029/g, '\\\\u2029')\n .replace(/\\u0027/g, '\\\\u0027');\nconst isNumber = (val) => typeof val === 'number' && isFinite(val);\nconst isDate = (val) => toTypeString(val) === '[object Date]';\nconst isRegExp = (val) => toTypeString(val) === '[object RegExp]';\nconst isEmptyObject = (val) => isPlainObject(val) && Object.keys(val).length === 0;\nconst assign = Object.assign;\nlet _globalThis;\nconst getGlobalThis = () => {\n // prettier-ignore\n return (_globalThis ||\n (_globalThis =\n typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {}));\n};\nfunction escapeHtml(rawText) {\n return rawText\n .replace(//g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''');\n}\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn(obj, key) {\n return hasOwnProperty.call(obj, key);\n}\n/* eslint-enable */\n/**\n * Useful Utilities By Evan you\n * Modified by kazuya kawaguchi\n * MIT License\n * https://github.com/vuejs/vue-next/blob/master/packages/shared/src/index.ts\n * https://github.com/vuejs/vue-next/blob/master/packages/shared/src/codeframe.ts\n */\nconst isArray = Array.isArray;\nconst isFunction = (val) => typeof val === 'function';\nconst isString = (val) => typeof val === 'string';\nconst isBoolean = (val) => typeof val === 'boolean';\nconst isSymbol = (val) => typeof val === 'symbol';\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isObject = (val) => val !== null && typeof val === 'object';\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isPromise = (val) => {\n return isObject(val) && isFunction(val.then) && isFunction(val.catch);\n};\nconst objectToString = Object.prototype.toString;\nconst toTypeString = (value) => objectToString.call(value);\nconst isPlainObject = (val) => {\n if (!isObject(val))\n return false;\n const proto = Object.getPrototypeOf(val);\n return proto === null || proto.constructor === Object;\n};\n// for converting list and named values to displayed strings.\nconst toDisplayString = (val) => {\n return val == null\n ? ''\n : isArray(val) || (isPlainObject(val) && val.toString === objectToString)\n ? JSON.stringify(val, null, 2)\n : String(val);\n};\nfunction join(items, separator = '') {\n return items.reduce((str, item, index) => (index === 0 ? str + item : str + separator + item), '');\n}\nconst RANGE = 2;\nfunction generateCodeFrame(source, start = 0, end = source.length) {\n const lines = source.split(/\\r?\\n/);\n let count = 0;\n const res = [];\n for (let i = 0; i < lines.length; i++) {\n count += lines[i].length + 1;\n if (count >= start) {\n for (let j = i - RANGE; j <= i + RANGE || end > count; j++) {\n if (j < 0 || j >= lines.length)\n continue;\n const line = j + 1;\n res.push(`${line}${' '.repeat(3 - String(line).length)}| ${lines[j]}`);\n const lineLength = lines[j].length;\n if (j === i) {\n // push underline\n const pad = start - (count - lineLength) + 1;\n const length = Math.max(1, end > count ? lineLength - pad : end - start);\n res.push(` | ` + ' '.repeat(pad) + '^'.repeat(length));\n }\n else if (j > i) {\n if (end > count) {\n const length = Math.max(Math.min(end - count, lineLength), 1);\n res.push(` | ` + '^'.repeat(length));\n }\n count += lineLength + 1;\n }\n }\n break;\n }\n }\n return res.join('\\n');\n}\nfunction incrementer(code) {\n let current = code;\n return () => ++current;\n}\n\nfunction warn(msg, err) {\n if (typeof console !== 'undefined') {\n console.warn(`[intlify] ` + msg);\n /* istanbul ignore if */\n if (err) {\n console.warn(err.stack);\n }\n }\n}\nconst hasWarned = {};\nfunction warnOnce(msg) {\n if (!hasWarned[msg]) {\n hasWarned[msg] = true;\n warn(msg);\n }\n}\n\n/**\n * Event emitter, forked from the below:\n * - original repository url: https://github.com/developit/mitt\n * - code url: https://github.com/developit/mitt/blob/master/src/index.ts\n * - author: Jason Miller (https://github.com/developit)\n * - license: MIT\n */\n/**\n * Create a event emitter\n *\n * @returns An event emitter\n */\nfunction createEmitter() {\n const events = new Map();\n const emitter = {\n events,\n on(event, handler) {\n const handlers = events.get(event);\n const added = handlers && handlers.push(handler);\n if (!added) {\n events.set(event, [handler]);\n }\n },\n off(event, handler) {\n const handlers = events.get(event);\n if (handlers) {\n handlers.splice(handlers.indexOf(handler) >>> 0, 1);\n }\n },\n emit(event, payload) {\n (events.get(event) || [])\n .slice()\n .map(handler => handler(payload));\n (events.get('*') || [])\n .slice()\n .map(handler => handler(event, payload));\n }\n };\n return emitter;\n}\n\nconst isNotObjectOrIsArray = (val) => !isObject(val) || isArray(val);\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\nfunction deepCopy(src, des) {\n // src and des should both be objects, and none of them can be a array\n if (isNotObjectOrIsArray(src) || isNotObjectOrIsArray(des)) {\n throw new Error('Invalid value');\n }\n const stack = [{ src, des }];\n while (stack.length) {\n const { src, des } = stack.pop();\n Object.keys(src).forEach(key => {\n if (isNotObjectOrIsArray(src[key]) || isNotObjectOrIsArray(des[key])) {\n // replace with src[key] when:\n // src[key] or des[key] is not an object, or\n // src[key] or des[key] is an array\n des[key] = src[key];\n }\n else {\n // src[key] and des[key] are both objects, merge them\n stack.push({ src: src[key], des: des[key] });\n }\n });\n }\n}\n\nexport { assign, createEmitter, deepCopy, escapeHtml, format, friendlyJSONstringify, generateCodeFrame, generateFormatCacheKey, getGlobalThis, hasOwn, inBrowser, incrementer, isArray, isBoolean, isDate, isEmptyObject, isFunction, isNumber, isObject, isPlainObject, isPromise, isRegExp, isString, isSymbol, join, makeSymbol, mark, measure, objectToString, toDisplayString, toTypeString, warn, warnOnce };\n","/*!\n * message-compiler v9.13.1\n * (c) 2024 kazuya kawaguchi\n * Released under the MIT License.\n */\nconst LOCATION_STUB = {\n start: { line: 1, column: 1, offset: 0 },\n end: { line: 1, column: 1, offset: 0 }\n};\nfunction createPosition(line, column, offset) {\n return { line, column, offset };\n}\nfunction createLocation(start, end, source) {\n const loc = { start, end };\n if (source != null) {\n loc.source = source;\n }\n return loc;\n}\n\n/**\n * Original Utilities\n * written by kazuya kawaguchi\n */\nconst RE_ARGS = /\\{([0-9a-zA-Z]+)\\}/g;\n/* eslint-disable */\nfunction format(message, ...args) {\n if (args.length === 1 && isObject(args[0])) {\n args = args[0];\n }\n if (!args || !args.hasOwnProperty) {\n args = {};\n }\n return message.replace(RE_ARGS, (match, identifier) => {\n return args.hasOwnProperty(identifier) ? args[identifier] : '';\n });\n}\nconst assign = Object.assign;\nconst isString = (val) => typeof val === 'string';\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isObject = (val) => val !== null && typeof val === 'object';\nfunction join(items, separator = '') {\n return items.reduce((str, item, index) => (index === 0 ? str + item : str + separator + item), '');\n}\n\nconst CompileWarnCodes = {\n USE_MODULO_SYNTAX: 1,\n __EXTEND_POINT__: 2\n};\n/** @internal */\nconst warnMessages = {\n [CompileWarnCodes.USE_MODULO_SYNTAX]: `Use modulo before '{{0}}'.`\n};\nfunction createCompileWarn(code, loc, ...args) {\n const msg = format(warnMessages[code] || '', ...(args || [])) ;\n const message = { message: String(msg), code };\n if (loc) {\n message.location = loc;\n }\n return message;\n}\n\nconst CompileErrorCodes = {\n // tokenizer error codes\n EXPECTED_TOKEN: 1,\n INVALID_TOKEN_IN_PLACEHOLDER: 2,\n UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,\n UNKNOWN_ESCAPE_SEQUENCE: 4,\n INVALID_UNICODE_ESCAPE_SEQUENCE: 5,\n UNBALANCED_CLOSING_BRACE: 6,\n UNTERMINATED_CLOSING_BRACE: 7,\n EMPTY_PLACEHOLDER: 8,\n NOT_ALLOW_NEST_PLACEHOLDER: 9,\n INVALID_LINKED_FORMAT: 10,\n // parser error codes\n MUST_HAVE_MESSAGES_IN_PLURAL: 11,\n UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,\n UNEXPECTED_EMPTY_LINKED_KEY: 13,\n UNEXPECTED_LEXICAL_ANALYSIS: 14,\n // generator error codes\n UNHANDLED_CODEGEN_NODE_TYPE: 15,\n // minifier error codes\n UNHANDLED_MINIFIER_NODE_TYPE: 16,\n // Special value for higher-order compilers to pick up the last code\n // to avoid collision of error codes. This should always be kept as the last\n // item.\n __EXTEND_POINT__: 17\n};\n/** @internal */\nconst errorMessages = {\n // tokenizer error messages\n [CompileErrorCodes.EXPECTED_TOKEN]: `Expected token: '{0}'`,\n [CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER]: `Invalid token in placeholder: '{0}'`,\n [CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]: `Unterminated single quote in placeholder`,\n [CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE]: `Unknown escape sequence: \\\\{0}`,\n [CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE]: `Invalid unicode escape sequence: {0}`,\n [CompileErrorCodes.UNBALANCED_CLOSING_BRACE]: `Unbalanced closing brace`,\n [CompileErrorCodes.UNTERMINATED_CLOSING_BRACE]: `Unterminated closing brace`,\n [CompileErrorCodes.EMPTY_PLACEHOLDER]: `Empty placeholder`,\n [CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER]: `Not allowed nest placeholder`,\n [CompileErrorCodes.INVALID_LINKED_FORMAT]: `Invalid linked format`,\n // parser error messages\n [CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL]: `Plural must have messages`,\n [CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER]: `Unexpected empty linked modifier`,\n [CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY]: `Unexpected empty linked key`,\n [CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS]: `Unexpected lexical analysis in token: '{0}'`,\n // generator error messages\n [CompileErrorCodes.UNHANDLED_CODEGEN_NODE_TYPE]: `unhandled codegen node type: '{0}'`,\n // minimizer error messages\n [CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE]: `unhandled mimifier node type: '{0}'`\n};\nfunction createCompileError(code, loc, options = {}) {\n const { domain, messages, args } = options;\n const msg = format((messages || errorMessages)[code] || '', ...(args || []))\n ;\n const error = new SyntaxError(String(msg));\n error.code = code;\n if (loc) {\n error.location = loc;\n }\n error.domain = domain;\n return error;\n}\n/** @internal */\nfunction defaultOnError(error) {\n throw error;\n}\n\n// eslint-disable-next-line no-useless-escape\nconst RE_HTML_TAG = /<\\/?[\\w\\s=\"/.':;#-\\/]+>/;\nconst detectHtmlTag = (source) => RE_HTML_TAG.test(source);\n\nconst CHAR_SP = ' ';\nconst CHAR_CR = '\\r';\nconst CHAR_LF = '\\n';\nconst CHAR_LS = String.fromCharCode(0x2028);\nconst CHAR_PS = String.fromCharCode(0x2029);\nfunction createScanner(str) {\n const _buf = str;\n let _index = 0;\n let _line = 1;\n let _column = 1;\n let _peekOffset = 0;\n const isCRLF = (index) => _buf[index] === CHAR_CR && _buf[index + 1] === CHAR_LF;\n const isLF = (index) => _buf[index] === CHAR_LF;\n const isPS = (index) => _buf[index] === CHAR_PS;\n const isLS = (index) => _buf[index] === CHAR_LS;\n const isLineEnd = (index) => isCRLF(index) || isLF(index) || isPS(index) || isLS(index);\n const index = () => _index;\n const line = () => _line;\n const column = () => _column;\n const peekOffset = () => _peekOffset;\n const charAt = (offset) => isCRLF(offset) || isPS(offset) || isLS(offset) ? CHAR_LF : _buf[offset];\n const currentChar = () => charAt(_index);\n const currentPeek = () => charAt(_index + _peekOffset);\n function next() {\n _peekOffset = 0;\n if (isLineEnd(_index)) {\n _line++;\n _column = 0;\n }\n if (isCRLF(_index)) {\n _index++;\n }\n _index++;\n _column++;\n return _buf[_index];\n }\n function peek() {\n if (isCRLF(_index + _peekOffset)) {\n _peekOffset++;\n }\n _peekOffset++;\n return _buf[_index + _peekOffset];\n }\n function reset() {\n _index = 0;\n _line = 1;\n _column = 1;\n _peekOffset = 0;\n }\n function resetPeek(offset = 0) {\n _peekOffset = offset;\n }\n function skipToPeek() {\n const target = _index + _peekOffset;\n // eslint-disable-next-line no-unmodified-loop-condition\n while (target !== _index) {\n next();\n }\n _peekOffset = 0;\n }\n return {\n index,\n line,\n column,\n peekOffset,\n charAt,\n currentChar,\n currentPeek,\n next,\n peek,\n reset,\n resetPeek,\n skipToPeek\n };\n}\n\nconst EOF = undefined;\nconst DOT = '.';\nconst LITERAL_DELIMITER = \"'\";\nconst ERROR_DOMAIN$3 = 'tokenizer';\nfunction createTokenizer(source, options = {}) {\n const location = options.location !== false;\n const _scnr = createScanner(source);\n const currentOffset = () => _scnr.index();\n const currentPosition = () => createPosition(_scnr.line(), _scnr.column(), _scnr.index());\n const _initLoc = currentPosition();\n const _initOffset = currentOffset();\n const _context = {\n currentType: 14 /* TokenTypes.EOF */,\n offset: _initOffset,\n startLoc: _initLoc,\n endLoc: _initLoc,\n lastType: 14 /* TokenTypes.EOF */,\n lastOffset: _initOffset,\n lastStartLoc: _initLoc,\n lastEndLoc: _initLoc,\n braceNest: 0,\n inLinked: false,\n text: ''\n };\n const context = () => _context;\n const { onError } = options;\n function emitError(code, pos, offset, ...args) {\n const ctx = context();\n pos.column += offset;\n pos.offset += offset;\n if (onError) {\n const loc = location ? createLocation(ctx.startLoc, pos) : null;\n const err = createCompileError(code, loc, {\n domain: ERROR_DOMAIN$3,\n args\n });\n onError(err);\n }\n }\n function getToken(context, type, value) {\n context.endLoc = currentPosition();\n context.currentType = type;\n const token = { type };\n if (location) {\n token.loc = createLocation(context.startLoc, context.endLoc);\n }\n if (value != null) {\n token.value = value;\n }\n return token;\n }\n const getEndToken = (context) => getToken(context, 14 /* TokenTypes.EOF */);\n function eat(scnr, ch) {\n if (scnr.currentChar() === ch) {\n scnr.next();\n return ch;\n }\n else {\n emitError(CompileErrorCodes.EXPECTED_TOKEN, currentPosition(), 0, ch);\n return '';\n }\n }\n function peekSpaces(scnr) {\n let buf = '';\n while (scnr.currentPeek() === CHAR_SP || scnr.currentPeek() === CHAR_LF) {\n buf += scnr.currentPeek();\n scnr.peek();\n }\n return buf;\n }\n function skipSpaces(scnr) {\n const buf = peekSpaces(scnr);\n scnr.skipToPeek();\n return buf;\n }\n function isIdentifierStart(ch) {\n if (ch === EOF) {\n return false;\n }\n const cc = ch.charCodeAt(0);\n return ((cc >= 97 && cc <= 122) || // a-z\n (cc >= 65 && cc <= 90) || // A-Z\n cc === 95 // _\n );\n }\n function isNumberStart(ch) {\n if (ch === EOF) {\n return false;\n }\n const cc = ch.charCodeAt(0);\n return cc >= 48 && cc <= 57; // 0-9\n }\n function isNamedIdentifierStart(scnr, context) {\n const { currentType } = context;\n if (currentType !== 2 /* TokenTypes.BraceLeft */) {\n return false;\n }\n peekSpaces(scnr);\n const ret = isIdentifierStart(scnr.currentPeek());\n scnr.resetPeek();\n return ret;\n }\n function isListIdentifierStart(scnr, context) {\n const { currentType } = context;\n if (currentType !== 2 /* TokenTypes.BraceLeft */) {\n return false;\n }\n peekSpaces(scnr);\n const ch = scnr.currentPeek() === '-' ? scnr.peek() : scnr.currentPeek();\n const ret = isNumberStart(ch);\n scnr.resetPeek();\n return ret;\n }\n function isLiteralStart(scnr, context) {\n const { currentType } = context;\n if (currentType !== 2 /* TokenTypes.BraceLeft */) {\n return false;\n }\n peekSpaces(scnr);\n const ret = scnr.currentPeek() === LITERAL_DELIMITER;\n scnr.resetPeek();\n return ret;\n }\n function isLinkedDotStart(scnr, context) {\n const { currentType } = context;\n if (currentType !== 8 /* TokenTypes.LinkedAlias */) {\n return false;\n }\n peekSpaces(scnr);\n const ret = scnr.currentPeek() === \".\" /* TokenChars.LinkedDot */;\n scnr.resetPeek();\n return ret;\n }\n function isLinkedModifierStart(scnr, context) {\n const { currentType } = context;\n if (currentType !== 9 /* TokenTypes.LinkedDot */) {\n return false;\n }\n peekSpaces(scnr);\n const ret = isIdentifierStart(scnr.currentPeek());\n scnr.resetPeek();\n return ret;\n }\n function isLinkedDelimiterStart(scnr, context) {\n const { currentType } = context;\n if (!(currentType === 8 /* TokenTypes.LinkedAlias */ ||\n currentType === 12 /* TokenTypes.LinkedModifier */)) {\n return false;\n }\n peekSpaces(scnr);\n const ret = scnr.currentPeek() === \":\" /* TokenChars.LinkedDelimiter */;\n scnr.resetPeek();\n return ret;\n }\n function isLinkedReferStart(scnr, context) {\n const { currentType } = context;\n if (currentType !== 10 /* TokenTypes.LinkedDelimiter */) {\n return false;\n }\n const fn = () => {\n const ch = scnr.currentPeek();\n if (ch === \"{\" /* TokenChars.BraceLeft */) {\n return isIdentifierStart(scnr.peek());\n }\n else if (ch === \"@\" /* TokenChars.LinkedAlias */ ||\n ch === \"%\" /* TokenChars.Modulo */ ||\n ch === \"|\" /* TokenChars.Pipe */ ||\n ch === \":\" /* TokenChars.LinkedDelimiter */ ||\n ch === \".\" /* TokenChars.LinkedDot */ ||\n ch === CHAR_SP ||\n !ch) {\n return false;\n }\n else if (ch === CHAR_LF) {\n scnr.peek();\n return fn();\n }\n else {\n // other characters\n return isTextStart(scnr, false);\n }\n };\n const ret = fn();\n scnr.resetPeek();\n return ret;\n }\n function isPluralStart(scnr) {\n peekSpaces(scnr);\n const ret = scnr.currentPeek() === \"|\" /* TokenChars.Pipe */;\n scnr.resetPeek();\n return ret;\n }\n function detectModuloStart(scnr) {\n const spaces = peekSpaces(scnr);\n const ret = scnr.currentPeek() === \"%\" /* TokenChars.Modulo */ &&\n scnr.peek() === \"{\" /* TokenChars.BraceLeft */;\n scnr.resetPeek();\n return {\n isModulo: ret,\n hasSpace: spaces.length > 0\n };\n }\n function isTextStart(scnr, reset = true) {\n const fn = (hasSpace = false, prev = '', detectModulo = false) => {\n const ch = scnr.currentPeek();\n if (ch === \"{\" /* TokenChars.BraceLeft */) {\n return prev === \"%\" /* TokenChars.Modulo */ ? false : hasSpace;\n }\n else if (ch === \"@\" /* TokenChars.LinkedAlias */ || !ch) {\n return prev === \"%\" /* TokenChars.Modulo */ ? true : hasSpace;\n }\n else if (ch === \"%\" /* TokenChars.Modulo */) {\n scnr.peek();\n return fn(hasSpace, \"%\" /* TokenChars.Modulo */, true);\n }\n else if (ch === \"|\" /* TokenChars.Pipe */) {\n return prev === \"%\" /* TokenChars.Modulo */ || detectModulo\n ? true\n : !(prev === CHAR_SP || prev === CHAR_LF);\n }\n else if (ch === CHAR_SP) {\n scnr.peek();\n return fn(true, CHAR_SP, detectModulo);\n }\n else if (ch === CHAR_LF) {\n scnr.peek();\n return fn(true, CHAR_LF, detectModulo);\n }\n else {\n return true;\n }\n };\n const ret = fn();\n reset && scnr.resetPeek();\n return ret;\n }\n function takeChar(scnr, fn) {\n const ch = scnr.currentChar();\n if (ch === EOF) {\n return EOF;\n }\n if (fn(ch)) {\n scnr.next();\n return ch;\n }\n return null;\n }\n function isIdentifier(ch) {\n const cc = ch.charCodeAt(0);\n return ((cc >= 97 && cc <= 122) || // a-z\n (cc >= 65 && cc <= 90) || // A-Z\n (cc >= 48 && cc <= 57) || // 0-9\n cc === 95 || // _\n cc === 36 // $\n );\n }\n function takeIdentifierChar(scnr) {\n return takeChar(scnr, isIdentifier);\n }\n function isNamedIdentifier(ch) {\n const cc = ch.charCodeAt(0);\n return ((cc >= 97 && cc <= 122) || // a-z\n (cc >= 65 && cc <= 90) || // A-Z\n (cc >= 48 && cc <= 57) || // 0-9\n cc === 95 || // _\n cc === 36 || // $\n cc === 45 // -\n );\n }\n function takeNamedIdentifierChar(scnr) {\n return takeChar(scnr, isNamedIdentifier);\n }\n function isDigit(ch) {\n const cc = ch.charCodeAt(0);\n return cc >= 48 && cc <= 57; // 0-9\n }\n function takeDigit(scnr) {\n return takeChar(scnr, isDigit);\n }\n function isHexDigit(ch) {\n const cc = ch.charCodeAt(0);\n return ((cc >= 48 && cc <= 57) || // 0-9\n (cc >= 65 && cc <= 70) || // A-F\n (cc >= 97 && cc <= 102)); // a-f\n }\n function takeHexDigit(scnr) {\n return takeChar(scnr, isHexDigit);\n }\n function getDigits(scnr) {\n let ch = '';\n let num = '';\n while ((ch = takeDigit(scnr))) {\n num += ch;\n }\n return num;\n }\n function readModulo(scnr) {\n skipSpaces(scnr);\n const ch = scnr.currentChar();\n if (ch !== \"%\" /* TokenChars.Modulo */) {\n emitError(CompileErrorCodes.EXPECTED_TOKEN, currentPosition(), 0, ch);\n }\n scnr.next();\n return \"%\" /* TokenChars.Modulo */;\n }\n function readText(scnr) {\n let buf = '';\n // eslint-disable-next-line no-constant-condition\n while (true) {\n const ch = scnr.currentChar();\n if (ch === \"{\" /* TokenChars.BraceLeft */ ||\n ch === \"}\" /* TokenChars.BraceRight */ ||\n ch === \"@\" /* TokenChars.LinkedAlias */ ||\n ch === \"|\" /* TokenChars.Pipe */ ||\n !ch) {\n break;\n }\n else if (ch === \"%\" /* TokenChars.Modulo */) {\n if (isTextStart(scnr)) {\n buf += ch;\n scnr.next();\n }\n else {\n break;\n }\n }\n else if (ch === CHAR_SP || ch === CHAR_LF) {\n if (isTextStart(scnr)) {\n buf += ch;\n scnr.next();\n }\n else if (isPluralStart(scnr)) {\n break;\n }\n else {\n buf += ch;\n scnr.next();\n }\n }\n else {\n buf += ch;\n scnr.next();\n }\n }\n return buf;\n }\n function readNamedIdentifier(scnr) {\n skipSpaces(scnr);\n let ch = '';\n let name = '';\n while ((ch = takeNamedIdentifierChar(scnr))) {\n name += ch;\n }\n if (scnr.currentChar() === EOF) {\n emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\n }\n return name;\n }\n function readListIdentifier(scnr) {\n skipSpaces(scnr);\n let value = '';\n if (scnr.currentChar() === '-') {\n scnr.next();\n value += `-${getDigits(scnr)}`;\n }\n else {\n value += getDigits(scnr);\n }\n if (scnr.currentChar() === EOF) {\n emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\n }\n return value;\n }\n function isLiteral(ch) {\n return ch !== LITERAL_DELIMITER && ch !== CHAR_LF;\n }\n function readLiteral(scnr) {\n skipSpaces(scnr);\n // eslint-disable-next-line no-useless-escape\n eat(scnr, `\\'`);\n let ch = '';\n let literal = '';\n while ((ch = takeChar(scnr, isLiteral))) {\n if (ch === '\\\\') {\n literal += readEscapeSequence(scnr);\n }\n else {\n literal += ch;\n }\n }\n const current = scnr.currentChar();\n if (current === CHAR_LF || current === EOF) {\n emitError(CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, currentPosition(), 0);\n // TODO: Is it correct really?\n if (current === CHAR_LF) {\n scnr.next();\n // eslint-disable-next-line no-useless-escape\n eat(scnr, `\\'`);\n }\n return literal;\n }\n // eslint-disable-next-line no-useless-escape\n eat(scnr, `\\'`);\n return literal;\n }\n function readEscapeSequence(scnr) {\n const ch = scnr.currentChar();\n switch (ch) {\n case '\\\\':\n case `\\'`: // eslint-disable-line no-useless-escape\n scnr.next();\n return `\\\\${ch}`;\n case 'u':\n return readUnicodeEscapeSequence(scnr, ch, 4);\n case 'U':\n return readUnicodeEscapeSequence(scnr, ch, 6);\n default:\n emitError(CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE, currentPosition(), 0, ch);\n return '';\n }\n }\n function readUnicodeEscapeSequence(scnr, unicode, digits) {\n eat(scnr, unicode);\n let sequence = '';\n for (let i = 0; i < digits; i++) {\n const ch = takeHexDigit(scnr);\n if (!ch) {\n emitError(CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE, currentPosition(), 0, `\\\\${unicode}${sequence}${scnr.currentChar()}`);\n break;\n }\n sequence += ch;\n }\n return `\\\\${unicode}${sequence}`;\n }\n function isInvalidIdentifier(ch) {\n return (ch !== \"{\" /* TokenChars.BraceLeft */ &&\n ch !== \"}\" /* TokenChars.BraceRight */ &&\n ch !== CHAR_SP &&\n ch !== CHAR_LF);\n }\n function readInvalidIdentifier(scnr) {\n skipSpaces(scnr);\n let ch = '';\n let identifiers = '';\n while ((ch = takeChar(scnr, isInvalidIdentifier))) {\n identifiers += ch;\n }\n return identifiers;\n }\n function readLinkedModifier(scnr) {\n let ch = '';\n let name = '';\n while ((ch = takeIdentifierChar(scnr))) {\n name += ch;\n }\n return name;\n }\n function readLinkedRefer(scnr) {\n const fn = (buf) => {\n const ch = scnr.currentChar();\n if (ch === \"{\" /* TokenChars.BraceLeft */ ||\n ch === \"%\" /* TokenChars.Modulo */ ||\n ch === \"@\" /* TokenChars.LinkedAlias */ ||\n ch === \"|\" /* TokenChars.Pipe */ ||\n ch === \"(\" /* TokenChars.ParenLeft */ ||\n ch === \")\" /* TokenChars.ParenRight */ ||\n !ch) {\n return buf;\n }\n else if (ch === CHAR_SP) {\n return buf;\n }\n else if (ch === CHAR_LF || ch === DOT) {\n buf += ch;\n scnr.next();\n return fn(buf);\n }\n else {\n buf += ch;\n scnr.next();\n return fn(buf);\n }\n };\n return fn('');\n }\n function readPlural(scnr) {\n skipSpaces(scnr);\n const plural = eat(scnr, \"|\" /* TokenChars.Pipe */);\n skipSpaces(scnr);\n return plural;\n }\n // TODO: We need refactoring of token parsing ...\n function readTokenInPlaceholder(scnr, context) {\n let token = null;\n const ch = scnr.currentChar();\n switch (ch) {\n case \"{\" /* TokenChars.BraceLeft */:\n if (context.braceNest >= 1) {\n emitError(CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER, currentPosition(), 0);\n }\n scnr.next();\n token = getToken(context, 2 /* TokenTypes.BraceLeft */, \"{\" /* TokenChars.BraceLeft */);\n skipSpaces(scnr);\n context.braceNest++;\n return token;\n case \"}\" /* TokenChars.BraceRight */:\n if (context.braceNest > 0 &&\n context.currentType === 2 /* TokenTypes.BraceLeft */) {\n emitError(CompileErrorCodes.EMPTY_PLACEHOLDER, currentPosition(), 0);\n }\n scnr.next();\n token = getToken(context, 3 /* TokenTypes.BraceRight */, \"}\" /* TokenChars.BraceRight */);\n context.braceNest--;\n context.braceNest > 0 && skipSpaces(scnr);\n if (context.inLinked && context.braceNest === 0) {\n context.inLinked = false;\n }\n return token;\n case \"@\" /* TokenChars.LinkedAlias */:\n if (context.braceNest > 0) {\n emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\n }\n token = readTokenInLinked(scnr, context) || getEndToken(context);\n context.braceNest = 0;\n return token;\n default: {\n let validNamedIdentifier = true;\n let validListIdentifier = true;\n let validLiteral = true;\n if (isPluralStart(scnr)) {\n if (context.braceNest > 0) {\n emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\n }\n token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));\n // reset\n context.braceNest = 0;\n context.inLinked = false;\n return token;\n }\n if (context.braceNest > 0 &&\n (context.currentType === 5 /* TokenTypes.Named */ ||\n context.currentType === 6 /* TokenTypes.List */ ||\n context.currentType === 7 /* TokenTypes.Literal */)) {\n emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\n context.braceNest = 0;\n return readToken(scnr, context);\n }\n if ((validNamedIdentifier = isNamedIdentifierStart(scnr, context))) {\n token = getToken(context, 5 /* TokenTypes.Named */, readNamedIdentifier(scnr));\n skipSpaces(scnr);\n return token;\n }\n if ((validListIdentifier = isListIdentifierStart(scnr, context))) {\n token = getToken(context, 6 /* TokenTypes.List */, readListIdentifier(scnr));\n skipSpaces(scnr);\n return token;\n }\n if ((validLiteral = isLiteralStart(scnr, context))) {\n token = getToken(context, 7 /* TokenTypes.Literal */, readLiteral(scnr));\n skipSpaces(scnr);\n return token;\n }\n if (!validNamedIdentifier && !validListIdentifier && !validLiteral) {\n // TODO: we should be re-designed invalid cases, when we will extend message syntax near the future ...\n token = getToken(context, 13 /* TokenTypes.InvalidPlace */, readInvalidIdentifier(scnr));\n emitError(CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER, currentPosition(), 0, token.value);\n skipSpaces(scnr);\n return token;\n }\n break;\n }\n }\n return token;\n }\n // TODO: We need refactoring of token parsing ...\n function readTokenInLinked(scnr, context) {\n const { currentType } = context;\n let token = null;\n const ch = scnr.currentChar();\n if ((currentType === 8 /* TokenTypes.LinkedAlias */ ||\n currentType === 9 /* TokenTypes.LinkedDot */ ||\n currentType === 12 /* TokenTypes.LinkedModifier */ ||\n currentType === 10 /* TokenTypes.LinkedDelimiter */) &&\n (ch === CHAR_LF || ch === CHAR_SP)) {\n emitError(CompileErrorCodes.INVALID_LINKED_FORMAT, currentPosition(), 0);\n }\n switch (ch) {\n case \"@\" /* TokenChars.LinkedAlias */:\n scnr.next();\n token = getToken(context, 8 /* TokenTypes.LinkedAlias */, \"@\" /* TokenChars.LinkedAlias */);\n context.inLinked = true;\n return token;\n case \".\" /* TokenChars.LinkedDot */:\n skipSpaces(scnr);\n scnr.next();\n return getToken(context, 9 /* TokenTypes.LinkedDot */, \".\" /* TokenChars.LinkedDot */);\n case \":\" /* TokenChars.LinkedDelimiter */:\n skipSpaces(scnr);\n scnr.next();\n return getToken(context, 10 /* TokenTypes.LinkedDelimiter */, \":\" /* TokenChars.LinkedDelimiter */);\n default:\n if (isPluralStart(scnr)) {\n token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));\n // reset\n context.braceNest = 0;\n context.inLinked = false;\n return token;\n }\n if (isLinkedDotStart(scnr, context) ||\n isLinkedDelimiterStart(scnr, context)) {\n skipSpaces(scnr);\n return readTokenInLinked(scnr, context);\n }\n if (isLinkedModifierStart(scnr, context)) {\n skipSpaces(scnr);\n return getToken(context, 12 /* TokenTypes.LinkedModifier */, readLinkedModifier(scnr));\n }\n if (isLinkedReferStart(scnr, context)) {\n skipSpaces(scnr);\n if (ch === \"{\" /* TokenChars.BraceLeft */) {\n // scan the placeholder\n return readTokenInPlaceholder(scnr, context) || token;\n }\n else {\n return getToken(context, 11 /* TokenTypes.LinkedKey */, readLinkedRefer(scnr));\n }\n }\n if (currentType === 8 /* TokenTypes.LinkedAlias */) {\n emitError(CompileErrorCodes.INVALID_LINKED_FORMAT, currentPosition(), 0);\n }\n context.braceNest = 0;\n context.inLinked = false;\n return readToken(scnr, context);\n }\n }\n // TODO: We need refactoring of token parsing ...\n function readToken(scnr, context) {\n let token = { type: 14 /* TokenTypes.EOF */ };\n if (context.braceNest > 0) {\n return readTokenInPlaceholder(scnr, context) || getEndToken(context);\n }\n if (context.inLinked) {\n return readTokenInLinked(scnr, context) || getEndToken(context);\n }\n const ch = scnr.currentChar();\n switch (ch) {\n case \"{\" /* TokenChars.BraceLeft */:\n return readTokenInPlaceholder(scnr, context) || getEndToken(context);\n case \"}\" /* TokenChars.BraceRight */:\n emitError(CompileErrorCodes.UNBALANCED_CLOSING_BRACE, currentPosition(), 0);\n scnr.next();\n return getToken(context, 3 /* TokenTypes.BraceRight */, \"}\" /* TokenChars.BraceRight */);\n case \"@\" /* TokenChars.LinkedAlias */:\n return readTokenInLinked(scnr, context) || getEndToken(context);\n default: {\n if (isPluralStart(scnr)) {\n token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));\n // reset\n context.braceNest = 0;\n context.inLinked = false;\n return token;\n }\n const { isModulo, hasSpace } = detectModuloStart(scnr);\n if (isModulo) {\n return hasSpace\n ? getToken(context, 0 /* TokenTypes.Text */, readText(scnr))\n : getToken(context, 4 /* TokenTypes.Modulo */, readModulo(scnr));\n }\n if (isTextStart(scnr)) {\n return getToken(context, 0 /* TokenTypes.Text */, readText(scnr));\n }\n break;\n }\n }\n return token;\n }\n function nextToken() {\n const { currentType, offset, startLoc, endLoc } = _context;\n _context.lastType = currentType;\n _context.lastOffset = offset;\n _context.lastStartLoc = startLoc;\n _context.lastEndLoc = endLoc;\n _context.offset = currentOffset();\n _context.startLoc = currentPosition();\n if (_scnr.currentChar() === EOF) {\n return getToken(_context, 14 /* TokenTypes.EOF */);\n }\n return readToken(_scnr, _context);\n }\n return {\n nextToken,\n currentOffset,\n currentPosition,\n context\n };\n}\n\nconst ERROR_DOMAIN$2 = 'parser';\n// Backslash backslash, backslash quote, uHHHH, UHHHHHH.\nconst KNOWN_ESCAPES = /(?:\\\\\\\\|\\\\'|\\\\u([0-9a-fA-F]{4})|\\\\U([0-9a-fA-F]{6}))/g;\nfunction fromEscapeSequence(match, codePoint4, codePoint6) {\n switch (match) {\n case `\\\\\\\\`:\n return `\\\\`;\n // eslint-disable-next-line no-useless-escape\n case `\\\\\\'`:\n // eslint-disable-next-line no-useless-escape\n return `\\'`;\n default: {\n const codePoint = parseInt(codePoint4 || codePoint6, 16);\n if (codePoint <= 0xd7ff || codePoint >= 0xe000) {\n return String.fromCodePoint(codePoint);\n }\n // invalid ...\n // Replace them with U+FFFD REPLACEMENT CHARACTER.\n return '�';\n }\n }\n}\nfunction createParser(options = {}) {\n const location = options.location !== false;\n const { onError, onWarn } = options;\n function emitError(tokenzer, code, start, offset, ...args) {\n const end = tokenzer.currentPosition();\n end.offset += offset;\n end.column += offset;\n if (onError) {\n const loc = location ? createLocation(start, end) : null;\n const err = createCompileError(code, loc, {\n domain: ERROR_DOMAIN$2,\n args\n });\n onError(err);\n }\n }\n function emitWarn(tokenzer, code, start, offset, ...args) {\n const end = tokenzer.currentPosition();\n end.offset += offset;\n end.column += offset;\n if (onWarn) {\n const loc = location ? createLocation(start, end) : null;\n onWarn(createCompileWarn(code, loc, args));\n }\n }\n function startNode(type, offset, loc) {\n const node = { type };\n if (location) {\n node.start = offset;\n node.end = offset;\n node.loc = { start: loc, end: loc };\n }\n return node;\n }\n function endNode(node, offset, pos, type) {\n if (type) {\n node.type = type;\n }\n if (location) {\n node.end = offset;\n if (node.loc) {\n node.loc.end = pos;\n }\n }\n }\n function parseText(tokenizer, value) {\n const context = tokenizer.context();\n const node = startNode(3 /* NodeTypes.Text */, context.offset, context.startLoc);\n node.value = value;\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n return node;\n }\n function parseList(tokenizer, index) {\n const context = tokenizer.context();\n const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc\n const node = startNode(5 /* NodeTypes.List */, offset, loc);\n node.index = parseInt(index, 10);\n tokenizer.nextToken(); // skip brach right\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n return node;\n }\n function parseNamed(tokenizer, key, modulo) {\n const context = tokenizer.context();\n const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc\n const node = startNode(4 /* NodeTypes.Named */, offset, loc);\n node.key = key;\n if (modulo === true) {\n node.modulo = true;\n }\n tokenizer.nextToken(); // skip brach right\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n return node;\n }\n function parseLiteral(tokenizer, value) {\n const context = tokenizer.context();\n const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc\n const node = startNode(9 /* NodeTypes.Literal */, offset, loc);\n node.value = value.replace(KNOWN_ESCAPES, fromEscapeSequence);\n tokenizer.nextToken(); // skip brach right\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n return node;\n }\n function parseLinkedModifier(tokenizer) {\n const token = tokenizer.nextToken();\n const context = tokenizer.context();\n const { lastOffset: offset, lastStartLoc: loc } = context; // get linked dot loc\n const node = startNode(8 /* NodeTypes.LinkedModifier */, offset, loc);\n if (token.type !== 12 /* TokenTypes.LinkedModifier */) {\n // empty modifier\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER, context.lastStartLoc, 0);\n node.value = '';\n endNode(node, offset, loc);\n return {\n nextConsumeToken: token,\n node\n };\n }\n // check token\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n node.value = token.value || '';\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n return {\n node\n };\n }\n function parseLinkedKey(tokenizer, value) {\n const context = tokenizer.context();\n const node = startNode(7 /* NodeTypes.LinkedKey */, context.offset, context.startLoc);\n node.value = value;\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n return node;\n }\n function parseLinked(tokenizer) {\n const context = tokenizer.context();\n const linkedNode = startNode(6 /* NodeTypes.Linked */, context.offset, context.startLoc);\n let token = tokenizer.nextToken();\n if (token.type === 9 /* TokenTypes.LinkedDot */) {\n const parsed = parseLinkedModifier(tokenizer);\n linkedNode.modifier = parsed.node;\n token = parsed.nextConsumeToken || tokenizer.nextToken();\n }\n // asset check token\n if (token.type !== 10 /* TokenTypes.LinkedDelimiter */) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n token = tokenizer.nextToken();\n // skip brace left\n if (token.type === 2 /* TokenTypes.BraceLeft */) {\n token = tokenizer.nextToken();\n }\n switch (token.type) {\n case 11 /* TokenTypes.LinkedKey */:\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n linkedNode.key = parseLinkedKey(tokenizer, token.value || '');\n break;\n case 5 /* TokenTypes.Named */:\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n linkedNode.key = parseNamed(tokenizer, token.value || '');\n break;\n case 6 /* TokenTypes.List */:\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n linkedNode.key = parseList(tokenizer, token.value || '');\n break;\n case 7 /* TokenTypes.Literal */:\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n linkedNode.key = parseLiteral(tokenizer, token.value || '');\n break;\n default: {\n // empty key\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY, context.lastStartLoc, 0);\n const nextContext = tokenizer.context();\n const emptyLinkedKeyNode = startNode(7 /* NodeTypes.LinkedKey */, nextContext.offset, nextContext.startLoc);\n emptyLinkedKeyNode.value = '';\n endNode(emptyLinkedKeyNode, nextContext.offset, nextContext.startLoc);\n linkedNode.key = emptyLinkedKeyNode;\n endNode(linkedNode, nextContext.offset, nextContext.startLoc);\n return {\n nextConsumeToken: token,\n node: linkedNode\n };\n }\n }\n endNode(linkedNode, tokenizer.currentOffset(), tokenizer.currentPosition());\n return {\n node: linkedNode\n };\n }\n function parseMessage(tokenizer) {\n const context = tokenizer.context();\n const startOffset = context.currentType === 1 /* TokenTypes.Pipe */\n ? tokenizer.currentOffset()\n : context.offset;\n const startLoc = context.currentType === 1 /* TokenTypes.Pipe */\n ? context.endLoc\n : context.startLoc;\n const node = startNode(2 /* NodeTypes.Message */, startOffset, startLoc);\n node.items = [];\n let nextToken = null;\n let modulo = null;\n do {\n const token = nextToken || tokenizer.nextToken();\n nextToken = null;\n switch (token.type) {\n case 0 /* TokenTypes.Text */:\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n node.items.push(parseText(tokenizer, token.value || ''));\n break;\n case 6 /* TokenTypes.List */:\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n node.items.push(parseList(tokenizer, token.value || ''));\n break;\n case 4 /* TokenTypes.Modulo */:\n modulo = true;\n break;\n case 5 /* TokenTypes.Named */:\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n node.items.push(parseNamed(tokenizer, token.value || '', !!modulo));\n if (modulo) {\n emitWarn(tokenizer, CompileWarnCodes.USE_MODULO_SYNTAX, context.lastStartLoc, 0, getTokenCaption(token));\n modulo = null;\n }\n break;\n case 7 /* TokenTypes.Literal */:\n if (token.value == null) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n }\n node.items.push(parseLiteral(tokenizer, token.value || ''));\n break;\n case 8 /* TokenTypes.LinkedAlias */: {\n const parsed = parseLinked(tokenizer);\n node.items.push(parsed.node);\n nextToken = parsed.nextConsumeToken || null;\n break;\n }\n }\n } while (context.currentType !== 14 /* TokenTypes.EOF */ &&\n context.currentType !== 1 /* TokenTypes.Pipe */);\n // adjust message node loc\n const endOffset = context.currentType === 1 /* TokenTypes.Pipe */\n ? context.lastOffset\n : tokenizer.currentOffset();\n const endLoc = context.currentType === 1 /* TokenTypes.Pipe */\n ? context.lastEndLoc\n : tokenizer.currentPosition();\n endNode(node, endOffset, endLoc);\n return node;\n }\n function parsePlural(tokenizer, offset, loc, msgNode) {\n const context = tokenizer.context();\n let hasEmptyMessage = msgNode.items.length === 0;\n const node = startNode(1 /* NodeTypes.Plural */, offset, loc);\n node.cases = [];\n node.cases.push(msgNode);\n do {\n const msg = parseMessage(tokenizer);\n if (!hasEmptyMessage) {\n hasEmptyMessage = msg.items.length === 0;\n }\n node.cases.push(msg);\n } while (context.currentType !== 14 /* TokenTypes.EOF */);\n if (hasEmptyMessage) {\n emitError(tokenizer, CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL, loc, 0);\n }\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n return node;\n }\n function parseResource(tokenizer) {\n const context = tokenizer.context();\n const { offset, startLoc } = context;\n const msgNode = parseMessage(tokenizer);\n if (context.currentType === 14 /* TokenTypes.EOF */) {\n return msgNode;\n }\n else {\n return parsePlural(tokenizer, offset, startLoc, msgNode);\n }\n }\n function parse(source) {\n const tokenizer = createTokenizer(source, assign({}, options));\n const context = tokenizer.context();\n const node = startNode(0 /* NodeTypes.Resource */, context.offset, context.startLoc);\n if (location && node.loc) {\n node.loc.source = source;\n }\n node.body = parseResource(tokenizer);\n if (options.onCacheKey) {\n node.cacheKey = options.onCacheKey(source);\n }\n // assert whether achieved to EOF\n if (context.currentType !== 14 /* TokenTypes.EOF */) {\n emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, source[context.offset] || '');\n }\n endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n return node;\n }\n return { parse };\n}\nfunction getTokenCaption(token) {\n if (token.type === 14 /* TokenTypes.EOF */) {\n return 'EOF';\n }\n const name = (token.value || '').replace(/\\r?\\n/gu, '\\\\n');\n return name.length > 10 ? name.slice(0, 9) + '…' : name;\n}\n\nfunction createTransformer(ast, options = {} // eslint-disable-line\n) {\n const _context = {\n ast,\n helpers: new Set()\n };\n const context = () => _context;\n const helper = (name) => {\n _context.helpers.add(name);\n return name;\n };\n return { context, helper };\n}\nfunction traverseNodes(nodes, transformer) {\n for (let i = 0; i < nodes.length; i++) {\n traverseNode(nodes[i], transformer);\n }\n}\nfunction traverseNode(node, transformer) {\n // TODO: if we need pre-hook of transform, should be implemented to here\n switch (node.type) {\n case 1 /* NodeTypes.Plural */:\n traverseNodes(node.cases, transformer);\n transformer.helper(\"plural\" /* HelperNameMap.PLURAL */);\n break;\n case 2 /* NodeTypes.Message */:\n traverseNodes(node.items, transformer);\n break;\n case 6 /* NodeTypes.Linked */: {\n const linked = node;\n traverseNode(linked.key, transformer);\n transformer.helper(\"linked\" /* HelperNameMap.LINKED */);\n transformer.helper(\"type\" /* HelperNameMap.TYPE */);\n break;\n }\n case 5 /* NodeTypes.List */:\n transformer.helper(\"interpolate\" /* HelperNameMap.INTERPOLATE */);\n transformer.helper(\"list\" /* HelperNameMap.LIST */);\n break;\n case 4 /* NodeTypes.Named */:\n transformer.helper(\"interpolate\" /* HelperNameMap.INTERPOLATE */);\n transformer.helper(\"named\" /* HelperNameMap.NAMED */);\n break;\n }\n // TODO: if we need post-hook of transform, should be implemented to here\n}\n// transform AST\nfunction transform(ast, options = {} // eslint-disable-line\n) {\n const transformer = createTransformer(ast);\n transformer.helper(\"normalize\" /* HelperNameMap.NORMALIZE */);\n // traverse\n ast.body && traverseNode(ast.body, transformer);\n // set meta information\n const context = transformer.context();\n ast.helpers = Array.from(context.helpers);\n}\n\nfunction optimize(ast) {\n const body = ast.body;\n if (body.type === 2 /* NodeTypes.Message */) {\n optimizeMessageNode(body);\n }\n else {\n body.cases.forEach(c => optimizeMessageNode(c));\n }\n return ast;\n}\nfunction optimizeMessageNode(message) {\n if (message.items.length === 1) {\n const item = message.items[0];\n if (item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */) {\n message.static = item.value;\n delete item.value; // optimization for size\n }\n }\n else {\n const values = [];\n for (let i = 0; i < message.items.length; i++) {\n const item = message.items[i];\n if (!(item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */)) {\n break;\n }\n if (item.value == null) {\n break;\n }\n values.push(item.value);\n }\n if (values.length === message.items.length) {\n message.static = join(values);\n for (let i = 0; i < message.items.length; i++) {\n const item = message.items[i];\n if (item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */) {\n delete item.value; // optimization for size\n }\n }\n }\n }\n}\n\nconst ERROR_DOMAIN$1 = 'minifier';\n/* eslint-disable @typescript-eslint/no-explicit-any */\nfunction minify(node) {\n node.t = node.type;\n switch (node.type) {\n case 0 /* NodeTypes.Resource */: {\n const resource = node;\n minify(resource.body);\n resource.b = resource.body;\n delete resource.body;\n break;\n }\n case 1 /* NodeTypes.Plural */: {\n const plural = node;\n const cases = plural.cases;\n for (let i = 0; i < cases.length; i++) {\n minify(cases[i]);\n }\n plural.c = cases;\n delete plural.cases;\n break;\n }\n case 2 /* NodeTypes.Message */: {\n const message = node;\n const items = message.items;\n for (let i = 0; i < items.length; i++) {\n minify(items[i]);\n }\n message.i = items;\n delete message.items;\n if (message.static) {\n message.s = message.static;\n delete message.static;\n }\n break;\n }\n case 3 /* NodeTypes.Text */:\n case 9 /* NodeTypes.Literal */:\n case 8 /* NodeTypes.LinkedModifier */:\n case 7 /* NodeTypes.LinkedKey */: {\n const valueNode = node;\n if (valueNode.value) {\n valueNode.v = valueNode.value;\n delete valueNode.value;\n }\n break;\n }\n case 6 /* NodeTypes.Linked */: {\n const linked = node;\n minify(linked.key);\n linked.k = linked.key;\n delete linked.key;\n if (linked.modifier) {\n minify(linked.modifier);\n linked.m = linked.modifier;\n delete linked.modifier;\n }\n break;\n }\n case 5 /* NodeTypes.List */: {\n const list = node;\n list.i = list.index;\n delete list.index;\n break;\n }\n case 4 /* NodeTypes.Named */: {\n const named = node;\n named.k = named.key;\n delete named.key;\n break;\n }\n default:\n {\n throw createCompileError(CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE, null, {\n domain: ERROR_DOMAIN$1,\n args: [node.type]\n });\n }\n }\n delete node.type;\n}\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\n// eslint-disable-next-line @typescript-eslint/triple-slash-reference\n/// \nconst ERROR_DOMAIN = 'parser';\nfunction createCodeGenerator(ast, options) {\n const { sourceMap, filename, breakLineCode, needIndent: _needIndent } = options;\n const location = options.location !== false;\n const _context = {\n filename,\n code: '',\n column: 1,\n line: 1,\n offset: 0,\n map: undefined,\n breakLineCode,\n needIndent: _needIndent,\n indentLevel: 0\n };\n if (location && ast.loc) {\n _context.source = ast.loc.source;\n }\n const context = () => _context;\n function push(code, node) {\n _context.code += code;\n }\n function _newline(n, withBreakLine = true) {\n const _breakLineCode = withBreakLine ? breakLineCode : '';\n push(_needIndent ? _breakLineCode + ` `.repeat(n) : _breakLineCode);\n }\n function indent(withNewLine = true) {\n const level = ++_context.indentLevel;\n withNewLine && _newline(level);\n }\n function deindent(withNewLine = true) {\n const level = --_context.indentLevel;\n withNewLine && _newline(level);\n }\n function newline() {\n _newline(_context.indentLevel);\n }\n const helper = (key) => `_${key}`;\n const needIndent = () => _context.needIndent;\n return {\n context,\n push,\n indent,\n deindent,\n newline,\n helper,\n needIndent\n };\n}\nfunction generateLinkedNode(generator, node) {\n const { helper } = generator;\n generator.push(`${helper(\"linked\" /* HelperNameMap.LINKED */)}(`);\n generateNode(generator, node.key);\n if (node.modifier) {\n generator.push(`, `);\n generateNode(generator, node.modifier);\n generator.push(`, _type`);\n }\n else {\n generator.push(`, undefined, _type`);\n }\n generator.push(`)`);\n}\nfunction generateMessageNode(generator, node) {\n const { helper, needIndent } = generator;\n generator.push(`${helper(\"normalize\" /* HelperNameMap.NORMALIZE */)}([`);\n generator.indent(needIndent());\n const length = node.items.length;\n for (let i = 0; i < length; i++) {\n generateNode(generator, node.items[i]);\n if (i === length - 1) {\n break;\n }\n generator.push(', ');\n }\n generator.deindent(needIndent());\n generator.push('])');\n}\nfunction generatePluralNode(generator, node) {\n const { helper, needIndent } = generator;\n if (node.cases.length > 1) {\n generator.push(`${helper(\"plural\" /* HelperNameMap.PLURAL */)}([`);\n generator.indent(needIndent());\n const length = node.cases.length;\n for (let i = 0; i < length; i++) {\n generateNode(generator, node.cases[i]);\n if (i === length - 1) {\n break;\n }\n generator.push(', ');\n }\n generator.deindent(needIndent());\n generator.push(`])`);\n }\n}\nfunction generateResource(generator, node) {\n if (node.body) {\n generateNode(generator, node.body);\n }\n else {\n generator.push('null');\n }\n}\nfunction generateNode(generator, node) {\n const { helper } = generator;\n switch (node.type) {\n case 0 /* NodeTypes.Resource */:\n generateResource(generator, node);\n break;\n case 1 /* NodeTypes.Plural */:\n generatePluralNode(generator, node);\n break;\n case 2 /* NodeTypes.Message */:\n generateMessageNode(generator, node);\n break;\n case 6 /* NodeTypes.Linked */:\n generateLinkedNode(generator, node);\n break;\n case 8 /* NodeTypes.LinkedModifier */:\n generator.push(JSON.stringify(node.value), node);\n break;\n case 7 /* NodeTypes.LinkedKey */:\n generator.push(JSON.stringify(node.value), node);\n break;\n case 5 /* NodeTypes.List */:\n generator.push(`${helper(\"interpolate\" /* HelperNameMap.INTERPOLATE */)}(${helper(\"list\" /* HelperNameMap.LIST */)}(${node.index}))`, node);\n break;\n case 4 /* NodeTypes.Named */:\n generator.push(`${helper(\"interpolate\" /* HelperNameMap.INTERPOLATE */)}(${helper(\"named\" /* HelperNameMap.NAMED */)}(${JSON.stringify(node.key)}))`, node);\n break;\n case 9 /* NodeTypes.Literal */:\n generator.push(JSON.stringify(node.value), node);\n break;\n case 3 /* NodeTypes.Text */:\n generator.push(JSON.stringify(node.value), node);\n break;\n default:\n {\n throw createCompileError(CompileErrorCodes.UNHANDLED_CODEGEN_NODE_TYPE, null, {\n domain: ERROR_DOMAIN,\n args: [node.type]\n });\n }\n }\n}\n// generate code from AST\nconst generate = (ast, options = {} // eslint-disable-line\n) => {\n const mode = isString(options.mode) ? options.mode : 'normal';\n const filename = isString(options.filename)\n ? options.filename\n : 'message.intl';\n const sourceMap = !!options.sourceMap;\n // prettier-ignore\n const breakLineCode = options.breakLineCode != null\n ? options.breakLineCode\n : mode === 'arrow'\n ? ';'\n : '\\n';\n const needIndent = options.needIndent ? options.needIndent : mode !== 'arrow';\n const helpers = ast.helpers || [];\n const generator = createCodeGenerator(ast, {\n mode,\n filename,\n sourceMap,\n breakLineCode,\n needIndent\n });\n generator.push(mode === 'normal' ? `function __msg__ (ctx) {` : `(ctx) => {`);\n generator.indent(needIndent);\n if (helpers.length > 0) {\n generator.push(`const { ${join(helpers.map(s => `${s}: _${s}`), ', ')} } = ctx`);\n generator.newline();\n }\n generator.push(`return `);\n generateNode(generator, ast);\n generator.deindent(needIndent);\n generator.push(`}`);\n delete ast.helpers;\n const { code, map } = generator.context();\n return {\n ast,\n code,\n map: map ? map.toJSON() : undefined // eslint-disable-line @typescript-eslint/no-explicit-any\n };\n};\n\nfunction baseCompile(source, options = {}) {\n const assignedOptions = assign({}, options);\n const jit = !!assignedOptions.jit;\n const enalbeMinify = !!assignedOptions.minify;\n const enambeOptimize = assignedOptions.optimize == null ? true : assignedOptions.optimize;\n // parse source codes\n const parser = createParser(assignedOptions);\n const ast = parser.parse(source);\n if (!jit) {\n // transform ASTs\n transform(ast, assignedOptions);\n // generate javascript codes\n return generate(ast, assignedOptions);\n }\n else {\n // optimize ASTs\n enambeOptimize && optimize(ast);\n // minimize ASTs\n enalbeMinify && minify(ast);\n // In JIT mode, no ast transform, no code generation.\n return { ast, code: '' };\n }\n}\n\nexport { CompileErrorCodes, CompileWarnCodes, ERROR_DOMAIN$2 as ERROR_DOMAIN, LOCATION_STUB, baseCompile, createCompileError, createCompileWarn, createLocation, createParser, createPosition, defaultOnError, detectHtmlTag, errorMessages, warnMessages };\n","/*!\n * core-base v9.13.1\n * (c) 2024 kazuya kawaguchi\n * Released under the MIT License.\n */\nimport { getGlobalThis, isObject, isFunction, isString, isNumber, isPlainObject, assign, join, toDisplayString, isArray, incrementer, format as format$1, isPromise, isBoolean, warn, isRegExp, warnOnce, escapeHtml, inBrowser, mark, measure, isEmptyObject, generateCodeFrame, generateFormatCacheKey, isDate } from '@intlify/shared';\nimport { CompileWarnCodes, CompileErrorCodes, createCompileError, detectHtmlTag, defaultOnError, baseCompile as baseCompile$1 } from '@intlify/message-compiler';\nexport { CompileErrorCodes, createCompileError } from '@intlify/message-compiler';\n\n/**\n * This is only called in esm-bundler builds.\n * istanbul-ignore-next\n */\nfunction initFeatureFlags() {\n if (typeof __INTLIFY_PROD_DEVTOOLS__ !== 'boolean') {\n getGlobalThis().__INTLIFY_PROD_DEVTOOLS__ = false;\n }\n if (typeof __INTLIFY_JIT_COMPILATION__ !== 'boolean') {\n getGlobalThis().__INTLIFY_JIT_COMPILATION__ = false;\n }\n if (typeof __INTLIFY_DROP_MESSAGE_COMPILER__ !== 'boolean') {\n getGlobalThis().__INTLIFY_DROP_MESSAGE_COMPILER__ = false;\n }\n}\n\nconst pathStateMachine = [];\npathStateMachine[0 /* States.BEFORE_PATH */] = {\n [\"w\" /* PathCharTypes.WORKSPACE */]: [0 /* States.BEFORE_PATH */],\n [\"i\" /* PathCharTypes.IDENT */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],\n [\"[\" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */],\n [\"o\" /* PathCharTypes.END_OF_FAIL */]: [7 /* States.AFTER_PATH */]\n};\npathStateMachine[1 /* States.IN_PATH */] = {\n [\"w\" /* PathCharTypes.WORKSPACE */]: [1 /* States.IN_PATH */],\n [\".\" /* PathCharTypes.DOT */]: [2 /* States.BEFORE_IDENT */],\n [\"[\" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */],\n [\"o\" /* PathCharTypes.END_OF_FAIL */]: [7 /* States.AFTER_PATH */]\n};\npathStateMachine[2 /* States.BEFORE_IDENT */] = {\n [\"w\" /* PathCharTypes.WORKSPACE */]: [2 /* States.BEFORE_IDENT */],\n [\"i\" /* PathCharTypes.IDENT */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],\n [\"0\" /* PathCharTypes.ZERO */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */]\n};\npathStateMachine[3 /* States.IN_IDENT */] = {\n [\"i\" /* PathCharTypes.IDENT */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],\n [\"0\" /* PathCharTypes.ZERO */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],\n [\"w\" /* PathCharTypes.WORKSPACE */]: [1 /* States.IN_PATH */, 1 /* Actions.PUSH */],\n [\".\" /* PathCharTypes.DOT */]: [2 /* States.BEFORE_IDENT */, 1 /* Actions.PUSH */],\n [\"[\" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */, 1 /* Actions.PUSH */],\n [\"o\" /* PathCharTypes.END_OF_FAIL */]: [7 /* States.AFTER_PATH */, 1 /* Actions.PUSH */]\n};\npathStateMachine[4 /* States.IN_SUB_PATH */] = {\n [\"'\" /* PathCharTypes.SINGLE_QUOTE */]: [5 /* States.IN_SINGLE_QUOTE */, 0 /* Actions.APPEND */],\n [\"\\\"\" /* PathCharTypes.DOUBLE_QUOTE */]: [6 /* States.IN_DOUBLE_QUOTE */, 0 /* Actions.APPEND */],\n [\"[\" /* PathCharTypes.LEFT_BRACKET */]: [\n 4 /* States.IN_SUB_PATH */,\n 2 /* Actions.INC_SUB_PATH_DEPTH */\n ],\n [\"]\" /* PathCharTypes.RIGHT_BRACKET */]: [1 /* States.IN_PATH */, 3 /* Actions.PUSH_SUB_PATH */],\n [\"o\" /* PathCharTypes.END_OF_FAIL */]: 8 /* States.ERROR */,\n [\"l\" /* PathCharTypes.ELSE */]: [4 /* States.IN_SUB_PATH */, 0 /* Actions.APPEND */]\n};\npathStateMachine[5 /* States.IN_SINGLE_QUOTE */] = {\n [\"'\" /* PathCharTypes.SINGLE_QUOTE */]: [4 /* States.IN_SUB_PATH */, 0 /* Actions.APPEND */],\n [\"o\" /* PathCharTypes.END_OF_FAIL */]: 8 /* States.ERROR */,\n [\"l\" /* PathCharTypes.ELSE */]: [5 /* States.IN_SINGLE_QUOTE */, 0 /* Actions.APPEND */]\n};\npathStateMachine[6 /* States.IN_DOUBLE_QUOTE */] = {\n [\"\\\"\" /* PathCharTypes.DOUBLE_QUOTE */]: [4 /* States.IN_SUB_PATH */, 0 /* Actions.APPEND */],\n [\"o\" /* PathCharTypes.END_OF_FAIL */]: 8 /* States.ERROR */,\n [\"l\" /* PathCharTypes.ELSE */]: [6 /* States.IN_DOUBLE_QUOTE */, 0 /* Actions.APPEND */]\n};\n/**\n * Check if an expression is a literal value.\n */\nconst literalValueRE = /^\\s?(?:true|false|-?[\\d.]+|'[^']*'|\"[^\"]*\")\\s?$/;\nfunction isLiteral(exp) {\n return literalValueRE.test(exp);\n}\n/**\n * Strip quotes from a string\n */\nfunction stripQuotes(str) {\n const a = str.charCodeAt(0);\n const b = str.charCodeAt(str.length - 1);\n return a === b && (a === 0x22 || a === 0x27) ? str.slice(1, -1) : str;\n}\n/**\n * Determine the type of a character in a keypath.\n */\nfunction getPathCharType(ch) {\n if (ch === undefined || ch === null) {\n return \"o\" /* PathCharTypes.END_OF_FAIL */;\n }\n const code = ch.charCodeAt(0);\n switch (code) {\n case 0x5b: // [\n case 0x5d: // ]\n case 0x2e: // .\n case 0x22: // \"\n case 0x27: // '\n return ch;\n case 0x5f: // _\n case 0x24: // $\n case 0x2d: // -\n return \"i\" /* PathCharTypes.IDENT */;\n case 0x09: // Tab (HT)\n case 0x0a: // Newline (LF)\n case 0x0d: // Return (CR)\n case 0xa0: // No-break space (NBSP)\n case 0xfeff: // Byte Order Mark (BOM)\n case 0x2028: // Line Separator (LS)\n case 0x2029: // Paragraph Separator (PS)\n return \"w\" /* PathCharTypes.WORKSPACE */;\n }\n return \"i\" /* PathCharTypes.IDENT */;\n}\n/**\n * Format a subPath, return its plain form if it is\n * a literal string or number. Otherwise prepend the\n * dynamic indicator (*).\n */\nfunction formatSubPath(path) {\n const trimmed = path.trim();\n // invalid leading 0\n if (path.charAt(0) === '0' && isNaN(parseInt(path))) {\n return false;\n }\n return isLiteral(trimmed)\n ? stripQuotes(trimmed)\n : \"*\" /* PathCharTypes.ASTARISK */ + trimmed;\n}\n/**\n * Parse a string path into an array of segments\n */\nfunction parse(path) {\n const keys = [];\n let index = -1;\n let mode = 0 /* States.BEFORE_PATH */;\n let subPathDepth = 0;\n let c;\n let key; // eslint-disable-line\n let newChar;\n let type;\n let transition;\n let action;\n let typeMap;\n const actions = [];\n actions[0 /* Actions.APPEND */] = () => {\n if (key === undefined) {\n key = newChar;\n }\n else {\n key += newChar;\n }\n };\n actions[1 /* Actions.PUSH */] = () => {\n if (key !== undefined) {\n keys.push(key);\n key = undefined;\n }\n };\n actions[2 /* Actions.INC_SUB_PATH_DEPTH */] = () => {\n actions[0 /* Actions.APPEND */]();\n subPathDepth++;\n };\n actions[3 /* Actions.PUSH_SUB_PATH */] = () => {\n if (subPathDepth > 0) {\n subPathDepth--;\n mode = 4 /* States.IN_SUB_PATH */;\n actions[0 /* Actions.APPEND */]();\n }\n else {\n subPathDepth = 0;\n if (key === undefined) {\n return false;\n }\n key = formatSubPath(key);\n if (key === false) {\n return false;\n }\n else {\n actions[1 /* Actions.PUSH */]();\n }\n }\n };\n function maybeUnescapeQuote() {\n const nextChar = path[index + 1];\n if ((mode === 5 /* States.IN_SINGLE_QUOTE */ &&\n nextChar === \"'\" /* PathCharTypes.SINGLE_QUOTE */) ||\n (mode === 6 /* States.IN_DOUBLE_QUOTE */ &&\n nextChar === \"\\\"\" /* PathCharTypes.DOUBLE_QUOTE */)) {\n index++;\n newChar = '\\\\' + nextChar;\n actions[0 /* Actions.APPEND */]();\n return true;\n }\n }\n while (mode !== null) {\n index++;\n c = path[index];\n if (c === '\\\\' && maybeUnescapeQuote()) {\n continue;\n }\n type = getPathCharType(c);\n typeMap = pathStateMachine[mode];\n transition = typeMap[type] || typeMap[\"l\" /* PathCharTypes.ELSE */] || 8 /* States.ERROR */;\n // check parse error\n if (transition === 8 /* States.ERROR */) {\n return;\n }\n mode = transition[0];\n if (transition[1] !== undefined) {\n action = actions[transition[1]];\n if (action) {\n newChar = c;\n if (action() === false) {\n return;\n }\n }\n }\n // check parse finish\n if (mode === 7 /* States.AFTER_PATH */) {\n return keys;\n }\n }\n}\n// path token cache\nconst cache = new Map();\n/**\n * key-value message resolver\n *\n * @remarks\n * Resolves messages with the key-value structure. Note that messages with a hierarchical structure such as objects cannot be resolved\n *\n * @param obj - A target object to be resolved with path\n * @param path - A {@link Path | path} to resolve the value of message\n *\n * @returns A resolved {@link PathValue | path value}\n *\n * @VueI18nGeneral\n */\nfunction resolveWithKeyValue(obj, path) {\n return isObject(obj) ? obj[path] : null;\n}\n/**\n * message resolver\n *\n * @remarks\n * Resolves messages. messages with a hierarchical structure such as objects can be resolved. This resolver is used in VueI18n as default.\n *\n * @param obj - A target object to be resolved with path\n * @param path - A {@link Path | path} to resolve the value of message\n *\n * @returns A resolved {@link PathValue | path value}\n *\n * @VueI18nGeneral\n */\nfunction resolveValue(obj, path) {\n // check object\n if (!isObject(obj)) {\n return null;\n }\n // parse path\n let hit = cache.get(path);\n if (!hit) {\n hit = parse(path);\n if (hit) {\n cache.set(path, hit);\n }\n }\n // check hit\n if (!hit) {\n return null;\n }\n // resolve path value\n const len = hit.length;\n let last = obj;\n let i = 0;\n while (i < len) {\n const val = last[hit[i]];\n if (val === undefined) {\n return null;\n }\n if (isFunction(last)) {\n return null;\n }\n last = val;\n i++;\n }\n return last;\n}\n\nconst DEFAULT_MODIFIER = (str) => str;\nconst DEFAULT_MESSAGE = (ctx) => ''; // eslint-disable-line\nconst DEFAULT_MESSAGE_DATA_TYPE = 'text';\nconst DEFAULT_NORMALIZE = (values) => values.length === 0 ? '' : join(values);\nconst DEFAULT_INTERPOLATE = toDisplayString;\nfunction pluralDefault(choice, choicesLength) {\n choice = Math.abs(choice);\n if (choicesLength === 2) {\n // prettier-ignore\n return choice\n ? choice > 1\n ? 1\n : 0\n : 1;\n }\n return choice ? Math.min(choice, 2) : 0;\n}\nfunction getPluralIndex(options) {\n // prettier-ignore\n const index = isNumber(options.pluralIndex)\n ? options.pluralIndex\n : -1;\n // prettier-ignore\n return options.named && (isNumber(options.named.count) || isNumber(options.named.n))\n ? isNumber(options.named.count)\n ? options.named.count\n : isNumber(options.named.n)\n ? options.named.n\n : index\n : index;\n}\nfunction normalizeNamed(pluralIndex, props) {\n if (!props.count) {\n props.count = pluralIndex;\n }\n if (!props.n) {\n props.n = pluralIndex;\n }\n}\nfunction createMessageContext(options = {}) {\n const locale = options.locale;\n const pluralIndex = getPluralIndex(options);\n const pluralRule = isObject(options.pluralRules) &&\n isString(locale) &&\n isFunction(options.pluralRules[locale])\n ? options.pluralRules[locale]\n : pluralDefault;\n const orgPluralRule = isObject(options.pluralRules) &&\n isString(locale) &&\n isFunction(options.pluralRules[locale])\n ? pluralDefault\n : undefined;\n const plural = (messages) => {\n return messages[pluralRule(pluralIndex, messages.length, orgPluralRule)];\n };\n const _list = options.list || [];\n const list = (index) => _list[index];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const _named = options.named || {};\n isNumber(options.pluralIndex) && normalizeNamed(pluralIndex, _named);\n const named = (key) => _named[key];\n function message(key) {\n // prettier-ignore\n const msg = isFunction(options.messages)\n ? options.messages(key)\n : isObject(options.messages)\n ? options.messages[key]\n : false;\n return !msg\n ? options.parent\n ? options.parent.message(key) // resolve from parent messages\n : DEFAULT_MESSAGE\n : msg;\n }\n const _modifier = (name) => options.modifiers\n ? options.modifiers[name]\n : DEFAULT_MODIFIER;\n const normalize = isPlainObject(options.processor) && isFunction(options.processor.normalize)\n ? options.processor.normalize\n : DEFAULT_NORMALIZE;\n const interpolate = isPlainObject(options.processor) &&\n isFunction(options.processor.interpolate)\n ? options.processor.interpolate\n : DEFAULT_INTERPOLATE;\n const type = isPlainObject(options.processor) && isString(options.processor.type)\n ? options.processor.type\n : DEFAULT_MESSAGE_DATA_TYPE;\n const linked = (key, ...args) => {\n const [arg1, arg2] = args;\n let type = 'text';\n let modifier = '';\n if (args.length === 1) {\n if (isObject(arg1)) {\n modifier = arg1.modifier || modifier;\n type = arg1.type || type;\n }\n else if (isString(arg1)) {\n modifier = arg1 || modifier;\n }\n }\n else if (args.length === 2) {\n if (isString(arg1)) {\n modifier = arg1 || modifier;\n }\n if (isString(arg2)) {\n type = arg2 || type;\n }\n }\n const ret = message(key)(ctx);\n const msg = \n // The message in vnode resolved with linked are returned as an array by processor.nomalize\n type === 'vnode' && isArray(ret) && modifier\n ? ret[0]\n : ret;\n return modifier ? _modifier(modifier)(msg, type) : msg;\n };\n const ctx = {\n [\"list\" /* HelperNameMap.LIST */]: list,\n [\"named\" /* HelperNameMap.NAMED */]: named,\n [\"plural\" /* HelperNameMap.PLURAL */]: plural,\n [\"linked\" /* HelperNameMap.LINKED */]: linked,\n [\"message\" /* HelperNameMap.MESSAGE */]: message,\n [\"type\" /* HelperNameMap.TYPE */]: type,\n [\"interpolate\" /* HelperNameMap.INTERPOLATE */]: interpolate,\n [\"normalize\" /* HelperNameMap.NORMALIZE */]: normalize,\n [\"values\" /* HelperNameMap.VALUES */]: assign({}, _list, _named)\n };\n return ctx;\n}\n\nlet devtools = null;\nfunction setDevToolsHook(hook) {\n devtools = hook;\n}\nfunction getDevToolsHook() {\n return devtools;\n}\nfunction initI18nDevTools(i18n, version, meta) {\n // TODO: queue if devtools is undefined\n devtools &&\n devtools.emit(\"i18n:init\" /* IntlifyDevToolsHooks.I18nInit */, {\n timestamp: Date.now(),\n i18n,\n version,\n meta\n });\n}\nconst translateDevTools = /* #__PURE__*/ createDevToolsHook(\"function:translate\" /* IntlifyDevToolsHooks.FunctionTranslate */);\nfunction createDevToolsHook(hook) {\n return (payloads) => devtools && devtools.emit(hook, payloads);\n}\n\nconst code$1 = CompileWarnCodes.__EXTEND_POINT__;\nconst inc$1 = incrementer(code$1);\nconst CoreWarnCodes = {\n NOT_FOUND_KEY: code$1, // 2\n FALLBACK_TO_TRANSLATE: inc$1(), // 3\n CANNOT_FORMAT_NUMBER: inc$1(), // 4\n FALLBACK_TO_NUMBER_FORMAT: inc$1(), // 5\n CANNOT_FORMAT_DATE: inc$1(), // 6\n FALLBACK_TO_DATE_FORMAT: inc$1(), // 7\n EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER: inc$1(), // 8\n __EXTEND_POINT__: inc$1() // 9\n};\n/** @internal */\nconst warnMessages = {\n [CoreWarnCodes.NOT_FOUND_KEY]: `Not found '{key}' key in '{locale}' locale messages.`,\n [CoreWarnCodes.FALLBACK_TO_TRANSLATE]: `Fall back to translate '{key}' key with '{target}' locale.`,\n [CoreWarnCodes.CANNOT_FORMAT_NUMBER]: `Cannot format a number value due to not supported Intl.NumberFormat.`,\n [CoreWarnCodes.FALLBACK_TO_NUMBER_FORMAT]: `Fall back to number format '{key}' key with '{target}' locale.`,\n [CoreWarnCodes.CANNOT_FORMAT_DATE]: `Cannot format a date value due to not supported Intl.DateTimeFormat.`,\n [CoreWarnCodes.FALLBACK_TO_DATE_FORMAT]: `Fall back to datetime format '{key}' key with '{target}' locale.`,\n [CoreWarnCodes.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]: `This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future.`\n};\nfunction getWarnMessage(code, ...args) {\n return format$1(warnMessages[code], ...args);\n}\n\nconst code = CompileErrorCodes.__EXTEND_POINT__;\nconst inc = incrementer(code);\nconst CoreErrorCodes = {\n INVALID_ARGUMENT: code, // 17\n INVALID_DATE_ARGUMENT: inc(), // 18\n INVALID_ISO_DATE_ARGUMENT: inc(), // 19\n NOT_SUPPORT_NON_STRING_MESSAGE: inc(), // 20\n NOT_SUPPORT_LOCALE_PROMISE_VALUE: inc(), // 21\n NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: inc(), // 22\n NOT_SUPPORT_LOCALE_TYPE: inc(), // 23\n __EXTEND_POINT__: inc() // 24\n};\nfunction createCoreError(code) {\n return createCompileError(code, null, (process.env.NODE_ENV !== 'production') ? { messages: errorMessages } : undefined);\n}\n/** @internal */\nconst errorMessages = {\n [CoreErrorCodes.INVALID_ARGUMENT]: 'Invalid arguments',\n [CoreErrorCodes.INVALID_DATE_ARGUMENT]: 'The date provided is an invalid Date object.' +\n 'Make sure your Date represents a valid date.',\n [CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT]: 'The argument provided is not a valid ISO date string',\n [CoreErrorCodes.NOT_SUPPORT_NON_STRING_MESSAGE]: 'Not support non-string message',\n [CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE]: 'cannot support promise value',\n [CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]: 'cannot support async function',\n [CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE]: 'cannot support locale type'\n};\n\n/** @internal */\nfunction getLocale(context, options) {\n return options.locale != null\n ? resolveLocale(options.locale)\n : resolveLocale(context.locale);\n}\nlet _resolveLocale;\n/** @internal */\nfunction resolveLocale(locale) {\n if (isString(locale)) {\n return locale;\n }\n else {\n if (isFunction(locale)) {\n if (locale.resolvedOnce && _resolveLocale != null) {\n return _resolveLocale;\n }\n else if (locale.constructor.name === 'Function') {\n const resolve = locale();\n if (isPromise(resolve)) {\n throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE);\n }\n return (_resolveLocale = resolve);\n }\n else {\n throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);\n }\n }\n else {\n throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE);\n }\n }\n}\n/**\n * Fallback with simple implemenation\n *\n * @remarks\n * A fallback locale function implemented with a simple fallback algorithm.\n *\n * Basically, it returns the value as specified in the `fallbackLocale` props, and is processed with the fallback inside intlify.\n *\n * @param ctx - A {@link CoreContext | context}\n * @param fallback - A {@link FallbackLocale | fallback locale}\n * @param start - A starting {@link Locale | locale}\n *\n * @returns Fallback locales\n *\n * @VueI18nGeneral\n */\nfunction fallbackWithSimple(ctx, fallback, start // eslint-disable-line @typescript-eslint/no-unused-vars\n) {\n // prettier-ignore\n return [...new Set([\n start,\n ...(isArray(fallback)\n ? fallback\n : isObject(fallback)\n ? Object.keys(fallback)\n : isString(fallback)\n ? [fallback]\n : [start])\n ])];\n}\n/**\n * Fallback with locale chain\n *\n * @remarks\n * A fallback locale function implemented with a fallback chain algorithm. It's used in VueI18n as default.\n *\n * @param ctx - A {@link CoreContext | context}\n * @param fallback - A {@link FallbackLocale | fallback locale}\n * @param start - A starting {@link Locale | locale}\n *\n * @returns Fallback locales\n *\n * @VueI18nSee [Fallbacking](../guide/essentials/fallback)\n *\n * @VueI18nGeneral\n */\nfunction fallbackWithLocaleChain(ctx, fallback, start) {\n const startLocale = isString(start) ? start : DEFAULT_LOCALE;\n const context = ctx;\n if (!context.__localeChainCache) {\n context.__localeChainCache = new Map();\n }\n let chain = context.__localeChainCache.get(startLocale);\n if (!chain) {\n chain = [];\n // first block defined by start\n let block = [start];\n // while any intervening block found\n while (isArray(block)) {\n block = appendBlockToChain(chain, block, fallback);\n }\n // prettier-ignore\n // last block defined by default\n const defaults = isArray(fallback) || !isPlainObject(fallback)\n ? fallback\n : fallback['default']\n ? fallback['default']\n : null;\n // convert defaults to array\n block = isString(defaults) ? [defaults] : defaults;\n if (isArray(block)) {\n appendBlockToChain(chain, block, false);\n }\n context.__localeChainCache.set(startLocale, chain);\n }\n return chain;\n}\nfunction appendBlockToChain(chain, block, blocks) {\n let follow = true;\n for (let i = 0; i < block.length && isBoolean(follow); i++) {\n const locale = block[i];\n if (isString(locale)) {\n follow = appendLocaleToChain(chain, block[i], blocks);\n }\n }\n return follow;\n}\nfunction appendLocaleToChain(chain, locale, blocks) {\n let follow;\n const tokens = locale.split('-');\n do {\n const target = tokens.join('-');\n follow = appendItemToChain(chain, target, blocks);\n tokens.splice(-1, 1);\n } while (tokens.length && follow === true);\n return follow;\n}\nfunction appendItemToChain(chain, target, blocks) {\n let follow = false;\n if (!chain.includes(target)) {\n follow = true;\n if (target) {\n follow = target[target.length - 1] !== '!';\n const locale = target.replace(/!/g, '');\n chain.push(locale);\n if ((isArray(blocks) || isPlainObject(blocks)) &&\n blocks[locale] // eslint-disable-line @typescript-eslint/no-explicit-any\n ) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n follow = blocks[locale];\n }\n }\n }\n return follow;\n}\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * Intlify core-base version\n * @internal\n */\nconst VERSION = '9.13.1';\nconst NOT_REOSLVED = -1;\nconst DEFAULT_LOCALE = 'en-US';\nconst MISSING_RESOLVE_VALUE = '';\nconst capitalize = (str) => `${str.charAt(0).toLocaleUpperCase()}${str.substr(1)}`;\nfunction getDefaultLinkedModifiers() {\n return {\n upper: (val, type) => {\n // prettier-ignore\n return type === 'text' && isString(val)\n ? val.toUpperCase()\n : type === 'vnode' && isObject(val) && '__v_isVNode' in val\n ? val.children.toUpperCase()\n : val;\n },\n lower: (val, type) => {\n // prettier-ignore\n return type === 'text' && isString(val)\n ? val.toLowerCase()\n : type === 'vnode' && isObject(val) && '__v_isVNode' in val\n ? val.children.toLowerCase()\n : val;\n },\n capitalize: (val, type) => {\n // prettier-ignore\n return (type === 'text' && isString(val)\n ? capitalize(val)\n : type === 'vnode' && isObject(val) && '__v_isVNode' in val\n ? capitalize(val.children)\n : val);\n }\n };\n}\nlet _compiler;\nfunction registerMessageCompiler(compiler) {\n _compiler = compiler;\n}\nlet _resolver;\n/**\n * Register the message resolver\n *\n * @param resolver - A {@link MessageResolver} function\n *\n * @VueI18nGeneral\n */\nfunction registerMessageResolver(resolver) {\n _resolver = resolver;\n}\nlet _fallbacker;\n/**\n * Register the locale fallbacker\n *\n * @param fallbacker - A {@link LocaleFallbacker} function\n *\n * @VueI18nGeneral\n */\nfunction registerLocaleFallbacker(fallbacker) {\n _fallbacker = fallbacker;\n}\n// Additional Meta for Intlify DevTools\nlet _additionalMeta = null;\n/* #__NO_SIDE_EFFECTS__ */\nconst setAdditionalMeta = (meta) => {\n _additionalMeta = meta;\n};\n/* #__NO_SIDE_EFFECTS__ */\nconst getAdditionalMeta = () => _additionalMeta;\nlet _fallbackContext = null;\nconst setFallbackContext = (context) => {\n _fallbackContext = context;\n};\nconst getFallbackContext = () => _fallbackContext;\n// ID for CoreContext\nlet _cid = 0;\nfunction createCoreContext(options = {}) {\n // setup options\n const onWarn = isFunction(options.onWarn) ? options.onWarn : warn;\n const version = isString(options.version) ? options.version : VERSION;\n const locale = isString(options.locale) || isFunction(options.locale)\n ? options.locale\n : DEFAULT_LOCALE;\n const _locale = isFunction(locale) ? DEFAULT_LOCALE : locale;\n const fallbackLocale = isArray(options.fallbackLocale) ||\n isPlainObject(options.fallbackLocale) ||\n isString(options.fallbackLocale) ||\n options.fallbackLocale === false\n ? options.fallbackLocale\n : _locale;\n const messages = isPlainObject(options.messages)\n ? options.messages\n : { [_locale]: {} };\n const datetimeFormats = isPlainObject(options.datetimeFormats)\n ? options.datetimeFormats\n : { [_locale]: {} }\n ;\n const numberFormats = isPlainObject(options.numberFormats)\n ? options.numberFormats\n : { [_locale]: {} }\n ;\n const modifiers = assign({}, options.modifiers || {}, getDefaultLinkedModifiers());\n const pluralRules = options.pluralRules || {};\n const missing = isFunction(options.missing) ? options.missing : null;\n const missingWarn = isBoolean(options.missingWarn) || isRegExp(options.missingWarn)\n ? options.missingWarn\n : true;\n const fallbackWarn = isBoolean(options.fallbackWarn) || isRegExp(options.fallbackWarn)\n ? options.fallbackWarn\n : true;\n const fallbackFormat = !!options.fallbackFormat;\n const unresolving = !!options.unresolving;\n const postTranslation = isFunction(options.postTranslation)\n ? options.postTranslation\n : null;\n const processor = isPlainObject(options.processor) ? options.processor : null;\n const warnHtmlMessage = isBoolean(options.warnHtmlMessage)\n ? options.warnHtmlMessage\n : true;\n const escapeParameter = !!options.escapeParameter;\n const messageCompiler = isFunction(options.messageCompiler)\n ? options.messageCompiler\n : _compiler;\n if ((process.env.NODE_ENV !== 'production') &&\n !false &&\n !false &&\n isFunction(options.messageCompiler)) {\n warnOnce(getWarnMessage(CoreWarnCodes.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));\n }\n const messageResolver = isFunction(options.messageResolver)\n ? options.messageResolver\n : _resolver || resolveWithKeyValue;\n const localeFallbacker = isFunction(options.localeFallbacker)\n ? options.localeFallbacker\n : _fallbacker || fallbackWithSimple;\n const fallbackContext = isObject(options.fallbackContext)\n ? options.fallbackContext\n : undefined;\n // setup internal options\n const internalOptions = options;\n const __datetimeFormatters = isObject(internalOptions.__datetimeFormatters)\n ? internalOptions.__datetimeFormatters\n : new Map()\n ;\n const __numberFormatters = isObject(internalOptions.__numberFormatters)\n ? internalOptions.__numberFormatters\n : new Map()\n ;\n const __meta = isObject(internalOptions.__meta) ? internalOptions.__meta : {};\n _cid++;\n const context = {\n version,\n cid: _cid,\n locale,\n fallbackLocale,\n messages,\n modifiers,\n pluralRules,\n missing,\n missingWarn,\n fallbackWarn,\n fallbackFormat,\n unresolving,\n postTranslation,\n processor,\n warnHtmlMessage,\n escapeParameter,\n messageCompiler,\n messageResolver,\n localeFallbacker,\n fallbackContext,\n onWarn,\n __meta\n };\n {\n context.datetimeFormats = datetimeFormats;\n context.numberFormats = numberFormats;\n context.__datetimeFormatters = __datetimeFormatters;\n context.__numberFormatters = __numberFormatters;\n }\n // for vue-devtools timeline event\n if ((process.env.NODE_ENV !== 'production')) {\n context.__v_emitter =\n internalOptions.__v_emitter != null\n ? internalOptions.__v_emitter\n : undefined;\n }\n // NOTE: experimental !!\n if ((process.env.NODE_ENV !== 'production') || __INTLIFY_PROD_DEVTOOLS__) {\n initI18nDevTools(context, version, __meta);\n }\n return context;\n}\n/** @internal */\nfunction isTranslateFallbackWarn(fallback, key) {\n return fallback instanceof RegExp ? fallback.test(key) : fallback;\n}\n/** @internal */\nfunction isTranslateMissingWarn(missing, key) {\n return missing instanceof RegExp ? missing.test(key) : missing;\n}\n/** @internal */\nfunction handleMissing(context, key, locale, missingWarn, type) {\n const { missing, onWarn } = context;\n // for vue-devtools timeline event\n if ((process.env.NODE_ENV !== 'production')) {\n const emitter = context.__v_emitter;\n if (emitter) {\n emitter.emit(\"missing\" /* VueDevToolsTimelineEvents.MISSING */, {\n locale,\n key,\n type,\n groupId: `${type}:${key}`\n });\n }\n }\n if (missing !== null) {\n const ret = missing(context, locale, key, type);\n return isString(ret) ? ret : key;\n }\n else {\n if ((process.env.NODE_ENV !== 'production') && isTranslateMissingWarn(missingWarn, key)) {\n onWarn(getWarnMessage(CoreWarnCodes.NOT_FOUND_KEY, { key, locale }));\n }\n return key;\n }\n}\n/** @internal */\nfunction updateFallbackLocale(ctx, locale, fallback) {\n const context = ctx;\n context.__localeChainCache = new Map();\n ctx.localeFallbacker(ctx, fallback, locale);\n}\n/** @internal */\nfunction isAlmostSameLocale(locale, compareLocale) {\n if (locale === compareLocale)\n return false;\n return locale.split('-')[0] === compareLocale.split('-')[0];\n}\n/** @internal */\nfunction isImplicitFallback(targetLocale, locales) {\n const index = locales.indexOf(targetLocale);\n if (index === -1) {\n return false;\n }\n for (let i = index + 1; i < locales.length; i++) {\n if (isAlmostSameLocale(targetLocale, locales[i])) {\n return true;\n }\n }\n return false;\n}\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\nfunction format(ast) {\n const msg = (ctx) => formatParts(ctx, ast);\n return msg;\n}\nfunction formatParts(ctx, ast) {\n const body = ast.b || ast.body;\n if ((body.t || body.type) === 1 /* NodeTypes.Plural */) {\n const plural = body;\n const cases = plural.c || plural.cases;\n return ctx.plural(cases.reduce((messages, c) => [\n ...messages,\n formatMessageParts(ctx, c)\n ], []));\n }\n else {\n return formatMessageParts(ctx, body);\n }\n}\nfunction formatMessageParts(ctx, node) {\n const _static = node.s || node.static;\n if (_static) {\n return ctx.type === 'text'\n ? _static\n : ctx.normalize([_static]);\n }\n else {\n const messages = (node.i || node.items).reduce((acm, c) => [...acm, formatMessagePart(ctx, c)], []);\n return ctx.normalize(messages);\n }\n}\nfunction formatMessagePart(ctx, node) {\n const type = node.t || node.type;\n switch (type) {\n case 3 /* NodeTypes.Text */: {\n const text = node;\n return (text.v || text.value);\n }\n case 9 /* NodeTypes.Literal */: {\n const literal = node;\n return (literal.v || literal.value);\n }\n case 4 /* NodeTypes.Named */: {\n const named = node;\n return ctx.interpolate(ctx.named(named.k || named.key));\n }\n case 5 /* NodeTypes.List */: {\n const list = node;\n return ctx.interpolate(ctx.list(list.i != null ? list.i : list.index));\n }\n case 6 /* NodeTypes.Linked */: {\n const linked = node;\n const modifier = linked.m || linked.modifier;\n return ctx.linked(formatMessagePart(ctx, linked.k || linked.key), modifier ? formatMessagePart(ctx, modifier) : undefined, ctx.type);\n }\n case 7 /* NodeTypes.LinkedKey */: {\n const linkedKey = node;\n return (linkedKey.v || linkedKey.value);\n }\n case 8 /* NodeTypes.LinkedModifier */: {\n const linkedModifier = node;\n return (linkedModifier.v || linkedModifier.value);\n }\n default:\n throw new Error(`unhandled node type on format message part: ${type}`);\n }\n}\n\nconst WARN_MESSAGE = `Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.`;\nfunction checkHtmlMessage(source, warnHtmlMessage) {\n if (warnHtmlMessage && detectHtmlTag(source)) {\n warn(format$1(WARN_MESSAGE, { source }));\n }\n}\nconst defaultOnCacheKey = (message) => message;\nlet compileCache = Object.create(null);\nfunction onCompileWarn(_warn) {\n if (_warn.code === CompileWarnCodes.USE_MODULO_SYNTAX) {\n warn(`The use of named interpolation with modulo syntax is deprecated. ` +\n `It will be removed in v10.\\n` +\n `reference: https://vue-i18n.intlify.dev/guide/essentials/syntax#rails-i18n-format \\n` +\n `(message compiler warning message: ${_warn.message})`);\n }\n}\nfunction clearCompileCache() {\n compileCache = Object.create(null);\n}\nconst isMessageAST = (val) => isObject(val) &&\n (val.t === 0 || val.type === 0) &&\n ('b' in val || 'body' in val);\nfunction baseCompile(message, options = {}) {\n // error detecting on compile\n let detectError = false;\n const onError = options.onError || defaultOnError;\n options.onError = (err) => {\n detectError = true;\n onError(err);\n };\n // compile with mesasge-compiler\n return { ...baseCompile$1(message, options), detectError };\n}\n/* #__NO_SIDE_EFFECTS__ */\nconst compileToFunction = (message, context) => {\n if (!isString(message)) {\n throw createCoreError(CoreErrorCodes.NOT_SUPPORT_NON_STRING_MESSAGE);\n }\n // set onWarn\n if ((process.env.NODE_ENV !== 'production')) {\n context.onWarn = onCompileWarn;\n }\n {\n // check HTML message\n const warnHtmlMessage = isBoolean(context.warnHtmlMessage)\n ? context.warnHtmlMessage\n : true;\n (process.env.NODE_ENV !== 'production') && checkHtmlMessage(message, warnHtmlMessage);\n // check caches\n const onCacheKey = context.onCacheKey || defaultOnCacheKey;\n const cacheKey = onCacheKey(message);\n const cached = compileCache[cacheKey];\n if (cached) {\n return cached;\n }\n // compile\n const { code, detectError } = baseCompile(message, context);\n // evaluate function\n const msg = new Function(`return ${code}`)();\n // if occurred compile error, don't cache\n return !detectError\n ? (compileCache[cacheKey] = msg)\n : msg;\n }\n};\nfunction compile(message, context) {\n // set onWarn\n if ((process.env.NODE_ENV !== 'production')) {\n context.onWarn = onCompileWarn;\n }\n if (((__INTLIFY_JIT_COMPILATION__ && !__INTLIFY_DROP_MESSAGE_COMPILER__)) &&\n isString(message)) {\n // check HTML message\n const warnHtmlMessage = isBoolean(context.warnHtmlMessage)\n ? context.warnHtmlMessage\n : true;\n (process.env.NODE_ENV !== 'production') && checkHtmlMessage(message, warnHtmlMessage);\n // check caches\n const onCacheKey = context.onCacheKey || defaultOnCacheKey;\n const cacheKey = onCacheKey(message);\n const cached = compileCache[cacheKey];\n if (cached) {\n return cached;\n }\n // compile with JIT mode\n const { ast, detectError } = baseCompile(message, {\n ...context,\n location: (process.env.NODE_ENV !== 'production'),\n jit: true\n });\n // compose message function from AST\n const msg = format(ast);\n // if occurred compile error, don't cache\n return !detectError\n ? (compileCache[cacheKey] = msg)\n : msg;\n }\n else {\n if ((process.env.NODE_ENV !== 'production') && !isMessageAST(message)) {\n warn(`the message that is resolve with key '${context.key}' is not supported for jit compilation`);\n return (() => message);\n }\n // AST case (passed from bundler)\n const cacheKey = message.cacheKey;\n if (cacheKey) {\n const cached = compileCache[cacheKey];\n if (cached) {\n return cached;\n }\n // compose message function from message (AST)\n return (compileCache[cacheKey] =\n format(message));\n }\n else {\n return format(message);\n }\n }\n}\n\nconst NOOP_MESSAGE_FUNCTION = () => '';\nconst isMessageFunction = (val) => isFunction(val);\n// implementation of `translate` function\nfunction translate(context, ...args) {\n const { fallbackFormat, postTranslation, unresolving, messageCompiler, fallbackLocale, messages } = context;\n const [key, options] = parseTranslateArgs(...args);\n const missingWarn = isBoolean(options.missingWarn)\n ? options.missingWarn\n : context.missingWarn;\n const fallbackWarn = isBoolean(options.fallbackWarn)\n ? options.fallbackWarn\n : context.fallbackWarn;\n const escapeParameter = isBoolean(options.escapeParameter)\n ? options.escapeParameter\n : context.escapeParameter;\n const resolvedMessage = !!options.resolvedMessage;\n // prettier-ignore\n const defaultMsgOrKey = isString(options.default) || isBoolean(options.default) // default by function option\n ? !isBoolean(options.default)\n ? options.default\n : (!messageCompiler ? () => key : key)\n : fallbackFormat // default by `fallbackFormat` option\n ? (!messageCompiler ? () => key : key)\n : '';\n const enableDefaultMsg = fallbackFormat || defaultMsgOrKey !== '';\n const locale = getLocale(context, options);\n // escape params\n escapeParameter && escapeParams(options);\n // resolve message format\n // eslint-disable-next-line prefer-const\n let [formatScope, targetLocale, message] = !resolvedMessage\n ? resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn)\n : [\n key,\n locale,\n messages[locale] || {}\n ];\n // NOTE:\n // Fix to work around `ssrTransfrom` bug in Vite.\n // https://github.com/vitejs/vite/issues/4306\n // To get around this, use temporary variables.\n // https://github.com/nuxt/framework/issues/1461#issuecomment-954606243\n let format = formatScope;\n // if you use default message, set it as message format!\n let cacheBaseKey = key;\n if (!resolvedMessage &&\n !(isString(format) ||\n isMessageAST(format) ||\n isMessageFunction(format))) {\n if (enableDefaultMsg) {\n format = defaultMsgOrKey;\n cacheBaseKey = format;\n }\n }\n // checking message format and target locale\n if (!resolvedMessage &&\n (!(isString(format) ||\n isMessageAST(format) ||\n isMessageFunction(format)) ||\n !isString(targetLocale))) {\n return unresolving ? NOT_REOSLVED : key;\n }\n // TODO: refactor\n if ((process.env.NODE_ENV !== 'production') && isString(format) && context.messageCompiler == null) {\n warn(`The message format compilation is not supported in this build. ` +\n `Because message compiler isn't included. ` +\n `You need to pre-compilation all message format. ` +\n `So translate function return '${key}'.`);\n return key;\n }\n // setup compile error detecting\n let occurred = false;\n const onError = () => {\n occurred = true;\n };\n // compile message format\n const msg = !isMessageFunction(format)\n ? compileMessageFormat(context, key, targetLocale, format, cacheBaseKey, onError)\n : format;\n // if occurred compile error, return the message format\n if (occurred) {\n return format;\n }\n // evaluate message with context\n const ctxOptions = getMessageContextOptions(context, targetLocale, message, options);\n const msgContext = createMessageContext(ctxOptions);\n const messaged = evaluateMessage(context, msg, msgContext);\n // if use post translation option, proceed it with handler\n const ret = postTranslation\n ? postTranslation(messaged, key)\n : messaged;\n // NOTE: experimental !!\n if ((process.env.NODE_ENV !== 'production') || __INTLIFY_PROD_DEVTOOLS__) {\n // prettier-ignore\n const payloads = {\n timestamp: Date.now(),\n key: isString(key)\n ? key\n : isMessageFunction(format)\n ? format.key\n : '',\n locale: targetLocale || (isMessageFunction(format)\n ? format.locale\n : ''),\n format: isString(format)\n ? format\n : isMessageFunction(format)\n ? format.source\n : '',\n message: ret\n };\n payloads.meta = assign({}, context.__meta, getAdditionalMeta() || {});\n translateDevTools(payloads);\n }\n return ret;\n}\nfunction escapeParams(options) {\n if (isArray(options.list)) {\n options.list = options.list.map(item => isString(item) ? escapeHtml(item) : item);\n }\n else if (isObject(options.named)) {\n Object.keys(options.named).forEach(key => {\n if (isString(options.named[key])) {\n options.named[key] = escapeHtml(options.named[key]);\n }\n });\n }\n}\nfunction resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn) {\n const { messages, onWarn, messageResolver: resolveValue, localeFallbacker } = context;\n const locales = localeFallbacker(context, fallbackLocale, locale); // eslint-disable-line @typescript-eslint/no-explicit-any\n let message = {};\n let targetLocale;\n let format = null;\n let from = locale;\n let to = null;\n const type = 'translate';\n for (let i = 0; i < locales.length; i++) {\n targetLocale = to = locales[i];\n if ((process.env.NODE_ENV !== 'production') &&\n locale !== targetLocale &&\n !isAlmostSameLocale(locale, targetLocale) &&\n isTranslateFallbackWarn(fallbackWarn, key)) {\n onWarn(getWarnMessage(CoreWarnCodes.FALLBACK_TO_TRANSLATE, {\n key,\n target: targetLocale\n }));\n }\n // for vue-devtools timeline event\n if ((process.env.NODE_ENV !== 'production') && locale !== targetLocale) {\n const emitter = context.__v_emitter;\n if (emitter) {\n emitter.emit(\"fallback\" /* VueDevToolsTimelineEvents.FALBACK */, {\n type,\n key,\n from,\n to,\n groupId: `${type}:${key}`\n });\n }\n }\n message =\n messages[targetLocale] || {};\n // for vue-devtools timeline event\n let start = null;\n let startTag;\n let endTag;\n if ((process.env.NODE_ENV !== 'production') && inBrowser) {\n start = window.performance.now();\n startTag = 'intlify-message-resolve-start';\n endTag = 'intlify-message-resolve-end';\n mark && mark(startTag);\n }\n if ((format = resolveValue(message, key)) === null) {\n // if null, resolve with object key path\n format = message[key]; // eslint-disable-line @typescript-eslint/no-explicit-any\n }\n // for vue-devtools timeline event\n if ((process.env.NODE_ENV !== 'production') && inBrowser) {\n const end = window.performance.now();\n const emitter = context.__v_emitter;\n if (emitter && start && format) {\n emitter.emit(\"message-resolve\" /* VueDevToolsTimelineEvents.MESSAGE_RESOLVE */, {\n type: \"message-resolve\" /* VueDevToolsTimelineEvents.MESSAGE_RESOLVE */,\n key,\n message: format,\n time: end - start,\n groupId: `${type}:${key}`\n });\n }\n if (startTag && endTag && mark && measure) {\n mark(endTag);\n measure('intlify message resolve', startTag, endTag);\n }\n }\n if (isString(format) || isMessageAST(format) || isMessageFunction(format)) {\n break;\n }\n if (!isImplicitFallback(targetLocale, locales)) {\n const missingRet = handleMissing(context, // eslint-disable-line @typescript-eslint/no-explicit-any\n key, targetLocale, missingWarn, type);\n if (missingRet !== key) {\n format = missingRet;\n }\n }\n from = to;\n }\n return [format, targetLocale, message];\n}\nfunction compileMessageFormat(context, key, targetLocale, format, cacheBaseKey, onError) {\n const { messageCompiler, warnHtmlMessage } = context;\n if (isMessageFunction(format)) {\n const msg = format;\n msg.locale = msg.locale || targetLocale;\n msg.key = msg.key || key;\n return msg;\n }\n if (messageCompiler == null) {\n const msg = (() => format);\n msg.locale = targetLocale;\n msg.key = key;\n return msg;\n }\n // for vue-devtools timeline event\n let start = null;\n let startTag;\n let endTag;\n if ((process.env.NODE_ENV !== 'production') && inBrowser) {\n start = window.performance.now();\n startTag = 'intlify-message-compilation-start';\n endTag = 'intlify-message-compilation-end';\n mark && mark(startTag);\n }\n const msg = messageCompiler(format, getCompileContext(context, targetLocale, cacheBaseKey, format, warnHtmlMessage, onError));\n // for vue-devtools timeline event\n if ((process.env.NODE_ENV !== 'production') && inBrowser) {\n const end = window.performance.now();\n const emitter = context.__v_emitter;\n if (emitter && start) {\n emitter.emit(\"message-compilation\" /* VueDevToolsTimelineEvents.MESSAGE_COMPILATION */, {\n type: \"message-compilation\" /* VueDevToolsTimelineEvents.MESSAGE_COMPILATION */,\n message: format,\n time: end - start,\n groupId: `${'translate'}:${key}`\n });\n }\n if (startTag && endTag && mark && measure) {\n mark(endTag);\n measure('intlify message compilation', startTag, endTag);\n }\n }\n msg.locale = targetLocale;\n msg.key = key;\n msg.source = format;\n return msg;\n}\nfunction evaluateMessage(context, msg, msgCtx) {\n // for vue-devtools timeline event\n let start = null;\n let startTag;\n let endTag;\n if ((process.env.NODE_ENV !== 'production') && inBrowser) {\n start = window.performance.now();\n startTag = 'intlify-message-evaluation-start';\n endTag = 'intlify-message-evaluation-end';\n mark && mark(startTag);\n }\n const messaged = msg(msgCtx);\n // for vue-devtools timeline event\n if ((process.env.NODE_ENV !== 'production') && inBrowser) {\n const end = window.performance.now();\n const emitter = context.__v_emitter;\n if (emitter && start) {\n emitter.emit(\"message-evaluation\" /* VueDevToolsTimelineEvents.MESSAGE_EVALUATION */, {\n type: \"message-evaluation\" /* VueDevToolsTimelineEvents.MESSAGE_EVALUATION */,\n value: messaged,\n time: end - start,\n groupId: `${'translate'}:${msg.key}`\n });\n }\n if (startTag && endTag && mark && measure) {\n mark(endTag);\n measure('intlify message evaluation', startTag, endTag);\n }\n }\n return messaged;\n}\n/** @internal */\nfunction parseTranslateArgs(...args) {\n const [arg1, arg2, arg3] = args;\n const options = {};\n if (!isString(arg1) &&\n !isNumber(arg1) &&\n !isMessageFunction(arg1) &&\n !isMessageAST(arg1)) {\n throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);\n }\n // prettier-ignore\n const key = isNumber(arg1)\n ? String(arg1)\n : isMessageFunction(arg1)\n ? arg1\n : arg1;\n if (isNumber(arg2)) {\n options.plural = arg2;\n }\n else if (isString(arg2)) {\n options.default = arg2;\n }\n else if (isPlainObject(arg2) && !isEmptyObject(arg2)) {\n options.named = arg2;\n }\n else if (isArray(arg2)) {\n options.list = arg2;\n }\n if (isNumber(arg3)) {\n options.plural = arg3;\n }\n else if (isString(arg3)) {\n options.default = arg3;\n }\n else if (isPlainObject(arg3)) {\n assign(options, arg3);\n }\n return [key, options];\n}\nfunction getCompileContext(context, locale, key, source, warnHtmlMessage, onError) {\n return {\n locale,\n key,\n warnHtmlMessage,\n onError: (err) => {\n onError && onError(err);\n if ((process.env.NODE_ENV !== 'production')) {\n const _source = getSourceForCodeFrame(source);\n const message = `Message compilation error: ${err.message}`;\n const codeFrame = err.location &&\n _source &&\n generateCodeFrame(_source, err.location.start.offset, err.location.end.offset);\n const emitter = context.__v_emitter;\n if (emitter && _source) {\n emitter.emit(\"compile-error\" /* VueDevToolsTimelineEvents.COMPILE_ERROR */, {\n message: _source,\n error: err.message,\n start: err.location && err.location.start.offset,\n end: err.location && err.location.end.offset,\n groupId: `${'translate'}:${key}`\n });\n }\n console.error(codeFrame ? `${message}\\n${codeFrame}` : message);\n }\n else {\n throw err;\n }\n },\n onCacheKey: (source) => generateFormatCacheKey(locale, key, source)\n };\n}\nfunction getSourceForCodeFrame(source) {\n if (isString(source)) {\n return source;\n }\n else {\n if (source.loc && source.loc.source) {\n return source.loc.source;\n }\n }\n}\nfunction getMessageContextOptions(context, locale, message, options) {\n const { modifiers, pluralRules, messageResolver: resolveValue, fallbackLocale, fallbackWarn, missingWarn, fallbackContext } = context;\n const resolveMessage = (key) => {\n let val = resolveValue(message, key);\n // fallback to root context\n if (val == null && fallbackContext) {\n const [, , message] = resolveMessageFormat(fallbackContext, key, locale, fallbackLocale, fallbackWarn, missingWarn);\n val = resolveValue(message, key);\n }\n if (isString(val) || isMessageAST(val)) {\n let occurred = false;\n const onError = () => {\n occurred = true;\n };\n const msg = compileMessageFormat(context, key, locale, val, key, onError);\n return !occurred\n ? msg\n : NOOP_MESSAGE_FUNCTION;\n }\n else if (isMessageFunction(val)) {\n return val;\n }\n else {\n // TODO: should be implemented warning message\n return NOOP_MESSAGE_FUNCTION;\n }\n };\n const ctxOptions = {\n locale,\n modifiers,\n pluralRules,\n messages: resolveMessage\n };\n if (context.processor) {\n ctxOptions.processor = context.processor;\n }\n if (options.list) {\n ctxOptions.list = options.list;\n }\n if (options.named) {\n ctxOptions.named = options.named;\n }\n if (isNumber(options.plural)) {\n ctxOptions.pluralIndex = options.plural;\n }\n return ctxOptions;\n}\n\nconst intlDefined = typeof Intl !== 'undefined';\nconst Availabilities = {\n dateTimeFormat: intlDefined && typeof Intl.DateTimeFormat !== 'undefined',\n numberFormat: intlDefined && typeof Intl.NumberFormat !== 'undefined'\n};\n\n// implementation of `datetime` function\nfunction datetime(context, ...args) {\n const { datetimeFormats, unresolving, fallbackLocale, onWarn, localeFallbacker } = context;\n const { __datetimeFormatters } = context;\n if ((process.env.NODE_ENV !== 'production') && !Availabilities.dateTimeFormat) {\n onWarn(getWarnMessage(CoreWarnCodes.CANNOT_FORMAT_DATE));\n return MISSING_RESOLVE_VALUE;\n }\n const [key, value, options, overrides] = parseDateTimeArgs(...args);\n const missingWarn = isBoolean(options.missingWarn)\n ? options.missingWarn\n : context.missingWarn;\n const fallbackWarn = isBoolean(options.fallbackWarn)\n ? options.fallbackWarn\n : context.fallbackWarn;\n const part = !!options.part;\n const locale = getLocale(context, options);\n const locales = localeFallbacker(context, // eslint-disable-line @typescript-eslint/no-explicit-any\n fallbackLocale, locale);\n if (!isString(key) || key === '') {\n return new Intl.DateTimeFormat(locale, overrides).format(value);\n }\n // resolve format\n let datetimeFormat = {};\n let targetLocale;\n let format = null;\n let from = locale;\n let to = null;\n const type = 'datetime format';\n for (let i = 0; i < locales.length; i++) {\n targetLocale = to = locales[i];\n if ((process.env.NODE_ENV !== 'production') &&\n locale !== targetLocale &&\n isTranslateFallbackWarn(fallbackWarn, key)) {\n onWarn(getWarnMessage(CoreWarnCodes.FALLBACK_TO_DATE_FORMAT, {\n key,\n target: targetLocale\n }));\n }\n // for vue-devtools timeline event\n if ((process.env.NODE_ENV !== 'production') && locale !== targetLocale) {\n const emitter = context.__v_emitter;\n if (emitter) {\n emitter.emit(\"fallback\" /* VueDevToolsTimelineEvents.FALBACK */, {\n type,\n key,\n from,\n to,\n groupId: `${type}:${key}`\n });\n }\n }\n datetimeFormat =\n datetimeFormats[targetLocale] || {};\n format = datetimeFormat[key];\n if (isPlainObject(format))\n break;\n handleMissing(context, key, targetLocale, missingWarn, type); // eslint-disable-line @typescript-eslint/no-explicit-any\n from = to;\n }\n // checking format and target locale\n if (!isPlainObject(format) || !isString(targetLocale)) {\n return unresolving ? NOT_REOSLVED : key;\n }\n let id = `${targetLocale}__${key}`;\n if (!isEmptyObject(overrides)) {\n id = `${id}__${JSON.stringify(overrides)}`;\n }\n let formatter = __datetimeFormatters.get(id);\n if (!formatter) {\n formatter = new Intl.DateTimeFormat(targetLocale, assign({}, format, overrides));\n __datetimeFormatters.set(id, formatter);\n }\n return !part ? formatter.format(value) : formatter.formatToParts(value);\n}\n/** @internal */\nconst DATETIME_FORMAT_OPTIONS_KEYS = [\n 'localeMatcher',\n 'weekday',\n 'era',\n 'year',\n 'month',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'timeZoneName',\n 'formatMatcher',\n 'hour12',\n 'timeZone',\n 'dateStyle',\n 'timeStyle',\n 'calendar',\n 'dayPeriod',\n 'numberingSystem',\n 'hourCycle',\n 'fractionalSecondDigits'\n];\n/** @internal */\nfunction parseDateTimeArgs(...args) {\n const [arg1, arg2, arg3, arg4] = args;\n const options = {};\n let overrides = {};\n let value;\n if (isString(arg1)) {\n // Only allow ISO strings - other date formats are often supported,\n // but may cause different results in different browsers.\n const matches = arg1.match(/(\\d{4}-\\d{2}-\\d{2})(T|\\s)?(.*)/);\n if (!matches) {\n throw createCoreError(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);\n }\n // Some browsers can not parse the iso datetime separated by space,\n // this is a compromise solution by replace the 'T'/' ' with 'T'\n const dateTime = matches[3]\n ? matches[3].trim().startsWith('T')\n ? `${matches[1].trim()}${matches[3].trim()}`\n : `${matches[1].trim()}T${matches[3].trim()}`\n : matches[1].trim();\n value = new Date(dateTime);\n try {\n // This will fail if the date is not valid\n value.toISOString();\n }\n catch (e) {\n throw createCoreError(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);\n }\n }\n else if (isDate(arg1)) {\n if (isNaN(arg1.getTime())) {\n throw createCoreError(CoreErrorCodes.INVALID_DATE_ARGUMENT);\n }\n value = arg1;\n }\n else if (isNumber(arg1)) {\n value = arg1;\n }\n else {\n throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);\n }\n if (isString(arg2)) {\n options.key = arg2;\n }\n else if (isPlainObject(arg2)) {\n Object.keys(arg2).forEach(key => {\n if (DATETIME_FORMAT_OPTIONS_KEYS.includes(key)) {\n overrides[key] = arg2[key];\n }\n else {\n options[key] = arg2[key];\n }\n });\n }\n if (isString(arg3)) {\n options.locale = arg3;\n }\n else if (isPlainObject(arg3)) {\n overrides = arg3;\n }\n if (isPlainObject(arg4)) {\n overrides = arg4;\n }\n return [options.key || '', value, options, overrides];\n}\n/** @internal */\nfunction clearDateTimeFormat(ctx, locale, format) {\n const context = ctx;\n for (const key in format) {\n const id = `${locale}__${key}`;\n if (!context.__datetimeFormatters.has(id)) {\n continue;\n }\n context.__datetimeFormatters.delete(id);\n }\n}\n\n// implementation of `number` function\nfunction number(context, ...args) {\n const { numberFormats, unresolving, fallbackLocale, onWarn, localeFallbacker } = context;\n const { __numberFormatters } = context;\n if ((process.env.NODE_ENV !== 'production') && !Availabilities.numberFormat) {\n onWarn(getWarnMessage(CoreWarnCodes.CANNOT_FORMAT_NUMBER));\n return MISSING_RESOLVE_VALUE;\n }\n const [key, value, options, overrides] = parseNumberArgs(...args);\n const missingWarn = isBoolean(options.missingWarn)\n ? options.missingWarn\n : context.missingWarn;\n const fallbackWarn = isBoolean(options.fallbackWarn)\n ? options.fallbackWarn\n : context.fallbackWarn;\n const part = !!options.part;\n const locale = getLocale(context, options);\n const locales = localeFallbacker(context, // eslint-disable-line @typescript-eslint/no-explicit-any\n fallbackLocale, locale);\n if (!isString(key) || key === '') {\n return new Intl.NumberFormat(locale, overrides).format(value);\n }\n // resolve format\n let numberFormat = {};\n let targetLocale;\n let format = null;\n let from = locale;\n let to = null;\n const type = 'number format';\n for (let i = 0; i < locales.length; i++) {\n targetLocale = to = locales[i];\n if ((process.env.NODE_ENV !== 'production') &&\n locale !== targetLocale &&\n isTranslateFallbackWarn(fallbackWarn, key)) {\n onWarn(getWarnMessage(CoreWarnCodes.FALLBACK_TO_NUMBER_FORMAT, {\n key,\n target: targetLocale\n }));\n }\n // for vue-devtools timeline event\n if ((process.env.NODE_ENV !== 'production') && locale !== targetLocale) {\n const emitter = context.__v_emitter;\n if (emitter) {\n emitter.emit(\"fallback\" /* VueDevToolsTimelineEvents.FALBACK */, {\n type,\n key,\n from,\n to,\n groupId: `${type}:${key}`\n });\n }\n }\n numberFormat =\n numberFormats[targetLocale] || {};\n format = numberFormat[key];\n if (isPlainObject(format))\n break;\n handleMissing(context, key, targetLocale, missingWarn, type); // eslint-disable-line @typescript-eslint/no-explicit-any\n from = to;\n }\n // checking format and target locale\n if (!isPlainObject(format) || !isString(targetLocale)) {\n return unresolving ? NOT_REOSLVED : key;\n }\n let id = `${targetLocale}__${key}`;\n if (!isEmptyObject(overrides)) {\n id = `${id}__${JSON.stringify(overrides)}`;\n }\n let formatter = __numberFormatters.get(id);\n if (!formatter) {\n formatter = new Intl.NumberFormat(targetLocale, assign({}, format, overrides));\n __numberFormatters.set(id, formatter);\n }\n return !part ? formatter.format(value) : formatter.formatToParts(value);\n}\n/** @internal */\nconst NUMBER_FORMAT_OPTIONS_KEYS = [\n 'localeMatcher',\n 'style',\n 'currency',\n 'currencyDisplay',\n 'currencySign',\n 'useGrouping',\n 'minimumIntegerDigits',\n 'minimumFractionDigits',\n 'maximumFractionDigits',\n 'minimumSignificantDigits',\n 'maximumSignificantDigits',\n 'compactDisplay',\n 'notation',\n 'signDisplay',\n 'unit',\n 'unitDisplay',\n 'roundingMode',\n 'roundingPriority',\n 'roundingIncrement',\n 'trailingZeroDisplay'\n];\n/** @internal */\nfunction parseNumberArgs(...args) {\n const [arg1, arg2, arg3, arg4] = args;\n const options = {};\n let overrides = {};\n if (!isNumber(arg1)) {\n throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);\n }\n const value = arg1;\n if (isString(arg2)) {\n options.key = arg2;\n }\n else if (isPlainObject(arg2)) {\n Object.keys(arg2).forEach(key => {\n if (NUMBER_FORMAT_OPTIONS_KEYS.includes(key)) {\n overrides[key] = arg2[key];\n }\n else {\n options[key] = arg2[key];\n }\n });\n }\n if (isString(arg3)) {\n options.locale = arg3;\n }\n else if (isPlainObject(arg3)) {\n overrides = arg3;\n }\n if (isPlainObject(arg4)) {\n overrides = arg4;\n }\n return [options.key || '', value, options, overrides];\n}\n/** @internal */\nfunction clearNumberFormat(ctx, locale, format) {\n const context = ctx;\n for (const key in format) {\n const id = `${locale}__${key}`;\n if (!context.__numberFormatters.has(id)) {\n continue;\n }\n context.__numberFormatters.delete(id);\n }\n}\n\n{\n initFeatureFlags();\n}\n\nexport { CoreErrorCodes, CoreWarnCodes, DATETIME_FORMAT_OPTIONS_KEYS, DEFAULT_LOCALE, DEFAULT_MESSAGE_DATA_TYPE, MISSING_RESOLVE_VALUE, NOT_REOSLVED, NUMBER_FORMAT_OPTIONS_KEYS, VERSION, clearCompileCache, clearDateTimeFormat, clearNumberFormat, compile, compileToFunction, createCoreContext, createCoreError, createMessageContext, datetime, fallbackWithLocaleChain, fallbackWithSimple, getAdditionalMeta, getDevToolsHook, getFallbackContext, getLocale, getWarnMessage, handleMissing, initI18nDevTools, isAlmostSameLocale, isImplicitFallback, isMessageAST, isMessageFunction, isTranslateFallbackWarn, isTranslateMissingWarn, number, parse, parseDateTimeArgs, parseNumberArgs, parseTranslateArgs, registerLocaleFallbacker, registerMessageCompiler, registerMessageResolver, resolveLocale, resolveValue, resolveWithKeyValue, setAdditionalMeta, setDevToolsHook, setFallbackContext, translate, translateDevTools, updateFallbackLocale };\n","/*!\n * vue-i18n v9.13.1\n * (c) 2024 kazuya kawaguchi\n * Released under the MIT License.\n */\nimport { getGlobalThis, incrementer, format, makeSymbol, isPlainObject, isArray, deepCopy, isString, hasOwn, isObject, warn, warnOnce, isBoolean, isRegExp, isFunction, inBrowser, assign, isNumber, createEmitter, isEmptyObject } from '@intlify/shared';\nimport { CoreWarnCodes, CoreErrorCodes, createCompileError, DEFAULT_LOCALE, updateFallbackLocale, setFallbackContext, createCoreContext, clearDateTimeFormat, clearNumberFormat, setAdditionalMeta, getFallbackContext, NOT_REOSLVED, isTranslateFallbackWarn, isTranslateMissingWarn, parseTranslateArgs, translate, MISSING_RESOLVE_VALUE, parseDateTimeArgs, datetime, parseNumberArgs, number, isMessageAST, isMessageFunction, fallbackWithLocaleChain, NUMBER_FORMAT_OPTIONS_KEYS, DATETIME_FORMAT_OPTIONS_KEYS, registerMessageCompiler, compile, compileToFunction, registerMessageResolver, resolveValue, registerLocaleFallbacker, setDevToolsHook } from '@intlify/core-base';\nimport { createVNode, Text, computed, watch, getCurrentInstance, ref, shallowRef, Fragment, defineComponent, h, effectScope, inject, onMounted, onUnmounted, onBeforeMount, isRef } from 'vue';\nimport { setupDevtoolsPlugin } from '@vue/devtools-api';\n\n/**\n * Vue I18n Version\n *\n * @remarks\n * Semver format. Same format as the package.json `version` field.\n *\n * @VueI18nGeneral\n */\nconst VERSION = '9.13.1';\n/**\n * This is only called in esm-bundler builds.\n * istanbul-ignore-next\n */\nfunction initFeatureFlags() {\n if (typeof __VUE_I18N_FULL_INSTALL__ !== 'boolean') {\n getGlobalThis().__VUE_I18N_FULL_INSTALL__ = true;\n }\n if (typeof __VUE_I18N_LEGACY_API__ !== 'boolean') {\n getGlobalThis().__VUE_I18N_LEGACY_API__ = true;\n }\n if (typeof __INTLIFY_JIT_COMPILATION__ !== 'boolean') {\n getGlobalThis().__INTLIFY_JIT_COMPILATION__ = false;\n }\n if (typeof __INTLIFY_DROP_MESSAGE_COMPILER__ !== 'boolean') {\n getGlobalThis().__INTLIFY_DROP_MESSAGE_COMPILER__ = false;\n }\n if (typeof __INTLIFY_PROD_DEVTOOLS__ !== 'boolean') {\n getGlobalThis().__INTLIFY_PROD_DEVTOOLS__ = false;\n }\n}\n\nconst code$1 = CoreWarnCodes.__EXTEND_POINT__;\nconst inc$1 = incrementer(code$1);\nconst I18nWarnCodes = {\n FALLBACK_TO_ROOT: code$1, // 9\n NOT_SUPPORTED_PRESERVE: inc$1(), // 10\n NOT_SUPPORTED_FORMATTER: inc$1(), // 11\n NOT_SUPPORTED_PRESERVE_DIRECTIVE: inc$1(), // 12\n NOT_SUPPORTED_GET_CHOICE_INDEX: inc$1(), // 13\n COMPONENT_NAME_LEGACY_COMPATIBLE: inc$1(), // 14\n NOT_FOUND_PARENT_SCOPE: inc$1(), // 15\n IGNORE_OBJ_FLATTEN: inc$1(), // 16\n NOTICE_DROP_ALLOW_COMPOSITION: inc$1(), // 17\n NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG: inc$1() // 18\n};\nconst warnMessages = {\n [I18nWarnCodes.FALLBACK_TO_ROOT]: `Fall back to {type} '{key}' with root locale.`,\n [I18nWarnCodes.NOT_SUPPORTED_PRESERVE]: `Not supported 'preserve'.`,\n [I18nWarnCodes.NOT_SUPPORTED_FORMATTER]: `Not supported 'formatter'.`,\n [I18nWarnCodes.NOT_SUPPORTED_PRESERVE_DIRECTIVE]: `Not supported 'preserveDirectiveContent'.`,\n [I18nWarnCodes.NOT_SUPPORTED_GET_CHOICE_INDEX]: `Not supported 'getChoiceIndex'.`,\n [I18nWarnCodes.COMPONENT_NAME_LEGACY_COMPATIBLE]: `Component name legacy compatible: '{name}' -> 'i18n'`,\n [I18nWarnCodes.NOT_FOUND_PARENT_SCOPE]: `Not found parent scope. use the global scope.`,\n [I18nWarnCodes.IGNORE_OBJ_FLATTEN]: `Ignore object flatten: '{key}' key has an string value`,\n [I18nWarnCodes.NOTICE_DROP_ALLOW_COMPOSITION]: `'allowComposition' option will be dropped in the next major version. For more information, please see 👉 https://tinyurl.com/2p97mcze`,\n [I18nWarnCodes.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG]: `'translateExistCompatible' option will be dropped in the next major version.`\n};\nfunction getWarnMessage(code, ...args) {\n return format(warnMessages[code], ...args);\n}\n\nconst code = CoreErrorCodes.__EXTEND_POINT__;\nconst inc = incrementer(code);\nconst I18nErrorCodes = {\n // composer module errors\n UNEXPECTED_RETURN_TYPE: code, // 24\n // legacy module errors\n INVALID_ARGUMENT: inc(), // 25\n // i18n module errors\n MUST_BE_CALL_SETUP_TOP: inc(), // 26\n NOT_INSTALLED: inc(), // 27\n NOT_AVAILABLE_IN_LEGACY_MODE: inc(), // 28\n // directive module errors\n REQUIRED_VALUE: inc(), // 29\n INVALID_VALUE: inc(), // 30\n // vue-devtools errors\n CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN: inc(), // 31\n NOT_INSTALLED_WITH_PROVIDE: inc(), // 32\n // unexpected error\n UNEXPECTED_ERROR: inc(), // 33\n // not compatible legacy vue-i18n constructor\n NOT_COMPATIBLE_LEGACY_VUE_I18N: inc(), // 34\n // bridge support vue 2.x only\n BRIDGE_SUPPORT_VUE_2_ONLY: inc(), // 35\n // need to define `i18n` option in `allowComposition: true` and `useScope: 'local' at `useI18n``\n MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION: inc(), // 36\n // Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly\n NOT_AVAILABLE_COMPOSITION_IN_LEGACY: inc(), // 37\n // for enhancement\n __EXTEND_POINT__: inc() // 38\n};\nfunction createI18nError(code, ...args) {\n return createCompileError(code, null, (process.env.NODE_ENV !== 'production') ? { messages: errorMessages, args } : undefined);\n}\nconst errorMessages = {\n [I18nErrorCodes.UNEXPECTED_RETURN_TYPE]: 'Unexpected return type in composer',\n [I18nErrorCodes.INVALID_ARGUMENT]: 'Invalid argument',\n [I18nErrorCodes.MUST_BE_CALL_SETUP_TOP]: 'Must be called at the top of a `setup` function',\n [I18nErrorCodes.NOT_INSTALLED]: 'Need to install with `app.use` function',\n [I18nErrorCodes.UNEXPECTED_ERROR]: 'Unexpected error',\n [I18nErrorCodes.NOT_AVAILABLE_IN_LEGACY_MODE]: 'Not available in legacy mode',\n [I18nErrorCodes.REQUIRED_VALUE]: `Required in value: {0}`,\n [I18nErrorCodes.INVALID_VALUE]: `Invalid value`,\n [I18nErrorCodes.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]: `Cannot setup vue-devtools plugin`,\n [I18nErrorCodes.NOT_INSTALLED_WITH_PROVIDE]: 'Need to install with `provide` function',\n [I18nErrorCodes.NOT_COMPATIBLE_LEGACY_VUE_I18N]: 'Not compatible legacy VueI18n.',\n [I18nErrorCodes.BRIDGE_SUPPORT_VUE_2_ONLY]: 'vue-i18n-bridge support Vue 2.x only',\n [I18nErrorCodes.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION]: 'Must define ‘i18n’ option or custom block in Composition API with using local scope in Legacy API mode',\n [I18nErrorCodes.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]: 'Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly'\n};\n\nconst TranslateVNodeSymbol = \n/* #__PURE__*/ makeSymbol('__translateVNode');\nconst DatetimePartsSymbol = /* #__PURE__*/ makeSymbol('__datetimeParts');\nconst NumberPartsSymbol = /* #__PURE__*/ makeSymbol('__numberParts');\nconst EnableEmitter = /* #__PURE__*/ makeSymbol('__enableEmitter');\nconst DisableEmitter = /* #__PURE__*/ makeSymbol('__disableEmitter');\nconst SetPluralRulesSymbol = makeSymbol('__setPluralRules');\nmakeSymbol('__intlifyMeta');\nconst InejctWithOptionSymbol = \n/* #__PURE__*/ makeSymbol('__injectWithOption');\nconst DisposeSymbol = /* #__PURE__*/ makeSymbol('__dispose');\nconst __VUE_I18N_BRIDGE__ = '__VUE_I18N_BRIDGE__';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * Transform flat json in obj to normal json in obj\n */\nfunction handleFlatJson(obj) {\n // check obj\n if (!isObject(obj)) {\n return obj;\n }\n for (const key in obj) {\n // check key\n if (!hasOwn(obj, key)) {\n continue;\n }\n // handle for normal json\n if (!key.includes('.')) {\n // recursive process value if value is also a object\n if (isObject(obj[key])) {\n handleFlatJson(obj[key]);\n }\n }\n // handle for flat json, transform to normal json\n else {\n // go to the last object\n const subKeys = key.split('.');\n const lastIndex = subKeys.length - 1;\n let currentObj = obj;\n let hasStringValue = false;\n for (let i = 0; i < lastIndex; i++) {\n if (!(subKeys[i] in currentObj)) {\n currentObj[subKeys[i]] = {};\n }\n if (!isObject(currentObj[subKeys[i]])) {\n (process.env.NODE_ENV !== 'production') &&\n warn(getWarnMessage(I18nWarnCodes.IGNORE_OBJ_FLATTEN, {\n key: subKeys[i]\n }));\n hasStringValue = true;\n break;\n }\n currentObj = currentObj[subKeys[i]];\n }\n // update last object value, delete old property\n if (!hasStringValue) {\n currentObj[subKeys[lastIndex]] = obj[key];\n delete obj[key];\n }\n // recursive process value if value is also a object\n if (isObject(currentObj[subKeys[lastIndex]])) {\n handleFlatJson(currentObj[subKeys[lastIndex]]);\n }\n }\n }\n return obj;\n}\nfunction getLocaleMessages(locale, options) {\n const { messages, __i18n, messageResolver, flatJson } = options;\n // prettier-ignore\n const ret = (isPlainObject(messages)\n ? messages\n : isArray(__i18n)\n ? {}\n : { [locale]: {} });\n // merge locale messages of i18n custom block\n if (isArray(__i18n)) {\n __i18n.forEach(custom => {\n if ('locale' in custom && 'resource' in custom) {\n const { locale, resource } = custom;\n if (locale) {\n ret[locale] = ret[locale] || {};\n deepCopy(resource, ret[locale]);\n }\n else {\n deepCopy(resource, ret);\n }\n }\n else {\n isString(custom) && deepCopy(JSON.parse(custom), ret);\n }\n });\n }\n // handle messages for flat json\n if (messageResolver == null && flatJson) {\n for (const key in ret) {\n if (hasOwn(ret, key)) {\n handleFlatJson(ret[key]);\n }\n }\n }\n return ret;\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getComponentOptions(instance) {\n return instance.type ;\n}\nfunction adjustI18nResources(gl, options, componentOptions // eslint-disable-line @typescript-eslint/no-explicit-any\n) {\n let messages = isObject(options.messages) ? options.messages : {};\n if ('__i18nGlobal' in componentOptions) {\n messages = getLocaleMessages(gl.locale.value, {\n messages,\n __i18n: componentOptions.__i18nGlobal\n });\n }\n // merge locale messages\n const locales = Object.keys(messages);\n if (locales.length) {\n locales.forEach(locale => {\n gl.mergeLocaleMessage(locale, messages[locale]);\n });\n }\n {\n // merge datetime formats\n if (isObject(options.datetimeFormats)) {\n const locales = Object.keys(options.datetimeFormats);\n if (locales.length) {\n locales.forEach(locale => {\n gl.mergeDateTimeFormat(locale, options.datetimeFormats[locale]);\n });\n }\n }\n // merge number formats\n if (isObject(options.numberFormats)) {\n const locales = Object.keys(options.numberFormats);\n if (locales.length) {\n locales.forEach(locale => {\n gl.mergeNumberFormat(locale, options.numberFormats[locale]);\n });\n }\n }\n }\n}\nfunction createTextNode(key) {\n return createVNode(Text, null, key, 0)\n ;\n}\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n// extend VNode interface\nconst DEVTOOLS_META = '__INTLIFY_META__';\nconst NOOP_RETURN_ARRAY = () => [];\nconst NOOP_RETURN_FALSE = () => false;\nlet composerID = 0;\nfunction defineCoreMissingHandler(missing) {\n return ((ctx, locale, key, type) => {\n return missing(locale, key, getCurrentInstance() || undefined, type);\n });\n}\n// for Intlify DevTools\n/* #__NO_SIDE_EFFECTS__ */\nconst getMetaInfo = () => {\n const instance = getCurrentInstance();\n let meta = null; // eslint-disable-line @typescript-eslint/no-explicit-any\n return instance && (meta = getComponentOptions(instance)[DEVTOOLS_META])\n ? { [DEVTOOLS_META]: meta } // eslint-disable-line @typescript-eslint/no-explicit-any\n : null;\n};\n/**\n * Create composer interface factory\n *\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nfunction createComposer(options = {}, VueI18nLegacy) {\n const { __root, __injectWithOption } = options;\n const _isGlobal = __root === undefined;\n const flatJson = options.flatJson;\n const _ref = inBrowser ? ref : shallowRef;\n const translateExistCompatible = !!options.translateExistCompatible;\n if ((process.env.NODE_ENV !== 'production')) {\n if (translateExistCompatible && !false) {\n warnOnce(getWarnMessage(I18nWarnCodes.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG));\n }\n }\n let _inheritLocale = isBoolean(options.inheritLocale)\n ? options.inheritLocale\n : true;\n const _locale = _ref(\n // prettier-ignore\n __root && _inheritLocale\n ? __root.locale.value\n : isString(options.locale)\n ? options.locale\n : DEFAULT_LOCALE);\n const _fallbackLocale = _ref(\n // prettier-ignore\n __root && _inheritLocale\n ? __root.fallbackLocale.value\n : isString(options.fallbackLocale) ||\n isArray(options.fallbackLocale) ||\n isPlainObject(options.fallbackLocale) ||\n options.fallbackLocale === false\n ? options.fallbackLocale\n : _locale.value);\n const _messages = _ref(getLocaleMessages(_locale.value, options));\n // prettier-ignore\n const _datetimeFormats = _ref(isPlainObject(options.datetimeFormats)\n ? options.datetimeFormats\n : { [_locale.value]: {} })\n ;\n // prettier-ignore\n const _numberFormats = _ref(isPlainObject(options.numberFormats)\n ? options.numberFormats\n : { [_locale.value]: {} })\n ;\n // warning suppress options\n // prettier-ignore\n let _missingWarn = __root\n ? __root.missingWarn\n : isBoolean(options.missingWarn) || isRegExp(options.missingWarn)\n ? options.missingWarn\n : true;\n // prettier-ignore\n let _fallbackWarn = __root\n ? __root.fallbackWarn\n : isBoolean(options.fallbackWarn) || isRegExp(options.fallbackWarn)\n ? options.fallbackWarn\n : true;\n // prettier-ignore\n let _fallbackRoot = __root\n ? __root.fallbackRoot\n : isBoolean(options.fallbackRoot)\n ? options.fallbackRoot\n : true;\n // configure fall back to root\n let _fallbackFormat = !!options.fallbackFormat;\n // runtime missing\n let _missing = isFunction(options.missing) ? options.missing : null;\n let _runtimeMissing = isFunction(options.missing)\n ? defineCoreMissingHandler(options.missing)\n : null;\n // postTranslation handler\n let _postTranslation = isFunction(options.postTranslation)\n ? options.postTranslation\n : null;\n // prettier-ignore\n let _warnHtmlMessage = __root\n ? __root.warnHtmlMessage\n : isBoolean(options.warnHtmlMessage)\n ? options.warnHtmlMessage\n : true;\n let _escapeParameter = !!options.escapeParameter;\n // custom linked modifiers\n // prettier-ignore\n const _modifiers = __root\n ? __root.modifiers\n : isPlainObject(options.modifiers)\n ? options.modifiers\n : {};\n // pluralRules\n let _pluralRules = options.pluralRules || (__root && __root.pluralRules);\n // runtime context\n // eslint-disable-next-line prefer-const\n let _context;\n const getCoreContext = () => {\n _isGlobal && setFallbackContext(null);\n const ctxOptions = {\n version: VERSION,\n locale: _locale.value,\n fallbackLocale: _fallbackLocale.value,\n messages: _messages.value,\n modifiers: _modifiers,\n pluralRules: _pluralRules,\n missing: _runtimeMissing === null ? undefined : _runtimeMissing,\n missingWarn: _missingWarn,\n fallbackWarn: _fallbackWarn,\n fallbackFormat: _fallbackFormat,\n unresolving: true,\n postTranslation: _postTranslation === null ? undefined : _postTranslation,\n warnHtmlMessage: _warnHtmlMessage,\n escapeParameter: _escapeParameter,\n messageResolver: options.messageResolver,\n messageCompiler: options.messageCompiler,\n __meta: { framework: 'vue' }\n };\n {\n ctxOptions.datetimeFormats = _datetimeFormats.value;\n ctxOptions.numberFormats = _numberFormats.value;\n ctxOptions.__datetimeFormatters = isPlainObject(_context)\n ? _context.__datetimeFormatters\n : undefined;\n ctxOptions.__numberFormatters = isPlainObject(_context)\n ? _context.__numberFormatters\n : undefined;\n }\n if ((process.env.NODE_ENV !== 'production')) {\n ctxOptions.__v_emitter = isPlainObject(_context)\n ? _context.__v_emitter\n : undefined;\n }\n const ctx = createCoreContext(ctxOptions);\n _isGlobal && setFallbackContext(ctx);\n return ctx;\n };\n _context = getCoreContext();\n updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);\n // track reactivity\n function trackReactivityValues() {\n return [\n _locale.value,\n _fallbackLocale.value,\n _messages.value,\n _datetimeFormats.value,\n _numberFormats.value\n ]\n ;\n }\n // locale\n const locale = computed({\n get: () => _locale.value,\n set: val => {\n _locale.value = val;\n _context.locale = _locale.value;\n }\n });\n // fallbackLocale\n const fallbackLocale = computed({\n get: () => _fallbackLocale.value,\n set: val => {\n _fallbackLocale.value = val;\n _context.fallbackLocale = _fallbackLocale.value;\n updateFallbackLocale(_context, _locale.value, val);\n }\n });\n // messages\n const messages = computed(() => _messages.value);\n // datetimeFormats\n const datetimeFormats = /* #__PURE__*/ computed(() => _datetimeFormats.value);\n // numberFormats\n const numberFormats = /* #__PURE__*/ computed(() => _numberFormats.value);\n // getPostTranslationHandler\n function getPostTranslationHandler() {\n return isFunction(_postTranslation) ? _postTranslation : null;\n }\n // setPostTranslationHandler\n function setPostTranslationHandler(handler) {\n _postTranslation = handler;\n _context.postTranslation = handler;\n }\n // getMissingHandler\n function getMissingHandler() {\n return _missing;\n }\n // setMissingHandler\n function setMissingHandler(handler) {\n if (handler !== null) {\n _runtimeMissing = defineCoreMissingHandler(handler);\n }\n _missing = handler;\n _context.missing = _runtimeMissing;\n }\n function isResolvedTranslateMessage(type, arg // eslint-disable-line @typescript-eslint/no-explicit-any\n ) {\n return type !== 'translate' || !arg.resolvedMessage;\n }\n const wrapWithDeps = (fn, argumentParser, warnType, fallbackSuccess, fallbackFail, successCondition) => {\n trackReactivityValues(); // track reactive dependency\n // NOTE: experimental !!\n let ret;\n try {\n if ((process.env.NODE_ENV !== 'production') || __INTLIFY_PROD_DEVTOOLS__) {\n setAdditionalMeta(getMetaInfo());\n }\n if (!_isGlobal) {\n _context.fallbackContext = __root\n ? getFallbackContext()\n : undefined;\n }\n ret = fn(_context);\n }\n finally {\n if ((process.env.NODE_ENV !== 'production') || __INTLIFY_PROD_DEVTOOLS__) {\n setAdditionalMeta(null);\n }\n if (!_isGlobal) {\n _context.fallbackContext = undefined;\n }\n }\n if ((warnType !== 'translate exists' && // for not `te` (e.g `t`)\n isNumber(ret) &&\n ret === NOT_REOSLVED) ||\n (warnType === 'translate exists' && !ret) // for `te`\n ) {\n const [key, arg2] = argumentParser();\n if ((process.env.NODE_ENV !== 'production') &&\n __root &&\n isString(key) &&\n isResolvedTranslateMessage(warnType, arg2)) {\n if (_fallbackRoot &&\n (isTranslateFallbackWarn(_fallbackWarn, key) ||\n isTranslateMissingWarn(_missingWarn, key))) {\n warn(getWarnMessage(I18nWarnCodes.FALLBACK_TO_ROOT, {\n key,\n type: warnType\n }));\n }\n // for vue-devtools timeline event\n if ((process.env.NODE_ENV !== 'production')) {\n const { __v_emitter: emitter } = _context;\n if (emitter && _fallbackRoot) {\n emitter.emit(\"fallback\" /* VueDevToolsTimelineEvents.FALBACK */, {\n type: warnType,\n key,\n to: 'global',\n groupId: `${warnType}:${key}`\n });\n }\n }\n }\n return __root && _fallbackRoot\n ? fallbackSuccess(__root)\n : fallbackFail(key);\n }\n else if (successCondition(ret)) {\n return ret;\n }\n else {\n /* istanbul ignore next */\n throw createI18nError(I18nErrorCodes.UNEXPECTED_RETURN_TYPE);\n }\n };\n // t\n function t(...args) {\n return wrapWithDeps(context => Reflect.apply(translate, null, [context, ...args]), () => parseTranslateArgs(...args), 'translate', root => Reflect.apply(root.t, root, [...args]), key => key, val => isString(val));\n }\n // rt\n function rt(...args) {\n const [arg1, arg2, arg3] = args;\n if (arg3 && !isObject(arg3)) {\n throw createI18nError(I18nErrorCodes.INVALID_ARGUMENT);\n }\n return t(...[arg1, arg2, assign({ resolvedMessage: true }, arg3 || {})]);\n }\n // d\n function d(...args) {\n return wrapWithDeps(context => Reflect.apply(datetime, null, [context, ...args]), () => parseDateTimeArgs(...args), 'datetime format', root => Reflect.apply(root.d, root, [...args]), () => MISSING_RESOLVE_VALUE, val => isString(val));\n }\n // n\n function n(...args) {\n return wrapWithDeps(context => Reflect.apply(number, null, [context, ...args]), () => parseNumberArgs(...args), 'number format', root => Reflect.apply(root.n, root, [...args]), () => MISSING_RESOLVE_VALUE, val => isString(val));\n }\n // for custom processor\n function normalize(values) {\n return values.map(val => isString(val) || isNumber(val) || isBoolean(val)\n ? createTextNode(String(val))\n : val);\n }\n const interpolate = (val) => val;\n const processor = {\n normalize,\n interpolate,\n type: 'vnode'\n };\n // translateVNode, using for `i18n-t` component\n function translateVNode(...args) {\n return wrapWithDeps(context => {\n let ret;\n const _context = context;\n try {\n _context.processor = processor;\n ret = Reflect.apply(translate, null, [_context, ...args]);\n }\n finally {\n _context.processor = null;\n }\n return ret;\n }, () => parseTranslateArgs(...args), 'translate', \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n root => root[TranslateVNodeSymbol](...args), key => [createTextNode(key)], val => isArray(val));\n }\n // numberParts, using for `i18n-n` component\n function numberParts(...args) {\n return wrapWithDeps(context => Reflect.apply(number, null, [context, ...args]), () => parseNumberArgs(...args), 'number format', \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n root => root[NumberPartsSymbol](...args), NOOP_RETURN_ARRAY, val => isString(val) || isArray(val));\n }\n // datetimeParts, using for `i18n-d` component\n function datetimeParts(...args) {\n return wrapWithDeps(context => Reflect.apply(datetime, null, [context, ...args]), () => parseDateTimeArgs(...args), 'datetime format', \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n root => root[DatetimePartsSymbol](...args), NOOP_RETURN_ARRAY, val => isString(val) || isArray(val));\n }\n function setPluralRules(rules) {\n _pluralRules = rules;\n _context.pluralRules = _pluralRules;\n }\n // te\n function te(key, locale) {\n return wrapWithDeps(() => {\n if (!key) {\n return false;\n }\n const targetLocale = isString(locale) ? locale : _locale.value;\n const message = getLocaleMessage(targetLocale);\n const resolved = _context.messageResolver(message, key);\n return !translateExistCompatible\n ? isMessageAST(resolved) ||\n isMessageFunction(resolved) ||\n isString(resolved)\n : resolved != null;\n }, () => [key], 'translate exists', root => {\n return Reflect.apply(root.te, root, [key, locale]);\n }, NOOP_RETURN_FALSE, val => isBoolean(val));\n }\n function resolveMessages(key) {\n let messages = null;\n const locales = fallbackWithLocaleChain(_context, _fallbackLocale.value, _locale.value);\n for (let i = 0; i < locales.length; i++) {\n const targetLocaleMessages = _messages.value[locales[i]] || {};\n const messageValue = _context.messageResolver(targetLocaleMessages, key);\n if (messageValue != null) {\n messages = messageValue;\n break;\n }\n }\n return messages;\n }\n // tm\n function tm(key) {\n const messages = resolveMessages(key);\n // prettier-ignore\n return messages != null\n ? messages\n : __root\n ? __root.tm(key) || {}\n : {};\n }\n // getLocaleMessage\n function getLocaleMessage(locale) {\n return (_messages.value[locale] || {});\n }\n // setLocaleMessage\n function setLocaleMessage(locale, message) {\n if (flatJson) {\n const _message = { [locale]: message };\n for (const key in _message) {\n if (hasOwn(_message, key)) {\n handleFlatJson(_message[key]);\n }\n }\n message = _message[locale];\n }\n _messages.value[locale] = message;\n _context.messages = _messages.value;\n }\n // mergeLocaleMessage\n function mergeLocaleMessage(locale, message) {\n _messages.value[locale] = _messages.value[locale] || {};\n const _message = { [locale]: message };\n if (flatJson) {\n for (const key in _message) {\n if (hasOwn(_message, key)) {\n handleFlatJson(_message[key]);\n }\n }\n }\n message = _message[locale];\n deepCopy(message, _messages.value[locale]);\n _context.messages = _messages.value;\n }\n // getDateTimeFormat\n function getDateTimeFormat(locale) {\n return _datetimeFormats.value[locale] || {};\n }\n // setDateTimeFormat\n function setDateTimeFormat(locale, format) {\n _datetimeFormats.value[locale] = format;\n _context.datetimeFormats = _datetimeFormats.value;\n clearDateTimeFormat(_context, locale, format);\n }\n // mergeDateTimeFormat\n function mergeDateTimeFormat(locale, format) {\n _datetimeFormats.value[locale] = assign(_datetimeFormats.value[locale] || {}, format);\n _context.datetimeFormats = _datetimeFormats.value;\n clearDateTimeFormat(_context, locale, format);\n }\n // getNumberFormat\n function getNumberFormat(locale) {\n return _numberFormats.value[locale] || {};\n }\n // setNumberFormat\n function setNumberFormat(locale, format) {\n _numberFormats.value[locale] = format;\n _context.numberFormats = _numberFormats.value;\n clearNumberFormat(_context, locale, format);\n }\n // mergeNumberFormat\n function mergeNumberFormat(locale, format) {\n _numberFormats.value[locale] = assign(_numberFormats.value[locale] || {}, format);\n _context.numberFormats = _numberFormats.value;\n clearNumberFormat(_context, locale, format);\n }\n // for debug\n composerID++;\n // watch root locale & fallbackLocale\n if (__root && inBrowser) {\n watch(__root.locale, (val) => {\n if (_inheritLocale) {\n _locale.value = val;\n _context.locale = val;\n updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);\n }\n });\n watch(__root.fallbackLocale, (val) => {\n if (_inheritLocale) {\n _fallbackLocale.value = val;\n _context.fallbackLocale = val;\n updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);\n }\n });\n }\n // define basic composition API!\n const composer = {\n id: composerID,\n locale,\n fallbackLocale,\n get inheritLocale() {\n return _inheritLocale;\n },\n set inheritLocale(val) {\n _inheritLocale = val;\n if (val && __root) {\n _locale.value = __root.locale.value;\n _fallbackLocale.value = __root.fallbackLocale.value;\n updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);\n }\n },\n get availableLocales() {\n return Object.keys(_messages.value).sort();\n },\n messages,\n get modifiers() {\n return _modifiers;\n },\n get pluralRules() {\n return _pluralRules || {};\n },\n get isGlobal() {\n return _isGlobal;\n },\n get missingWarn() {\n return _missingWarn;\n },\n set missingWarn(val) {\n _missingWarn = val;\n _context.missingWarn = _missingWarn;\n },\n get fallbackWarn() {\n return _fallbackWarn;\n },\n set fallbackWarn(val) {\n _fallbackWarn = val;\n _context.fallbackWarn = _fallbackWarn;\n },\n get fallbackRoot() {\n return _fallbackRoot;\n },\n set fallbackRoot(val) {\n _fallbackRoot = val;\n },\n get fallbackFormat() {\n return _fallbackFormat;\n },\n set fallbackFormat(val) {\n _fallbackFormat = val;\n _context.fallbackFormat = _fallbackFormat;\n },\n get warnHtmlMessage() {\n return _warnHtmlMessage;\n },\n set warnHtmlMessage(val) {\n _warnHtmlMessage = val;\n _context.warnHtmlMessage = val;\n },\n get escapeParameter() {\n return _escapeParameter;\n },\n set escapeParameter(val) {\n _escapeParameter = val;\n _context.escapeParameter = val;\n },\n t,\n getLocaleMessage,\n setLocaleMessage,\n mergeLocaleMessage,\n getPostTranslationHandler,\n setPostTranslationHandler,\n getMissingHandler,\n setMissingHandler,\n [SetPluralRulesSymbol]: setPluralRules\n };\n {\n composer.datetimeFormats = datetimeFormats;\n composer.numberFormats = numberFormats;\n composer.rt = rt;\n composer.te = te;\n composer.tm = tm;\n composer.d = d;\n composer.n = n;\n composer.getDateTimeFormat = getDateTimeFormat;\n composer.setDateTimeFormat = setDateTimeFormat;\n composer.mergeDateTimeFormat = mergeDateTimeFormat;\n composer.getNumberFormat = getNumberFormat;\n composer.setNumberFormat = setNumberFormat;\n composer.mergeNumberFormat = mergeNumberFormat;\n composer[InejctWithOptionSymbol] = __injectWithOption;\n composer[TranslateVNodeSymbol] = translateVNode;\n composer[DatetimePartsSymbol] = datetimeParts;\n composer[NumberPartsSymbol] = numberParts;\n }\n // for vue-devtools timeline event\n if ((process.env.NODE_ENV !== 'production')) {\n composer[EnableEmitter] = (emitter) => {\n _context.__v_emitter = emitter;\n };\n composer[DisableEmitter] = () => {\n _context.__v_emitter = undefined;\n };\n }\n return composer;\n}\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * Convert to I18n Composer Options from VueI18n Options\n *\n * @internal\n */\nfunction convertComposerOptions(options) {\n const locale = isString(options.locale) ? options.locale : DEFAULT_LOCALE;\n const fallbackLocale = isString(options.fallbackLocale) ||\n isArray(options.fallbackLocale) ||\n isPlainObject(options.fallbackLocale) ||\n options.fallbackLocale === false\n ? options.fallbackLocale\n : locale;\n const missing = isFunction(options.missing) ? options.missing : undefined;\n const missingWarn = isBoolean(options.silentTranslationWarn) ||\n isRegExp(options.silentTranslationWarn)\n ? !options.silentTranslationWarn\n : true;\n const fallbackWarn = isBoolean(options.silentFallbackWarn) ||\n isRegExp(options.silentFallbackWarn)\n ? !options.silentFallbackWarn\n : true;\n const fallbackRoot = isBoolean(options.fallbackRoot)\n ? options.fallbackRoot\n : true;\n const fallbackFormat = !!options.formatFallbackMessages;\n const modifiers = isPlainObject(options.modifiers) ? options.modifiers : {};\n const pluralizationRules = options.pluralizationRules;\n const postTranslation = isFunction(options.postTranslation)\n ? options.postTranslation\n : undefined;\n const warnHtmlMessage = isString(options.warnHtmlInMessage)\n ? options.warnHtmlInMessage !== 'off'\n : true;\n const escapeParameter = !!options.escapeParameterHtml;\n const inheritLocale = isBoolean(options.sync) ? options.sync : true;\n if ((process.env.NODE_ENV !== 'production') && options.formatter) {\n warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_FORMATTER));\n }\n if ((process.env.NODE_ENV !== 'production') && options.preserveDirectiveContent) {\n warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_PRESERVE_DIRECTIVE));\n }\n let messages = options.messages;\n if (isPlainObject(options.sharedMessages)) {\n const sharedMessages = options.sharedMessages;\n const locales = Object.keys(sharedMessages);\n messages = locales.reduce((messages, locale) => {\n const message = messages[locale] || (messages[locale] = {});\n assign(message, sharedMessages[locale]);\n return messages;\n }, (messages || {}));\n }\n const { __i18n, __root, __injectWithOption } = options;\n const datetimeFormats = options.datetimeFormats;\n const numberFormats = options.numberFormats;\n const flatJson = options.flatJson;\n const translateExistCompatible = options\n .translateExistCompatible;\n return {\n locale,\n fallbackLocale,\n messages,\n flatJson,\n datetimeFormats,\n numberFormats,\n missing,\n missingWarn,\n fallbackWarn,\n fallbackRoot,\n fallbackFormat,\n modifiers,\n pluralRules: pluralizationRules,\n postTranslation,\n warnHtmlMessage,\n escapeParameter,\n messageResolver: options.messageResolver,\n inheritLocale,\n translateExistCompatible,\n __i18n,\n __root,\n __injectWithOption\n };\n}\n/**\n * create VueI18n interface factory\n *\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nfunction createVueI18n(options = {}, VueI18nLegacy) {\n {\n const composer = createComposer(convertComposerOptions(options));\n const { __extender } = options;\n // defines VueI18n\n const vueI18n = {\n // id\n id: composer.id,\n // locale\n get locale() {\n return composer.locale.value;\n },\n set locale(val) {\n composer.locale.value = val;\n },\n // fallbackLocale\n get fallbackLocale() {\n return composer.fallbackLocale.value;\n },\n set fallbackLocale(val) {\n composer.fallbackLocale.value = val;\n },\n // messages\n get messages() {\n return composer.messages.value;\n },\n // datetimeFormats\n get datetimeFormats() {\n return composer.datetimeFormats.value;\n },\n // numberFormats\n get numberFormats() {\n return composer.numberFormats.value;\n },\n // availableLocales\n get availableLocales() {\n return composer.availableLocales;\n },\n // formatter\n get formatter() {\n (process.env.NODE_ENV !== 'production') && warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_FORMATTER));\n // dummy\n return {\n interpolate() {\n return [];\n }\n };\n },\n set formatter(val) {\n (process.env.NODE_ENV !== 'production') && warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_FORMATTER));\n },\n // missing\n get missing() {\n return composer.getMissingHandler();\n },\n set missing(handler) {\n composer.setMissingHandler(handler);\n },\n // silentTranslationWarn\n get silentTranslationWarn() {\n return isBoolean(composer.missingWarn)\n ? !composer.missingWarn\n : composer.missingWarn;\n },\n set silentTranslationWarn(val) {\n composer.missingWarn = isBoolean(val) ? !val : val;\n },\n // silentFallbackWarn\n get silentFallbackWarn() {\n return isBoolean(composer.fallbackWarn)\n ? !composer.fallbackWarn\n : composer.fallbackWarn;\n },\n set silentFallbackWarn(val) {\n composer.fallbackWarn = isBoolean(val) ? !val : val;\n },\n // modifiers\n get modifiers() {\n return composer.modifiers;\n },\n // formatFallbackMessages\n get formatFallbackMessages() {\n return composer.fallbackFormat;\n },\n set formatFallbackMessages(val) {\n composer.fallbackFormat = val;\n },\n // postTranslation\n get postTranslation() {\n return composer.getPostTranslationHandler();\n },\n set postTranslation(handler) {\n composer.setPostTranslationHandler(handler);\n },\n // sync\n get sync() {\n return composer.inheritLocale;\n },\n set sync(val) {\n composer.inheritLocale = val;\n },\n // warnInHtmlMessage\n get warnHtmlInMessage() {\n return composer.warnHtmlMessage ? 'warn' : 'off';\n },\n set warnHtmlInMessage(val) {\n composer.warnHtmlMessage = val !== 'off';\n },\n // escapeParameterHtml\n get escapeParameterHtml() {\n return composer.escapeParameter;\n },\n set escapeParameterHtml(val) {\n composer.escapeParameter = val;\n },\n // preserveDirectiveContent\n get preserveDirectiveContent() {\n (process.env.NODE_ENV !== 'production') &&\n warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_PRESERVE_DIRECTIVE));\n return true;\n },\n set preserveDirectiveContent(val) {\n (process.env.NODE_ENV !== 'production') &&\n warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_PRESERVE_DIRECTIVE));\n },\n // pluralizationRules\n get pluralizationRules() {\n return composer.pluralRules || {};\n },\n // for internal\n __composer: composer,\n // t\n t(...args) {\n const [arg1, arg2, arg3] = args;\n const options = {};\n let list = null;\n let named = null;\n if (!isString(arg1)) {\n throw createI18nError(I18nErrorCodes.INVALID_ARGUMENT);\n }\n const key = arg1;\n if (isString(arg2)) {\n options.locale = arg2;\n }\n else if (isArray(arg2)) {\n list = arg2;\n }\n else if (isPlainObject(arg2)) {\n named = arg2;\n }\n if (isArray(arg3)) {\n list = arg3;\n }\n else if (isPlainObject(arg3)) {\n named = arg3;\n }\n // return composer.t(key, (list || named || {}) as any, options)\n return Reflect.apply(composer.t, composer, [\n key,\n (list || named || {}),\n options\n ]);\n },\n rt(...args) {\n return Reflect.apply(composer.rt, composer, [...args]);\n },\n // tc\n tc(...args) {\n const [arg1, arg2, arg3] = args;\n const options = { plural: 1 };\n let list = null;\n let named = null;\n if (!isString(arg1)) {\n throw createI18nError(I18nErrorCodes.INVALID_ARGUMENT);\n }\n const key = arg1;\n if (isString(arg2)) {\n options.locale = arg2;\n }\n else if (isNumber(arg2)) {\n options.plural = arg2;\n }\n else if (isArray(arg2)) {\n list = arg2;\n }\n else if (isPlainObject(arg2)) {\n named = arg2;\n }\n if (isString(arg3)) {\n options.locale = arg3;\n }\n else if (isArray(arg3)) {\n list = arg3;\n }\n else if (isPlainObject(arg3)) {\n named = arg3;\n }\n // return composer.t(key, (list || named || {}) as any, options)\n return Reflect.apply(composer.t, composer, [\n key,\n (list || named || {}),\n options\n ]);\n },\n // te\n te(key, locale) {\n return composer.te(key, locale);\n },\n // tm\n tm(key) {\n return composer.tm(key);\n },\n // getLocaleMessage\n getLocaleMessage(locale) {\n return composer.getLocaleMessage(locale);\n },\n // setLocaleMessage\n setLocaleMessage(locale, message) {\n composer.setLocaleMessage(locale, message);\n },\n // mergeLocaleMessage\n mergeLocaleMessage(locale, message) {\n composer.mergeLocaleMessage(locale, message);\n },\n // d\n d(...args) {\n return Reflect.apply(composer.d, composer, [...args]);\n },\n // getDateTimeFormat\n getDateTimeFormat(locale) {\n return composer.getDateTimeFormat(locale);\n },\n // setDateTimeFormat\n setDateTimeFormat(locale, format) {\n composer.setDateTimeFormat(locale, format);\n },\n // mergeDateTimeFormat\n mergeDateTimeFormat(locale, format) {\n composer.mergeDateTimeFormat(locale, format);\n },\n // n\n n(...args) {\n return Reflect.apply(composer.n, composer, [...args]);\n },\n // getNumberFormat\n getNumberFormat(locale) {\n return composer.getNumberFormat(locale);\n },\n // setNumberFormat\n setNumberFormat(locale, format) {\n composer.setNumberFormat(locale, format);\n },\n // mergeNumberFormat\n mergeNumberFormat(locale, format) {\n composer.mergeNumberFormat(locale, format);\n },\n // getChoiceIndex\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getChoiceIndex(choice, choicesLength) {\n (process.env.NODE_ENV !== 'production') &&\n warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_GET_CHOICE_INDEX));\n return -1;\n }\n };\n vueI18n.__extender = __extender;\n // for vue-devtools timeline event\n if ((process.env.NODE_ENV !== 'production')) {\n vueI18n.__enableEmitter = (emitter) => {\n const __composer = composer;\n __composer[EnableEmitter] && __composer[EnableEmitter](emitter);\n };\n vueI18n.__disableEmitter = () => {\n const __composer = composer;\n __composer[DisableEmitter] && __composer[DisableEmitter]();\n };\n }\n return vueI18n;\n }\n}\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\nconst baseFormatProps = {\n tag: {\n type: [String, Object]\n },\n locale: {\n type: String\n },\n scope: {\n type: String,\n // NOTE: avoid https://github.com/microsoft/rushstack/issues/1050\n validator: (val /* ComponentI18nScope */) => val === 'parent' || val === 'global',\n default: 'parent' /* ComponentI18nScope */\n },\n i18n: {\n type: Object\n }\n};\n\nfunction getInterpolateArg(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n{ slots }, // SetupContext,\nkeys) {\n if (keys.length === 1 && keys[0] === 'default') {\n // default slot with list\n const ret = slots.default ? slots.default() : [];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return ret.reduce((slot, current) => {\n return [\n ...slot,\n // prettier-ignore\n ...(current.type === Fragment ? current.children : [current]\n )\n ];\n }, []);\n }\n else {\n // named slots\n return keys.reduce((arg, key) => {\n const slot = slots[key];\n if (slot) {\n arg[key] = slot();\n }\n return arg;\n }, {});\n }\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getFragmentableTag(tag) {\n return Fragment ;\n}\n\nconst TranslationImpl = /*#__PURE__*/ defineComponent({\n /* eslint-disable */\n name: 'i18n-t',\n props: assign({\n keypath: {\n type: String,\n required: true\n },\n plural: {\n type: [Number, String],\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n validator: (val) => isNumber(val) || !isNaN(val)\n }\n }, baseFormatProps),\n /* eslint-enable */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n setup(props, context) {\n const { slots, attrs } = context;\n // NOTE: avoid https://github.com/microsoft/rushstack/issues/1050\n const i18n = props.i18n ||\n useI18n({\n useScope: props.scope,\n __useComponent: true\n });\n return () => {\n const keys = Object.keys(slots).filter(key => key !== '_');\n const options = {};\n if (props.locale) {\n options.locale = props.locale;\n }\n if (props.plural !== undefined) {\n options.plural = isString(props.plural) ? +props.plural : props.plural;\n }\n const arg = getInterpolateArg(context, keys);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const children = i18n[TranslateVNodeSymbol](props.keypath, arg, options);\n const assignedAttrs = assign({}, attrs);\n const tag = isString(props.tag) || isObject(props.tag)\n ? props.tag\n : getFragmentableTag();\n return h(tag, assignedAttrs, children);\n };\n }\n});\n/**\n * export the public type for h/tsx inference\n * also to avoid inline import() in generated d.ts files\n */\n/**\n * Translation Component\n *\n * @remarks\n * See the following items for property about details\n *\n * @VueI18nSee [TranslationProps](component#translationprops)\n * @VueI18nSee [BaseFormatProps](component#baseformatprops)\n * @VueI18nSee [Component Interpolation](../guide/advanced/component)\n *\n * @example\n * ```html\n *
\n * \n * \n * {{ $t('tos') }}\n * \n * \n *
\n * ```\n * ```js\n * import { createApp } from 'vue'\n * import { createI18n } from 'vue-i18n'\n *\n * const messages = {\n * en: {\n * tos: 'Term of Service',\n * term: 'I accept xxx {0}.'\n * },\n * ja: {\n * tos: '利用規約',\n * term: '私は xxx の{0}に同意します。'\n * }\n * }\n *\n * const i18n = createI18n({\n * locale: 'en',\n * messages\n * })\n *\n * const app = createApp({\n * data: {\n * url: '/term'\n * }\n * }).use(i18n).mount('#app')\n * ```\n *\n * @VueI18nComponent\n */\nconst Translation = TranslationImpl;\nconst I18nT = Translation;\n\nfunction isVNode(target) {\n return isArray(target) && !isString(target[0]);\n}\nfunction renderFormatter(props, context, slotKeys, partFormatter) {\n const { slots, attrs } = context;\n return () => {\n const options = { part: true };\n let overrides = {};\n if (props.locale) {\n options.locale = props.locale;\n }\n if (isString(props.format)) {\n options.key = props.format;\n }\n else if (isObject(props.format)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (isString(props.format.key)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n options.key = props.format.key;\n }\n // Filter out number format options only\n overrides = Object.keys(props.format).reduce((options, prop) => {\n return slotKeys.includes(prop)\n ? assign({}, options, { [prop]: props.format[prop] }) // eslint-disable-line @typescript-eslint/no-explicit-any\n : options;\n }, {});\n }\n const parts = partFormatter(...[props.value, options, overrides]);\n let children = [options.key];\n if (isArray(parts)) {\n children = parts.map((part, index) => {\n const slot = slots[part.type];\n const node = slot\n ? slot({ [part.type]: part.value, index, parts })\n : [part.value];\n if (isVNode(node)) {\n node[0].key = `${part.type}-${index}`;\n }\n return node;\n });\n }\n else if (isString(parts)) {\n children = [parts];\n }\n const assignedAttrs = assign({}, attrs);\n const tag = isString(props.tag) || isObject(props.tag)\n ? props.tag\n : getFragmentableTag();\n return h(tag, assignedAttrs, children);\n };\n}\n\nconst NumberFormatImpl = /*#__PURE__*/ defineComponent({\n /* eslint-disable */\n name: 'i18n-n',\n props: assign({\n value: {\n type: Number,\n required: true\n },\n format: {\n type: [String, Object]\n }\n }, baseFormatProps),\n /* eslint-enable */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n setup(props, context) {\n const i18n = props.i18n ||\n useI18n({\n useScope: props.scope,\n __useComponent: true\n });\n return renderFormatter(props, context, NUMBER_FORMAT_OPTIONS_KEYS, (...args) => \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n i18n[NumberPartsSymbol](...args));\n }\n});\n/**\n * export the public type for h/tsx inference\n * also to avoid inline import() in generated d.ts files\n */\n/**\n * Number Format Component\n *\n * @remarks\n * See the following items for property about details\n *\n * @VueI18nSee [FormattableProps](component#formattableprops)\n * @VueI18nSee [BaseFormatProps](component#baseformatprops)\n * @VueI18nSee [Custom Formatting](../guide/essentials/number#custom-formatting)\n *\n * @VueI18nDanger\n * Not supported IE, due to no support `Intl.NumberFormat#formatToParts` in [IE](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/formatToParts)\n *\n * If you want to use it, you need to use [polyfill](https://github.com/formatjs/formatjs/tree/main/packages/intl-numberformat)\n *\n * @VueI18nComponent\n */\nconst NumberFormat = NumberFormatImpl;\nconst I18nN = NumberFormat;\n\nconst DatetimeFormatImpl = /* #__PURE__*/ defineComponent({\n /* eslint-disable */\n name: 'i18n-d',\n props: assign({\n value: {\n type: [Number, Date],\n required: true\n },\n format: {\n type: [String, Object]\n }\n }, baseFormatProps),\n /* eslint-enable */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n setup(props, context) {\n const i18n = props.i18n ||\n useI18n({\n useScope: props.scope,\n __useComponent: true\n });\n return renderFormatter(props, context, DATETIME_FORMAT_OPTIONS_KEYS, (...args) => \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n i18n[DatetimePartsSymbol](...args));\n }\n});\n/**\n * Datetime Format Component\n *\n * @remarks\n * See the following items for property about details\n *\n * @VueI18nSee [FormattableProps](component#formattableprops)\n * @VueI18nSee [BaseFormatProps](component#baseformatprops)\n * @VueI18nSee [Custom Formatting](../guide/essentials/datetime#custom-formatting)\n *\n * @VueI18nDanger\n * Not supported IE, due to no support `Intl.DateTimeFormat#formatToParts` in [IE](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/formatToParts)\n *\n * If you want to use it, you need to use [polyfill](https://github.com/formatjs/formatjs/tree/main/packages/intl-datetimeformat)\n *\n * @VueI18nComponent\n */\nconst DatetimeFormat = DatetimeFormatImpl;\nconst I18nD = DatetimeFormat;\n\nfunction getComposer$2(i18n, instance) {\n const i18nInternal = i18n;\n if (i18n.mode === 'composition') {\n return (i18nInternal.__getInstance(instance) || i18n.global);\n }\n else {\n const vueI18n = i18nInternal.__getInstance(instance);\n return vueI18n != null\n ? vueI18n.__composer\n : i18n.global.__composer;\n }\n}\nfunction vTDirective(i18n) {\n const _process = (binding) => {\n const { instance, modifiers, value } = binding;\n /* istanbul ignore if */\n if (!instance || !instance.$) {\n throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\n }\n const composer = getComposer$2(i18n, instance.$);\n if ((process.env.NODE_ENV !== 'production') && modifiers.preserve) {\n warn(getWarnMessage(I18nWarnCodes.NOT_SUPPORTED_PRESERVE));\n }\n const parsedValue = parseValue(value);\n return [\n Reflect.apply(composer.t, composer, [...makeParams(parsedValue)]),\n composer\n ];\n };\n const register = (el, binding) => {\n const [textContent, composer] = _process(binding);\n if (inBrowser && i18n.global === composer) {\n // global scope only\n el.__i18nWatcher = watch(composer.locale, () => {\n binding.instance && binding.instance.$forceUpdate();\n });\n }\n el.__composer = composer;\n el.textContent = textContent;\n };\n const unregister = (el) => {\n if (inBrowser && el.__i18nWatcher) {\n el.__i18nWatcher();\n el.__i18nWatcher = undefined;\n delete el.__i18nWatcher;\n }\n if (el.__composer) {\n el.__composer = undefined;\n delete el.__composer;\n }\n };\n const update = (el, { value }) => {\n if (el.__composer) {\n const composer = el.__composer;\n const parsedValue = parseValue(value);\n el.textContent = Reflect.apply(composer.t, composer, [\n ...makeParams(parsedValue)\n ]);\n }\n };\n const getSSRProps = (binding) => {\n const [textContent] = _process(binding);\n return { textContent };\n };\n return {\n created: register,\n unmounted: unregister,\n beforeUpdate: update,\n getSSRProps\n };\n}\nfunction parseValue(value) {\n if (isString(value)) {\n return { path: value };\n }\n else if (isPlainObject(value)) {\n if (!('path' in value)) {\n throw createI18nError(I18nErrorCodes.REQUIRED_VALUE, 'path');\n }\n return value;\n }\n else {\n throw createI18nError(I18nErrorCodes.INVALID_VALUE);\n }\n}\nfunction makeParams(value) {\n const { path, locale, args, choice, plural } = value;\n const options = {};\n const named = args || {};\n if (isString(locale)) {\n options.locale = locale;\n }\n if (isNumber(choice)) {\n options.plural = choice;\n }\n if (isNumber(plural)) {\n options.plural = plural;\n }\n return [path, named, options];\n}\n\nfunction apply(app, i18n, ...options) {\n const pluginOptions = isPlainObject(options[0])\n ? options[0]\n : {};\n const useI18nComponentName = !!pluginOptions.useI18nComponentName;\n const globalInstall = isBoolean(pluginOptions.globalInstall)\n ? pluginOptions.globalInstall\n : true;\n if ((process.env.NODE_ENV !== 'production') && globalInstall && useI18nComponentName) {\n warn(getWarnMessage(I18nWarnCodes.COMPONENT_NAME_LEGACY_COMPATIBLE, {\n name: Translation.name\n }));\n }\n if (globalInstall) {\n [!useI18nComponentName ? Translation.name : 'i18n', 'I18nT'].forEach(name => app.component(name, Translation));\n [NumberFormat.name, 'I18nN'].forEach(name => app.component(name, NumberFormat));\n [DatetimeFormat.name, 'I18nD'].forEach(name => app.component(name, DatetimeFormat));\n }\n // install directive\n {\n app.directive('t', vTDirective(i18n));\n }\n}\n\nconst VueDevToolsLabels = {\n [\"vue-devtools-plugin-vue-i18n\" /* VueDevToolsIDs.PLUGIN */]: 'Vue I18n devtools',\n [\"vue-i18n-resource-inspector\" /* VueDevToolsIDs.CUSTOM_INSPECTOR */]: 'I18n Resources',\n [\"vue-i18n-timeline\" /* VueDevToolsIDs.TIMELINE */]: 'Vue I18n'\n};\nconst VueDevToolsPlaceholders = {\n [\"vue-i18n-resource-inspector\" /* VueDevToolsIDs.CUSTOM_INSPECTOR */]: 'Search for scopes ...'\n};\nconst VueDevToolsTimelineColors = {\n [\"vue-i18n-timeline\" /* VueDevToolsIDs.TIMELINE */]: 0xffcd19\n};\n\nconst VUE_I18N_COMPONENT_TYPES = 'vue-i18n: composer properties';\nlet devtoolsApi;\nasync function enableDevTools(app, i18n) {\n return new Promise((resolve, reject) => {\n try {\n setupDevtoolsPlugin({\n id: \"vue-devtools-plugin-vue-i18n\" /* VueDevToolsIDs.PLUGIN */,\n label: VueDevToolsLabels[\"vue-devtools-plugin-vue-i18n\" /* VueDevToolsIDs.PLUGIN */],\n packageName: 'vue-i18n',\n homepage: 'https://vue-i18n.intlify.dev',\n logo: 'https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png',\n componentStateTypes: [VUE_I18N_COMPONENT_TYPES],\n app: app // eslint-disable-line @typescript-eslint/no-explicit-any\n }, api => {\n devtoolsApi = api;\n api.on.visitComponentTree(({ componentInstance, treeNode }) => {\n updateComponentTreeTags(componentInstance, treeNode, i18n);\n });\n api.on.inspectComponent(({ componentInstance, instanceData }) => {\n if (componentInstance.vnode.el &&\n componentInstance.vnode.el.__VUE_I18N__ &&\n instanceData) {\n if (i18n.mode === 'legacy') {\n // ignore global scope on legacy mode\n if (componentInstance.vnode.el.__VUE_I18N__ !==\n i18n.global.__composer) {\n inspectComposer(instanceData, componentInstance.vnode.el.__VUE_I18N__);\n }\n }\n else {\n inspectComposer(instanceData, componentInstance.vnode.el.__VUE_I18N__);\n }\n }\n });\n api.addInspector({\n id: \"vue-i18n-resource-inspector\" /* VueDevToolsIDs.CUSTOM_INSPECTOR */,\n label: VueDevToolsLabels[\"vue-i18n-resource-inspector\" /* VueDevToolsIDs.CUSTOM_INSPECTOR */],\n icon: 'language',\n treeFilterPlaceholder: VueDevToolsPlaceholders[\"vue-i18n-resource-inspector\" /* VueDevToolsIDs.CUSTOM_INSPECTOR */]\n });\n api.on.getInspectorTree(payload => {\n if (payload.app === app &&\n payload.inspectorId === \"vue-i18n-resource-inspector\" /* VueDevToolsIDs.CUSTOM_INSPECTOR */) {\n registerScope(payload, i18n);\n }\n });\n const roots = new Map();\n api.on.getInspectorState(async (payload) => {\n if (payload.app === app &&\n payload.inspectorId === \"vue-i18n-resource-inspector\" /* VueDevToolsIDs.CUSTOM_INSPECTOR */) {\n api.unhighlightElement();\n inspectScope(payload, i18n);\n if (payload.nodeId === 'global') {\n if (!roots.has(payload.app)) {\n const [root] = await api.getComponentInstances(payload.app);\n roots.set(payload.app, root);\n }\n api.highlightElement(roots.get(payload.app));\n }\n else {\n const instance = getComponentInstance(payload.nodeId, i18n);\n instance && api.highlightElement(instance);\n }\n }\n });\n api.on.editInspectorState(payload => {\n if (payload.app === app &&\n payload.inspectorId === \"vue-i18n-resource-inspector\" /* VueDevToolsIDs.CUSTOM_INSPECTOR */) {\n editScope(payload, i18n);\n }\n });\n api.addTimelineLayer({\n id: \"vue-i18n-timeline\" /* VueDevToolsIDs.TIMELINE */,\n label: VueDevToolsLabels[\"vue-i18n-timeline\" /* VueDevToolsIDs.TIMELINE */],\n color: VueDevToolsTimelineColors[\"vue-i18n-timeline\" /* VueDevToolsIDs.TIMELINE */]\n });\n resolve(true);\n });\n }\n catch (e) {\n console.error(e);\n reject(false);\n }\n });\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getI18nScopeLable(instance) {\n return (instance.type.name ||\n instance.type.displayName ||\n instance.type.__file ||\n 'Anonymous');\n}\nfunction updateComponentTreeTags(instance, // eslint-disable-line @typescript-eslint/no-explicit-any\ntreeNode, i18n) {\n // prettier-ignore\n const global = i18n.mode === 'composition'\n ? i18n.global\n : i18n.global.__composer;\n if (instance && instance.vnode.el && instance.vnode.el.__VUE_I18N__) {\n // add custom tags local scope only\n if (instance.vnode.el.__VUE_I18N__ !== global) {\n const tag = {\n label: `i18n (${getI18nScopeLable(instance)} Scope)`,\n textColor: 0x000000,\n backgroundColor: 0xffcd19\n };\n treeNode.tags.push(tag);\n }\n }\n}\nfunction inspectComposer(instanceData, composer) {\n const type = VUE_I18N_COMPONENT_TYPES;\n instanceData.state.push({\n type,\n key: 'locale',\n editable: true,\n value: composer.locale.value\n });\n instanceData.state.push({\n type,\n key: 'availableLocales',\n editable: false,\n value: composer.availableLocales\n });\n instanceData.state.push({\n type,\n key: 'fallbackLocale',\n editable: true,\n value: composer.fallbackLocale.value\n });\n instanceData.state.push({\n type,\n key: 'inheritLocale',\n editable: true,\n value: composer.inheritLocale\n });\n instanceData.state.push({\n type,\n key: 'messages',\n editable: false,\n value: getLocaleMessageValue(composer.messages.value)\n });\n {\n instanceData.state.push({\n type,\n key: 'datetimeFormats',\n editable: false,\n value: composer.datetimeFormats.value\n });\n instanceData.state.push({\n type,\n key: 'numberFormats',\n editable: false,\n value: composer.numberFormats.value\n });\n }\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getLocaleMessageValue(messages) {\n const value = {};\n Object.keys(messages).forEach((key) => {\n const v = messages[key];\n if (isFunction(v) && 'source' in v) {\n value[key] = getMessageFunctionDetails(v);\n }\n else if (isMessageAST(v) && v.loc && v.loc.source) {\n value[key] = v.loc.source;\n }\n else if (isObject(v)) {\n value[key] = getLocaleMessageValue(v);\n }\n else {\n value[key] = v;\n }\n });\n return value;\n}\nconst ESC = {\n '<': '<',\n '>': '>',\n '\"': '"',\n '&': '&'\n};\nfunction escape(s) {\n return s.replace(/[<>\"&]/g, escapeChar);\n}\nfunction escapeChar(a) {\n return ESC[a] || a;\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getMessageFunctionDetails(func) {\n const argString = func.source ? `(\"${escape(func.source)}\")` : `(?)`;\n return {\n _custom: {\n type: 'function',\n display: `ƒ ${argString}`\n }\n };\n}\nfunction registerScope(payload, i18n) {\n payload.rootNodes.push({\n id: 'global',\n label: 'Global Scope'\n });\n // prettier-ignore\n const global = i18n.mode === 'composition'\n ? i18n.global\n : i18n.global.__composer;\n for (const [keyInstance, instance] of i18n.__instances) {\n // prettier-ignore\n const composer = i18n.mode === 'composition'\n ? instance\n : instance.__composer;\n if (global === composer) {\n continue;\n }\n payload.rootNodes.push({\n id: composer.id.toString(),\n label: `${getI18nScopeLable(keyInstance)} Scope`\n });\n }\n}\nfunction getComponentInstance(nodeId, i18n) {\n let instance = null;\n if (nodeId !== 'global') {\n for (const [component, composer] of i18n.__instances.entries()) {\n if (composer.id.toString() === nodeId) {\n instance = component;\n break;\n }\n }\n }\n return instance;\n}\nfunction getComposer$1(nodeId, i18n) {\n if (nodeId === 'global') {\n return i18n.mode === 'composition'\n ? i18n.global\n : i18n.global.__composer;\n }\n else {\n const instance = Array.from(i18n.__instances.values()).find(item => item.id.toString() === nodeId);\n if (instance) {\n return i18n.mode === 'composition'\n ? instance\n : instance.__composer;\n }\n else {\n return null;\n }\n }\n}\nfunction inspectScope(payload, i18n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n) {\n const composer = getComposer$1(payload.nodeId, i18n);\n if (composer) {\n // TODO:\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n payload.state = makeScopeInspectState(composer);\n }\n return null;\n}\nfunction makeScopeInspectState(composer) {\n const state = {};\n const localeType = 'Locale related info';\n const localeStates = [\n {\n type: localeType,\n key: 'locale',\n editable: true,\n value: composer.locale.value\n },\n {\n type: localeType,\n key: 'fallbackLocale',\n editable: true,\n value: composer.fallbackLocale.value\n },\n {\n type: localeType,\n key: 'availableLocales',\n editable: false,\n value: composer.availableLocales\n },\n {\n type: localeType,\n key: 'inheritLocale',\n editable: true,\n value: composer.inheritLocale\n }\n ];\n state[localeType] = localeStates;\n const localeMessagesType = 'Locale messages info';\n const localeMessagesStates = [\n {\n type: localeMessagesType,\n key: 'messages',\n editable: false,\n value: getLocaleMessageValue(composer.messages.value)\n }\n ];\n state[localeMessagesType] = localeMessagesStates;\n {\n const datetimeFormatsType = 'Datetime formats info';\n const datetimeFormatsStates = [\n {\n type: datetimeFormatsType,\n key: 'datetimeFormats',\n editable: false,\n value: composer.datetimeFormats.value\n }\n ];\n state[datetimeFormatsType] = datetimeFormatsStates;\n const numberFormatsType = 'Datetime formats info';\n const numberFormatsStates = [\n {\n type: numberFormatsType,\n key: 'numberFormats',\n editable: false,\n value: composer.numberFormats.value\n }\n ];\n state[numberFormatsType] = numberFormatsStates;\n }\n return state;\n}\nfunction addTimelineEvent(event, payload) {\n if (devtoolsApi) {\n let groupId;\n if (payload && 'groupId' in payload) {\n groupId = payload.groupId;\n delete payload.groupId;\n }\n devtoolsApi.addTimelineEvent({\n layerId: \"vue-i18n-timeline\" /* VueDevToolsIDs.TIMELINE */,\n event: {\n title: event,\n groupId,\n time: Date.now(),\n meta: {},\n data: payload || {},\n logType: event === \"compile-error\" /* VueDevToolsTimelineEvents.COMPILE_ERROR */\n ? 'error'\n : event === \"fallback\" /* VueDevToolsTimelineEvents.FALBACK */ ||\n event === \"missing\" /* VueDevToolsTimelineEvents.MISSING */\n ? 'warning'\n : 'default'\n }\n });\n }\n}\nfunction editScope(payload, i18n) {\n const composer = getComposer$1(payload.nodeId, i18n);\n if (composer) {\n const [field] = payload.path;\n if (field === 'locale' && isString(payload.state.value)) {\n composer.locale.value = payload.state.value;\n }\n else if (field === 'fallbackLocale' &&\n (isString(payload.state.value) ||\n isArray(payload.state.value) ||\n isObject(payload.state.value))) {\n composer.fallbackLocale.value = payload.state.value;\n }\n else if (field === 'inheritLocale' && isBoolean(payload.state.value)) {\n composer.inheritLocale = payload.state.value;\n }\n }\n}\n\n/**\n * Supports compatibility for legacy vue-i18n APIs\n * This mixin is used when we use vue-i18n@v9.x or later\n */\nfunction defineMixin(vuei18n, composer, i18n) {\n return {\n beforeCreate() {\n const instance = getCurrentInstance();\n /* istanbul ignore if */\n if (!instance) {\n throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\n }\n const options = this.$options;\n if (options.i18n) {\n const optionsI18n = options.i18n;\n if (options.__i18n) {\n optionsI18n.__i18n = options.__i18n;\n }\n optionsI18n.__root = composer;\n if (this === this.$root) {\n // merge option and gttach global\n this.$i18n = mergeToGlobal(vuei18n, optionsI18n);\n }\n else {\n optionsI18n.__injectWithOption = true;\n optionsI18n.__extender = i18n.__vueI18nExtend;\n // atttach local VueI18n instance\n this.$i18n = createVueI18n(optionsI18n);\n // extend VueI18n instance\n const _vueI18n = this.$i18n;\n if (_vueI18n.__extender) {\n _vueI18n.__disposer = _vueI18n.__extender(this.$i18n);\n }\n }\n }\n else if (options.__i18n) {\n if (this === this.$root) {\n // merge option and gttach global\n this.$i18n = mergeToGlobal(vuei18n, options);\n }\n else {\n // atttach local VueI18n instance\n this.$i18n = createVueI18n({\n __i18n: options.__i18n,\n __injectWithOption: true,\n __extender: i18n.__vueI18nExtend,\n __root: composer\n });\n // extend VueI18n instance\n const _vueI18n = this.$i18n;\n if (_vueI18n.__extender) {\n _vueI18n.__disposer = _vueI18n.__extender(this.$i18n);\n }\n }\n }\n else {\n // attach global VueI18n instance\n this.$i18n = vuei18n;\n }\n if (options.__i18nGlobal) {\n adjustI18nResources(composer, options, options);\n }\n // defines vue-i18n legacy APIs\n this.$t = (...args) => this.$i18n.t(...args);\n this.$rt = (...args) => this.$i18n.rt(...args);\n this.$tc = (...args) => this.$i18n.tc(...args);\n this.$te = (key, locale) => this.$i18n.te(key, locale);\n this.$d = (...args) => this.$i18n.d(...args);\n this.$n = (...args) => this.$i18n.n(...args);\n this.$tm = (key) => this.$i18n.tm(key);\n i18n.__setInstance(instance, this.$i18n);\n },\n mounted() {\n /* istanbul ignore if */\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) &&\n !false &&\n this.$el &&\n this.$i18n) {\n const _vueI18n = this.$i18n;\n this.$el.__VUE_I18N__ = _vueI18n.__composer;\n const emitter = (this.__v_emitter =\n createEmitter());\n _vueI18n.__enableEmitter && _vueI18n.__enableEmitter(emitter);\n emitter.on('*', addTimelineEvent);\n }\n },\n unmounted() {\n const instance = getCurrentInstance();\n /* istanbul ignore if */\n if (!instance) {\n throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\n }\n const _vueI18n = this.$i18n;\n /* istanbul ignore if */\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) &&\n !false &&\n this.$el &&\n this.$el.__VUE_I18N__) {\n if (this.__v_emitter) {\n this.__v_emitter.off('*', addTimelineEvent);\n delete this.__v_emitter;\n }\n if (this.$i18n) {\n _vueI18n.__disableEmitter && _vueI18n.__disableEmitter();\n delete this.$el.__VUE_I18N__;\n }\n }\n delete this.$t;\n delete this.$rt;\n delete this.$tc;\n delete this.$te;\n delete this.$d;\n delete this.$n;\n delete this.$tm;\n if (_vueI18n.__disposer) {\n _vueI18n.__disposer();\n delete _vueI18n.__disposer;\n delete _vueI18n.__extender;\n }\n i18n.__deleteInstance(instance);\n delete this.$i18n;\n }\n };\n}\nfunction mergeToGlobal(g, options) {\n g.locale = options.locale || g.locale;\n g.fallbackLocale = options.fallbackLocale || g.fallbackLocale;\n g.missing = options.missing || g.missing;\n g.silentTranslationWarn =\n options.silentTranslationWarn || g.silentFallbackWarn;\n g.silentFallbackWarn = options.silentFallbackWarn || g.silentFallbackWarn;\n g.formatFallbackMessages =\n options.formatFallbackMessages || g.formatFallbackMessages;\n g.postTranslation = options.postTranslation || g.postTranslation;\n g.warnHtmlInMessage = options.warnHtmlInMessage || g.warnHtmlInMessage;\n g.escapeParameterHtml = options.escapeParameterHtml || g.escapeParameterHtml;\n g.sync = options.sync || g.sync;\n g.__composer[SetPluralRulesSymbol](options.pluralizationRules || g.pluralizationRules);\n const messages = getLocaleMessages(g.locale, {\n messages: options.messages,\n __i18n: options.__i18n\n });\n Object.keys(messages).forEach(locale => g.mergeLocaleMessage(locale, messages[locale]));\n if (options.datetimeFormats) {\n Object.keys(options.datetimeFormats).forEach(locale => g.mergeDateTimeFormat(locale, options.datetimeFormats[locale]));\n }\n if (options.numberFormats) {\n Object.keys(options.numberFormats).forEach(locale => g.mergeNumberFormat(locale, options.numberFormats[locale]));\n }\n return g;\n}\n\n/**\n * Injection key for {@link useI18n}\n *\n * @remarks\n * The global injection key for I18n instances with `useI18n`. this injection key is used in Web Components.\n * Specify the i18n instance created by {@link createI18n} together with `provide` function.\n *\n * @VueI18nGeneral\n */\nconst I18nInjectionKey = \n/* #__PURE__*/ makeSymbol('global-vue-i18n');\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\nfunction createI18n(options = {}, VueI18nLegacy) {\n // prettier-ignore\n const __legacyMode = __VUE_I18N_LEGACY_API__ && isBoolean(options.legacy)\n ? options.legacy\n : __VUE_I18N_LEGACY_API__;\n // prettier-ignore\n const __globalInjection = isBoolean(options.globalInjection)\n ? options.globalInjection\n : true;\n // prettier-ignore\n const __allowComposition = __VUE_I18N_LEGACY_API__ && __legacyMode\n ? !!options.allowComposition\n : true;\n const __instances = new Map();\n const [globalScope, __global] = createGlobal(options, __legacyMode);\n const symbol = /* #__PURE__*/ makeSymbol((process.env.NODE_ENV !== 'production') ? 'vue-i18n' : '');\n if ((process.env.NODE_ENV !== 'production')) {\n if (__legacyMode && __allowComposition && !false) {\n warn(getWarnMessage(I18nWarnCodes.NOTICE_DROP_ALLOW_COMPOSITION));\n }\n }\n function __getInstance(component) {\n return __instances.get(component) || null;\n }\n function __setInstance(component, instance) {\n __instances.set(component, instance);\n }\n function __deleteInstance(component) {\n __instances.delete(component);\n }\n {\n const i18n = {\n // mode\n get mode() {\n return __VUE_I18N_LEGACY_API__ && __legacyMode\n ? 'legacy'\n : 'composition';\n },\n // allowComposition\n get allowComposition() {\n return __allowComposition;\n },\n // install plugin\n async install(app, ...options) {\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) &&\n !false) {\n app.__VUE_I18N__ = i18n;\n }\n // setup global provider\n app.__VUE_I18N_SYMBOL__ = symbol;\n app.provide(app.__VUE_I18N_SYMBOL__, i18n);\n // set composer & vuei18n extend hook options from plugin options\n if (isPlainObject(options[0])) {\n const opts = options[0];\n i18n.__composerExtend =\n opts.__composerExtend;\n i18n.__vueI18nExtend =\n opts.__vueI18nExtend;\n }\n // global method and properties injection for Composition API\n let globalReleaseHandler = null;\n if (!__legacyMode && __globalInjection) {\n globalReleaseHandler = injectGlobalFields(app, i18n.global);\n }\n // install built-in components and directive\n if (__VUE_I18N_FULL_INSTALL__) {\n apply(app, i18n, ...options);\n }\n // setup mixin for Legacy API\n if (__VUE_I18N_LEGACY_API__ && __legacyMode) {\n app.mixin(defineMixin(__global, __global.__composer, i18n));\n }\n // release global scope\n const unmountApp = app.unmount;\n app.unmount = () => {\n globalReleaseHandler && globalReleaseHandler();\n i18n.dispose();\n unmountApp();\n };\n // setup vue-devtools plugin\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) && !false) {\n const ret = await enableDevTools(app, i18n);\n if (!ret) {\n throw createI18nError(I18nErrorCodes.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);\n }\n const emitter = createEmitter();\n if (__legacyMode) {\n const _vueI18n = __global;\n _vueI18n.__enableEmitter && _vueI18n.__enableEmitter(emitter);\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const _composer = __global;\n _composer[EnableEmitter] && _composer[EnableEmitter](emitter);\n }\n emitter.on('*', addTimelineEvent);\n }\n },\n // global accessor\n get global() {\n return __global;\n },\n dispose() {\n globalScope.stop();\n },\n // @internal\n __instances,\n // @internal\n __getInstance,\n // @internal\n __setInstance,\n // @internal\n __deleteInstance\n };\n return i18n;\n }\n}\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nfunction useI18n(options = {}) {\n const instance = getCurrentInstance();\n if (instance == null) {\n throw createI18nError(I18nErrorCodes.MUST_BE_CALL_SETUP_TOP);\n }\n if (!instance.isCE &&\n instance.appContext.app != null &&\n !instance.appContext.app.__VUE_I18N_SYMBOL__) {\n throw createI18nError(I18nErrorCodes.NOT_INSTALLED);\n }\n const i18n = getI18nInstance(instance);\n const gl = getGlobalComposer(i18n);\n const componentOptions = getComponentOptions(instance);\n const scope = getScope(options, componentOptions);\n if (__VUE_I18N_LEGACY_API__) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (i18n.mode === 'legacy' && !options.__useComponent) {\n if (!i18n.allowComposition) {\n throw createI18nError(I18nErrorCodes.NOT_AVAILABLE_IN_LEGACY_MODE);\n }\n return useI18nForLegacy(instance, scope, gl, options);\n }\n }\n if (scope === 'global') {\n adjustI18nResources(gl, options, componentOptions);\n return gl;\n }\n if (scope === 'parent') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let composer = getComposer(i18n, instance, options.__useComponent);\n if (composer == null) {\n if ((process.env.NODE_ENV !== 'production')) {\n warn(getWarnMessage(I18nWarnCodes.NOT_FOUND_PARENT_SCOPE));\n }\n composer = gl;\n }\n return composer;\n }\n const i18nInternal = i18n;\n let composer = i18nInternal.__getInstance(instance);\n if (composer == null) {\n const composerOptions = assign({}, options);\n if ('__i18n' in componentOptions) {\n composerOptions.__i18n = componentOptions.__i18n;\n }\n if (gl) {\n composerOptions.__root = gl;\n }\n composer = createComposer(composerOptions);\n if (i18nInternal.__composerExtend) {\n composer[DisposeSymbol] =\n i18nInternal.__composerExtend(composer);\n }\n setupLifeCycle(i18nInternal, instance, composer);\n i18nInternal.__setInstance(instance, composer);\n }\n return composer;\n}\n/**\n * Cast to VueI18n legacy compatible type\n *\n * @remarks\n * This API is provided only with [vue-i18n-bridge](https://vue-i18n.intlify.dev/guide/migration/ways.html#what-is-vue-i18n-bridge).\n *\n * The purpose of this function is to convert an {@link I18n} instance created with {@link createI18n | createI18n(legacy: true)} into a `vue-i18n@v8.x` compatible instance of `new VueI18n` in a TypeScript environment.\n *\n * @param i18n - An instance of {@link I18n}\n * @returns A i18n instance which is casted to {@link VueI18n} type\n *\n * @VueI18nTip\n * :new: provided by **vue-i18n-bridge only**\n *\n * @VueI18nGeneral\n */\n/* #__NO_SIDE_EFFECTS__ */\nconst castToVueI18n = (i18n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n) => {\n if (!(__VUE_I18N_BRIDGE__ in i18n)) {\n throw createI18nError(I18nErrorCodes.NOT_COMPATIBLE_LEGACY_VUE_I18N);\n }\n return i18n;\n};\nfunction createGlobal(options, legacyMode, VueI18nLegacy // eslint-disable-line @typescript-eslint/no-explicit-any\n) {\n const scope = effectScope();\n {\n const obj = __VUE_I18N_LEGACY_API__ && legacyMode\n ? scope.run(() => createVueI18n(options))\n : scope.run(() => createComposer(options));\n if (obj == null) {\n throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\n }\n return [scope, obj];\n }\n}\nfunction getI18nInstance(instance) {\n {\n const i18n = inject(!instance.isCE\n ? instance.appContext.app.__VUE_I18N_SYMBOL__\n : I18nInjectionKey);\n /* istanbul ignore if */\n if (!i18n) {\n throw createI18nError(!instance.isCE\n ? I18nErrorCodes.UNEXPECTED_ERROR\n : I18nErrorCodes.NOT_INSTALLED_WITH_PROVIDE);\n }\n return i18n;\n }\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getScope(options, componentOptions) {\n // prettier-ignore\n return isEmptyObject(options)\n ? ('__i18n' in componentOptions)\n ? 'local'\n : 'global'\n : !options.useScope\n ? 'local'\n : options.useScope;\n}\nfunction getGlobalComposer(i18n) {\n // prettier-ignore\n return i18n.mode === 'composition'\n ? i18n.global\n : i18n.global.__composer\n ;\n}\nfunction getComposer(i18n, target, useComponent = false) {\n let composer = null;\n const root = target.root;\n let current = getParentComponentInstance(target, useComponent);\n while (current != null) {\n const i18nInternal = i18n;\n if (i18n.mode === 'composition') {\n composer = i18nInternal.__getInstance(current);\n }\n else {\n if (__VUE_I18N_LEGACY_API__) {\n const vueI18n = i18nInternal.__getInstance(current);\n if (vueI18n != null) {\n composer = vueI18n\n .__composer;\n if (useComponent &&\n composer &&\n !composer[InejctWithOptionSymbol] // eslint-disable-line @typescript-eslint/no-explicit-any\n ) {\n composer = null;\n }\n }\n }\n }\n if (composer != null) {\n break;\n }\n if (root === current) {\n break;\n }\n current = current.parent;\n }\n return composer;\n}\nfunction getParentComponentInstance(target, useComponent = false) {\n if (target == null) {\n return null;\n }\n {\n // if `useComponent: true` will be specified, we get lexical scope owner instance for use-case slots\n return !useComponent\n ? target.parent\n : target.vnode.ctx || target.parent; // eslint-disable-line @typescript-eslint/no-explicit-any\n }\n}\nfunction setupLifeCycle(i18n, target, composer) {\n let emitter = null;\n {\n onMounted(() => {\n // inject composer instance to DOM for intlify-devtools\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) &&\n !false &&\n target.vnode.el) {\n target.vnode.el.__VUE_I18N__ = composer;\n emitter = createEmitter();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const _composer = composer;\n _composer[EnableEmitter] && _composer[EnableEmitter](emitter);\n emitter.on('*', addTimelineEvent);\n }\n }, target);\n onUnmounted(() => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const _composer = composer;\n // remove composer instance from DOM for intlify-devtools\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) &&\n !false &&\n target.vnode.el &&\n target.vnode.el.__VUE_I18N__) {\n emitter && emitter.off('*', addTimelineEvent);\n _composer[DisableEmitter] && _composer[DisableEmitter]();\n delete target.vnode.el.__VUE_I18N__;\n }\n i18n.__deleteInstance(target);\n // dispose extended resources\n const dispose = _composer[DisposeSymbol];\n if (dispose) {\n dispose();\n delete _composer[DisposeSymbol];\n }\n }, target);\n }\n}\nfunction useI18nForLegacy(instance, scope, root, options = {} // eslint-disable-line @typescript-eslint/no-explicit-any\n) {\n const isLocalScope = scope === 'local';\n const _composer = shallowRef(null);\n if (isLocalScope &&\n instance.proxy &&\n !(instance.proxy.$options.i18n || instance.proxy.$options.__i18n)) {\n throw createI18nError(I18nErrorCodes.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);\n }\n const _inheritLocale = isBoolean(options.inheritLocale)\n ? options.inheritLocale\n : !isString(options.locale);\n const _locale = ref(\n // prettier-ignore\n !isLocalScope || _inheritLocale\n ? root.locale.value\n : isString(options.locale)\n ? options.locale\n : DEFAULT_LOCALE);\n const _fallbackLocale = ref(\n // prettier-ignore\n !isLocalScope || _inheritLocale\n ? root.fallbackLocale.value\n : isString(options.fallbackLocale) ||\n isArray(options.fallbackLocale) ||\n isPlainObject(options.fallbackLocale) ||\n options.fallbackLocale === false\n ? options.fallbackLocale\n : _locale.value);\n const _messages = ref(getLocaleMessages(_locale.value, options));\n // prettier-ignore\n const _datetimeFormats = ref(isPlainObject(options.datetimeFormats)\n ? options.datetimeFormats\n : { [_locale.value]: {} });\n // prettier-ignore\n const _numberFormats = ref(isPlainObject(options.numberFormats)\n ? options.numberFormats\n : { [_locale.value]: {} });\n // prettier-ignore\n const _missingWarn = isLocalScope\n ? root.missingWarn\n : isBoolean(options.missingWarn) || isRegExp(options.missingWarn)\n ? options.missingWarn\n : true;\n // prettier-ignore\n const _fallbackWarn = isLocalScope\n ? root.fallbackWarn\n : isBoolean(options.fallbackWarn) || isRegExp(options.fallbackWarn)\n ? options.fallbackWarn\n : true;\n // prettier-ignore\n const _fallbackRoot = isLocalScope\n ? root.fallbackRoot\n : isBoolean(options.fallbackRoot)\n ? options.fallbackRoot\n : true;\n // configure fall back to root\n const _fallbackFormat = !!options.fallbackFormat;\n // runtime missing\n const _missing = isFunction(options.missing) ? options.missing : null;\n // postTranslation handler\n const _postTranslation = isFunction(options.postTranslation)\n ? options.postTranslation\n : null;\n // prettier-ignore\n const _warnHtmlMessage = isLocalScope\n ? root.warnHtmlMessage\n : isBoolean(options.warnHtmlMessage)\n ? options.warnHtmlMessage\n : true;\n const _escapeParameter = !!options.escapeParameter;\n // prettier-ignore\n const _modifiers = isLocalScope\n ? root.modifiers\n : isPlainObject(options.modifiers)\n ? options.modifiers\n : {};\n // pluralRules\n const _pluralRules = options.pluralRules || (isLocalScope && root.pluralRules);\n // track reactivity\n function trackReactivityValues() {\n return [\n _locale.value,\n _fallbackLocale.value,\n _messages.value,\n _datetimeFormats.value,\n _numberFormats.value\n ];\n }\n // locale\n const locale = computed({\n get: () => {\n return _composer.value ? _composer.value.locale.value : _locale.value;\n },\n set: val => {\n if (_composer.value) {\n _composer.value.locale.value = val;\n }\n _locale.value = val;\n }\n });\n // fallbackLocale\n const fallbackLocale = computed({\n get: () => {\n return _composer.value\n ? _composer.value.fallbackLocale.value\n : _fallbackLocale.value;\n },\n set: val => {\n if (_composer.value) {\n _composer.value.fallbackLocale.value = val;\n }\n _fallbackLocale.value = val;\n }\n });\n // messages\n const messages = computed(() => {\n if (_composer.value) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return _composer.value.messages.value;\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return _messages.value;\n }\n });\n const datetimeFormats = computed(() => _datetimeFormats.value);\n const numberFormats = computed(() => _numberFormats.value);\n function getPostTranslationHandler() {\n return _composer.value\n ? _composer.value.getPostTranslationHandler()\n : _postTranslation;\n }\n function setPostTranslationHandler(handler) {\n if (_composer.value) {\n _composer.value.setPostTranslationHandler(handler);\n }\n }\n function getMissingHandler() {\n return _composer.value ? _composer.value.getMissingHandler() : _missing;\n }\n function setMissingHandler(handler) {\n if (_composer.value) {\n _composer.value.setMissingHandler(handler);\n }\n }\n function warpWithDeps(fn) {\n trackReactivityValues();\n return fn();\n }\n function t(...args) {\n return _composer.value\n ? warpWithDeps(() => Reflect.apply(_composer.value.t, null, [...args]))\n : warpWithDeps(() => '');\n }\n function rt(...args) {\n return _composer.value\n ? Reflect.apply(_composer.value.rt, null, [...args])\n : '';\n }\n function d(...args) {\n return _composer.value\n ? warpWithDeps(() => Reflect.apply(_composer.value.d, null, [...args]))\n : warpWithDeps(() => '');\n }\n function n(...args) {\n return _composer.value\n ? warpWithDeps(() => Reflect.apply(_composer.value.n, null, [...args]))\n : warpWithDeps(() => '');\n }\n function tm(key) {\n return _composer.value ? _composer.value.tm(key) : {};\n }\n function te(key, locale) {\n return _composer.value ? _composer.value.te(key, locale) : false;\n }\n function getLocaleMessage(locale) {\n return _composer.value ? _composer.value.getLocaleMessage(locale) : {};\n }\n function setLocaleMessage(locale, message) {\n if (_composer.value) {\n _composer.value.setLocaleMessage(locale, message);\n _messages.value[locale] = message;\n }\n }\n function mergeLocaleMessage(locale, message) {\n if (_composer.value) {\n _composer.value.mergeLocaleMessage(locale, message);\n }\n }\n function getDateTimeFormat(locale) {\n return _composer.value ? _composer.value.getDateTimeFormat(locale) : {};\n }\n function setDateTimeFormat(locale, format) {\n if (_composer.value) {\n _composer.value.setDateTimeFormat(locale, format);\n _datetimeFormats.value[locale] = format;\n }\n }\n function mergeDateTimeFormat(locale, format) {\n if (_composer.value) {\n _composer.value.mergeDateTimeFormat(locale, format);\n }\n }\n function getNumberFormat(locale) {\n return _composer.value ? _composer.value.getNumberFormat(locale) : {};\n }\n function setNumberFormat(locale, format) {\n if (_composer.value) {\n _composer.value.setNumberFormat(locale, format);\n _numberFormats.value[locale] = format;\n }\n }\n function mergeNumberFormat(locale, format) {\n if (_composer.value) {\n _composer.value.mergeNumberFormat(locale, format);\n }\n }\n const wrapper = {\n get id() {\n return _composer.value ? _composer.value.id : -1;\n },\n locale,\n fallbackLocale,\n messages,\n datetimeFormats,\n numberFormats,\n get inheritLocale() {\n return _composer.value ? _composer.value.inheritLocale : _inheritLocale;\n },\n set inheritLocale(val) {\n if (_composer.value) {\n _composer.value.inheritLocale = val;\n }\n },\n get availableLocales() {\n return _composer.value\n ? _composer.value.availableLocales\n : Object.keys(_messages.value);\n },\n get modifiers() {\n return (_composer.value ? _composer.value.modifiers : _modifiers);\n },\n get pluralRules() {\n return (_composer.value ? _composer.value.pluralRules : _pluralRules);\n },\n get isGlobal() {\n return _composer.value ? _composer.value.isGlobal : false;\n },\n get missingWarn() {\n return _composer.value ? _composer.value.missingWarn : _missingWarn;\n },\n set missingWarn(val) {\n if (_composer.value) {\n _composer.value.missingWarn = val;\n }\n },\n get fallbackWarn() {\n return _composer.value ? _composer.value.fallbackWarn : _fallbackWarn;\n },\n set fallbackWarn(val) {\n if (_composer.value) {\n _composer.value.missingWarn = val;\n }\n },\n get fallbackRoot() {\n return _composer.value ? _composer.value.fallbackRoot : _fallbackRoot;\n },\n set fallbackRoot(val) {\n if (_composer.value) {\n _composer.value.fallbackRoot = val;\n }\n },\n get fallbackFormat() {\n return _composer.value ? _composer.value.fallbackFormat : _fallbackFormat;\n },\n set fallbackFormat(val) {\n if (_composer.value) {\n _composer.value.fallbackFormat = val;\n }\n },\n get warnHtmlMessage() {\n return _composer.value\n ? _composer.value.warnHtmlMessage\n : _warnHtmlMessage;\n },\n set warnHtmlMessage(val) {\n if (_composer.value) {\n _composer.value.warnHtmlMessage = val;\n }\n },\n get escapeParameter() {\n return _composer.value\n ? _composer.value.escapeParameter\n : _escapeParameter;\n },\n set escapeParameter(val) {\n if (_composer.value) {\n _composer.value.escapeParameter = val;\n }\n },\n t,\n getPostTranslationHandler,\n setPostTranslationHandler,\n getMissingHandler,\n setMissingHandler,\n rt,\n d,\n n,\n tm,\n te,\n getLocaleMessage,\n setLocaleMessage,\n mergeLocaleMessage,\n getDateTimeFormat,\n setDateTimeFormat,\n mergeDateTimeFormat,\n getNumberFormat,\n setNumberFormat,\n mergeNumberFormat\n };\n function sync(composer) {\n composer.locale.value = _locale.value;\n composer.fallbackLocale.value = _fallbackLocale.value;\n Object.keys(_messages.value).forEach(locale => {\n composer.mergeLocaleMessage(locale, _messages.value[locale]);\n });\n Object.keys(_datetimeFormats.value).forEach(locale => {\n composer.mergeDateTimeFormat(locale, _datetimeFormats.value[locale]);\n });\n Object.keys(_numberFormats.value).forEach(locale => {\n composer.mergeNumberFormat(locale, _numberFormats.value[locale]);\n });\n composer.escapeParameter = _escapeParameter;\n composer.fallbackFormat = _fallbackFormat;\n composer.fallbackRoot = _fallbackRoot;\n composer.fallbackWarn = _fallbackWarn;\n composer.missingWarn = _missingWarn;\n composer.warnHtmlMessage = _warnHtmlMessage;\n }\n onBeforeMount(() => {\n if (instance.proxy == null || instance.proxy.$i18n == null) {\n throw createI18nError(I18nErrorCodes.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const composer = (_composer.value = instance.proxy.$i18n\n .__composer);\n if (scope === 'global') {\n _locale.value = composer.locale.value;\n _fallbackLocale.value = composer.fallbackLocale.value;\n _messages.value = composer.messages.value;\n _datetimeFormats.value = composer.datetimeFormats.value;\n _numberFormats.value = composer.numberFormats.value;\n }\n else if (isLocalScope) {\n sync(composer);\n }\n });\n return wrapper;\n}\nconst globalExportProps = [\n 'locale',\n 'fallbackLocale',\n 'availableLocales'\n];\nconst globalExportMethods = ['t', 'rt', 'd', 'n', 'tm', 'te']\n ;\nfunction injectGlobalFields(app, composer) {\n const i18n = Object.create(null);\n globalExportProps.forEach(prop => {\n const desc = Object.getOwnPropertyDescriptor(composer, prop);\n if (!desc) {\n throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\n }\n const wrap = isRef(desc.value) // check computed props\n ? {\n get() {\n return desc.value.value;\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n set(val) {\n desc.value.value = val;\n }\n }\n : {\n get() {\n return desc.get && desc.get();\n }\n };\n Object.defineProperty(i18n, prop, wrap);\n });\n app.config.globalProperties.$i18n = i18n;\n globalExportMethods.forEach(method => {\n const desc = Object.getOwnPropertyDescriptor(composer, method);\n if (!desc || !desc.value) {\n throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\n }\n Object.defineProperty(app.config.globalProperties, `$${method}`, desc);\n });\n const dispose = () => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n delete app.config.globalProperties.$i18n;\n globalExportMethods.forEach(method => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n delete app.config.globalProperties[`$${method}`];\n });\n };\n return dispose;\n}\n\n{\n initFeatureFlags();\n}\n// register message compiler at vue-i18n\nif (__INTLIFY_JIT_COMPILATION__) {\n registerMessageCompiler(compile);\n}\nelse {\n registerMessageCompiler(compileToFunction);\n}\n// register message resolver at vue-i18n\nregisterMessageResolver(resolveValue);\n// register fallback locale at vue-i18n\nregisterLocaleFallbacker(fallbackWithLocaleChain);\n// NOTE: experimental !!\nif ((process.env.NODE_ENV !== 'production') || __INTLIFY_PROD_DEVTOOLS__) {\n const target = getGlobalThis();\n target.__INTLIFY__ = true;\n setDevToolsHook(target.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);\n}\nif ((process.env.NODE_ENV !== 'production')) ;\n\nexport { DatetimeFormat, I18nD, I18nInjectionKey, I18nN, I18nT, NumberFormat, Translation, VERSION, castToVueI18n, createI18n, useI18n, vTDirective };\n","import { ElectronAPI } from '@comfyorg/comfyui-electron-types'\n\nexport function isElectron() {\n return 'electronAPI' in window && window['electronAPI'] !== undefined\n}\n\nexport function electronAPI() {\n return (window as any)['electronAPI'] as ElectronAPI\n}\n","import { ref } from 'vue'\nimport { defineStore } from 'pinia'\nimport { isElectron, electronAPI } from '@/utils/envUtil'\n\nexport interface ElectronDownload {\n url: string\n status: 'paused' | 'in_progress' | 'cancelled'\n progress: number\n savePath: string\n filename: string\n}\n\n/** Electron donwloads store handler */\nexport const useElectronDownloadStore = defineStore('downloads', () => {\n const downloads = ref([])\n const { DownloadManager } = electronAPI()\n\n const findByUrl = (url: string) =>\n downloads.value.find((download) => url === download.url)\n\n const initialize = async () => {\n if (isElectron()) {\n const allDownloads: ElectronDownload[] =\n (await DownloadManager.getAllDownloads()) as unknown as ElectronDownload[]\n\n for (const download of allDownloads) {\n downloads.value.push(download)\n }\n\n // ToDO: replace with ElectronDownload type\n DownloadManager.onDownloadProgress((data: any) => {\n if (!findByUrl(data.url)) {\n downloads.value.push(data)\n }\n\n const download = findByUrl(data.url)\n\n if (download) {\n download.progress = data.progress\n download.status = data.status\n download.filename = data.filename\n download.savePath = data.savePath\n }\n })\n }\n }\n\n void initialize()\n\n const start = ({\n url,\n savePath,\n filename\n }: Pick) =>\n DownloadManager.startDownload(url, savePath, filename)\n const pause = (url: string) => DownloadManager.pauseDownload(url)\n const resume = (url: string) => DownloadManager.resumeDownload(url)\n const cancel = (url: string) => DownloadManager.cancelDownload(url)\n\n return {\n downloads,\n start,\n pause,\n resume,\n cancel,\n findByUrl,\n initialize\n }\n})\n","\n\n\n\n","\n\n\n\n","\n\n\n\n\n","import BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-tabs {\\n display: flex;\\n flex-direction: column;\\n}\\n\\n.p-tablist {\\n display: flex;\\n position: relative;\\n}\\n\\n.p-tabs-scrollable > .p-tablist {\\n overflow: hidden;\\n}\\n\\n.p-tablist-viewport {\\n overflow-x: auto;\\n overflow-y: hidden;\\n scroll-behavior: smooth;\\n scrollbar-width: none;\\n overscroll-behavior: contain auto;\\n}\\n\\n.p-tablist-viewport::-webkit-scrollbar {\\n display: none;\\n}\\n\\n.p-tablist-tab-list {\\n position: relative;\\n display: flex;\\n background: \".concat(dt('tabs.tablist.background'), \";\\n border-style: solid;\\n border-color: \").concat(dt('tabs.tablist.border.color'), \";\\n border-width: \").concat(dt('tabs.tablist.border.width'), \";\\n}\\n\\n.p-tablist-content {\\n flex-grow: 1;\\n}\\n\\n.p-tablist-nav-button {\\n all: unset;\\n position: absolute !important;\\n flex-shrink: 0;\\n top: 0;\\n z-index: 2;\\n height: 100%;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n background: \").concat(dt('tabs.nav.button.background'), \";\\n color: \").concat(dt('tabs.nav.button.color'), \";\\n width: \").concat(dt('tabs.nav.button.width'), \";\\n transition: color \").concat(dt('tabs.transition.duration'), \", outline-color \").concat(dt('tabs.transition.duration'), \", box-shadow \").concat(dt('tabs.transition.duration'), \";\\n box-shadow: \").concat(dt('tabs.nav.button.shadow'), \";\\n outline-color: transparent;\\n cursor: pointer;\\n}\\n\\n.p-tablist-nav-button:focus-visible {\\n z-index: 1;\\n box-shadow: \").concat(dt('tabs.nav.button.focus.ring.shadow'), \";\\n outline: \").concat(dt('tabs.nav.button.focus.ring.width'), \" \").concat(dt('tabs.nav.button.focus.ring.style'), \" \").concat(dt('tabs.nav.button.focus.ring.color'), \";\\n outline-offset: \").concat(dt('tabs.nav.button.focus.ring.offset'), \";\\n}\\n\\n.p-tablist-nav-button:hover {\\n color: \").concat(dt('tabs.nav.button.hover.color'), \";\\n}\\n\\n.p-tablist-prev-button {\\n left: 0;\\n}\\n\\n.p-tablist-next-button {\\n right: 0;\\n}\\n\\n.p-tab {\\n flex-shrink: 0;\\n cursor: pointer;\\n user-select: none;\\n position: relative;\\n border-style: solid;\\n white-space: nowrap;\\n background: \").concat(dt('tabs.tab.background'), \";\\n border-width: \").concat(dt('tabs.tab.border.width'), \";\\n border-color: \").concat(dt('tabs.tab.border.color'), \";\\n color: \").concat(dt('tabs.tab.color'), \";\\n padding: \").concat(dt('tabs.tab.padding'), \";\\n font-weight: \").concat(dt('tabs.tab.font.weight'), \";\\n transition: background \").concat(dt('tabs.transition.duration'), \", border-color \").concat(dt('tabs.transition.duration'), \", color \").concat(dt('tabs.transition.duration'), \", outline-color \").concat(dt('tabs.transition.duration'), \", box-shadow \").concat(dt('tabs.transition.duration'), \";\\n margin: \").concat(dt('tabs.tab.margin'), \";\\n outline-color: transparent;\\n}\\n\\n.p-tab:not(.p-disabled):focus-visible {\\n z-index: 1;\\n box-shadow: \").concat(dt('tabs.tab.focus.ring.shadow'), \";\\n outline: \").concat(dt('tabs.tab.focus.ring.width'), \" \").concat(dt('tabs.tab.focus.ring.style'), \" \").concat(dt('tabs.tab.focus.ring.color'), \";\\n outline-offset: \").concat(dt('tabs.tab.focus.ring.offset'), \";\\n}\\n\\n.p-tab:not(.p-tab-active):not(.p-disabled):hover {\\n background: \").concat(dt('tabs.tab.hover.background'), \";\\n border-color: \").concat(dt('tabs.tab.hover.border.color'), \";\\n color: \").concat(dt('tabs.tab.hover.color'), \";\\n}\\n\\n.p-tab-active {\\n background: \").concat(dt('tabs.tab.active.background'), \";\\n border-color: \").concat(dt('tabs.tab.active.border.color'), \";\\n color: \").concat(dt('tabs.tab.active.color'), \";\\n}\\n\\n.p-tabpanels {\\n background: \").concat(dt('tabs.tabpanel.background'), \";\\n color: \").concat(dt('tabs.tabpanel.color'), \";\\n padding: \").concat(dt('tabs.tabpanel.padding'), \";\\n outline: 0 none;\\n}\\n\\n.p-tabpanel:focus-visible {\\n box-shadow: \").concat(dt('tabs.tabpanel.focus.ring.shadow'), \";\\n outline: \").concat(dt('tabs.tabpanel.focus.ring.width'), \" \").concat(dt('tabs.tabpanel.focus.ring.style'), \" \").concat(dt('tabs.tabpanel.focus.ring.color'), \";\\n outline-offset: \").concat(dt('tabs.tabpanel.focus.ring.offset'), \";\\n}\\n\\n.p-tablist-active-bar {\\n z-index: 1;\\n display: block;\\n position: absolute;\\n bottom: \").concat(dt('tabs.active.bar.bottom'), \";\\n height: \").concat(dt('tabs.active.bar.height'), \";\\n background: \").concat(dt('tabs.active.bar.background'), \";\\n transition: 250ms cubic-bezier(0.35, 0, 0.25, 1);\\n}\\n\");\n};\nvar classes = {\n root: function root(_ref2) {\n var props = _ref2.props;\n return ['p-tabs p-component', {\n 'p-tabs-scrollable': props.scrollable\n }];\n }\n};\nvar TabsStyle = BaseStyle.extend({\n name: 'tabs',\n theme: theme,\n classes: classes\n});\n\nexport { TabsStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import { UniqueComponentId } from '@primevue/core/utils';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport TabsStyle from 'primevue/tabs/style';\nimport { openBlock, createElementBlock, mergeProps, renderSlot } from 'vue';\n\nvar script$1 = {\n name: 'BaseTabs',\n \"extends\": BaseComponent,\n props: {\n value: {\n type: [String, Number],\n \"default\": undefined\n },\n lazy: {\n type: Boolean,\n \"default\": false\n },\n scrollable: {\n type: Boolean,\n \"default\": false\n },\n showNavigators: {\n type: Boolean,\n \"default\": true\n },\n tabindex: {\n type: Number,\n \"default\": 0\n },\n selectOnFocus: {\n type: Boolean,\n \"default\": false\n }\n },\n style: TabsStyle,\n provide: function provide() {\n return {\n $pcTabs: this,\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'Tabs',\n \"extends\": script$1,\n inheritAttrs: false,\n emits: ['update:value'],\n data: function data() {\n return {\n id: this.$attrs.id,\n d_value: this.value\n };\n },\n watch: {\n '$attrs.id': function $attrsId(newValue) {\n this.id = newValue || UniqueComponentId();\n },\n value: function value(newValue) {\n this.d_value = newValue;\n }\n },\n mounted: function mounted() {\n this.id = this.id || UniqueComponentId();\n },\n methods: {\n updateValue: function updateValue(newValue) {\n if (this.d_value !== newValue) {\n this.d_value = newValue;\n this.$emit('update:value', newValue);\n }\n },\n isVertical: function isVertical() {\n return this.orientation === 'vertical';\n }\n }\n};\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"div\", mergeProps({\n \"class\": _ctx.cx('root')\n }, _ctx.ptmi('root')), [renderSlot(_ctx.$slots, \"default\")], 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseStyle from '@primevue/core/base/style';\n\nvar classes = {\n root: 'p-tabpanels'\n};\nvar TabPanelsStyle = BaseStyle.extend({\n name: 'tabpanels',\n classes: classes\n});\n\nexport { TabPanelsStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseComponent from '@primevue/core/basecomponent';\nimport TabPanelsStyle from 'primevue/tabpanels/style';\nimport { openBlock, createElementBlock, mergeProps, renderSlot } from 'vue';\n\nvar script$1 = {\n name: 'BaseTabPanels',\n \"extends\": BaseComponent,\n props: {},\n style: TabPanelsStyle,\n provide: function provide() {\n return {\n $pcTabPanels: this,\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'TabPanels',\n \"extends\": script$1,\n inheritAttrs: false\n};\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"div\", mergeProps({\n \"class\": _ctx.cx('root'),\n role: \"presentation\"\n }, _ctx.ptmi('root')), [renderSlot(_ctx.$slots, \"default\")], 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseStyle from '@primevue/core/base/style';\n\nvar classes = {\n root: function root(_ref) {\n var instance = _ref.instance;\n return ['p-tabpanel', {\n 'p-tabpanel-active': instance.active\n }];\n }\n};\nvar TabPanelStyle = BaseStyle.extend({\n name: 'tabpanel',\n classes: classes\n});\n\nexport { TabPanelStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import { equals } from '@primeuix/utils/object';\nimport { mergeProps, renderSlot, openBlock, createElementBlock, Fragment, withDirectives, createBlock, resolveDynamicComponent, withCtx, vShow, createCommentVNode, normalizeClass } from 'vue';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport TabPanelStyle from 'primevue/tabpanel/style';\n\nvar script$1 = {\n name: 'BaseTabPanel',\n \"extends\": BaseComponent,\n props: {\n // in Tabs\n value: {\n type: [String, Number],\n \"default\": undefined\n },\n as: {\n type: [String, Object],\n \"default\": 'DIV'\n },\n asChild: {\n type: Boolean,\n \"default\": false\n },\n // in TabView\n header: null,\n headerStyle: null,\n headerClass: null,\n headerProps: null,\n headerActionProps: null,\n contentStyle: null,\n contentClass: null,\n contentProps: null,\n disabled: Boolean\n },\n style: TabPanelStyle,\n provide: function provide() {\n return {\n $pcTabPanel: this,\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'TabPanel',\n \"extends\": script$1,\n inheritAttrs: false,\n inject: ['$pcTabs'],\n computed: {\n active: function active() {\n var _this$$pcTabs;\n return equals((_this$$pcTabs = this.$pcTabs) === null || _this$$pcTabs === void 0 ? void 0 : _this$$pcTabs.d_value, this.value);\n },\n id: function id() {\n var _this$$pcTabs2;\n return \"\".concat((_this$$pcTabs2 = this.$pcTabs) === null || _this$$pcTabs2 === void 0 ? void 0 : _this$$pcTabs2.id, \"_tabpanel_\").concat(this.value);\n },\n ariaLabelledby: function ariaLabelledby() {\n var _this$$pcTabs3;\n return \"\".concat((_this$$pcTabs3 = this.$pcTabs) === null || _this$$pcTabs3 === void 0 ? void 0 : _this$$pcTabs3.id, \"_tab_\").concat(this.value);\n },\n attrs: function attrs() {\n return mergeProps(this.a11yAttrs, this.ptmi('root', this.ptParams));\n },\n a11yAttrs: function a11yAttrs() {\n var _this$$pcTabs4;\n return {\n id: this.id,\n tabindex: (_this$$pcTabs4 = this.$pcTabs) === null || _this$$pcTabs4 === void 0 ? void 0 : _this$$pcTabs4.tabindex,\n role: 'tabpanel',\n 'aria-labelledby': this.ariaLabelledby,\n 'data-pc-name': 'tabpanel',\n 'data-p-active': this.active\n };\n },\n ptParams: function ptParams() {\n return {\n context: {\n active: this.active\n }\n };\n }\n }\n};\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n var _$options$$pcTabs, _$options$$pcTabs2;\n return !$options.$pcTabs ? renderSlot(_ctx.$slots, \"default\", {\n key: 0\n }) : (openBlock(), createElementBlock(Fragment, {\n key: 1\n }, [!_ctx.asChild ? (openBlock(), createElementBlock(Fragment, {\n key: 0\n }, [((_$options$$pcTabs = $options.$pcTabs) !== null && _$options$$pcTabs !== void 0 && _$options$$pcTabs.lazy ? $options.active : true) ? withDirectives((openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps({\n key: 0,\n \"class\": _ctx.cx('root')\n }, $options.attrs), {\n \"default\": withCtx(function () {\n return [renderSlot(_ctx.$slots, \"default\")];\n }),\n _: 3\n }, 16, [\"class\"])), [[vShow, (_$options$$pcTabs2 = $options.$pcTabs) !== null && _$options$$pcTabs2 !== void 0 && _$options$$pcTabs2.lazy ? true : $options.active]]) : createCommentVNode(\"\", true)], 64)) : renderSlot(_ctx.$slots, \"default\", {\n key: 1,\n \"class\": normalizeClass(_ctx.cx('root')),\n active: $options.active,\n a11yAttrs: $options.a11yAttrs\n })], 64));\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-divider-horizontal {\\n display: flex;\\n width: 100%;\\n position: relative;\\n align-items: center;\\n margin: \".concat(dt('divider.horizontal.margin'), \";\\n padding: \").concat(dt('divider.horizontal.padding'), \";\\n}\\n\\n.p-divider-horizontal:before {\\n position: absolute;\\n display: block;\\n top: 50%;\\n left: 0;\\n width: 100%;\\n content: \\\"\\\";\\n border-top: 1px solid \").concat(dt('divider.border.color'), \";\\n}\\n\\n.p-divider-horizontal .p-divider-content {\\n padding: \").concat(dt('divider.horizontal.content.padding'), \";\\n}\\n\\n.p-divider-vertical {\\n min-height: 100%;\\n margin: 0 1rem;\\n display: flex;\\n position: relative;\\n justify-content: center;\\n margin: \").concat(dt('divider.vertical.margin'), \";\\n padding: \").concat(dt('divider.vertical.padding'), \";\\n}\\n\\n.p-divider-vertical:before {\\n position: absolute;\\n display: block;\\n top: 0;\\n left: 50%;\\n height: 100%;\\n content: \\\"\\\";\\n border-left: 1px solid \").concat(dt('divider.border.color'), \";\\n}\\n\\n.p-divider.p-divider-vertical .p-divider-content {\\n padding: \").concat(dt('divider.vertical.content.padding'), \";\\n}\\n\\n.p-divider-content {\\n z-index: 1;\\n background: \").concat(dt('divider.content.background'), \";\\n color: \").concat(dt('divider.content.color'), \";\\n}\\n\\n.p-divider-solid.p-divider-horizontal:before {\\n border-top-style: solid;\\n}\\n\\n.p-divider-solid.p-divider-vertical:before {\\n border-left-style: solid;\\n}\\n\\n.p-divider-dashed.p-divider-horizontal:before {\\n border-top-style: dashed;\\n}\\n\\n.p-divider-dashed.p-divider-vertical:before {\\n border-left-style: dashed;\\n}\\n\\n.p-divider-dotted.p-divider-horizontal:before {\\n border-top-style: dotted;\\n}\\n\\n.p-divider-dotted.p-divider-vertical:before {\\n border-left-style: dotted;\\n}\\n\");\n};\n\n/* Position */\nvar inlineStyles = {\n root: function root(_ref2) {\n var props = _ref2.props;\n return {\n justifyContent: props.layout === 'horizontal' ? props.align === 'center' || props.align === null ? 'center' : props.align === 'left' ? 'flex-start' : props.align === 'right' ? 'flex-end' : null : null,\n alignItems: props.layout === 'vertical' ? props.align === 'center' || props.align === null ? 'center' : props.align === 'top' ? 'flex-start' : props.align === 'bottom' ? 'flex-end' : null : null\n };\n }\n};\nvar classes = {\n root: function root(_ref3) {\n var props = _ref3.props;\n return ['p-divider p-component', 'p-divider-' + props.layout, 'p-divider-' + props.type, {\n 'p-divider-left': props.layout === 'horizontal' && (!props.align || props.align === 'left')\n }, {\n 'p-divider-center': props.layout === 'horizontal' && props.align === 'center'\n }, {\n 'p-divider-right': props.layout === 'horizontal' && props.align === 'right'\n }, {\n 'p-divider-top': props.layout === 'vertical' && props.align === 'top'\n }, {\n 'p-divider-center': props.layout === 'vertical' && (!props.align || props.align === 'center')\n }, {\n 'p-divider-bottom': props.layout === 'vertical' && props.align === 'bottom'\n }];\n },\n content: 'p-divider-content'\n};\nvar DividerStyle = BaseStyle.extend({\n name: 'divider',\n theme: theme,\n classes: classes,\n inlineStyles: inlineStyles\n});\n\nexport { DividerStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseComponent from '@primevue/core/basecomponent';\nimport DividerStyle from 'primevue/divider/style';\nimport { openBlock, createElementBlock, mergeProps, renderSlot, createCommentVNode } from 'vue';\n\nvar script$1 = {\n name: 'BaseDivider',\n \"extends\": BaseComponent,\n props: {\n align: {\n type: String,\n \"default\": null\n },\n layout: {\n type: String,\n \"default\": 'horizontal'\n },\n type: {\n type: String,\n \"default\": 'solid'\n }\n },\n style: DividerStyle,\n provide: function provide() {\n return {\n $pcDivider: this,\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'Divider',\n \"extends\": script$1,\n inheritAttrs: false\n};\n\nvar _hoisted_1 = [\"aria-orientation\"];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"div\", mergeProps({\n \"class\": _ctx.cx('root'),\n style: _ctx.sx('root'),\n role: \"separator\",\n \"aria-orientation\": _ctx.layout\n }, _ctx.ptmi('root')), [_ctx.$slots[\"default\"] ? (openBlock(), createElementBlock(\"div\", mergeProps({\n key: 0,\n \"class\": _ctx.cx('content')\n }, _ctx.ptm('content')), [renderSlot(_ctx.$slots, \"default\")], 16)) : createCommentVNode(\"\", true)], 16, _hoisted_1);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-scrollpanel-content-container {\\n overflow: hidden;\\n width: 100%;\\n height: 100%;\\n position: relative;\\n z-index: 1;\\n float: left;\\n}\\n\\n.p-scrollpanel-content {\\n height: calc(100% + calc(2 * \".concat(dt('scrollpanel.bar.size'), \"));\\n width: calc(100% + calc(2 * \").concat(dt('scrollpanel.bar.size'), \"));\\n padding: 0 calc(2 * \").concat(dt('scrollpanel.bar.size'), \") calc(2 * \").concat(dt('scrollpanel.bar.size'), \") 0;\\n position: relative;\\n overflow: auto;\\n box-sizing: border-box;\\n scrollbar-width: none;\\n}\\n\\n.p-scrollpanel-content::-webkit-scrollbar {\\n display: none;\\n}\\n\\n.p-scrollpanel-bar {\\n position: relative;\\n border-radius: \").concat(dt('scrollpanel.bar.border.radius'), \";\\n z-index: 2;\\n cursor: pointer;\\n opacity: 0;\\n outline-color: transparent;\\n transition: outline-color \").concat(dt('scrollpanel.transition.duration'), \";\\n background: \").concat(dt('scrollpanel.bar.background'), \";\\n border: 0 none;\\n transition: outline-color \").concat(dt('scrollpanel.transition.duration'), \", opacity \").concat(dt('scrollpanel.transition.duration'), \";\\n}\\n\\n.p-scrollpanel-bar:focus-visible {\\n box-shadow: \").concat(dt('scrollpanel.bar.focus.ring.shadow'), \";\\n outline: \").concat(dt('scrollpanel.barfocus.ring.width'), \" \").concat(dt('scrollpanel.bar.focus.ring.style'), \" \").concat(dt('scrollpanel.bar.focus.ring.color'), \";\\n outline-offset: \").concat(dt('scrollpanel.barfocus.ring.offset'), \";\\n}\\n\\n.p-scrollpanel-bar-y {\\n width: \").concat(dt('scrollpanel.bar.size'), \";\\n top: 0;\\n}\\n\\n.p-scrollpanel-bar-x {\\n height: \").concat(dt('scrollpanel.bar.size'), \";\\n bottom: 0;\\n}\\n\\n.p-scrollpanel-hidden {\\n visibility: hidden;\\n}\\n\\n.p-scrollpanel:hover .p-scrollpanel-bar,\\n.p-scrollpanel:active .p-scrollpanel-bar {\\n opacity: 1;\\n}\\n\\n.p-scrollpanel-grabbed {\\n user-select: none;\\n}\\n\");\n};\nvar classes = {\n root: 'p-scrollpanel p-component',\n contentContainer: 'p-scrollpanel-content-container',\n content: 'p-scrollpanel-content',\n barX: 'p-scrollpanel-bar p-scrollpanel-bar-x',\n barY: 'p-scrollpanel-bar p-scrollpanel-bar-y'\n};\nvar ScrollPanelStyle = BaseStyle.extend({\n name: 'scrollpanel',\n theme: theme,\n classes: classes\n});\n\nexport { ScrollPanelStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import { UniqueComponentId } from '@primevue/core/utils';\nimport { getHeight, addClass, removeClass } from '@primeuix/utils/dom';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport ScrollPanelStyle from 'primevue/scrollpanel/style';\nimport { openBlock, createElementBlock, mergeProps, createElementVNode, renderSlot } from 'vue';\n\nvar script$1 = {\n name: 'BaseScrollPanel',\n \"extends\": BaseComponent,\n props: {\n step: {\n type: Number,\n \"default\": 5\n }\n },\n style: ScrollPanelStyle,\n provide: function provide() {\n return {\n $pcScrollPanel: this,\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'ScrollPanel',\n \"extends\": script$1,\n inheritAttrs: false,\n initialized: false,\n documentResizeListener: null,\n documentMouseMoveListener: null,\n documentMouseUpListener: null,\n frame: null,\n scrollXRatio: null,\n scrollYRatio: null,\n isXBarClicked: false,\n isYBarClicked: false,\n lastPageX: null,\n lastPageY: null,\n timer: null,\n outsideClickListener: null,\n data: function data() {\n return {\n id: this.$attrs.id,\n orientation: 'vertical',\n lastScrollTop: 0,\n lastScrollLeft: 0\n };\n },\n watch: {\n '$attrs.id': function $attrsId(newValue) {\n this.id = newValue || UniqueComponentId();\n }\n },\n mounted: function mounted() {\n this.id = this.id || UniqueComponentId();\n if (this.$el.offsetParent) {\n this.initialize();\n }\n },\n updated: function updated() {\n if (!this.initialized && this.$el.offsetParent) {\n this.initialize();\n }\n },\n beforeUnmount: function beforeUnmount() {\n this.unbindDocumentResizeListener();\n if (this.frame) {\n window.cancelAnimationFrame(this.frame);\n }\n },\n methods: {\n initialize: function initialize() {\n this.moveBar();\n this.bindDocumentResizeListener();\n this.calculateContainerHeight();\n },\n calculateContainerHeight: function calculateContainerHeight() {\n var containerStyles = getComputedStyle(this.$el),\n xBarStyles = getComputedStyle(this.$refs.xBar),\n pureContainerHeight = getHeight(this.$el) - parseInt(xBarStyles['height'], 10);\n if (containerStyles['max-height'] !== 'none' && pureContainerHeight === 0) {\n if (this.$refs.content.offsetHeight + parseInt(xBarStyles['height'], 10) > parseInt(containerStyles['max-height'], 10)) {\n this.$el.style.height = containerStyles['max-height'];\n } else {\n this.$el.style.height = this.$refs.content.offsetHeight + parseFloat(containerStyles.paddingTop) + parseFloat(containerStyles.paddingBottom) + parseFloat(containerStyles.borderTopWidth) + parseFloat(containerStyles.borderBottomWidth) + 'px';\n }\n }\n },\n moveBar: function moveBar() {\n var _this = this;\n if (this.$refs.content) {\n /* horizontal scroll */\n var totalWidth = this.$refs.content.scrollWidth;\n var ownWidth = this.$refs.content.clientWidth;\n var bottom = (this.$el.clientHeight - this.$refs.xBar.clientHeight) * -1;\n this.scrollXRatio = ownWidth / totalWidth;\n\n /* vertical scroll */\n var totalHeight = this.$refs.content.scrollHeight;\n var ownHeight = this.$refs.content.clientHeight;\n var right = (this.$el.clientWidth - this.$refs.yBar.clientWidth) * -1;\n this.scrollYRatio = ownHeight / totalHeight;\n this.frame = this.requestAnimationFrame(function () {\n if (_this.$refs.xBar) {\n if (_this.scrollXRatio >= 1) {\n _this.$refs.xBar.setAttribute('data-p-scrollpanel-hidden', 'true');\n !_this.isUnstyled && addClass(_this.$refs.xBar, 'p-scrollpanel-hidden');\n } else {\n _this.$refs.xBar.setAttribute('data-p-scrollpanel-hidden', 'false');\n !_this.isUnstyled && removeClass(_this.$refs.xBar, 'p-scrollpanel-hidden');\n _this.$refs.xBar.style.cssText = 'width:' + Math.max(_this.scrollXRatio * 100, 10) + '%; left:' + _this.$refs.content.scrollLeft / totalWidth * 100 + '%;bottom:' + bottom + 'px;';\n }\n }\n if (_this.$refs.yBar) {\n if (_this.scrollYRatio >= 1) {\n _this.$refs.yBar.setAttribute('data-p-scrollpanel-hidden', 'true');\n !_this.isUnstyled && addClass(_this.$refs.yBar, 'p-scrollpanel-hidden');\n } else {\n _this.$refs.yBar.setAttribute('data-p-scrollpanel-hidden', 'false');\n !_this.isUnstyled && removeClass(_this.$refs.yBar, 'p-scrollpanel-hidden');\n _this.$refs.yBar.style.cssText = 'height:' + Math.max(_this.scrollYRatio * 100, 10) + '%; top: calc(' + _this.$refs.content.scrollTop / totalHeight * 100 + '% - ' + _this.$refs.xBar.clientHeight + 'px);right:' + right + 'px;';\n }\n }\n });\n }\n },\n onYBarMouseDown: function onYBarMouseDown(e) {\n this.isYBarClicked = true;\n this.$refs.yBar.focus();\n this.lastPageY = e.pageY;\n this.$refs.yBar.setAttribute('data-p-scrollpanel-grabbed', 'true');\n !this.isUnstyled && addClass(this.$refs.yBar, 'p-scrollpanel-grabbed');\n document.body.setAttribute('data-p-scrollpanel-grabbed', 'true');\n !this.isUnstyled && addClass(document.body, 'p-scrollpanel-grabbed');\n this.bindDocumentMouseListeners();\n e.preventDefault();\n },\n onXBarMouseDown: function onXBarMouseDown(e) {\n this.isXBarClicked = true;\n this.$refs.xBar.focus();\n this.lastPageX = e.pageX;\n this.$refs.yBar.setAttribute('data-p-scrollpanel-grabbed', 'false');\n !this.isUnstyled && addClass(this.$refs.xBar, 'p-scrollpanel-grabbed');\n document.body.setAttribute('data-p-scrollpanel-grabbed', 'false');\n !this.isUnstyled && addClass(document.body, 'p-scrollpanel-grabbed');\n this.bindDocumentMouseListeners();\n e.preventDefault();\n },\n onScroll: function onScroll(event) {\n if (this.lastScrollLeft !== event.target.scrollLeft) {\n this.lastScrollLeft = event.target.scrollLeft;\n this.orientation = 'horizontal';\n } else if (this.lastScrollTop !== event.target.scrollTop) {\n this.lastScrollTop = event.target.scrollTop;\n this.orientation = 'vertical';\n }\n this.moveBar();\n },\n onKeyDown: function onKeyDown(event) {\n if (this.orientation === 'vertical') {\n switch (event.code) {\n case 'ArrowDown':\n {\n this.setTimer('scrollTop', this.step);\n event.preventDefault();\n break;\n }\n case 'ArrowUp':\n {\n this.setTimer('scrollTop', this.step * -1);\n event.preventDefault();\n break;\n }\n case 'ArrowLeft':\n case 'ArrowRight':\n {\n event.preventDefault();\n break;\n }\n }\n } else if (this.orientation === 'horizontal') {\n switch (event.code) {\n case 'ArrowRight':\n {\n this.setTimer('scrollLeft', this.step);\n event.preventDefault();\n break;\n }\n case 'ArrowLeft':\n {\n this.setTimer('scrollLeft', this.step * -1);\n event.preventDefault();\n break;\n }\n case 'ArrowDown':\n case 'ArrowUp':\n {\n event.preventDefault();\n break;\n }\n }\n }\n },\n onKeyUp: function onKeyUp() {\n this.clearTimer();\n },\n repeat: function repeat(bar, step) {\n this.$refs.content[bar] += step;\n this.moveBar();\n },\n setTimer: function setTimer(bar, step) {\n var _this2 = this;\n this.clearTimer();\n this.timer = setTimeout(function () {\n _this2.repeat(bar, step);\n }, 40);\n },\n clearTimer: function clearTimer() {\n if (this.timer) {\n clearTimeout(this.timer);\n }\n },\n onDocumentMouseMove: function onDocumentMouseMove(e) {\n if (this.isXBarClicked) {\n this.onMouseMoveForXBar(e);\n } else if (this.isYBarClicked) {\n this.onMouseMoveForYBar(e);\n } else {\n this.onMouseMoveForXBar(e);\n this.onMouseMoveForYBar(e);\n }\n },\n onMouseMoveForXBar: function onMouseMoveForXBar(e) {\n var _this3 = this;\n var deltaX = e.pageX - this.lastPageX;\n this.lastPageX = e.pageX;\n this.frame = this.requestAnimationFrame(function () {\n _this3.$refs.content.scrollLeft += deltaX / _this3.scrollXRatio;\n });\n },\n onMouseMoveForYBar: function onMouseMoveForYBar(e) {\n var _this4 = this;\n var deltaY = e.pageY - this.lastPageY;\n this.lastPageY = e.pageY;\n this.frame = this.requestAnimationFrame(function () {\n _this4.$refs.content.scrollTop += deltaY / _this4.scrollYRatio;\n });\n },\n onFocus: function onFocus(event) {\n if (this.$refs.xBar.isSameNode(event.target)) {\n this.orientation = 'horizontal';\n } else if (this.$refs.yBar.isSameNode(event.target)) {\n this.orientation = 'vertical';\n }\n },\n onBlur: function onBlur() {\n if (this.orientation === 'horizontal') {\n this.orientation = 'vertical';\n }\n },\n onDocumentMouseUp: function onDocumentMouseUp() {\n this.$refs.yBar.setAttribute('data-p-scrollpanel-grabbed', 'false');\n !this.isUnstyled && removeClass(this.$refs.yBar, 'p-scrollpanel-grabbed');\n this.$refs.xBar.setAttribute('data-p-scrollpanel-grabbed', 'false');\n !this.isUnstyled && removeClass(this.$refs.xBar, 'p-scrollpanel-grabbed');\n document.body.setAttribute('data-p-scrollpanel-grabbed', 'false');\n !this.isUnstyled && removeClass(document.body, 'p-scrollpanel-grabbed');\n this.unbindDocumentMouseListeners();\n this.isXBarClicked = false;\n this.isYBarClicked = false;\n },\n requestAnimationFrame: function requestAnimationFrame(f) {\n var frame = window.requestAnimationFrame || this.timeoutFrame;\n return frame(f);\n },\n refresh: function refresh() {\n this.moveBar();\n },\n scrollTop: function scrollTop(_scrollTop) {\n var scrollableHeight = this.$refs.content.scrollHeight - this.$refs.content.clientHeight;\n _scrollTop = _scrollTop > scrollableHeight ? scrollableHeight : _scrollTop > 0 ? _scrollTop : 0;\n this.$refs.content.scrollTop = _scrollTop;\n },\n timeoutFrame: function timeoutFrame(fn) {\n setTimeout(fn, 0);\n },\n bindDocumentMouseListeners: function bindDocumentMouseListeners() {\n var _this5 = this;\n if (!this.documentMouseMoveListener) {\n this.documentMouseMoveListener = function (e) {\n _this5.onDocumentMouseMove(e);\n };\n document.addEventListener('mousemove', this.documentMouseMoveListener);\n }\n if (!this.documentMouseUpListener) {\n this.documentMouseUpListener = function (e) {\n _this5.onDocumentMouseUp(e);\n };\n document.addEventListener('mouseup', this.documentMouseUpListener);\n }\n },\n unbindDocumentMouseListeners: function unbindDocumentMouseListeners() {\n if (this.documentMouseMoveListener) {\n document.removeEventListener('mousemove', this.documentMouseMoveListener);\n this.documentMouseMoveListener = null;\n }\n if (this.documentMouseUpListener) {\n document.removeEventListener('mouseup', this.documentMouseUpListener);\n this.documentMouseUpListener = null;\n }\n },\n bindDocumentResizeListener: function bindDocumentResizeListener() {\n var _this6 = this;\n if (!this.documentResizeListener) {\n this.documentResizeListener = function () {\n _this6.moveBar();\n };\n window.addEventListener('resize', this.documentResizeListener);\n }\n },\n unbindDocumentResizeListener: function unbindDocumentResizeListener() {\n if (this.documentResizeListener) {\n window.removeEventListener('resize', this.documentResizeListener);\n this.documentResizeListener = null;\n }\n }\n },\n computed: {\n contentId: function contentId() {\n return this.id + '_content';\n }\n }\n};\n\nvar _hoisted_1 = [\"id\"];\nvar _hoisted_2 = [\"aria-controls\", \"aria-valuenow\"];\nvar _hoisted_3 = [\"aria-controls\", \"aria-valuenow\"];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"div\", mergeProps({\n \"class\": _ctx.cx('root')\n }, _ctx.ptmi('root')), [createElementVNode(\"div\", mergeProps({\n \"class\": _ctx.cx('contentContainer')\n }, _ctx.ptm('contentContainer')), [createElementVNode(\"div\", mergeProps({\n ref: \"content\",\n id: $options.contentId,\n \"class\": _ctx.cx('content'),\n onScroll: _cache[0] || (_cache[0] = function () {\n return $options.onScroll && $options.onScroll.apply($options, arguments);\n }),\n onMouseenter: _cache[1] || (_cache[1] = function () {\n return $options.moveBar && $options.moveBar.apply($options, arguments);\n })\n }, _ctx.ptm('content')), [renderSlot(_ctx.$slots, \"default\")], 16, _hoisted_1)], 16), createElementVNode(\"div\", mergeProps({\n ref: \"xBar\",\n \"class\": _ctx.cx('barx'),\n tabindex: \"0\",\n role: \"scrollbar\",\n \"aria-orientation\": \"horizontal\",\n \"aria-controls\": $options.contentId,\n \"aria-valuenow\": $data.lastScrollLeft,\n onMousedown: _cache[2] || (_cache[2] = function () {\n return $options.onXBarMouseDown && $options.onXBarMouseDown.apply($options, arguments);\n }),\n onKeydown: _cache[3] || (_cache[3] = function ($event) {\n return $options.onKeyDown($event);\n }),\n onKeyup: _cache[4] || (_cache[4] = function () {\n return $options.onKeyUp && $options.onKeyUp.apply($options, arguments);\n }),\n onFocus: _cache[5] || (_cache[5] = function () {\n return $options.onFocus && $options.onFocus.apply($options, arguments);\n }),\n onBlur: _cache[6] || (_cache[6] = function () {\n return $options.onBlur && $options.onBlur.apply($options, arguments);\n })\n }, _ctx.ptm('barx'), {\n \"data-pc-group-section\": \"bar\"\n }), null, 16, _hoisted_2), createElementVNode(\"div\", mergeProps({\n ref: \"yBar\",\n \"class\": _ctx.cx('bary'),\n tabindex: \"0\",\n role: \"scrollbar\",\n \"aria-orientation\": \"vertical\",\n \"aria-controls\": $options.contentId,\n \"aria-valuenow\": $data.lastScrollTop,\n onMousedown: _cache[7] || (_cache[7] = function () {\n return $options.onYBarMouseDown && $options.onYBarMouseDown.apply($options, arguments);\n }),\n onKeydown: _cache[8] || (_cache[8] = function ($event) {\n return $options.onKeyDown($event);\n }),\n onKeyup: _cache[9] || (_cache[9] = function () {\n return $options.onKeyUp && $options.onKeyUp.apply($options, arguments);\n }),\n onFocus: _cache[10] || (_cache[10] = function () {\n return $options.onFocus && $options.onFocus.apply($options, arguments);\n })\n }, _ctx.ptm('bary'), {\n \"data-pc-group-section\": \"bar\"\n }), null, 16, _hoisted_3)], 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseIcon from '@primevue/icons/baseicon';\nimport { openBlock, createElementBlock, mergeProps, createElementVNode } from 'vue';\n\nvar script = {\n name: 'AngleDownIcon',\n \"extends\": BaseIcon\n};\n\nvar _hoisted_1 = /*#__PURE__*/createElementVNode(\"path\", {\n d: \"M3.58659 4.5007C3.68513 4.50023 3.78277 4.51945 3.87379 4.55723C3.9648 4.59501 4.04735 4.65058 4.11659 4.7207L7.11659 7.7207L10.1166 4.7207C10.2619 4.65055 10.4259 4.62911 10.5843 4.65956C10.7427 4.69002 10.8871 4.77074 10.996 4.88976C11.1049 5.00877 11.1726 5.15973 11.1889 5.32022C11.2052 5.48072 11.1693 5.6422 11.0866 5.7807L7.58659 9.2807C7.44597 9.42115 7.25534 9.50004 7.05659 9.50004C6.85784 9.50004 6.66722 9.42115 6.52659 9.2807L3.02659 5.7807C2.88614 5.64007 2.80725 5.44945 2.80725 5.2507C2.80725 5.05195 2.88614 4.86132 3.02659 4.7207C3.09932 4.64685 3.18675 4.58911 3.28322 4.55121C3.37969 4.51331 3.48305 4.4961 3.58659 4.5007Z\",\n fill: \"currentColor\"\n}, null, -1);\nvar _hoisted_2 = [_hoisted_1];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"svg\", mergeProps({\n width: \"14\",\n height: \"14\",\n viewBox: \"0 0 14 14\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, _ctx.pti()), _hoisted_2, 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseIcon from '@primevue/icons/baseicon';\nimport { openBlock, createElementBlock, mergeProps, createElementVNode } from 'vue';\n\nvar script = {\n name: 'AngleUpIcon',\n \"extends\": BaseIcon\n};\n\nvar _hoisted_1 = /*#__PURE__*/createElementVNode(\"path\", {\n d: \"M10.4134 9.49931C10.3148 9.49977 10.2172 9.48055 10.1262 9.44278C10.0352 9.405 9.95263 9.34942 9.88338 9.27931L6.88338 6.27931L3.88338 9.27931C3.73811 9.34946 3.57409 9.3709 3.41567 9.34044C3.25724 9.30999 3.11286 9.22926 3.00395 9.11025C2.89504 8.99124 2.82741 8.84028 2.8111 8.67978C2.79478 8.51928 2.83065 8.35781 2.91338 8.21931L6.41338 4.71931C6.55401 4.57886 6.74463 4.49997 6.94338 4.49997C7.14213 4.49997 7.33276 4.57886 7.47338 4.71931L10.9734 8.21931C11.1138 8.35994 11.1927 8.55056 11.1927 8.74931C11.1927 8.94806 11.1138 9.13868 10.9734 9.27931C10.9007 9.35315 10.8132 9.41089 10.7168 9.44879C10.6203 9.48669 10.5169 9.5039 10.4134 9.49931Z\",\n fill: \"currentColor\"\n}, null, -1);\nvar _hoisted_2 = [_hoisted_1];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"svg\", mergeProps({\n width: \"14\",\n height: \"14\",\n viewBox: \"0 0 14 14\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, _ctx.pti()), _hoisted_2, 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-inputnumber {\\n display: inline-flex;\\n position: relative;\\n}\\n\\n.p-inputnumber-button {\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n flex: 0 0 auto;\\n cursor: pointer;\\n background: \".concat(dt('inputnumber.button.background'), \";\\n color: \").concat(dt('inputnumber.button.color'), \";\\n width: \").concat(dt('inputnumber.button.width'), \";\\n transition: background \").concat(dt('inputnumber.transition.duration'), \", color \").concat(dt('inputnumber.transition.duration'), \", border-color \").concat(dt('inputnumber.transition.duration'), \", outline-color \").concat(dt('inputnumber.transition.duration'), \";\\n}\\n\\n.p-inputnumber-button:hover {\\n background: \").concat(dt('inputnumber.button.hover.background'), \";\\n color: \").concat(dt('inputnumber.button.hover.color'), \";\\n}\\n\\n.p-inputnumber-button:active {\\n background: \").concat(dt('inputnumber.button.active.background'), \";\\n color: \").concat(dt('inputnumber.button.active.color'), \";\\n}\\n\\n.p-inputnumber-stacked .p-inputnumber-button {\\n position: relative;\\n border: 0 none;\\n}\\n\\n.p-inputnumber-stacked .p-inputnumber-button-group {\\n display: flex;\\n flex-direction: column;\\n position: absolute;\\n top: 1px;\\n right: 1px;\\n height: calc(100% - 2px);\\n z-index: 1;\\n}\\n\\n.p-inputnumber-stacked .p-inputnumber-increment-button {\\n padding: 0;\\n border-top-right-radius: calc(\").concat(dt('inputnumber.button.border.radius'), \" - 1px);\\n}\\n\\n.p-inputnumber-stacked .p-inputnumber-decrement-button {\\n padding: 0;\\n border-bottom-right-radius: calc(\").concat(dt('inputnumber.button.border.radius'), \" - 1px);\\n}\\n\\n.p-inputnumber-stacked .p-inputnumber-button {\\n flex: 1 1 auto;\\n border: 0 none;\\n}\\n\\n.p-inputnumber-horizontal .p-inputnumber-button {\\n border: 1px solid \").concat(dt('inputnumber.button.border.color'), \";\\n}\\n\\n.p-inputnumber-horizontal .p-inputnumber-button:hover {\\n border-color: \").concat(dt('inputnumber.button.hover.border.color'), \";\\n}\\n\\n.p-inputnumber-horizontal .p-inputnumber-button:active {\\n border-color: \").concat(dt('inputnumber.button.active.border.color'), \";\\n}\\n\\n.p-inputnumber-horizontal .p-inputnumber-increment-button {\\n order: 3;\\n border-top-right-radius: \").concat(dt('inputnumber.button.border.radius'), \";\\n border-bottom-right-radius: \").concat(dt('inputnumber.button.border.radius'), \";\\n border-left: 0 none;\\n}\\n\\n.p-inputnumber-horizontal .p-inputnumber-input {\\n order: 2;\\n border-radius: 0;\\n}\\n\\n.p-inputnumber-horizontal .p-inputnumber-decrement-button {\\n order: 1;\\n border-top-left-radius: \").concat(dt('inputnumber.button.border.radius'), \";\\n border-bottom-left-radius: \").concat(dt('inputnumber.button.border.radius'), \";\\n border-right: 0 none;\\n}\\n\\n.p-inputnumber-vertical {\\n flex-direction: column;\\n}\\n\\n.p-inputnumber-vertical .p-inputnumber-button {\\n border: 1px solid \").concat(dt('inputnumber.button.border.color'), \";\\n padding: \").concat(dt('inputnumber.button.vertical.padding'), \"; 0;\\n}\\n\\n.p-inputnumber-vertical .p-inputnumber-button:hover {\\n border-color: \").concat(dt('inputnumber.button.hover.border.color'), \";\\n}\\n\\n.p-inputnumber-vertical .p-inputnumber-button:active {\\n border-color: \").concat(dt('inputnumber.button.active.border.color'), \";\\n}\\n\\n.p-inputnumber-vertical .p-inputnumber-increment-button {\\n order: 1;\\n border-top-left-radius: \").concat(dt('inputnumber.button.border.radius'), \";\\n border-top-right-radius: \").concat(dt('inputnumber.button.border.radius'), \";\\n width: 100%;\\n border-bottom: 0 none;\\n}\\n\\n.p-inputnumber-vertical .p-inputnumber-input {\\n order: 2;\\n border-radius: 0;\\n text-align: center;\\n}\\n\\n.p-inputnumber-vertical .p-inputnumber-decrement-button {\\n order: 3;\\n border-bottom-left-radius: \").concat(dt('inputnumber.button.border.radius'), \";\\n border-bottom-right-radius: \").concat(dt('inputnumber.button.border.radius'), \";\\n width: 100%;\\n border-top: 0 none;\\n}\\n\\n.p-inputnumber-input {\\n flex: 1 1 auto;\\n}\\n\\n.p-inputnumber-fluid {\\n width: 100%;\\n}\\n\\n.p-inputnumber-fluid .p-inputnumber-input {\\n width: 1%;\\n}\\n\\n.p-inputnumber-fluid.p-inputnumber-vertical .p-inputnumber-input {\\n width: 100%;\\n}\\n\");\n};\nvar classes = {\n root: function root(_ref2) {\n var instance = _ref2.instance,\n props = _ref2.props;\n return ['p-inputnumber p-component p-inputwrapper', {\n 'p-inputwrapper-filled': instance.filled || props.allowEmpty === false,\n 'p-inputwrapper-focus': instance.focused,\n 'p-inputnumber-stacked': props.showButtons && props.buttonLayout === 'stacked',\n 'p-inputnumber-horizontal': props.showButtons && props.buttonLayout === 'horizontal',\n 'p-inputnumber-vertical': props.showButtons && props.buttonLayout === 'vertical',\n 'p-inputnumber-fluid': instance.hasFluid\n }];\n },\n pcInput: 'p-inputnumber-input',\n buttonGroup: 'p-inputnumber-button-group',\n incrementButton: function incrementButton(_ref3) {\n var instance = _ref3.instance,\n props = _ref3.props;\n return ['p-inputnumber-button p-inputnumber-increment-button', {\n 'p-disabled': props.showButtons && props.max !== null && instance.maxBoundry()\n }];\n },\n decrementButton: function decrementButton(_ref4) {\n var instance = _ref4.instance,\n props = _ref4.props;\n return ['p-inputnumber-button p-inputnumber-decrement-button', {\n 'p-disabled': props.showButtons && props.min !== null && instance.minBoundry()\n }];\n }\n};\nvar InputNumberStyle = BaseStyle.extend({\n name: 'inputnumber',\n theme: theme,\n classes: classes\n});\n\nexport { InputNumberStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import { getSelection, clearSelection } from '@primeuix/utils/dom';\nimport { isNotEmpty, isEmpty } from '@primeuix/utils/object';\nimport AngleDownIcon from '@primevue/icons/angledown';\nimport AngleUpIcon from '@primevue/icons/angleup';\nimport InputText from 'primevue/inputtext';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport InputNumberStyle from 'primevue/inputnumber/style';\nimport { resolveComponent, openBlock, createElementBlock, mergeProps, createVNode, normalizeClass, normalizeStyle, renderSlot, createElementVNode, toHandlers, createBlock, resolveDynamicComponent, createCommentVNode } from 'vue';\n\nvar script$1 = {\n name: 'BaseInputNumber',\n \"extends\": BaseComponent,\n props: {\n modelValue: {\n type: Number,\n \"default\": null\n },\n format: {\n type: Boolean,\n \"default\": true\n },\n showButtons: {\n type: Boolean,\n \"default\": false\n },\n buttonLayout: {\n type: String,\n \"default\": 'stacked'\n },\n incrementButtonClass: {\n type: String,\n \"default\": null\n },\n decrementButtonClass: {\n type: String,\n \"default\": null\n },\n incrementButtonIcon: {\n type: String,\n \"default\": undefined\n },\n incrementIcon: {\n type: String,\n \"default\": undefined\n },\n decrementButtonIcon: {\n type: String,\n \"default\": undefined\n },\n decrementIcon: {\n type: String,\n \"default\": undefined\n },\n locale: {\n type: String,\n \"default\": undefined\n },\n localeMatcher: {\n type: String,\n \"default\": undefined\n },\n mode: {\n type: String,\n \"default\": 'decimal'\n },\n prefix: {\n type: String,\n \"default\": null\n },\n suffix: {\n type: String,\n \"default\": null\n },\n currency: {\n type: String,\n \"default\": undefined\n },\n currencyDisplay: {\n type: String,\n \"default\": undefined\n },\n useGrouping: {\n type: Boolean,\n \"default\": true\n },\n minFractionDigits: {\n type: Number,\n \"default\": undefined\n },\n maxFractionDigits: {\n type: Number,\n \"default\": undefined\n },\n roundingMode: {\n type: String,\n \"default\": 'halfExpand',\n validator: function validator(value) {\n return ['ceil', 'floor', 'expand', 'trunc', 'halfCeil', 'halfFloor', 'halfExpand', 'halfTrunc', 'halfEven'].includes(value);\n }\n },\n min: {\n type: Number,\n \"default\": null\n },\n max: {\n type: Number,\n \"default\": null\n },\n step: {\n type: Number,\n \"default\": 1\n },\n allowEmpty: {\n type: Boolean,\n \"default\": true\n },\n highlightOnFocus: {\n type: Boolean,\n \"default\": false\n },\n readonly: {\n type: Boolean,\n \"default\": false\n },\n variant: {\n type: String,\n \"default\": null\n },\n invalid: {\n type: Boolean,\n \"default\": false\n },\n disabled: {\n type: Boolean,\n \"default\": false\n },\n placeholder: {\n type: String,\n \"default\": null\n },\n fluid: {\n type: Boolean,\n \"default\": null\n },\n inputId: {\n type: String,\n \"default\": null\n },\n inputClass: {\n type: [String, Object],\n \"default\": null\n },\n inputStyle: {\n type: Object,\n \"default\": null\n },\n ariaLabelledby: {\n type: String,\n \"default\": null\n },\n ariaLabel: {\n type: String,\n \"default\": null\n }\n },\n style: InputNumberStyle,\n provide: function provide() {\n return {\n $pcInputNumber: this,\n $parentInstance: this\n };\n }\n};\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _iterableToArray(r) { if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r); }\nfunction _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nvar script = {\n name: 'InputNumber',\n \"extends\": script$1,\n inheritAttrs: false,\n emits: ['update:modelValue', 'input', 'focus', 'blur'],\n inject: {\n $pcFluid: {\n \"default\": null\n }\n },\n numberFormat: null,\n _numeral: null,\n _decimal: null,\n _group: null,\n _minusSign: null,\n _currency: null,\n _suffix: null,\n _prefix: null,\n _index: null,\n groupChar: '',\n isSpecialChar: null,\n prefixChar: null,\n suffixChar: null,\n timer: null,\n data: function data() {\n return {\n d_modelValue: this.modelValue,\n focused: false\n };\n },\n watch: {\n modelValue: function modelValue(newValue) {\n this.d_modelValue = newValue;\n },\n locale: function locale(newValue, oldValue) {\n this.updateConstructParser(newValue, oldValue);\n },\n localeMatcher: function localeMatcher(newValue, oldValue) {\n this.updateConstructParser(newValue, oldValue);\n },\n mode: function mode(newValue, oldValue) {\n this.updateConstructParser(newValue, oldValue);\n },\n currency: function currency(newValue, oldValue) {\n this.updateConstructParser(newValue, oldValue);\n },\n currencyDisplay: function currencyDisplay(newValue, oldValue) {\n this.updateConstructParser(newValue, oldValue);\n },\n useGrouping: function useGrouping(newValue, oldValue) {\n this.updateConstructParser(newValue, oldValue);\n },\n minFractionDigits: function minFractionDigits(newValue, oldValue) {\n this.updateConstructParser(newValue, oldValue);\n },\n maxFractionDigits: function maxFractionDigits(newValue, oldValue) {\n this.updateConstructParser(newValue, oldValue);\n },\n suffix: function suffix(newValue, oldValue) {\n this.updateConstructParser(newValue, oldValue);\n },\n prefix: function prefix(newValue, oldValue) {\n this.updateConstructParser(newValue, oldValue);\n }\n },\n created: function created() {\n this.constructParser();\n },\n methods: {\n getOptions: function getOptions() {\n return {\n localeMatcher: this.localeMatcher,\n style: this.mode,\n currency: this.currency,\n currencyDisplay: this.currencyDisplay,\n useGrouping: this.useGrouping,\n minimumFractionDigits: this.minFractionDigits,\n maximumFractionDigits: this.maxFractionDigits,\n roundingMode: this.roundingMode\n };\n },\n constructParser: function constructParser() {\n this.numberFormat = new Intl.NumberFormat(this.locale, this.getOptions());\n var numerals = _toConsumableArray(new Intl.NumberFormat(this.locale, {\n useGrouping: false\n }).format(9876543210)).reverse();\n var index = new Map(numerals.map(function (d, i) {\n return [d, i];\n }));\n this._numeral = new RegExp(\"[\".concat(numerals.join(''), \"]\"), 'g');\n this._group = this.getGroupingExpression();\n this._minusSign = this.getMinusSignExpression();\n this._currency = this.getCurrencyExpression();\n this._decimal = this.getDecimalExpression();\n this._suffix = this.getSuffixExpression();\n this._prefix = this.getPrefixExpression();\n this._index = function (d) {\n return index.get(d);\n };\n },\n updateConstructParser: function updateConstructParser(newValue, oldValue) {\n if (newValue !== oldValue) {\n this.constructParser();\n }\n },\n escapeRegExp: function escapeRegExp(text) {\n return text.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n },\n getDecimalExpression: function getDecimalExpression() {\n var formatter = new Intl.NumberFormat(this.locale, _objectSpread(_objectSpread({}, this.getOptions()), {}, {\n useGrouping: false\n }));\n return new RegExp(\"[\".concat(formatter.format(1.1).replace(this._currency, '').trim().replace(this._numeral, ''), \"]\"), 'g');\n },\n getGroupingExpression: function getGroupingExpression() {\n var formatter = new Intl.NumberFormat(this.locale, {\n useGrouping: true\n });\n this.groupChar = formatter.format(1000000).trim().replace(this._numeral, '').charAt(0);\n return new RegExp(\"[\".concat(this.groupChar, \"]\"), 'g');\n },\n getMinusSignExpression: function getMinusSignExpression() {\n var formatter = new Intl.NumberFormat(this.locale, {\n useGrouping: false\n });\n return new RegExp(\"[\".concat(formatter.format(-1).trim().replace(this._numeral, ''), \"]\"), 'g');\n },\n getCurrencyExpression: function getCurrencyExpression() {\n if (this.currency) {\n var formatter = new Intl.NumberFormat(this.locale, {\n style: 'currency',\n currency: this.currency,\n currencyDisplay: this.currencyDisplay,\n minimumFractionDigits: 0,\n maximumFractionDigits: 0,\n roundingMode: this.roundingMode\n });\n return new RegExp(\"[\".concat(formatter.format(1).replace(/\\s/g, '').replace(this._numeral, '').replace(this._group, ''), \"]\"), 'g');\n }\n return new RegExp(\"[]\", 'g');\n },\n getPrefixExpression: function getPrefixExpression() {\n if (this.prefix) {\n this.prefixChar = this.prefix;\n } else {\n var formatter = new Intl.NumberFormat(this.locale, {\n style: this.mode,\n currency: this.currency,\n currencyDisplay: this.currencyDisplay\n });\n this.prefixChar = formatter.format(1).split('1')[0];\n }\n return new RegExp(\"\".concat(this.escapeRegExp(this.prefixChar || '')), 'g');\n },\n getSuffixExpression: function getSuffixExpression() {\n if (this.suffix) {\n this.suffixChar = this.suffix;\n } else {\n var formatter = new Intl.NumberFormat(this.locale, {\n style: this.mode,\n currency: this.currency,\n currencyDisplay: this.currencyDisplay,\n minimumFractionDigits: 0,\n maximumFractionDigits: 0,\n roundingMode: this.roundingMode\n });\n this.suffixChar = formatter.format(1).split('1')[1];\n }\n return new RegExp(\"\".concat(this.escapeRegExp(this.suffixChar || '')), 'g');\n },\n formatValue: function formatValue(value) {\n if (value != null) {\n if (value === '-') {\n // Minus sign\n return value;\n }\n if (this.format) {\n var formatter = new Intl.NumberFormat(this.locale, this.getOptions());\n var formattedValue = formatter.format(value);\n if (this.prefix) {\n formattedValue = this.prefix + formattedValue;\n }\n if (this.suffix) {\n formattedValue = formattedValue + this.suffix;\n }\n return formattedValue;\n }\n return value.toString();\n }\n return '';\n },\n parseValue: function parseValue(text) {\n var filteredText = text.replace(this._suffix, '').replace(this._prefix, '').trim().replace(/\\s/g, '').replace(this._currency, '').replace(this._group, '').replace(this._minusSign, '-').replace(this._decimal, '.').replace(this._numeral, this._index);\n if (filteredText) {\n if (filteredText === '-')\n // Minus sign\n return filteredText;\n var parsedValue = +filteredText;\n return isNaN(parsedValue) ? null : parsedValue;\n }\n return null;\n },\n repeat: function repeat(event, interval, dir) {\n var _this = this;\n if (this.readonly) {\n return;\n }\n var i = interval || 500;\n this.clearTimer();\n this.timer = setTimeout(function () {\n _this.repeat(event, 40, dir);\n }, i);\n this.spin(event, dir);\n },\n spin: function spin(event, dir) {\n if (this.$refs.input) {\n var step = this.step * dir;\n var currentValue = this.parseValue(this.$refs.input.$el.value) || 0;\n var newValue = this.validateValue(currentValue + step);\n this.updateInput(newValue, null, 'spin');\n this.updateModel(event, newValue);\n this.handleOnInput(event, currentValue, newValue);\n }\n },\n onUpButtonMouseDown: function onUpButtonMouseDown(event) {\n if (!this.disabled) {\n this.$refs.input.$el.focus();\n this.repeat(event, null, 1);\n event.preventDefault();\n }\n },\n onUpButtonMouseUp: function onUpButtonMouseUp() {\n if (!this.disabled) {\n this.clearTimer();\n }\n },\n onUpButtonMouseLeave: function onUpButtonMouseLeave() {\n if (!this.disabled) {\n this.clearTimer();\n }\n },\n onUpButtonKeyUp: function onUpButtonKeyUp() {\n if (!this.disabled) {\n this.clearTimer();\n }\n },\n onUpButtonKeyDown: function onUpButtonKeyDown(event) {\n if (event.code === 'Space' || event.code === 'Enter' || event.code === 'NumpadEnter') {\n this.repeat(event, null, 1);\n }\n },\n onDownButtonMouseDown: function onDownButtonMouseDown(event) {\n if (!this.disabled) {\n this.$refs.input.$el.focus();\n this.repeat(event, null, -1);\n event.preventDefault();\n }\n },\n onDownButtonMouseUp: function onDownButtonMouseUp() {\n if (!this.disabled) {\n this.clearTimer();\n }\n },\n onDownButtonMouseLeave: function onDownButtonMouseLeave() {\n if (!this.disabled) {\n this.clearTimer();\n }\n },\n onDownButtonKeyUp: function onDownButtonKeyUp() {\n if (!this.disabled) {\n this.clearTimer();\n }\n },\n onDownButtonKeyDown: function onDownButtonKeyDown(event) {\n if (event.code === 'Space' || event.code === 'Enter' || event.code === 'NumpadEnter') {\n this.repeat(event, null, -1);\n }\n },\n onUserInput: function onUserInput() {\n if (this.isSpecialChar) {\n this.$refs.input.$el.value = this.lastValue;\n }\n this.isSpecialChar = false;\n },\n onInputKeyDown: function onInputKeyDown(event) {\n if (this.readonly) {\n return;\n }\n if (event.altKey || event.ctrlKey || event.metaKey) {\n this.isSpecialChar = true;\n this.lastValue = this.$refs.input.$el.value;\n return;\n }\n this.lastValue = event.target.value;\n var selectionStart = event.target.selectionStart;\n var selectionEnd = event.target.selectionEnd;\n var inputValue = event.target.value;\n var newValueStr = null;\n switch (event.code) {\n case 'ArrowUp':\n this.spin(event, 1);\n event.preventDefault();\n break;\n case 'ArrowDown':\n this.spin(event, -1);\n event.preventDefault();\n break;\n case 'ArrowLeft':\n if (!this.isNumeralChar(inputValue.charAt(selectionStart - 1))) {\n event.preventDefault();\n }\n break;\n case 'ArrowRight':\n if (!this.isNumeralChar(inputValue.charAt(selectionStart))) {\n event.preventDefault();\n }\n break;\n case 'Tab':\n case 'Enter':\n case 'NumpadEnter':\n newValueStr = this.validateValue(this.parseValue(inputValue));\n this.$refs.input.$el.value = this.formatValue(newValueStr);\n this.$refs.input.$el.setAttribute('aria-valuenow', newValueStr);\n this.updateModel(event, newValueStr);\n break;\n case 'Backspace':\n {\n event.preventDefault();\n if (selectionStart === selectionEnd) {\n var deleteChar = inputValue.charAt(selectionStart - 1);\n var _this$getDecimalCharI = this.getDecimalCharIndexes(inputValue),\n decimalCharIndex = _this$getDecimalCharI.decimalCharIndex,\n decimalCharIndexWithoutPrefix = _this$getDecimalCharI.decimalCharIndexWithoutPrefix;\n if (this.isNumeralChar(deleteChar)) {\n var decimalLength = this.getDecimalLength(inputValue);\n if (this._group.test(deleteChar)) {\n this._group.lastIndex = 0;\n newValueStr = inputValue.slice(0, selectionStart - 2) + inputValue.slice(selectionStart - 1);\n } else if (this._decimal.test(deleteChar)) {\n this._decimal.lastIndex = 0;\n if (decimalLength) {\n this.$refs.input.$el.setSelectionRange(selectionStart - 1, selectionStart - 1);\n } else {\n newValueStr = inputValue.slice(0, selectionStart - 1) + inputValue.slice(selectionStart);\n }\n } else if (decimalCharIndex > 0 && selectionStart > decimalCharIndex) {\n var insertedText = this.isDecimalMode() && (this.minFractionDigits || 0) < decimalLength ? '' : '0';\n newValueStr = inputValue.slice(0, selectionStart - 1) + insertedText + inputValue.slice(selectionStart);\n } else if (decimalCharIndexWithoutPrefix === 1) {\n newValueStr = inputValue.slice(0, selectionStart - 1) + '0' + inputValue.slice(selectionStart);\n newValueStr = this.parseValue(newValueStr) > 0 ? newValueStr : '';\n } else {\n newValueStr = inputValue.slice(0, selectionStart - 1) + inputValue.slice(selectionStart);\n }\n }\n this.updateValue(event, newValueStr, null, 'delete-single');\n } else {\n newValueStr = this.deleteRange(inputValue, selectionStart, selectionEnd);\n this.updateValue(event, newValueStr, null, 'delete-range');\n }\n break;\n }\n case 'Delete':\n event.preventDefault();\n if (selectionStart === selectionEnd) {\n var _deleteChar = inputValue.charAt(selectionStart);\n var _this$getDecimalCharI2 = this.getDecimalCharIndexes(inputValue),\n _decimalCharIndex = _this$getDecimalCharI2.decimalCharIndex,\n _decimalCharIndexWithoutPrefix = _this$getDecimalCharI2.decimalCharIndexWithoutPrefix;\n if (this.isNumeralChar(_deleteChar)) {\n var _decimalLength = this.getDecimalLength(inputValue);\n if (this._group.test(_deleteChar)) {\n this._group.lastIndex = 0;\n newValueStr = inputValue.slice(0, selectionStart) + inputValue.slice(selectionStart + 2);\n } else if (this._decimal.test(_deleteChar)) {\n this._decimal.lastIndex = 0;\n if (_decimalLength) {\n this.$refs.input.$el.setSelectionRange(selectionStart + 1, selectionStart + 1);\n } else {\n newValueStr = inputValue.slice(0, selectionStart) + inputValue.slice(selectionStart + 1);\n }\n } else if (_decimalCharIndex > 0 && selectionStart > _decimalCharIndex) {\n var _insertedText = this.isDecimalMode() && (this.minFractionDigits || 0) < _decimalLength ? '' : '0';\n newValueStr = inputValue.slice(0, selectionStart) + _insertedText + inputValue.slice(selectionStart + 1);\n } else if (_decimalCharIndexWithoutPrefix === 1) {\n newValueStr = inputValue.slice(0, selectionStart) + '0' + inputValue.slice(selectionStart + 1);\n newValueStr = this.parseValue(newValueStr) > 0 ? newValueStr : '';\n } else {\n newValueStr = inputValue.slice(0, selectionStart) + inputValue.slice(selectionStart + 1);\n }\n }\n this.updateValue(event, newValueStr, null, 'delete-back-single');\n } else {\n newValueStr = this.deleteRange(inputValue, selectionStart, selectionEnd);\n this.updateValue(event, newValueStr, null, 'delete-range');\n }\n break;\n case 'Home':\n event.preventDefault();\n if (isNotEmpty(this.min)) {\n this.updateModel(event, this.min);\n }\n break;\n case 'End':\n event.preventDefault();\n if (isNotEmpty(this.max)) {\n this.updateModel(event, this.max);\n }\n break;\n }\n },\n onInputKeyPress: function onInputKeyPress(event) {\n if (this.readonly) {\n return;\n }\n var _char = event.key;\n var isDecimalSign = this.isDecimalSign(_char);\n var isMinusSign = this.isMinusSign(_char);\n if (event.code !== 'Enter') {\n event.preventDefault();\n }\n if (Number(_char) >= 0 && Number(_char) <= 9 || isMinusSign || isDecimalSign) {\n this.insert(event, _char, {\n isDecimalSign: isDecimalSign,\n isMinusSign: isMinusSign\n });\n }\n },\n onPaste: function onPaste(event) {\n event.preventDefault();\n var data = (event.clipboardData || window['clipboardData']).getData('Text');\n if (data) {\n var filteredData = this.parseValue(data);\n if (filteredData != null) {\n this.insert(event, filteredData.toString());\n }\n }\n },\n allowMinusSign: function allowMinusSign() {\n return this.min === null || this.min < 0;\n },\n isMinusSign: function isMinusSign(_char2) {\n if (this._minusSign.test(_char2) || _char2 === '-') {\n this._minusSign.lastIndex = 0;\n return true;\n }\n return false;\n },\n isDecimalSign: function isDecimalSign(_char3) {\n if (this._decimal.test(_char3)) {\n this._decimal.lastIndex = 0;\n return true;\n }\n return false;\n },\n isDecimalMode: function isDecimalMode() {\n return this.mode === 'decimal';\n },\n getDecimalCharIndexes: function getDecimalCharIndexes(val) {\n var decimalCharIndex = val.search(this._decimal);\n this._decimal.lastIndex = 0;\n var filteredVal = val.replace(this._prefix, '').trim().replace(/\\s/g, '').replace(this._currency, '');\n var decimalCharIndexWithoutPrefix = filteredVal.search(this._decimal);\n this._decimal.lastIndex = 0;\n return {\n decimalCharIndex: decimalCharIndex,\n decimalCharIndexWithoutPrefix: decimalCharIndexWithoutPrefix\n };\n },\n getCharIndexes: function getCharIndexes(val) {\n var decimalCharIndex = val.search(this._decimal);\n this._decimal.lastIndex = 0;\n var minusCharIndex = val.search(this._minusSign);\n this._minusSign.lastIndex = 0;\n var suffixCharIndex = val.search(this._suffix);\n this._suffix.lastIndex = 0;\n var currencyCharIndex = val.search(this._currency);\n this._currency.lastIndex = 0;\n return {\n decimalCharIndex: decimalCharIndex,\n minusCharIndex: minusCharIndex,\n suffixCharIndex: suffixCharIndex,\n currencyCharIndex: currencyCharIndex\n };\n },\n insert: function insert(event, text) {\n var sign = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {\n isDecimalSign: false,\n isMinusSign: false\n };\n var minusCharIndexOnText = text.search(this._minusSign);\n this._minusSign.lastIndex = 0;\n if (!this.allowMinusSign() && minusCharIndexOnText !== -1) {\n return;\n }\n var selectionStart = this.$refs.input.$el.selectionStart;\n var selectionEnd = this.$refs.input.$el.selectionEnd;\n var inputValue = this.$refs.input.$el.value.trim();\n var _this$getCharIndexes = this.getCharIndexes(inputValue),\n decimalCharIndex = _this$getCharIndexes.decimalCharIndex,\n minusCharIndex = _this$getCharIndexes.minusCharIndex,\n suffixCharIndex = _this$getCharIndexes.suffixCharIndex,\n currencyCharIndex = _this$getCharIndexes.currencyCharIndex;\n var newValueStr;\n if (sign.isMinusSign) {\n if (selectionStart === 0) {\n newValueStr = inputValue;\n if (minusCharIndex === -1 || selectionEnd !== 0) {\n newValueStr = this.insertText(inputValue, text, 0, selectionEnd);\n }\n this.updateValue(event, newValueStr, text, 'insert');\n }\n } else if (sign.isDecimalSign) {\n if (decimalCharIndex > 0 && selectionStart === decimalCharIndex) {\n this.updateValue(event, inputValue, text, 'insert');\n } else if (decimalCharIndex > selectionStart && decimalCharIndex < selectionEnd) {\n newValueStr = this.insertText(inputValue, text, selectionStart, selectionEnd);\n this.updateValue(event, newValueStr, text, 'insert');\n } else if (decimalCharIndex === -1 && this.maxFractionDigits) {\n newValueStr = this.insertText(inputValue, text, selectionStart, selectionEnd);\n this.updateValue(event, newValueStr, text, 'insert');\n }\n } else {\n var maxFractionDigits = this.numberFormat.resolvedOptions().maximumFractionDigits;\n var operation = selectionStart !== selectionEnd ? 'range-insert' : 'insert';\n if (decimalCharIndex > 0 && selectionStart > decimalCharIndex) {\n if (selectionStart + text.length - (decimalCharIndex + 1) <= maxFractionDigits) {\n var charIndex = currencyCharIndex >= selectionStart ? currencyCharIndex - 1 : suffixCharIndex >= selectionStart ? suffixCharIndex : inputValue.length;\n newValueStr = inputValue.slice(0, selectionStart) + text + inputValue.slice(selectionStart + text.length, charIndex) + inputValue.slice(charIndex);\n this.updateValue(event, newValueStr, text, operation);\n }\n } else {\n newValueStr = this.insertText(inputValue, text, selectionStart, selectionEnd);\n this.updateValue(event, newValueStr, text, operation);\n }\n }\n },\n insertText: function insertText(value, text, start, end) {\n var textSplit = text === '.' ? text : text.split('.');\n if (textSplit.length === 2) {\n var decimalCharIndex = value.slice(start, end).search(this._decimal);\n this._decimal.lastIndex = 0;\n return decimalCharIndex > 0 ? value.slice(0, start) + this.formatValue(text) + value.slice(end) : this.formatValue(text) || value;\n } else if (end - start === value.length) {\n return this.formatValue(text);\n } else if (start === 0) {\n return text + value.slice(end);\n } else if (end === value.length) {\n return value.slice(0, start) + text;\n } else {\n return value.slice(0, start) + text + value.slice(end);\n }\n },\n deleteRange: function deleteRange(value, start, end) {\n var newValueStr;\n if (end - start === value.length) newValueStr = '';else if (start === 0) newValueStr = value.slice(end);else if (end === value.length) newValueStr = value.slice(0, start);else newValueStr = value.slice(0, start) + value.slice(end);\n return newValueStr;\n },\n initCursor: function initCursor() {\n var selectionStart = this.$refs.input.$el.selectionStart;\n var inputValue = this.$refs.input.$el.value;\n var valueLength = inputValue.length;\n var index = null;\n\n // remove prefix\n var prefixLength = (this.prefixChar || '').length;\n inputValue = inputValue.replace(this._prefix, '');\n selectionStart = selectionStart - prefixLength;\n var _char4 = inputValue.charAt(selectionStart);\n if (this.isNumeralChar(_char4)) {\n return selectionStart + prefixLength;\n }\n\n //left\n var i = selectionStart - 1;\n while (i >= 0) {\n _char4 = inputValue.charAt(i);\n if (this.isNumeralChar(_char4)) {\n index = i + prefixLength;\n break;\n } else {\n i--;\n }\n }\n if (index !== null) {\n this.$refs.input.$el.setSelectionRange(index + 1, index + 1);\n } else {\n i = selectionStart;\n while (i < valueLength) {\n _char4 = inputValue.charAt(i);\n if (this.isNumeralChar(_char4)) {\n index = i + prefixLength;\n break;\n } else {\n i++;\n }\n }\n if (index !== null) {\n this.$refs.input.$el.setSelectionRange(index, index);\n }\n }\n return index || 0;\n },\n onInputClick: function onInputClick() {\n var currentValue = this.$refs.input.$el.value;\n if (!this.readonly && currentValue !== getSelection()) {\n this.initCursor();\n }\n },\n isNumeralChar: function isNumeralChar(_char5) {\n if (_char5.length === 1 && (this._numeral.test(_char5) || this._decimal.test(_char5) || this._group.test(_char5) || this._minusSign.test(_char5))) {\n this.resetRegex();\n return true;\n }\n return false;\n },\n resetRegex: function resetRegex() {\n this._numeral.lastIndex = 0;\n this._decimal.lastIndex = 0;\n this._group.lastIndex = 0;\n this._minusSign.lastIndex = 0;\n },\n updateValue: function updateValue(event, valueStr, insertedValueStr, operation) {\n var currentValue = this.$refs.input.$el.value;\n var newValue = null;\n if (valueStr != null) {\n newValue = this.parseValue(valueStr);\n newValue = !newValue && !this.allowEmpty ? 0 : newValue;\n this.updateInput(newValue, insertedValueStr, operation, valueStr);\n this.handleOnInput(event, currentValue, newValue);\n }\n },\n handleOnInput: function handleOnInput(event, currentValue, newValue) {\n if (this.isValueChanged(currentValue, newValue)) {\n this.$emit('input', {\n originalEvent: event,\n value: newValue,\n formattedValue: currentValue\n });\n }\n },\n isValueChanged: function isValueChanged(currentValue, newValue) {\n if (newValue === null && currentValue !== null) {\n return true;\n }\n if (newValue != null) {\n var parsedCurrentValue = typeof currentValue === 'string' ? this.parseValue(currentValue) : currentValue;\n return newValue !== parsedCurrentValue;\n }\n return false;\n },\n validateValue: function validateValue(value) {\n if (value === '-' || value == null) {\n return null;\n }\n if (this.min != null && value < this.min) {\n return this.min;\n }\n if (this.max != null && value > this.max) {\n return this.max;\n }\n return value;\n },\n updateInput: function updateInput(value, insertedValueStr, operation, valueStr) {\n insertedValueStr = insertedValueStr || '';\n var inputValue = this.$refs.input.$el.value;\n var newValue = this.formatValue(value);\n var currentLength = inputValue.length;\n if (newValue !== valueStr) {\n newValue = this.concatValues(newValue, valueStr);\n }\n if (currentLength === 0) {\n this.$refs.input.$el.value = newValue;\n this.$refs.input.$el.setSelectionRange(0, 0);\n var index = this.initCursor();\n var selectionEnd = index + insertedValueStr.length;\n this.$refs.input.$el.setSelectionRange(selectionEnd, selectionEnd);\n } else {\n var selectionStart = this.$refs.input.$el.selectionStart;\n var _selectionEnd = this.$refs.input.$el.selectionEnd;\n this.$refs.input.$el.value = newValue;\n var newLength = newValue.length;\n if (operation === 'range-insert') {\n var startValue = this.parseValue((inputValue || '').slice(0, selectionStart));\n var startValueStr = startValue !== null ? startValue.toString() : '';\n var startExpr = startValueStr.split('').join(\"(\".concat(this.groupChar, \")?\"));\n var sRegex = new RegExp(startExpr, 'g');\n sRegex.test(newValue);\n var tExpr = insertedValueStr.split('').join(\"(\".concat(this.groupChar, \")?\"));\n var tRegex = new RegExp(tExpr, 'g');\n tRegex.test(newValue.slice(sRegex.lastIndex));\n _selectionEnd = sRegex.lastIndex + tRegex.lastIndex;\n this.$refs.input.$el.setSelectionRange(_selectionEnd, _selectionEnd);\n } else if (newLength === currentLength) {\n if (operation === 'insert' || operation === 'delete-back-single') {\n this.$refs.input.$el.setSelectionRange(_selectionEnd + 1, _selectionEnd + 1);\n } else if (operation === 'delete-single') {\n this.$refs.input.$el.setSelectionRange(_selectionEnd - 1, _selectionEnd - 1);\n } else if (operation === 'delete-range' || operation === 'spin') {\n this.$refs.input.$el.setSelectionRange(_selectionEnd, _selectionEnd);\n }\n } else if (operation === 'delete-back-single') {\n var prevChar = inputValue.charAt(_selectionEnd - 1);\n var nextChar = inputValue.charAt(_selectionEnd);\n var diff = currentLength - newLength;\n var isGroupChar = this._group.test(nextChar);\n if (isGroupChar && diff === 1) {\n _selectionEnd += 1;\n } else if (!isGroupChar && this.isNumeralChar(prevChar)) {\n _selectionEnd += -1 * diff + 1;\n }\n this._group.lastIndex = 0;\n this.$refs.input.$el.setSelectionRange(_selectionEnd, _selectionEnd);\n } else if (inputValue === '-' && operation === 'insert') {\n this.$refs.input.$el.setSelectionRange(0, 0);\n var _index = this.initCursor();\n var _selectionEnd2 = _index + insertedValueStr.length + 1;\n this.$refs.input.$el.setSelectionRange(_selectionEnd2, _selectionEnd2);\n } else {\n _selectionEnd = _selectionEnd + (newLength - currentLength);\n this.$refs.input.$el.setSelectionRange(_selectionEnd, _selectionEnd);\n }\n }\n this.$refs.input.$el.setAttribute('aria-valuenow', value);\n },\n concatValues: function concatValues(val1, val2) {\n if (val1 && val2) {\n var decimalCharIndex = val2.search(this._decimal);\n this._decimal.lastIndex = 0;\n if (this.suffixChar) {\n return decimalCharIndex !== -1 ? val1.replace(this.suffixChar, '').split(this._decimal)[0] + val2.replace(this.suffixChar, '').slice(decimalCharIndex) + this.suffixChar : val1;\n } else {\n return decimalCharIndex !== -1 ? val1.split(this._decimal)[0] + val2.slice(decimalCharIndex) : val1;\n }\n }\n return val1;\n },\n getDecimalLength: function getDecimalLength(value) {\n if (value) {\n var valueSplit = value.split(this._decimal);\n if (valueSplit.length === 2) {\n return valueSplit[1].replace(this._suffix, '').trim().replace(/\\s/g, '').replace(this._currency, '').length;\n }\n }\n return 0;\n },\n updateModel: function updateModel(event, value) {\n this.d_modelValue = value;\n this.$emit('update:modelValue', value);\n },\n onInputFocus: function onInputFocus(event) {\n this.focused = true;\n if (!this.disabled && !this.readonly && this.$refs.input.$el.value !== getSelection() && this.highlightOnFocus) {\n event.target.select();\n }\n this.$emit('focus', event);\n },\n onInputBlur: function onInputBlur(event) {\n this.focused = false;\n var input = event.target;\n var newValue = this.validateValue(this.parseValue(input.value));\n this.$emit('blur', {\n originalEvent: event,\n value: input.value\n });\n input.value = this.formatValue(newValue);\n input.setAttribute('aria-valuenow', newValue);\n this.updateModel(event, newValue);\n if (!this.disabled && !this.readonly && this.highlightOnFocus) {\n clearSelection();\n }\n },\n clearTimer: function clearTimer() {\n if (this.timer) {\n clearInterval(this.timer);\n }\n },\n maxBoundry: function maxBoundry() {\n return this.d_modelValue >= this.max;\n },\n minBoundry: function minBoundry() {\n return this.d_modelValue <= this.min;\n }\n },\n computed: {\n filled: function filled() {\n return this.modelValue != null && this.modelValue.toString().length > 0;\n },\n upButtonListeners: function upButtonListeners() {\n var _this2 = this;\n return {\n mousedown: function mousedown(event) {\n return _this2.onUpButtonMouseDown(event);\n },\n mouseup: function mouseup(event) {\n return _this2.onUpButtonMouseUp(event);\n },\n mouseleave: function mouseleave(event) {\n return _this2.onUpButtonMouseLeave(event);\n },\n keydown: function keydown(event) {\n return _this2.onUpButtonKeyDown(event);\n },\n keyup: function keyup(event) {\n return _this2.onUpButtonKeyUp(event);\n }\n };\n },\n downButtonListeners: function downButtonListeners() {\n var _this3 = this;\n return {\n mousedown: function mousedown(event) {\n return _this3.onDownButtonMouseDown(event);\n },\n mouseup: function mouseup(event) {\n return _this3.onDownButtonMouseUp(event);\n },\n mouseleave: function mouseleave(event) {\n return _this3.onDownButtonMouseLeave(event);\n },\n keydown: function keydown(event) {\n return _this3.onDownButtonKeyDown(event);\n },\n keyup: function keyup(event) {\n return _this3.onDownButtonKeyUp(event);\n }\n };\n },\n formattedValue: function formattedValue() {\n var val = !this.modelValue && !this.allowEmpty ? 0 : this.modelValue;\n return this.formatValue(val);\n },\n getFormatter: function getFormatter() {\n return this.numberFormat;\n },\n hasFluid: function hasFluid() {\n return isEmpty(this.fluid) ? !!this.$pcFluid : this.fluid;\n }\n },\n components: {\n InputText: InputText,\n AngleUpIcon: AngleUpIcon,\n AngleDownIcon: AngleDownIcon\n }\n};\n\nvar _hoisted_1 = [\"disabled\"];\nvar _hoisted_2 = [\"disabled\"];\nvar _hoisted_3 = [\"disabled\"];\nvar _hoisted_4 = [\"disabled\"];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n var _component_InputText = resolveComponent(\"InputText\");\n return openBlock(), createElementBlock(\"span\", mergeProps({\n \"class\": _ctx.cx('root')\n }, _ctx.ptmi('root')), [createVNode(_component_InputText, {\n ref: \"input\",\n id: _ctx.inputId,\n role: \"spinbutton\",\n \"class\": normalizeClass([_ctx.cx('pcInput'), _ctx.inputClass]),\n style: normalizeStyle(_ctx.inputStyle),\n value: $options.formattedValue,\n \"aria-valuemin\": _ctx.min,\n \"aria-valuemax\": _ctx.max,\n \"aria-valuenow\": _ctx.modelValue,\n inputmode: _ctx.mode === 'decimal' && !_ctx.minFractionDigits ? 'numeric' : 'decimal',\n disabled: _ctx.disabled,\n readonly: _ctx.readonly,\n placeholder: _ctx.placeholder,\n \"aria-labelledby\": _ctx.ariaLabelledby,\n \"aria-label\": _ctx.ariaLabel,\n invalid: _ctx.invalid,\n variant: _ctx.variant,\n onInput: $options.onUserInput,\n onKeydown: $options.onInputKeyDown,\n onKeypress: $options.onInputKeyPress,\n onPaste: $options.onPaste,\n onClick: $options.onInputClick,\n onFocus: $options.onInputFocus,\n onBlur: $options.onInputBlur,\n pt: _ctx.ptm('pcInput'),\n unstyled: _ctx.unstyled\n }, null, 8, [\"id\", \"class\", \"style\", \"value\", \"aria-valuemin\", \"aria-valuemax\", \"aria-valuenow\", \"inputmode\", \"disabled\", \"readonly\", \"placeholder\", \"aria-labelledby\", \"aria-label\", \"invalid\", \"variant\", \"onInput\", \"onKeydown\", \"onKeypress\", \"onPaste\", \"onClick\", \"onFocus\", \"onBlur\", \"pt\", \"unstyled\"]), _ctx.showButtons && _ctx.buttonLayout === 'stacked' ? (openBlock(), createElementBlock(\"span\", mergeProps({\n key: 0,\n \"class\": _ctx.cx('buttonGroup')\n }, _ctx.ptm('buttonGroup')), [renderSlot(_ctx.$slots, \"incrementbutton\", {\n listeners: $options.upButtonListeners\n }, function () {\n return [createElementVNode(\"button\", mergeProps({\n \"class\": [_ctx.cx('incrementButton'), _ctx.incrementButtonClass]\n }, toHandlers($options.upButtonListeners, true), {\n disabled: _ctx.disabled,\n tabindex: -1,\n \"aria-hidden\": \"true\",\n type: \"button\"\n }, _ctx.ptm('incrementButton')), [renderSlot(_ctx.$slots, _ctx.$slots.incrementicon ? 'incrementicon' : 'incrementbuttonicon', {}, function () {\n return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.incrementIcon || _ctx.incrementButtonIcon ? 'span' : 'AngleUpIcon'), mergeProps({\n \"class\": [_ctx.incrementIcon, _ctx.incrementButtonIcon]\n }, _ctx.ptm('incrementIcon'), {\n \"data-pc-section\": \"incrementicon\"\n }), null, 16, [\"class\"]))];\n })], 16, _hoisted_1)];\n }), renderSlot(_ctx.$slots, \"decrementbutton\", {\n listeners: $options.downButtonListeners\n }, function () {\n return [createElementVNode(\"button\", mergeProps({\n \"class\": [_ctx.cx('decrementButton'), _ctx.decrementButtonClass]\n }, toHandlers($options.downButtonListeners, true), {\n disabled: _ctx.disabled,\n tabindex: -1,\n \"aria-hidden\": \"true\",\n type: \"button\"\n }, _ctx.ptm('decrementButton')), [renderSlot(_ctx.$slots, _ctx.$slots.decrementicon ? 'decrementicon' : 'decrementbuttonicon', {}, function () {\n return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.decrementIcon || _ctx.decrementButtonIcon ? 'span' : 'AngleDownIcon'), mergeProps({\n \"class\": [_ctx.decrementIcon, _ctx.decrementButtonIcon]\n }, _ctx.ptm('decrementIcon'), {\n \"data-pc-section\": \"decrementicon\"\n }), null, 16, [\"class\"]))];\n })], 16, _hoisted_2)];\n })], 16)) : createCommentVNode(\"\", true), renderSlot(_ctx.$slots, \"incrementbutton\", {\n listeners: $options.upButtonListeners\n }, function () {\n return [_ctx.showButtons && _ctx.buttonLayout !== 'stacked' ? (openBlock(), createElementBlock(\"button\", mergeProps({\n key: 0,\n \"class\": [_ctx.cx('incrementButton'), _ctx.incrementButtonClass]\n }, toHandlers($options.upButtonListeners, true), {\n disabled: _ctx.disabled,\n tabindex: -1,\n \"aria-hidden\": \"true\",\n type: \"button\"\n }, _ctx.ptm('incrementButton')), [renderSlot(_ctx.$slots, _ctx.$slots.incrementicon ? 'incrementicon' : 'incrementbuttonicon', {}, function () {\n return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.incrementIcon || _ctx.incrementButtonIcon ? 'span' : 'AngleUpIcon'), mergeProps({\n \"class\": [_ctx.incrementIcon, _ctx.incrementButtonIcon]\n }, _ctx.ptm('incrementIcon'), {\n \"data-pc-section\": \"incrementicon\"\n }), null, 16, [\"class\"]))];\n })], 16, _hoisted_3)) : createCommentVNode(\"\", true)];\n }), renderSlot(_ctx.$slots, \"decrementbutton\", {\n listeners: $options.downButtonListeners\n }, function () {\n return [_ctx.showButtons && _ctx.buttonLayout !== 'stacked' ? (openBlock(), createElementBlock(\"button\", mergeProps({\n key: 0,\n \"class\": [_ctx.cx('decrementButton'), _ctx.decrementButtonClass]\n }, toHandlers($options.downButtonListeners, true), {\n disabled: _ctx.disabled,\n tabindex: -1,\n \"aria-hidden\": \"true\",\n type: \"button\"\n }, _ctx.ptm('decrementButton')), [renderSlot(_ctx.$slots, _ctx.$slots.decrementicon ? 'decrementicon' : 'decrementbuttonicon', {}, function () {\n return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.decrementIcon || _ctx.decrementButtonIcon ? 'span' : 'AngleDownIcon'), mergeProps({\n \"class\": [_ctx.decrementIcon, _ctx.decrementButtonIcon]\n }, _ctx.ptm('decrementIcon'), {\n \"data-pc-section\": \"decrementicon\"\n }), null, 16, [\"class\"]))];\n })], 16, _hoisted_4)) : createCommentVNode(\"\", true)];\n })], 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseIcon from '@primevue/icons/baseicon';\nimport { openBlock, createElementBlock, mergeProps, createElementVNode } from 'vue';\n\nvar script = {\n name: 'ChevronDownIcon',\n \"extends\": BaseIcon\n};\n\nvar _hoisted_1 = /*#__PURE__*/createElementVNode(\"path\", {\n d: \"M7.01744 10.398C6.91269 10.3985 6.8089 10.378 6.71215 10.3379C6.61541 10.2977 6.52766 10.2386 6.45405 10.1641L1.13907 4.84913C1.03306 4.69404 0.985221 4.5065 1.00399 4.31958C1.02276 4.13266 1.10693 3.95838 1.24166 3.82747C1.37639 3.69655 1.55301 3.61742 1.74039 3.60402C1.92777 3.59062 2.11386 3.64382 2.26584 3.75424L7.01744 8.47394L11.769 3.75424C11.9189 3.65709 12.097 3.61306 12.2748 3.62921C12.4527 3.64535 12.6199 3.72073 12.7498 3.84328C12.8797 3.96582 12.9647 4.12842 12.9912 4.30502C13.0177 4.48162 12.9841 4.662 12.8958 4.81724L7.58083 10.1322C7.50996 10.2125 7.42344 10.2775 7.32656 10.3232C7.22968 10.3689 7.12449 10.3944 7.01744 10.398Z\",\n fill: \"currentColor\"\n}, null, -1);\nvar _hoisted_2 = [_hoisted_1];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"svg\", mergeProps({\n width: \"14\",\n height: \"14\",\n viewBox: \"0 0 14 14\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, _ctx.pti()), _hoisted_2, 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseIcon from '@primevue/icons/baseicon';\nimport { openBlock, createElementBlock, mergeProps, createElementVNode } from 'vue';\n\nvar script = {\n name: 'TimesIcon',\n \"extends\": BaseIcon\n};\n\nvar _hoisted_1 = /*#__PURE__*/createElementVNode(\"path\", {\n d: \"M8.01186 7.00933L12.27 2.75116C12.341 2.68501 12.398 2.60524 12.4375 2.51661C12.4769 2.42798 12.4982 2.3323 12.4999 2.23529C12.5016 2.13827 12.4838 2.0419 12.4474 1.95194C12.4111 1.86197 12.357 1.78024 12.2884 1.71163C12.2198 1.64302 12.138 1.58893 12.0481 1.55259C11.9581 1.51625 11.8617 1.4984 11.7647 1.50011C11.6677 1.50182 11.572 1.52306 11.4834 1.56255C11.3948 1.60204 11.315 1.65898 11.2488 1.72997L6.99067 5.98814L2.7325 1.72997C2.59553 1.60234 2.41437 1.53286 2.22718 1.53616C2.03999 1.53946 1.8614 1.61529 1.72901 1.74767C1.59663 1.88006 1.5208 2.05865 1.5175 2.24584C1.5142 2.43303 1.58368 2.61419 1.71131 2.75116L5.96948 7.00933L1.71131 11.2675C1.576 11.403 1.5 11.5866 1.5 11.7781C1.5 11.9696 1.576 12.1532 1.71131 12.2887C1.84679 12.424 2.03043 12.5 2.2219 12.5C2.41338 12.5 2.59702 12.424 2.7325 12.2887L6.99067 8.03052L11.2488 12.2887C11.3843 12.424 11.568 12.5 11.7594 12.5C11.9509 12.5 12.1346 12.424 12.27 12.2887C12.4053 12.1532 12.4813 11.9696 12.4813 11.7781C12.4813 11.5866 12.4053 11.403 12.27 11.2675L8.01186 7.00933Z\",\n fill: \"currentColor\"\n}, null, -1);\nvar _hoisted_2 = [_hoisted_1];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"svg\", mergeProps({\n width: \"14\",\n height: \"14\",\n viewBox: \"0 0 14 14\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, _ctx.pti()), _hoisted_2, 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import { EventBus } from '@primeuix/utils/eventbus';\n\nvar OverlayEventBus = EventBus();\n\nexport { OverlayEventBus as default };\n//# sourceMappingURL=index.mjs.map\n","import { isClient } from '@primeuix/utils/dom';\nimport { renderSlot, openBlock, createBlock, Teleport, createCommentVNode } from 'vue';\n\nvar script = {\n name: 'Portal',\n props: {\n appendTo: {\n type: [String, Object],\n \"default\": 'body'\n },\n disabled: {\n type: Boolean,\n \"default\": false\n }\n },\n data: function data() {\n return {\n mounted: false\n };\n },\n mounted: function mounted() {\n this.mounted = isClient();\n },\n computed: {\n inline: function inline() {\n return this.disabled || this.appendTo === 'self';\n }\n }\n};\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return $options.inline ? renderSlot(_ctx.$slots, \"default\", {\n key: 0\n }) : $data.mounted ? (openBlock(), createBlock(Teleport, {\n key: 1,\n to: $props.appendTo\n }, [renderSlot(_ctx.$slots, \"default\")], 8, [\"to\"])) : createCommentVNode(\"\", true);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-select {\\n display: inline-flex;\\n cursor: pointer;\\n position: relative;\\n user-select: none;\\n background: \".concat(dt('select.background'), \";\\n border: 1px solid \").concat(dt('select.border.color'), \";\\n transition: background \").concat(dt('select.transition.duration'), \", color \").concat(dt('select.transition.duration'), \", border-color \").concat(dt('select.transition.duration'), \",\\n outline-color \").concat(dt('select.transition.duration'), \", box-shadow \").concat(dt('select.transition.duration'), \";\\n border-radius: \").concat(dt('select.border.radius'), \";\\n outline-color: transparent;\\n box-shadow: \").concat(dt('select.shadow'), \";\\n}\\n\\n.p-select:not(.p-disabled):hover {\\n border-color: \").concat(dt('select.hover.border.color'), \";\\n}\\n\\n.p-select:not(.p-disabled).p-focus {\\n border-color: \").concat(dt('select.focus.border.color'), \";\\n box-shadow: \").concat(dt('select.focus.ring.shadow'), \";\\n outline: \").concat(dt('select.focus.ring.width'), \" \").concat(dt('select.focus.ring.style'), \" \").concat(dt('select.focus.ring.color'), \";\\n outline-offset: \").concat(dt('select.focus.ring.offset'), \";\\n}\\n\\n.p-select.p-variant-filled {\\n background: \").concat(dt('select.filled.background'), \";\\n}\\n\\n.p-select.p-variant-filled.p-focus {\\n background: \").concat(dt('select.filled.focus.background'), \";\\n}\\n\\n.p-select.p-invalid {\\n border-color: \").concat(dt('select.invalid.border.color'), \";\\n}\\n\\n.p-select.p-disabled {\\n opacity: 1;\\n background: \").concat(dt('select.disabled.background'), \";\\n}\\n\\n.p-select-clear-icon {\\n position: absolute;\\n top: 50%;\\n margin-top: -0.5rem;\\n color: \").concat(dt('select.clear.icon.color'), \";\\n right: \").concat(dt('select.dropdown.width'), \";\\n}\\n\\n.p-select-dropdown {\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n flex-shrink: 0;\\n background: transparent;\\n color: \").concat(dt('select.dropdown.color'), \";\\n width: \").concat(dt('select.dropdown.width'), \";\\n border-top-right-radius: \").concat(dt('select.border.radius'), \";\\n border-bottom-right-radius: \").concat(dt('select.border.radius'), \";\\n}\\n\\n.p-select-label {\\n display: block;\\n white-space: nowrap;\\n overflow: hidden;\\n flex: 1 1 auto;\\n width: 1%;\\n padding: \").concat(dt('select.padding.y'), \" \").concat(dt('select.padding.x'), \";\\n text-overflow: ellipsis;\\n cursor: pointer;\\n color: \").concat(dt('select.color'), \";\\n background: transparent;\\n border: 0 none;\\n outline: 0 none;\\n}\\n\\n.p-select-label.p-placeholder {\\n color: \").concat(dt('select.placeholder.color'), \";\\n}\\n\\n.p-select:has(.p-select-clear-icon) .p-select-label {\\n padding-right: calc(1rem + \").concat(dt('select.padding.x'), \");\\n}\\n\\n.p-select.p-disabled .p-select-label {\\n color: \").concat(dt('select.disabled.color'), \";\\n}\\n\\n.p-select-label-empty {\\n overflow: hidden;\\n opacity: 0;\\n}\\n\\ninput.p-select-label {\\n cursor: default;\\n}\\n\\n.p-select .p-select-overlay {\\n min-width: 100%;\\n}\\n\\n.p-select-overlay {\\n position: absolute;\\n top: 0;\\n left: 0;\\n background: \").concat(dt('select.overlay.background'), \";\\n color: \").concat(dt('select.overlay.color'), \";\\n border: 1px solid \").concat(dt('select.overlay.border.color'), \";\\n border-radius: \").concat(dt('select.overlay.border.radius'), \";\\n box-shadow: \").concat(dt('select.overlay.shadow'), \";\\n}\\n\\n.p-select-header {\\n padding: \").concat(dt('select.list.header.padding'), \";\\n}\\n\\n.p-select-filter {\\n width: 100%;\\n}\\n\\n.p-select-list-container {\\n overflow: auto;\\n}\\n\\n.p-select-option-group {\\n cursor: auto;\\n margin: 0;\\n padding: \").concat(dt('select.option.group.padding'), \";\\n background: \").concat(dt('select.option.group.background'), \";\\n color: \").concat(dt('select.option.group.color'), \";\\n font-weight: \").concat(dt('select.option.group.font.weight'), \";\\n}\\n\\n.p-select-list {\\n margin: 0;\\n padding: 0;\\n list-style-type: none;\\n padding: \").concat(dt('select.list.padding'), \";\\n gap: \").concat(dt('select.list.gap'), \";\\n display: flex;\\n flex-direction: column;\\n}\\n\\n.p-select-option {\\n cursor: pointer;\\n font-weight: normal;\\n white-space: nowrap;\\n position: relative;\\n overflow: hidden;\\n display: flex;\\n align-items: center;\\n padding: \").concat(dt('select.option.padding'), \";\\n border: 0 none;\\n color: \").concat(dt('select.option.color'), \";\\n background: transparent;\\n transition: background \").concat(dt('select.transition.duration'), \", color \").concat(dt('select.transition.duration'), \", border-color \").concat(dt('select.transition.duration'), \",\\n box-shadow \").concat(dt('select.transition.duration'), \", outline-color \").concat(dt('select.transition.duration'), \";\\n border-radius: \").concat(dt('select.option.border.radius'), \";\\n}\\n\\n.p-select-option:not(.p-select-option-selected):not(.p-disabled).p-focus {\\n background: \").concat(dt('select.option.focus.background'), \";\\n color: \").concat(dt('select.option.focus.color'), \";\\n}\\n\\n.p-select-option.p-select-option-selected {\\n background: \").concat(dt('select.option.selected.background'), \";\\n color: \").concat(dt('select.option.selected.color'), \";\\n}\\n\\n.p-select-option.p-select-option-selected.p-focus {\\n background: \").concat(dt('select.option.selected.focus.background'), \";\\n color: \").concat(dt('select.option.selected.focus.color'), \";\\n}\\n\\n.p-select-option-check-icon {\\n position: relative;\\n margin-inline-start: \").concat(dt('select.checkmark.gutter.start'), \";\\n margin-inline-end: \").concat(dt('select.checkmark.gutter.end'), \";\\n color: \").concat(dt('select.checkmark.color'), \";\\n}\\n\\n.p-select-empty-message {\\n padding: \").concat(dt('select.empty.message.padding'), \";\\n}\\n\\n.p-select-fluid {\\n display: flex;\\n}\\n\");\n};\nvar classes = {\n root: function root(_ref2) {\n var instance = _ref2.instance,\n props = _ref2.props,\n state = _ref2.state;\n return ['p-select p-component p-inputwrapper', {\n 'p-disabled': props.disabled,\n 'p-invalid': props.invalid,\n 'p-variant-filled': props.variant ? props.variant === 'filled' : instance.$primevue.config.inputStyle === 'filled' || instance.$primevue.config.inputVariant === 'filled',\n 'p-focus': state.focused,\n 'p-inputwrapper-filled': instance.hasSelectedOption,\n 'p-inputwrapper-focus': state.focused || state.overlayVisible,\n 'p-select-open': state.overlayVisible,\n 'p-select-fluid': instance.hasFluid\n }];\n },\n label: function label(_ref3) {\n var instance = _ref3.instance,\n props = _ref3.props;\n return ['p-select-label', {\n 'p-placeholder': !props.editable && instance.label === props.placeholder,\n 'p-select-label-empty': !props.editable && !instance.$slots['value'] && (instance.label === 'p-emptylabel' || instance.label.length === 0)\n }];\n },\n clearIcon: 'p-select-clear-icon',\n dropdown: 'p-select-dropdown',\n loadingicon: 'p-select-loading-icon',\n dropdownIcon: 'p-select-dropdown-icon',\n overlay: 'p-select-overlay p-component',\n header: 'p-select-header',\n pcFilter: 'p-select-filter',\n listContainer: 'p-select-list-container',\n list: 'p-select-list',\n optionGroup: 'p-select-option-group',\n optionGroupLabel: 'p-select-option-group-label',\n option: function option(_ref4) {\n var instance = _ref4.instance,\n props = _ref4.props,\n state = _ref4.state,\n _option = _ref4.option,\n focusedOption = _ref4.focusedOption;\n return ['p-select-option', {\n 'p-select-option-selected': instance.isSelected(_option) && props.highlightOnSelect,\n 'p-focus': state.focusedOptionIndex === focusedOption,\n 'p-disabled': instance.isOptionDisabled(_option)\n }];\n },\n optionLabel: 'p-select-option-label',\n optionCheckIcon: 'p-select-option-check-icon',\n optionBlankIcon: 'p-select-option-blank-icon',\n emptyMessage: 'p-select-empty-message'\n};\nvar SelectStyle = BaseStyle.extend({\n name: 'select',\n theme: theme,\n classes: classes\n});\n\nexport { SelectStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import { focus, isAndroid, getFirstFocusableElement, getLastFocusableElement, addStyle, relativePosition, getOuterWidth, absolutePosition, isTouchDevice, isVisible, getFocusableElements, findSingle } from '@primeuix/utils/dom';\nimport { resolveFieldData, isPrintableCharacter, isNotEmpty, equals, findLastIndex, isEmpty } from '@primeuix/utils/object';\nimport { ZIndex } from '@primeuix/utils/zindex';\nimport { FilterService } from '@primevue/core/api';\nimport { UniqueComponentId, ConnectedOverlayScrollHandler } from '@primevue/core/utils';\nimport BlankIcon from '@primevue/icons/blank';\nimport CheckIcon from '@primevue/icons/check';\nimport ChevronDownIcon from '@primevue/icons/chevrondown';\nimport SearchIcon from '@primevue/icons/search';\nimport SpinnerIcon from '@primevue/icons/spinner';\nimport TimesIcon from '@primevue/icons/times';\nimport IconField from 'primevue/iconfield';\nimport InputIcon from 'primevue/inputicon';\nimport InputText from 'primevue/inputtext';\nimport OverlayEventBus from 'primevue/overlayeventbus';\nimport Portal from 'primevue/portal';\nimport Ripple from 'primevue/ripple';\nimport VirtualScroller from 'primevue/virtualscroller';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport SelectStyle from 'primevue/select/style';\nimport { resolveComponent, resolveDirective, openBlock, createElementBlock, mergeProps, renderSlot, createTextVNode, toDisplayString, normalizeClass, createBlock, resolveDynamicComponent, createCommentVNode, createElementVNode, createVNode, withCtx, Transition, normalizeProps, createSlots, Fragment, renderList, withDirectives } from 'vue';\n\nvar script$1 = {\n name: 'BaseSelect',\n \"extends\": BaseComponent,\n props: {\n modelValue: null,\n options: Array,\n optionLabel: [String, Function],\n optionValue: [String, Function],\n optionDisabled: [String, Function],\n optionGroupLabel: [String, Function],\n optionGroupChildren: [String, Function],\n scrollHeight: {\n type: String,\n \"default\": '14rem'\n },\n filter: Boolean,\n filterPlaceholder: String,\n filterLocale: String,\n filterMatchMode: {\n type: String,\n \"default\": 'contains'\n },\n filterFields: {\n type: Array,\n \"default\": null\n },\n editable: Boolean,\n placeholder: {\n type: String,\n \"default\": null\n },\n variant: {\n type: String,\n \"default\": null\n },\n invalid: {\n type: Boolean,\n \"default\": false\n },\n disabled: {\n type: Boolean,\n \"default\": false\n },\n dataKey: null,\n showClear: {\n type: Boolean,\n \"default\": false\n },\n fluid: {\n type: Boolean,\n \"default\": null\n },\n inputId: {\n type: String,\n \"default\": null\n },\n inputClass: {\n type: [String, Object],\n \"default\": null\n },\n inputStyle: {\n type: Object,\n \"default\": null\n },\n labelId: {\n type: String,\n \"default\": null\n },\n labelClass: {\n type: [String, Object],\n \"default\": null\n },\n labelStyle: {\n type: Object,\n \"default\": null\n },\n panelClass: {\n type: [String, Object],\n \"default\": null\n },\n overlayStyle: {\n type: Object,\n \"default\": null\n },\n overlayClass: {\n type: [String, Object],\n \"default\": null\n },\n panelStyle: {\n type: Object,\n \"default\": null\n },\n appendTo: {\n type: [String, Object],\n \"default\": 'body'\n },\n loading: {\n type: Boolean,\n \"default\": false\n },\n clearIcon: {\n type: String,\n \"default\": undefined\n },\n dropdownIcon: {\n type: String,\n \"default\": undefined\n },\n filterIcon: {\n type: String,\n \"default\": undefined\n },\n loadingIcon: {\n type: String,\n \"default\": undefined\n },\n resetFilterOnHide: {\n type: Boolean,\n \"default\": false\n },\n resetFilterOnClear: {\n type: Boolean,\n \"default\": false\n },\n virtualScrollerOptions: {\n type: Object,\n \"default\": null\n },\n autoOptionFocus: {\n type: Boolean,\n \"default\": false\n },\n autoFilterFocus: {\n type: Boolean,\n \"default\": false\n },\n selectOnFocus: {\n type: Boolean,\n \"default\": false\n },\n focusOnHover: {\n type: Boolean,\n \"default\": true\n },\n highlightOnSelect: {\n type: Boolean,\n \"default\": true\n },\n checkmark: {\n type: Boolean,\n \"default\": false\n },\n filterMessage: {\n type: String,\n \"default\": null\n },\n selectionMessage: {\n type: String,\n \"default\": null\n },\n emptySelectionMessage: {\n type: String,\n \"default\": null\n },\n emptyFilterMessage: {\n type: String,\n \"default\": null\n },\n emptyMessage: {\n type: String,\n \"default\": null\n },\n tabindex: {\n type: Number,\n \"default\": 0\n },\n ariaLabel: {\n type: String,\n \"default\": null\n },\n ariaLabelledby: {\n type: String,\n \"default\": null\n }\n },\n style: SelectStyle,\n provide: function provide() {\n return {\n $pcSelect: this,\n $parentInstance: this\n };\n }\n};\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _iterableToArray(r) { if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r); }\nfunction _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nvar script = {\n name: 'Select',\n \"extends\": script$1,\n inheritAttrs: false,\n emits: ['update:modelValue', 'change', 'focus', 'blur', 'before-show', 'before-hide', 'show', 'hide', 'filter'],\n inject: {\n $pcFluid: {\n \"default\": null\n }\n },\n outsideClickListener: null,\n scrollHandler: null,\n resizeListener: null,\n labelClickListener: null,\n overlay: null,\n list: null,\n virtualScroller: null,\n searchTimeout: null,\n searchValue: null,\n isModelValueChanged: false,\n data: function data() {\n return {\n id: this.$attrs.id,\n clicked: false,\n focused: false,\n focusedOptionIndex: -1,\n filterValue: null,\n overlayVisible: false\n };\n },\n watch: {\n '$attrs.id': function $attrsId(newValue) {\n this.id = newValue || UniqueComponentId();\n },\n modelValue: function modelValue() {\n this.isModelValueChanged = true;\n },\n options: function options() {\n this.autoUpdateModel();\n }\n },\n mounted: function mounted() {\n this.id = this.id || UniqueComponentId();\n this.autoUpdateModel();\n this.bindLabelClickListener();\n },\n updated: function updated() {\n if (this.overlayVisible && this.isModelValueChanged) {\n this.scrollInView(this.findSelectedOptionIndex());\n }\n this.isModelValueChanged = false;\n },\n beforeUnmount: function beforeUnmount() {\n this.unbindOutsideClickListener();\n this.unbindResizeListener();\n this.unbindLabelClickListener();\n if (this.scrollHandler) {\n this.scrollHandler.destroy();\n this.scrollHandler = null;\n }\n if (this.overlay) {\n ZIndex.clear(this.overlay);\n this.overlay = null;\n }\n },\n methods: {\n getOptionIndex: function getOptionIndex(index, fn) {\n return this.virtualScrollerDisabled ? index : fn && fn(index)['index'];\n },\n getOptionLabel: function getOptionLabel(option) {\n return this.optionLabel ? resolveFieldData(option, this.optionLabel) : option;\n },\n getOptionValue: function getOptionValue(option) {\n return this.optionValue ? resolveFieldData(option, this.optionValue) : option;\n },\n getOptionRenderKey: function getOptionRenderKey(option, index) {\n return (this.dataKey ? resolveFieldData(option, this.dataKey) : this.getOptionLabel(option)) + '_' + index;\n },\n getPTItemOptions: function getPTItemOptions(option, itemOptions, index, key) {\n return this.ptm(key, {\n context: {\n option: option,\n index: index,\n selected: this.isSelected(option),\n focused: this.focusedOptionIndex === this.getOptionIndex(index, itemOptions),\n disabled: this.isOptionDisabled(option)\n }\n });\n },\n isOptionDisabled: function isOptionDisabled(option) {\n return this.optionDisabled ? resolveFieldData(option, this.optionDisabled) : false;\n },\n isOptionGroup: function isOptionGroup(option) {\n return this.optionGroupLabel && option.optionGroup && option.group;\n },\n getOptionGroupLabel: function getOptionGroupLabel(optionGroup) {\n return resolveFieldData(optionGroup, this.optionGroupLabel);\n },\n getOptionGroupChildren: function getOptionGroupChildren(optionGroup) {\n return resolveFieldData(optionGroup, this.optionGroupChildren);\n },\n getAriaPosInset: function getAriaPosInset(index) {\n var _this = this;\n return (this.optionGroupLabel ? index - this.visibleOptions.slice(0, index).filter(function (option) {\n return _this.isOptionGroup(option);\n }).length : index) + 1;\n },\n show: function show(isFocus) {\n this.$emit('before-show');\n this.overlayVisible = true;\n this.focusedOptionIndex = this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : this.editable ? -1 : this.findSelectedOptionIndex();\n isFocus && focus(this.$refs.focusInput);\n },\n hide: function hide(isFocus) {\n var _this2 = this;\n var _hide = function _hide() {\n _this2.$emit('before-hide');\n _this2.overlayVisible = false;\n _this2.clicked = false;\n _this2.focusedOptionIndex = -1;\n _this2.searchValue = '';\n _this2.resetFilterOnHide && (_this2.filterValue = null);\n isFocus && focus(_this2.$refs.focusInput);\n };\n setTimeout(function () {\n _hide();\n }, 0); // For ScreenReaders\n },\n onFocus: function onFocus(event) {\n if (this.disabled) {\n // For ScreenReaders\n return;\n }\n this.focused = true;\n if (this.overlayVisible) {\n this.focusedOptionIndex = this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : this.editable ? -1 : this.findSelectedOptionIndex();\n this.scrollInView(this.focusedOptionIndex);\n }\n this.$emit('focus', event);\n },\n onBlur: function onBlur(event) {\n this.focused = false;\n this.focusedOptionIndex = -1;\n this.searchValue = '';\n this.$emit('blur', event);\n },\n onKeyDown: function onKeyDown(event) {\n if (this.disabled || isAndroid()) {\n event.preventDefault();\n return;\n }\n var metaKey = event.metaKey || event.ctrlKey;\n switch (event.code) {\n case 'ArrowDown':\n this.onArrowDownKey(event);\n break;\n case 'ArrowUp':\n this.onArrowUpKey(event, this.editable);\n break;\n case 'ArrowLeft':\n case 'ArrowRight':\n this.onArrowLeftKey(event, this.editable);\n break;\n case 'Home':\n this.onHomeKey(event, this.editable);\n break;\n case 'End':\n this.onEndKey(event, this.editable);\n break;\n case 'PageDown':\n this.onPageDownKey(event);\n break;\n case 'PageUp':\n this.onPageUpKey(event);\n break;\n case 'Space':\n this.onSpaceKey(event, this.editable);\n break;\n case 'Enter':\n case 'NumpadEnter':\n this.onEnterKey(event);\n break;\n case 'Escape':\n this.onEscapeKey(event);\n break;\n case 'Tab':\n this.onTabKey(event);\n break;\n case 'Backspace':\n this.onBackspaceKey(event, this.editable);\n break;\n case 'ShiftLeft':\n case 'ShiftRight':\n //NOOP\n break;\n default:\n if (!metaKey && isPrintableCharacter(event.key)) {\n !this.overlayVisible && this.show();\n !this.editable && this.searchOptions(event, event.key);\n }\n break;\n }\n this.clicked = false;\n },\n onEditableInput: function onEditableInput(event) {\n var value = event.target.value;\n this.searchValue = '';\n var matched = this.searchOptions(event, value);\n !matched && (this.focusedOptionIndex = -1);\n this.updateModel(event, value);\n !this.overlayVisible && isNotEmpty(value) && this.show();\n },\n onContainerClick: function onContainerClick(event) {\n if (this.disabled || this.loading) {\n return;\n }\n if (event.target.tagName === 'INPUT' || event.target.getAttribute('data-pc-section') === 'clearicon' || event.target.closest('[data-pc-section=\"clearicon\"]')) {\n return;\n } else if (!this.overlay || !this.overlay.contains(event.target)) {\n this.overlayVisible ? this.hide(true) : this.show(true);\n }\n this.clicked = true;\n },\n onClearClick: function onClearClick(event) {\n this.updateModel(event, null);\n this.resetFilterOnClear && (this.filterValue = null);\n },\n onFirstHiddenFocus: function onFirstHiddenFocus(event) {\n var focusableEl = event.relatedTarget === this.$refs.focusInput ? getFirstFocusableElement(this.overlay, ':not([data-p-hidden-focusable=\"true\"])') : this.$refs.focusInput;\n focus(focusableEl);\n },\n onLastHiddenFocus: function onLastHiddenFocus(event) {\n var focusableEl = event.relatedTarget === this.$refs.focusInput ? getLastFocusableElement(this.overlay, ':not([data-p-hidden-focusable=\"true\"])') : this.$refs.focusInput;\n focus(focusableEl);\n },\n onOptionSelect: function onOptionSelect(event, option) {\n var isHide = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var value = this.getOptionValue(option);\n this.updateModel(event, value);\n isHide && this.hide(true);\n },\n onOptionMouseMove: function onOptionMouseMove(event, index) {\n if (this.focusOnHover) {\n this.changeFocusedOptionIndex(event, index);\n }\n },\n onFilterChange: function onFilterChange(event) {\n var value = event.target.value;\n this.filterValue = value;\n this.focusedOptionIndex = -1;\n this.$emit('filter', {\n originalEvent: event,\n value: value\n });\n !this.virtualScrollerDisabled && this.virtualScroller.scrollToIndex(0);\n },\n onFilterKeyDown: function onFilterKeyDown(event) {\n switch (event.code) {\n case 'ArrowDown':\n this.onArrowDownKey(event);\n break;\n case 'ArrowUp':\n this.onArrowUpKey(event, true);\n break;\n case 'ArrowLeft':\n case 'ArrowRight':\n this.onArrowLeftKey(event, true);\n break;\n case 'Home':\n this.onHomeKey(event, true);\n break;\n case 'End':\n this.onEndKey(event, true);\n break;\n case 'Enter':\n case 'NumpadEnter':\n this.onEnterKey(event);\n break;\n case 'Escape':\n this.onEscapeKey(event);\n break;\n case 'Tab':\n this.onTabKey(event, true);\n break;\n }\n },\n onFilterBlur: function onFilterBlur() {\n this.focusedOptionIndex = -1;\n },\n onFilterUpdated: function onFilterUpdated() {\n if (this.overlayVisible) {\n this.alignOverlay();\n }\n },\n onOverlayClick: function onOverlayClick(event) {\n OverlayEventBus.emit('overlay-click', {\n originalEvent: event,\n target: this.$el\n });\n },\n onOverlayKeyDown: function onOverlayKeyDown(event) {\n switch (event.code) {\n case 'Escape':\n this.onEscapeKey(event);\n break;\n }\n },\n onArrowDownKey: function onArrowDownKey(event) {\n if (!this.overlayVisible) {\n this.show();\n this.editable && this.changeFocusedOptionIndex(event, this.findSelectedOptionIndex());\n } else {\n var optionIndex = this.focusedOptionIndex !== -1 ? this.findNextOptionIndex(this.focusedOptionIndex) : this.clicked ? this.findFirstOptionIndex() : this.findFirstFocusedOptionIndex();\n this.changeFocusedOptionIndex(event, optionIndex);\n }\n event.preventDefault();\n },\n onArrowUpKey: function onArrowUpKey(event) {\n var pressedInInputText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (event.altKey && !pressedInInputText) {\n if (this.focusedOptionIndex !== -1) {\n this.onOptionSelect(event, this.visibleOptions[this.focusedOptionIndex]);\n }\n this.overlayVisible && this.hide();\n event.preventDefault();\n } else {\n var optionIndex = this.focusedOptionIndex !== -1 ? this.findPrevOptionIndex(this.focusedOptionIndex) : this.clicked ? this.findLastOptionIndex() : this.findLastFocusedOptionIndex();\n this.changeFocusedOptionIndex(event, optionIndex);\n !this.overlayVisible && this.show();\n event.preventDefault();\n }\n },\n onArrowLeftKey: function onArrowLeftKey(event) {\n var pressedInInputText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n pressedInInputText && (this.focusedOptionIndex = -1);\n },\n onHomeKey: function onHomeKey(event) {\n var pressedInInputText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (pressedInInputText) {\n var target = event.currentTarget;\n if (event.shiftKey) {\n target.setSelectionRange(0, event.target.selectionStart);\n } else {\n target.setSelectionRange(0, 0);\n this.focusedOptionIndex = -1;\n }\n } else {\n this.changeFocusedOptionIndex(event, this.findFirstOptionIndex());\n !this.overlayVisible && this.show();\n }\n event.preventDefault();\n },\n onEndKey: function onEndKey(event) {\n var pressedInInputText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (pressedInInputText) {\n var target = event.currentTarget;\n if (event.shiftKey) {\n target.setSelectionRange(event.target.selectionStart, target.value.length);\n } else {\n var len = target.value.length;\n target.setSelectionRange(len, len);\n this.focusedOptionIndex = -1;\n }\n } else {\n this.changeFocusedOptionIndex(event, this.findLastOptionIndex());\n !this.overlayVisible && this.show();\n }\n event.preventDefault();\n },\n onPageUpKey: function onPageUpKey(event) {\n this.scrollInView(0);\n event.preventDefault();\n },\n onPageDownKey: function onPageDownKey(event) {\n this.scrollInView(this.visibleOptions.length - 1);\n event.preventDefault();\n },\n onEnterKey: function onEnterKey(event) {\n if (!this.overlayVisible) {\n this.focusedOptionIndex = -1; // reset\n this.onArrowDownKey(event);\n } else {\n if (this.focusedOptionIndex !== -1) {\n this.onOptionSelect(event, this.visibleOptions[this.focusedOptionIndex]);\n }\n this.hide();\n }\n event.preventDefault();\n },\n onSpaceKey: function onSpaceKey(event) {\n var pressedInInputText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n !pressedInInputText && this.onEnterKey(event);\n },\n onEscapeKey: function onEscapeKey(event) {\n this.overlayVisible && this.hide(true);\n event.preventDefault();\n event.stopPropagation(); //@todo will be changed next versionss\n },\n onTabKey: function onTabKey(event) {\n var pressedInInputText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (!pressedInInputText) {\n if (this.overlayVisible && this.hasFocusableElements()) {\n focus(this.$refs.firstHiddenFocusableElementOnOverlay);\n event.preventDefault();\n } else {\n if (this.focusedOptionIndex !== -1) {\n this.onOptionSelect(event, this.visibleOptions[this.focusedOptionIndex]);\n }\n this.overlayVisible && this.hide(this.filter);\n }\n }\n },\n onBackspaceKey: function onBackspaceKey(event) {\n var pressedInInputText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (pressedInInputText) {\n !this.overlayVisible && this.show();\n }\n },\n onOverlayEnter: function onOverlayEnter(el) {\n ZIndex.set('overlay', el, this.$primevue.config.zIndex.overlay);\n addStyle(el, {\n position: 'absolute',\n top: '0',\n left: '0'\n });\n this.alignOverlay();\n this.scrollInView();\n this.autoFilterFocus && focus(this.$refs.filterInput.$el);\n },\n onOverlayAfterEnter: function onOverlayAfterEnter() {\n this.bindOutsideClickListener();\n this.bindScrollListener();\n this.bindResizeListener();\n this.$emit('show');\n },\n onOverlayLeave: function onOverlayLeave() {\n this.unbindOutsideClickListener();\n this.unbindScrollListener();\n this.unbindResizeListener();\n this.autoFilterFocus && focus(this.$refs.focusInput);\n this.$emit('hide');\n this.overlay = null;\n },\n onOverlayAfterLeave: function onOverlayAfterLeave(el) {\n ZIndex.clear(el);\n },\n alignOverlay: function alignOverlay() {\n if (this.appendTo === 'self') {\n relativePosition(this.overlay, this.$el);\n } else {\n this.overlay.style.minWidth = getOuterWidth(this.$el) + 'px';\n absolutePosition(this.overlay, this.$el);\n }\n },\n bindOutsideClickListener: function bindOutsideClickListener() {\n var _this3 = this;\n if (!this.outsideClickListener) {\n this.outsideClickListener = function (event) {\n if (_this3.overlayVisible && _this3.overlay && !_this3.$el.contains(event.target) && !_this3.overlay.contains(event.target)) {\n _this3.hide();\n }\n };\n document.addEventListener('click', this.outsideClickListener);\n }\n },\n unbindOutsideClickListener: function unbindOutsideClickListener() {\n if (this.outsideClickListener) {\n document.removeEventListener('click', this.outsideClickListener);\n this.outsideClickListener = null;\n }\n },\n bindScrollListener: function bindScrollListener() {\n var _this4 = this;\n if (!this.scrollHandler) {\n this.scrollHandler = new ConnectedOverlayScrollHandler(this.$refs.container, function () {\n if (_this4.overlayVisible) {\n _this4.hide();\n }\n });\n }\n this.scrollHandler.bindScrollListener();\n },\n unbindScrollListener: function unbindScrollListener() {\n if (this.scrollHandler) {\n this.scrollHandler.unbindScrollListener();\n }\n },\n bindResizeListener: function bindResizeListener() {\n var _this5 = this;\n if (!this.resizeListener) {\n this.resizeListener = function () {\n if (_this5.overlayVisible && !isTouchDevice()) {\n _this5.hide();\n }\n };\n window.addEventListener('resize', this.resizeListener);\n }\n },\n unbindResizeListener: function unbindResizeListener() {\n if (this.resizeListener) {\n window.removeEventListener('resize', this.resizeListener);\n this.resizeListener = null;\n }\n },\n bindLabelClickListener: function bindLabelClickListener() {\n var _this6 = this;\n if (!this.editable && !this.labelClickListener) {\n var label = document.querySelector(\"label[for=\\\"\".concat(this.inputId, \"\\\"]\"));\n if (label && isVisible(label)) {\n this.labelClickListener = function () {\n focus(_this6.$refs.focusInput);\n };\n label.addEventListener('click', this.labelClickListener);\n }\n }\n },\n unbindLabelClickListener: function unbindLabelClickListener() {\n if (this.labelClickListener) {\n var label = document.querySelector(\"label[for=\\\"\".concat(this.inputId, \"\\\"]\"));\n if (label && isVisible(label)) {\n label.removeEventListener('click', this.labelClickListener);\n }\n }\n },\n hasFocusableElements: function hasFocusableElements() {\n return getFocusableElements(this.overlay, ':not([data-p-hidden-focusable=\"true\"])').length > 0;\n },\n isOptionMatched: function isOptionMatched(option) {\n var _this$getOptionLabel;\n return this.isValidOption(option) && typeof this.getOptionLabel(option) === 'string' && ((_this$getOptionLabel = this.getOptionLabel(option)) === null || _this$getOptionLabel === void 0 ? void 0 : _this$getOptionLabel.toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale)));\n },\n isValidOption: function isValidOption(option) {\n return isNotEmpty(option) && !(this.isOptionDisabled(option) || this.isOptionGroup(option));\n },\n isValidSelectedOption: function isValidSelectedOption(option) {\n return this.isValidOption(option) && this.isSelected(option);\n },\n isSelected: function isSelected(option) {\n return this.isValidOption(option) && equals(this.modelValue, this.getOptionValue(option), this.equalityKey);\n },\n findFirstOptionIndex: function findFirstOptionIndex() {\n var _this7 = this;\n return this.visibleOptions.findIndex(function (option) {\n return _this7.isValidOption(option);\n });\n },\n findLastOptionIndex: function findLastOptionIndex() {\n var _this8 = this;\n return findLastIndex(this.visibleOptions, function (option) {\n return _this8.isValidOption(option);\n });\n },\n findNextOptionIndex: function findNextOptionIndex(index) {\n var _this9 = this;\n var matchedOptionIndex = index < this.visibleOptions.length - 1 ? this.visibleOptions.slice(index + 1).findIndex(function (option) {\n return _this9.isValidOption(option);\n }) : -1;\n return matchedOptionIndex > -1 ? matchedOptionIndex + index + 1 : index;\n },\n findPrevOptionIndex: function findPrevOptionIndex(index) {\n var _this10 = this;\n var matchedOptionIndex = index > 0 ? findLastIndex(this.visibleOptions.slice(0, index), function (option) {\n return _this10.isValidOption(option);\n }) : -1;\n return matchedOptionIndex > -1 ? matchedOptionIndex : index;\n },\n findSelectedOptionIndex: function findSelectedOptionIndex() {\n var _this11 = this;\n return this.hasSelectedOption ? this.visibleOptions.findIndex(function (option) {\n return _this11.isValidSelectedOption(option);\n }) : -1;\n },\n findFirstFocusedOptionIndex: function findFirstFocusedOptionIndex() {\n var selectedIndex = this.findSelectedOptionIndex();\n return selectedIndex < 0 ? this.findFirstOptionIndex() : selectedIndex;\n },\n findLastFocusedOptionIndex: function findLastFocusedOptionIndex() {\n var selectedIndex = this.findSelectedOptionIndex();\n return selectedIndex < 0 ? this.findLastOptionIndex() : selectedIndex;\n },\n searchOptions: function searchOptions(event, _char) {\n var _this12 = this;\n this.searchValue = (this.searchValue || '') + _char;\n var optionIndex = -1;\n var matched = false;\n if (isNotEmpty(this.searchValue)) {\n if (this.focusedOptionIndex !== -1) {\n optionIndex = this.visibleOptions.slice(this.focusedOptionIndex).findIndex(function (option) {\n return _this12.isOptionMatched(option);\n });\n optionIndex = optionIndex === -1 ? this.visibleOptions.slice(0, this.focusedOptionIndex).findIndex(function (option) {\n return _this12.isOptionMatched(option);\n }) : optionIndex + this.focusedOptionIndex;\n } else {\n optionIndex = this.visibleOptions.findIndex(function (option) {\n return _this12.isOptionMatched(option);\n });\n }\n if (optionIndex !== -1) {\n matched = true;\n }\n if (optionIndex === -1 && this.focusedOptionIndex === -1) {\n optionIndex = this.findFirstFocusedOptionIndex();\n }\n if (optionIndex !== -1) {\n this.changeFocusedOptionIndex(event, optionIndex);\n }\n }\n if (this.searchTimeout) {\n clearTimeout(this.searchTimeout);\n }\n this.searchTimeout = setTimeout(function () {\n _this12.searchValue = '';\n _this12.searchTimeout = null;\n }, 500);\n return matched;\n },\n changeFocusedOptionIndex: function changeFocusedOptionIndex(event, index) {\n if (this.focusedOptionIndex !== index) {\n this.focusedOptionIndex = index;\n this.scrollInView();\n if (this.selectOnFocus) {\n this.onOptionSelect(event, this.visibleOptions[index], false);\n }\n }\n },\n scrollInView: function scrollInView() {\n var _this13 = this;\n var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;\n this.$nextTick(function () {\n var id = index !== -1 ? \"\".concat(_this13.id, \"_\").concat(index) : _this13.focusedOptionId;\n var element = findSingle(_this13.list, \"li[id=\\\"\".concat(id, \"\\\"]\"));\n if (element) {\n element.scrollIntoView && element.scrollIntoView({\n block: 'nearest',\n inline: 'start'\n });\n } else if (!_this13.virtualScrollerDisabled) {\n _this13.virtualScroller && _this13.virtualScroller.scrollToIndex(index !== -1 ? index : _this13.focusedOptionIndex);\n }\n });\n },\n autoUpdateModel: function autoUpdateModel() {\n if (this.selectOnFocus && this.autoOptionFocus && !this.hasSelectedOption) {\n this.focusedOptionIndex = this.findFirstFocusedOptionIndex();\n this.onOptionSelect(null, this.visibleOptions[this.focusedOptionIndex], false);\n }\n },\n updateModel: function updateModel(event, value) {\n this.$emit('update:modelValue', value);\n this.$emit('change', {\n originalEvent: event,\n value: value\n });\n },\n flatOptions: function flatOptions(options) {\n var _this14 = this;\n return (options || []).reduce(function (result, option, index) {\n result.push({\n optionGroup: option,\n group: true,\n index: index\n });\n var optionGroupChildren = _this14.getOptionGroupChildren(option);\n optionGroupChildren && optionGroupChildren.forEach(function (o) {\n return result.push(o);\n });\n return result;\n }, []);\n },\n overlayRef: function overlayRef(el) {\n this.overlay = el;\n },\n listRef: function listRef(el, contentRef) {\n this.list = el;\n contentRef && contentRef(el); // For VirtualScroller\n },\n virtualScrollerRef: function virtualScrollerRef(el) {\n this.virtualScroller = el;\n }\n },\n computed: {\n visibleOptions: function visibleOptions() {\n var _this15 = this;\n var options = this.optionGroupLabel ? this.flatOptions(this.options) : this.options || [];\n if (this.filterValue) {\n var filteredOptions = FilterService.filter(options, this.searchFields, this.filterValue, this.filterMatchMode, this.filterLocale);\n if (this.optionGroupLabel) {\n var optionGroups = this.options || [];\n var filtered = [];\n optionGroups.forEach(function (group) {\n var groupChildren = _this15.getOptionGroupChildren(group);\n var filteredItems = groupChildren.filter(function (item) {\n return filteredOptions.includes(item);\n });\n if (filteredItems.length > 0) filtered.push(_objectSpread(_objectSpread({}, group), {}, _defineProperty({}, typeof _this15.optionGroupChildren === 'string' ? _this15.optionGroupChildren : 'items', _toConsumableArray(filteredItems))));\n });\n return this.flatOptions(filtered);\n }\n return filteredOptions;\n }\n return options;\n },\n hasSelectedOption: function hasSelectedOption() {\n return isNotEmpty(this.modelValue);\n },\n label: function label() {\n var selectedOptionIndex = this.findSelectedOptionIndex();\n return selectedOptionIndex !== -1 ? this.getOptionLabel(this.visibleOptions[selectedOptionIndex]) : this.placeholder || 'p-emptylabel';\n },\n editableInputValue: function editableInputValue() {\n var selectedOptionIndex = this.findSelectedOptionIndex();\n return selectedOptionIndex !== -1 ? this.getOptionLabel(this.visibleOptions[selectedOptionIndex]) : this.modelValue || '';\n },\n equalityKey: function equalityKey() {\n return this.optionValue ? null : this.dataKey;\n },\n searchFields: function searchFields() {\n return this.filterFields || [this.optionLabel];\n },\n filterResultMessageText: function filterResultMessageText() {\n return isNotEmpty(this.visibleOptions) ? this.filterMessageText.replaceAll('{0}', this.visibleOptions.length) : this.emptyFilterMessageText;\n },\n filterMessageText: function filterMessageText() {\n return this.filterMessage || this.$primevue.config.locale.searchMessage || '';\n },\n emptyFilterMessageText: function emptyFilterMessageText() {\n return this.emptyFilterMessage || this.$primevue.config.locale.emptySearchMessage || this.$primevue.config.locale.emptyFilterMessage || '';\n },\n emptyMessageText: function emptyMessageText() {\n return this.emptyMessage || this.$primevue.config.locale.emptyMessage || '';\n },\n selectionMessageText: function selectionMessageText() {\n return this.selectionMessage || this.$primevue.config.locale.selectionMessage || '';\n },\n emptySelectionMessageText: function emptySelectionMessageText() {\n return this.emptySelectionMessage || this.$primevue.config.locale.emptySelectionMessage || '';\n },\n selectedMessageText: function selectedMessageText() {\n return this.hasSelectedOption ? this.selectionMessageText.replaceAll('{0}', '1') : this.emptySelectionMessageText;\n },\n focusedOptionId: function focusedOptionId() {\n return this.focusedOptionIndex !== -1 ? \"\".concat(this.id, \"_\").concat(this.focusedOptionIndex) : null;\n },\n ariaSetSize: function ariaSetSize() {\n var _this16 = this;\n return this.visibleOptions.filter(function (option) {\n return !_this16.isOptionGroup(option);\n }).length;\n },\n isClearIconVisible: function isClearIconVisible() {\n return this.showClear && this.modelValue != null && isNotEmpty(this.options);\n },\n virtualScrollerDisabled: function virtualScrollerDisabled() {\n return !this.virtualScrollerOptions;\n },\n hasFluid: function hasFluid() {\n return isEmpty(this.fluid) ? !!this.$pcFluid : this.fluid;\n }\n },\n directives: {\n ripple: Ripple\n },\n components: {\n InputText: InputText,\n VirtualScroller: VirtualScroller,\n Portal: Portal,\n InputIcon: InputIcon,\n IconField: IconField,\n TimesIcon: TimesIcon,\n ChevronDownIcon: ChevronDownIcon,\n SpinnerIcon: SpinnerIcon,\n SearchIcon: SearchIcon,\n CheckIcon: CheckIcon,\n BlankIcon: BlankIcon\n }\n};\n\nvar _hoisted_1 = [\"id\"];\nvar _hoisted_2 = [\"id\", \"value\", \"placeholder\", \"tabindex\", \"disabled\", \"aria-label\", \"aria-labelledby\", \"aria-expanded\", \"aria-controls\", \"aria-activedescendant\", \"aria-invalid\"];\nvar _hoisted_3 = [\"id\", \"tabindex\", \"aria-label\", \"aria-labelledby\", \"aria-expanded\", \"aria-controls\", \"aria-activedescendant\", \"aria-disabled\"];\nvar _hoisted_4 = [\"id\"];\nvar _hoisted_5 = [\"id\"];\nvar _hoisted_6 = [\"id\", \"aria-label\", \"aria-selected\", \"aria-disabled\", \"aria-setsize\", \"aria-posinset\", \"onClick\", \"onMousemove\", \"data-p-selected\", \"data-p-focused\", \"data-p-disabled\"];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n var _component_SpinnerIcon = resolveComponent(\"SpinnerIcon\");\n var _component_InputText = resolveComponent(\"InputText\");\n var _component_SearchIcon = resolveComponent(\"SearchIcon\");\n var _component_InputIcon = resolveComponent(\"InputIcon\");\n var _component_IconField = resolveComponent(\"IconField\");\n var _component_CheckIcon = resolveComponent(\"CheckIcon\");\n var _component_BlankIcon = resolveComponent(\"BlankIcon\");\n var _component_VirtualScroller = resolveComponent(\"VirtualScroller\");\n var _component_Portal = resolveComponent(\"Portal\");\n var _directive_ripple = resolveDirective(\"ripple\");\n return openBlock(), createElementBlock(\"div\", mergeProps({\n ref: \"container\",\n id: $data.id,\n \"class\": _ctx.cx('root'),\n onClick: _cache[11] || (_cache[11] = function () {\n return $options.onContainerClick && $options.onContainerClick.apply($options, arguments);\n })\n }, _ctx.ptmi('root')), [_ctx.editable ? (openBlock(), createElementBlock(\"input\", mergeProps({\n key: 0,\n ref: \"focusInput\",\n id: _ctx.labelId || _ctx.inputId,\n type: \"text\",\n \"class\": [_ctx.cx('label'), _ctx.inputClass, _ctx.labelClass],\n style: [_ctx.inputStyle, _ctx.labelStyle],\n value: $options.editableInputValue,\n placeholder: _ctx.placeholder,\n tabindex: !_ctx.disabled ? _ctx.tabindex : -1,\n disabled: _ctx.disabled,\n autocomplete: \"off\",\n role: \"combobox\",\n \"aria-label\": _ctx.ariaLabel,\n \"aria-labelledby\": _ctx.ariaLabelledby,\n \"aria-haspopup\": \"listbox\",\n \"aria-expanded\": $data.overlayVisible,\n \"aria-controls\": $data.id + '_list',\n \"aria-activedescendant\": $data.focused ? $options.focusedOptionId : undefined,\n \"aria-invalid\": _ctx.invalid || undefined,\n onFocus: _cache[0] || (_cache[0] = function () {\n return $options.onFocus && $options.onFocus.apply($options, arguments);\n }),\n onBlur: _cache[1] || (_cache[1] = function () {\n return $options.onBlur && $options.onBlur.apply($options, arguments);\n }),\n onKeydown: _cache[2] || (_cache[2] = function () {\n return $options.onKeyDown && $options.onKeyDown.apply($options, arguments);\n }),\n onInput: _cache[3] || (_cache[3] = function () {\n return $options.onEditableInput && $options.onEditableInput.apply($options, arguments);\n })\n }, _ctx.ptm('label')), null, 16, _hoisted_2)) : (openBlock(), createElementBlock(\"span\", mergeProps({\n key: 1,\n ref: \"focusInput\",\n id: _ctx.labelId || _ctx.inputId,\n \"class\": [_ctx.cx('label'), _ctx.inputClass, _ctx.labelClass],\n style: [_ctx.inputStyle, _ctx.labelStyle],\n tabindex: !_ctx.disabled ? _ctx.tabindex : -1,\n role: \"combobox\",\n \"aria-label\": _ctx.ariaLabel || ($options.label === 'p-emptylabel' ? undefined : $options.label),\n \"aria-labelledby\": _ctx.ariaLabelledby,\n \"aria-haspopup\": \"listbox\",\n \"aria-expanded\": $data.overlayVisible,\n \"aria-controls\": $data.id + '_list',\n \"aria-activedescendant\": $data.focused ? $options.focusedOptionId : undefined,\n \"aria-disabled\": _ctx.disabled,\n onFocus: _cache[4] || (_cache[4] = function () {\n return $options.onFocus && $options.onFocus.apply($options, arguments);\n }),\n onBlur: _cache[5] || (_cache[5] = function () {\n return $options.onBlur && $options.onBlur.apply($options, arguments);\n }),\n onKeydown: _cache[6] || (_cache[6] = function () {\n return $options.onKeyDown && $options.onKeyDown.apply($options, arguments);\n })\n }, _ctx.ptm('label')), [renderSlot(_ctx.$slots, \"value\", {\n value: _ctx.modelValue,\n placeholder: _ctx.placeholder\n }, function () {\n return [createTextVNode(toDisplayString($options.label === 'p-emptylabel' ? ' ' : $options.label || 'empty'), 1)];\n })], 16, _hoisted_3)), $options.isClearIconVisible ? renderSlot(_ctx.$slots, \"clearicon\", {\n key: 2,\n \"class\": normalizeClass(_ctx.cx('clearIcon')),\n clearCallback: $options.onClearClick\n }, function () {\n return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon ? 'i' : 'TimesIcon'), mergeProps({\n ref: \"clearIcon\",\n \"class\": [_ctx.cx('clearIcon'), _ctx.clearIcon],\n onClick: $options.onClearClick\n }, _ctx.ptm('clearIcon'), {\n \"data-pc-section\": \"clearicon\"\n }), null, 16, [\"class\", \"onClick\"]))];\n }) : createCommentVNode(\"\", true), createElementVNode(\"div\", mergeProps({\n \"class\": _ctx.cx('dropdown')\n }, _ctx.ptm('dropdown')), [_ctx.loading ? renderSlot(_ctx.$slots, \"loadingicon\", {\n key: 0,\n \"class\": normalizeClass(_ctx.cx('loadingIcon'))\n }, function () {\n return [_ctx.loadingIcon ? (openBlock(), createElementBlock(\"span\", mergeProps({\n key: 0,\n \"class\": [_ctx.cx('loadingIcon'), 'pi-spin', _ctx.loadingIcon],\n \"aria-hidden\": \"true\"\n }, _ctx.ptm('loadingIcon')), null, 16)) : (openBlock(), createBlock(_component_SpinnerIcon, mergeProps({\n key: 1,\n \"class\": _ctx.cx('loadingIcon'),\n spin: \"\",\n \"aria-hidden\": \"true\"\n }, _ctx.ptm('loadingIcon')), null, 16, [\"class\"]))];\n }) : renderSlot(_ctx.$slots, \"dropdownicon\", {\n key: 1,\n \"class\": normalizeClass(_ctx.cx('dropdownIcon'))\n }, function () {\n return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.dropdownIcon ? 'span' : 'ChevronDownIcon'), mergeProps({\n \"class\": [_ctx.cx('dropdownIcon'), _ctx.dropdownIcon],\n \"aria-hidden\": \"true\"\n }, _ctx.ptm('dropdownIcon')), null, 16, [\"class\"]))];\n })], 16), createVNode(_component_Portal, {\n appendTo: _ctx.appendTo\n }, {\n \"default\": withCtx(function () {\n return [createVNode(Transition, mergeProps({\n name: \"p-connected-overlay\",\n onEnter: $options.onOverlayEnter,\n onAfterEnter: $options.onOverlayAfterEnter,\n onLeave: $options.onOverlayLeave,\n onAfterLeave: $options.onOverlayAfterLeave\n }, _ctx.ptm('transition')), {\n \"default\": withCtx(function () {\n return [$data.overlayVisible ? (openBlock(), createElementBlock(\"div\", mergeProps({\n key: 0,\n ref: $options.overlayRef,\n \"class\": [_ctx.cx('overlay'), _ctx.panelClass, _ctx.overlayClass],\n style: [_ctx.panelStyle, _ctx.overlayStyle],\n onClick: _cache[9] || (_cache[9] = function () {\n return $options.onOverlayClick && $options.onOverlayClick.apply($options, arguments);\n }),\n onKeydown: _cache[10] || (_cache[10] = function () {\n return $options.onOverlayKeyDown && $options.onOverlayKeyDown.apply($options, arguments);\n })\n }, _ctx.ptm('overlay')), [createElementVNode(\"span\", mergeProps({\n ref: \"firstHiddenFocusableElementOnOverlay\",\n role: \"presentation\",\n \"aria-hidden\": \"true\",\n \"class\": \"p-hidden-accessible p-hidden-focusable\",\n tabindex: 0,\n onFocus: _cache[7] || (_cache[7] = function () {\n return $options.onFirstHiddenFocus && $options.onFirstHiddenFocus.apply($options, arguments);\n })\n }, _ctx.ptm('hiddenFirstFocusableEl'), {\n \"data-p-hidden-accessible\": true,\n \"data-p-hidden-focusable\": true\n }), null, 16), renderSlot(_ctx.$slots, \"header\", {\n value: _ctx.modelValue,\n options: $options.visibleOptions\n }), _ctx.filter ? (openBlock(), createElementBlock(\"div\", mergeProps({\n key: 0,\n \"class\": _ctx.cx('header')\n }, _ctx.ptm('header')), [createVNode(_component_IconField, {\n unstyled: _ctx.unstyled,\n pt: _ctx.ptm('pcFilterContainer')\n }, {\n \"default\": withCtx(function () {\n return [createVNode(_component_InputText, {\n ref: \"filterInput\",\n type: \"text\",\n value: $data.filterValue,\n onVnodeMounted: $options.onFilterUpdated,\n onVnodeUpdated: $options.onFilterUpdated,\n \"class\": normalizeClass(_ctx.cx('pcFilter')),\n placeholder: _ctx.filterPlaceholder,\n variant: _ctx.variant,\n unstyled: _ctx.unstyled,\n role: \"searchbox\",\n autocomplete: \"off\",\n \"aria-owns\": $data.id + '_list',\n \"aria-activedescendant\": $options.focusedOptionId,\n onKeydown: $options.onFilterKeyDown,\n onBlur: $options.onFilterBlur,\n onInput: $options.onFilterChange,\n pt: _ctx.ptm('pcFilter')\n }, null, 8, [\"value\", \"onVnodeMounted\", \"onVnodeUpdated\", \"class\", \"placeholder\", \"variant\", \"unstyled\", \"aria-owns\", \"aria-activedescendant\", \"onKeydown\", \"onBlur\", \"onInput\", \"pt\"]), createVNode(_component_InputIcon, mergeProps({\n unstyled: _ctx.unstyled\n }, _ctx.ptm('pcFilterIconContainer')), {\n \"default\": withCtx(function () {\n return [renderSlot(_ctx.$slots, \"filtericon\", {}, function () {\n return [_ctx.filterIcon ? (openBlock(), createElementBlock(\"span\", mergeProps({\n key: 0,\n \"class\": _ctx.filterIcon\n }, _ctx.ptm('filterIcon')), null, 16)) : (openBlock(), createBlock(_component_SearchIcon, normalizeProps(mergeProps({\n key: 1\n }, _ctx.ptm('filterIcon'))), null, 16))];\n })];\n }),\n _: 3\n }, 16, [\"unstyled\"])];\n }),\n _: 3\n }, 8, [\"unstyled\", \"pt\"]), createElementVNode(\"span\", mergeProps({\n role: \"status\",\n \"aria-live\": \"polite\",\n \"class\": \"p-hidden-accessible\"\n }, _ctx.ptm('hiddenFilterResult'), {\n \"data-p-hidden-accessible\": true\n }), toDisplayString($options.filterResultMessageText), 17)], 16)) : createCommentVNode(\"\", true), createElementVNode(\"div\", mergeProps({\n \"class\": _ctx.cx('listContainer'),\n style: {\n 'max-height': $options.virtualScrollerDisabled ? _ctx.scrollHeight : ''\n }\n }, _ctx.ptm('listContainer')), [createVNode(_component_VirtualScroller, mergeProps({\n ref: $options.virtualScrollerRef\n }, _ctx.virtualScrollerOptions, {\n items: $options.visibleOptions,\n style: {\n height: _ctx.scrollHeight\n },\n tabindex: -1,\n disabled: $options.virtualScrollerDisabled,\n pt: _ctx.ptm('virtualScroller')\n }), createSlots({\n content: withCtx(function (_ref) {\n var styleClass = _ref.styleClass,\n contentRef = _ref.contentRef,\n items = _ref.items,\n getItemOptions = _ref.getItemOptions,\n contentStyle = _ref.contentStyle,\n itemSize = _ref.itemSize;\n return [createElementVNode(\"ul\", mergeProps({\n ref: function ref(el) {\n return $options.listRef(el, contentRef);\n },\n id: $data.id + '_list',\n \"class\": [_ctx.cx('list'), styleClass],\n style: contentStyle,\n role: \"listbox\"\n }, _ctx.ptm('list')), [(openBlock(true), createElementBlock(Fragment, null, renderList(items, function (option, i) {\n return openBlock(), createElementBlock(Fragment, {\n key: $options.getOptionRenderKey(option, $options.getOptionIndex(i, getItemOptions))\n }, [$options.isOptionGroup(option) ? (openBlock(), createElementBlock(\"li\", mergeProps({\n key: 0,\n id: $data.id + '_' + $options.getOptionIndex(i, getItemOptions),\n style: {\n height: itemSize ? itemSize + 'px' : undefined\n },\n \"class\": _ctx.cx('optionGroup'),\n role: \"option\",\n ref_for: true\n }, _ctx.ptm('optionGroup')), [renderSlot(_ctx.$slots, \"optiongroup\", {\n option: option.optionGroup,\n index: $options.getOptionIndex(i, getItemOptions)\n }, function () {\n return [createElementVNode(\"span\", mergeProps({\n \"class\": _ctx.cx('optionGroupLabel'),\n ref_for: true\n }, _ctx.ptm('optionGroupLabel')), toDisplayString($options.getOptionGroupLabel(option.optionGroup)), 17)];\n })], 16, _hoisted_5)) : withDirectives((openBlock(), createElementBlock(\"li\", mergeProps({\n key: 1,\n id: $data.id + '_' + $options.getOptionIndex(i, getItemOptions),\n \"class\": _ctx.cx('option', {\n option: option,\n focusedOption: $options.getOptionIndex(i, getItemOptions)\n }),\n style: {\n height: itemSize ? itemSize + 'px' : undefined\n },\n role: \"option\",\n \"aria-label\": $options.getOptionLabel(option),\n \"aria-selected\": $options.isSelected(option),\n \"aria-disabled\": $options.isOptionDisabled(option),\n \"aria-setsize\": $options.ariaSetSize,\n \"aria-posinset\": $options.getAriaPosInset($options.getOptionIndex(i, getItemOptions)),\n onClick: function onClick($event) {\n return $options.onOptionSelect($event, option);\n },\n onMousemove: function onMousemove($event) {\n return $options.onOptionMouseMove($event, $options.getOptionIndex(i, getItemOptions));\n },\n \"data-p-selected\": $options.isSelected(option),\n \"data-p-focused\": $data.focusedOptionIndex === $options.getOptionIndex(i, getItemOptions),\n \"data-p-disabled\": $options.isOptionDisabled(option),\n ref_for: true\n }, $options.getPTItemOptions(option, getItemOptions, i, 'option')), [_ctx.checkmark ? (openBlock(), createElementBlock(Fragment, {\n key: 0\n }, [$options.isSelected(option) ? (openBlock(), createBlock(_component_CheckIcon, mergeProps({\n key: 0,\n \"class\": _ctx.cx('optionCheckIcon'),\n ref_for: true\n }, _ctx.ptm('optionCheckIcon')), null, 16, [\"class\"])) : (openBlock(), createBlock(_component_BlankIcon, mergeProps({\n key: 1,\n \"class\": _ctx.cx('optionBlankIcon'),\n ref_for: true\n }, _ctx.ptm('optionBlankIcon')), null, 16, [\"class\"]))], 64)) : createCommentVNode(\"\", true), renderSlot(_ctx.$slots, \"option\", {\n option: option,\n selected: $options.isSelected(option),\n index: $options.getOptionIndex(i, getItemOptions)\n }, function () {\n return [createElementVNode(\"span\", mergeProps({\n \"class\": _ctx.cx('optionLabel'),\n ref_for: true\n }, _ctx.ptm('optionLabel')), toDisplayString($options.getOptionLabel(option)), 17)];\n })], 16, _hoisted_6)), [[_directive_ripple]])], 64);\n }), 128)), $data.filterValue && (!items || items && items.length === 0) ? (openBlock(), createElementBlock(\"li\", mergeProps({\n key: 0,\n \"class\": _ctx.cx('emptyMessage'),\n role: \"option\"\n }, _ctx.ptm('emptyMessage'), {\n \"data-p-hidden-accessible\": true\n }), [renderSlot(_ctx.$slots, \"emptyfilter\", {}, function () {\n return [createTextVNode(toDisplayString($options.emptyFilterMessageText), 1)];\n })], 16)) : !_ctx.options || _ctx.options && _ctx.options.length === 0 ? (openBlock(), createElementBlock(\"li\", mergeProps({\n key: 1,\n \"class\": _ctx.cx('emptyMessage'),\n role: \"option\"\n }, _ctx.ptm('emptyMessage'), {\n \"data-p-hidden-accessible\": true\n }), [renderSlot(_ctx.$slots, \"empty\", {}, function () {\n return [createTextVNode(toDisplayString($options.emptyMessageText), 1)];\n })], 16)) : createCommentVNode(\"\", true)], 16, _hoisted_4)];\n }),\n _: 2\n }, [_ctx.$slots.loader ? {\n name: \"loader\",\n fn: withCtx(function (_ref2) {\n var options = _ref2.options;\n return [renderSlot(_ctx.$slots, \"loader\", {\n options: options\n })];\n }),\n key: \"0\"\n } : undefined]), 1040, [\"items\", \"style\", \"disabled\", \"pt\"])], 16), renderSlot(_ctx.$slots, \"footer\", {\n value: _ctx.modelValue,\n options: $options.visibleOptions\n }), !_ctx.options || _ctx.options && _ctx.options.length === 0 ? (openBlock(), createElementBlock(\"span\", mergeProps({\n key: 1,\n role: \"status\",\n \"aria-live\": \"polite\",\n \"class\": \"p-hidden-accessible\"\n }, _ctx.ptm('hiddenEmptyMessage'), {\n \"data-p-hidden-accessible\": true\n }), toDisplayString($options.emptyMessageText), 17)) : createCommentVNode(\"\", true), createElementVNode(\"span\", mergeProps({\n role: \"status\",\n \"aria-live\": \"polite\",\n \"class\": \"p-hidden-accessible\"\n }, _ctx.ptm('hiddenSelectedMessage'), {\n \"data-p-hidden-accessible\": true\n }), toDisplayString($options.selectedMessageText), 17), createElementVNode(\"span\", mergeProps({\n ref: \"lastHiddenFocusableElementOnOverlay\",\n role: \"presentation\",\n \"aria-hidden\": \"true\",\n \"class\": \"p-hidden-accessible p-hidden-focusable\",\n tabindex: 0,\n onFocus: _cache[8] || (_cache[8] = function () {\n return $options.onLastHiddenFocus && $options.onLastHiddenFocus.apply($options, arguments);\n })\n }, _ctx.ptm('hiddenLastFocusableEl'), {\n \"data-p-hidden-accessible\": true,\n \"data-p-hidden-focusable\": true\n }), null, 16)], 16)) : createCommentVNode(\"\", true)];\n }),\n _: 3\n }, 16, [\"onEnter\", \"onAfterEnter\", \"onLeave\", \"onAfterLeave\"])];\n }),\n _: 3\n }, 8, [\"appendTo\"])], 16, _hoisted_1);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-toggleswitch {\\n display: inline-block;\\n width: \".concat(dt('toggleswitch.width'), \";\\n height: \").concat(dt('toggleswitch.height'), \";\\n}\\n\\n.p-toggleswitch-input {\\n cursor: pointer;\\n appearance: none;\\n position: absolute;\\n top: 0;\\n left: 0;\\n width: 100%;\\n height: 100%;\\n padding: 0;\\n margin: 0;\\n opacity: 0;\\n z-index: 1;\\n outline: 0 none;\\n border-radius: \").concat(dt('toggleswitch.border.radius'), \";\\n}\\n\\n.p-toggleswitch-slider {\\n display: inline-block;\\n cursor: pointer;\\n width: 100%;\\n height: 100%;\\n border-width: \").concat(dt('toggleswitch.border.width'), \";\\n border-style: solid;\\n border-color: \").concat(dt('toggleswitch.border.color'), \";\\n background: \").concat(dt('toggleswitch.background'), \";\\n transition: background \").concat(dt('toggleswitch.transition.duration'), \", color \").concat(dt('toggleswitch.transition.duration'), \", border-color \").concat(dt('toggleswitch.transition.duration'), \", outline-color \").concat(dt('toggleswitch.transition.duration'), \", box-shadow \").concat(dt('toggleswitch.transition.duration'), \";\\n border-radius: \").concat(dt('toggleswitch.border.radius'), \";\\n outline-color: transparent;\\n box-shadow: \").concat(dt('toggleswitch.shadow'), \";\\n}\\n\\n.p-toggleswitch-slider:before {\\n position: absolute;\\n content: \\\"\\\";\\n top: 50%;\\n background: \").concat(dt('toggleswitch.handle.background'), \";\\n width: \").concat(dt('toggleswitch.handle.size'), \";\\n height: \").concat(dt('toggleswitch.handle.size'), \";\\n left: \").concat(dt('toggleswitch.gap'), \";\\n margin-top: calc(-1 * calc(\").concat(dt('toggleswitch.handle.size'), \" / 2));\\n border-radius: \").concat(dt('toggleswitch.handle.border.radius'), \";\\n transition: background \").concat(dt('toggleswitch.transition.duration'), \", left \").concat(dt('toggleswitch.slide.duration'), \";\\n}\\n\\n.p-toggleswitch.p-toggleswitch-checked .p-toggleswitch-slider {\\n background: \").concat(dt('toggleswitch.checked.background'), \";\\n border-color: \").concat(dt('toggleswitch.checked.border.color'), \";\\n}\\n\\n.p-toggleswitch.p-toggleswitch-checked .p-toggleswitch-slider:before {\\n background: \").concat(dt('toggleswitch.handle.checked.background'), \";\\n left: calc(\").concat(dt('toggleswitch.width'), \" - calc(\").concat(dt('toggleswitch.handle.size'), \" + \").concat(dt('toggleswitch.gap'), \"));\\n}\\n\\n.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover) .p-toggleswitch-slider {\\n background: \").concat(dt('toggleswitch.hover.background'), \";\\n border-color: \").concat(dt('toggleswitch.hover.border.color'), \";\\n}\\n\\n.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover) .p-toggleswitch-slider:before {\\n background: \").concat(dt('toggleswitch.handle.hover.background'), \";\\n}\\n\\n.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover).p-toggleswitch-checked .p-toggleswitch-slider {\\n background: \").concat(dt('toggleswitch.checked.hover.background'), \";\\n border-color: \").concat(dt('toggleswitch.checked.hover.border.color'), \";\\n}\\n\\n.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover).p-toggleswitch-checked .p-toggleswitch-slider:before {\\n background: \").concat(dt('toggleswitch.handle.checked.hover.background'), \";\\n}\\n\\n.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:focus-visible) .p-toggleswitch-slider {\\n box-shadow: \").concat(dt('toggleswitch.focus.ring.shadow'), \";\\n outline: \").concat(dt('toggleswitch.focus.ring.width'), \" \").concat(dt('toggleswitch.focus.ring.style'), \" \").concat(dt('toggleswitch.focus.ring.color'), \";\\n outline-offset: \").concat(dt('toggleswitch.focus.ring.offset'), \";\\n}\\n\\n.p-toggleswitch.p-invalid > .p-toggleswitch-slider {\\n border-color: \").concat(dt('toggleswitch.invalid.border.color'), \";\\n}\\n\\n.p-toggleswitch.p-disabled {\\n opacity: 1;\\n}\\n\\n.p-toggleswitch.p-disabled .p-toggleswitch-slider {\\n background: \").concat(dt('toggleswitch.disabled.background'), \";\\n}\\n\\n.p-toggleswitch.p-disabled .p-toggleswitch-slider:before {\\n background: \").concat(dt('toggleswitch.handle.disabled.background'), \";\\n}\\n\");\n};\nvar inlineStyles = {\n root: {\n position: 'relative'\n }\n};\nvar classes = {\n root: function root(_ref2) {\n var instance = _ref2.instance,\n props = _ref2.props;\n return ['p-toggleswitch p-component', {\n 'p-toggleswitch-checked': instance.checked,\n 'p-disabled': props.disabled,\n 'p-invalid': props.invalid\n }];\n },\n input: 'p-toggleswitch-input',\n slider: 'p-toggleswitch-slider'\n};\nvar ToggleSwitchStyle = BaseStyle.extend({\n name: 'toggleswitch',\n theme: theme,\n classes: classes,\n inlineStyles: inlineStyles\n});\n\nexport { ToggleSwitchStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseComponent from '@primevue/core/basecomponent';\nimport ToggleSwitchStyle from 'primevue/toggleswitch/style';\nimport { openBlock, createElementBlock, mergeProps, createElementVNode } from 'vue';\n\nvar script$1 = {\n name: 'BaseToggleSwitch',\n \"extends\": BaseComponent,\n props: {\n modelValue: {\n type: null,\n \"default\": false\n },\n trueValue: {\n type: null,\n \"default\": true\n },\n falseValue: {\n type: null,\n \"default\": false\n },\n invalid: {\n type: Boolean,\n \"default\": false\n },\n disabled: {\n type: Boolean,\n \"default\": false\n },\n readonly: {\n type: Boolean,\n \"default\": false\n },\n tabindex: {\n type: Number,\n \"default\": null\n },\n inputId: {\n type: String,\n \"default\": null\n },\n inputClass: {\n type: [String, Object],\n \"default\": null\n },\n inputStyle: {\n type: Object,\n \"default\": null\n },\n ariaLabelledby: {\n type: String,\n \"default\": null\n },\n ariaLabel: {\n type: String,\n \"default\": null\n }\n },\n style: ToggleSwitchStyle,\n provide: function provide() {\n return {\n $pcToggleSwitch: this,\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'ToggleSwitch',\n \"extends\": script$1,\n inheritAttrs: false,\n emits: ['update:modelValue', 'change', 'focus', 'blur'],\n methods: {\n getPTOptions: function getPTOptions(key) {\n var _ptm = key === 'root' ? this.ptmi : this.ptm;\n return _ptm(key, {\n context: {\n checked: this.checked,\n disabled: this.disabled\n }\n });\n },\n onChange: function onChange(event) {\n if (!this.disabled && !this.readonly) {\n var newValue = this.checked ? this.falseValue : this.trueValue;\n this.$emit('update:modelValue', newValue);\n this.$emit('change', event);\n }\n },\n onFocus: function onFocus(event) {\n this.$emit('focus', event);\n },\n onBlur: function onBlur(event) {\n this.$emit('blur', event);\n }\n },\n computed: {\n checked: function checked() {\n return this.modelValue === this.trueValue;\n }\n }\n};\n\nvar _hoisted_1 = [\"data-p-checked\", \"data-p-disabled\"];\nvar _hoisted_2 = [\"id\", \"checked\", \"tabindex\", \"disabled\", \"readonly\", \"aria-checked\", \"aria-labelledby\", \"aria-label\", \"aria-invalid\"];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"div\", mergeProps({\n \"class\": _ctx.cx('root'),\n style: _ctx.sx('root')\n }, $options.getPTOptions('root'), {\n \"data-p-checked\": $options.checked,\n \"data-p-disabled\": _ctx.disabled\n }), [createElementVNode(\"input\", mergeProps({\n id: _ctx.inputId,\n type: \"checkbox\",\n role: \"switch\",\n \"class\": [_ctx.cx('input'), _ctx.inputClass],\n style: _ctx.inputStyle,\n checked: $options.checked,\n tabindex: _ctx.tabindex,\n disabled: _ctx.disabled,\n readonly: _ctx.readonly,\n \"aria-checked\": $options.checked,\n \"aria-labelledby\": _ctx.ariaLabelledby,\n \"aria-label\": _ctx.ariaLabel,\n \"aria-invalid\": _ctx.invalid || undefined,\n onFocus: _cache[0] || (_cache[0] = function () {\n return $options.onFocus && $options.onFocus.apply($options, arguments);\n }),\n onBlur: _cache[1] || (_cache[1] = function () {\n return $options.onBlur && $options.onBlur.apply($options, arguments);\n }),\n onChange: _cache[2] || (_cache[2] = function () {\n return $options.onChange && $options.onChange.apply($options, arguments);\n })\n }, $options.getPTOptions('input')), null, 16, _hoisted_2), createElementVNode(\"span\", mergeProps({\n \"class\": _ctx.cx('slider')\n }, $options.getPTOptions('slider')), null, 16)], 16, _hoisted_1);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-tag {\\n display: inline-flex;\\n align-items: center;\\n justify-content: center;\\n background: \".concat(dt('tag.primary.background'), \";\\n color: \").concat(dt('tag.primary.color'), \";\\n font-size: \").concat(dt('tag.font.size'), \";\\n font-weight: \").concat(dt('tag.font.weight'), \";\\n padding: \").concat(dt('tag.padding'), \";\\n border-radius: \").concat(dt('tag.border.radius'), \";\\n gap: \").concat(dt('tag.gap'), \";\\n}\\n\\n.p-tag-icon {\\n font-size: \").concat(dt('tag.icon.size'), \";\\n width: \").concat(dt('tag.icon.size'), \";\\n height:\").concat(dt('tag.icon.size'), \";\\n}\\n\\n.p-tag-rounded {\\n border-radius: \").concat(dt('tag.rounded.border.radius'), \";\\n}\\n\\n.p-tag-success {\\n background: \").concat(dt('tag.success.background'), \";\\n color: \").concat(dt('tag.success.color'), \";\\n}\\n\\n.p-tag-info {\\n background: \").concat(dt('tag.info.background'), \";\\n color: \").concat(dt('tag.info.color'), \";\\n}\\n\\n.p-tag-warn {\\n background: \").concat(dt('tag.warn.background'), \";\\n color: \").concat(dt('tag.warn.color'), \";\\n}\\n\\n.p-tag-danger {\\n background: \").concat(dt('tag.danger.background'), \";\\n color: \").concat(dt('tag.danger.color'), \";\\n}\\n\\n.p-tag-secondary {\\n background: \").concat(dt('tag.secondary.background'), \";\\n color: \").concat(dt('tag.secondary.color'), \";\\n}\\n\\n.p-tag-contrast {\\n background: \").concat(dt('tag.contrast.background'), \";\\n color: \").concat(dt('tag.contrast.color'), \";\\n}\\n\");\n};\nvar classes = {\n root: function root(_ref2) {\n var props = _ref2.props;\n return ['p-tag p-component', {\n 'p-tag-info': props.severity === 'info',\n 'p-tag-success': props.severity === 'success',\n 'p-tag-warn': props.severity === 'warn',\n 'p-tag-danger': props.severity === 'danger',\n 'p-tag-secondary': props.severity === 'secondary',\n 'p-tag-contrast': props.severity === 'contrast',\n 'p-tag-rounded': props.rounded\n }];\n },\n icon: 'p-tag-icon',\n label: 'p-tag-label'\n};\nvar TagStyle = BaseStyle.extend({\n name: 'tag',\n theme: theme,\n classes: classes\n});\n\nexport { TagStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseComponent from '@primevue/core/basecomponent';\nimport TagStyle from 'primevue/tag/style';\nimport { openBlock, createElementBlock, mergeProps, createBlock, resolveDynamicComponent, createCommentVNode, renderSlot, createElementVNode, toDisplayString } from 'vue';\n\nvar script$1 = {\n name: 'BaseTag',\n \"extends\": BaseComponent,\n props: {\n value: null,\n severity: null,\n rounded: Boolean,\n icon: String\n },\n style: TagStyle,\n provide: function provide() {\n return {\n $pcTag: this,\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'Tag',\n \"extends\": script$1,\n inheritAttrs: false\n};\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps({\n \"class\": _ctx.cx('root')\n }, _ctx.ptmi('root')), [_ctx.$slots.icon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.$slots.icon), mergeProps({\n key: 0,\n \"class\": _ctx.cx('icon')\n }, _ctx.ptm('icon')), null, 16, [\"class\"])) : _ctx.icon ? (openBlock(), createElementBlock(\"span\", mergeProps({\n key: 1,\n \"class\": [_ctx.cx('icon'), _ctx.icon]\n }, _ctx.ptm('icon')), null, 16)) : createCommentVNode(\"\", true), _ctx.value != null || _ctx.$slots[\"default\"] ? renderSlot(_ctx.$slots, \"default\", {\n key: 2\n }, function () {\n return [createElementVNode(\"span\", mergeProps({\n \"class\": _ctx.cx('label')\n }, _ctx.ptm('label')), toDisplayString(_ctx.value), 17)];\n }) : createCommentVNode(\"\", true)], 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","\n\n\n","import BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-slider {\\n position: relative;\\n background: \".concat(dt('slider.track.background'), \";\\n border-radius: \").concat(dt('slider.border.radius'), \";\\n}\\n\\n.p-slider-handle {\\n cursor: grab;\\n touch-action: none;\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n height: \").concat(dt('slider.handle.height'), \";\\n width: \").concat(dt('slider.handle.width'), \";\\n background: \").concat(dt('slider.handle.background'), \";\\n border-radius: \").concat(dt('slider.handle.border.radius'), \";\\n transition: background \").concat(dt('slider.transition.duration'), \", color \").concat(dt('slider.transition.duration'), \", border-color \").concat(dt('slider.transition.duration'), \", box-shadow \").concat(dt('slider.transition.duration'), \", outline-color \").concat(dt('slider.transition.duration'), \";\\n outline-color: transparent;\\n}\\n\\n.p-slider-handle::before {\\n content: \\\"\\\";\\n width: \").concat(dt('slider.handle.content.width'), \";\\n height: \").concat(dt('slider.handle.content.height'), \";\\n display: block;\\n background: \").concat(dt('slider.handle.content.background'), \";\\n border-radius: \").concat(dt('slider.handle.content.border.radius'), \";\\n box-shadow: \").concat(dt('slider.handle.content.shadow'), \";\\n transition: background \").concat(dt('slider.transition.duration'), \";\\n}\\n\\n.p-slider:not(.p-disabled) .p-slider-handle:hover {\\n background: \").concat(dt('slider.handle.hover.background'), \";\\n}\\n\\n.p-slider:not(.p-disabled) .p-slider-handle:hover::before {\\n background: \").concat(dt('slider.handle.content.hover.background'), \";\\n}\\n\\n.p-slider-handle:focus-visible {\\n border-color: \").concat(dt('slider.handle.focus.border.color'), \";\\n box-shadow: \").concat(dt('slider.handle.focus.ring.shadow'), \";\\n outline: \").concat(dt('slider.handle.focus.ring.width'), \" \").concat(dt('slider.handle.focus.ring.style'), \" \").concat(dt('slider.handle.focus.ring.color'), \";\\n outline-offset: \").concat(dt('slider.handle.focus.ring.offset'), \";\\n}\\n\\n.p-slider-range {\\n display: block;\\n background: \").concat(dt('slider.range.background'), \";\\n border-radius: \").concat(dt('slider.border.radius'), \";\\n}\\n\\n.p-slider.p-slider-horizontal {\\n height: \").concat(dt('slider.track.size'), \";\\n}\\n\\n.p-slider-horizontal .p-slider-range {\\n top: 0;\\n left: 0;\\n height: 100%;\\n}\\n\\n.p-slider-horizontal .p-slider-handle {\\n top: 50%;\\n margin-top: calc(-1 * calc(\").concat(dt('slider.handle.height'), \" / 2));\\n margin-left: calc(-1 * calc(\").concat(dt('slider.handle.width'), \" / 2));\\n}\\n\\n.p-slider-vertical {\\n min-height: 100px;\\n width: \").concat(dt('slider.track.size'), \";\\n}\\n\\n.p-slider-vertical .p-slider-handle {\\n left: 50%;\\n margin-left: calc(-1 * calc(\").concat(dt('slider.handle.width'), \" / 2));\\n margin-bottom: calc(-1 * calc(\").concat(dt('slider.handle.height'), \" / 2));\\n}\\n\\n.p-slider-vertical .p-slider-range {\\n bottom: 0;\\n left: 0;\\n width: 100%;\\n}\\n\");\n};\nvar inlineStyles = {\n handle: {\n position: 'absolute'\n },\n range: {\n position: 'absolute'\n }\n};\nvar classes = {\n root: function root(_ref2) {\n var props = _ref2.props;\n return ['p-slider p-component', {\n 'p-disabled': props.disabled,\n 'p-slider-horizontal': props.orientation === 'horizontal',\n 'p-slider-vertical': props.orientation === 'vertical'\n }];\n },\n range: 'p-slider-range',\n handle: 'p-slider-handle'\n};\nvar SliderStyle = BaseStyle.extend({\n name: 'slider',\n theme: theme,\n classes: classes,\n inlineStyles: inlineStyles\n});\n\nexport { SliderStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import { getWindowScrollLeft, getWindowScrollTop, getAttribute } from '@primeuix/utils/dom';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport SliderStyle from 'primevue/slider/style';\nimport { openBlock, createElementBlock, mergeProps, createElementVNode, createCommentVNode } from 'vue';\n\nvar script$1 = {\n name: 'BaseSlider',\n \"extends\": BaseComponent,\n props: {\n modelValue: [Number, Array],\n min: {\n type: Number,\n \"default\": 0\n },\n max: {\n type: Number,\n \"default\": 100\n },\n orientation: {\n type: String,\n \"default\": 'horizontal'\n },\n step: {\n type: Number,\n \"default\": null\n },\n range: {\n type: Boolean,\n \"default\": false\n },\n disabled: {\n type: Boolean,\n \"default\": false\n },\n tabindex: {\n type: Number,\n \"default\": 0\n },\n ariaLabelledby: {\n type: String,\n \"default\": null\n },\n ariaLabel: {\n type: String,\n \"default\": null\n }\n },\n style: SliderStyle,\n provide: function provide() {\n return {\n $pcSlider: this,\n $parentInstance: this\n };\n }\n};\n\nfunction _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _iterableToArray(r) { if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r); }\nfunction _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nvar script = {\n name: 'Slider',\n \"extends\": script$1,\n inheritAttrs: false,\n emits: ['update:modelValue', 'change', 'slideend'],\n dragging: false,\n handleIndex: null,\n initX: null,\n initY: null,\n barWidth: null,\n barHeight: null,\n dragListener: null,\n dragEndListener: null,\n beforeUnmount: function beforeUnmount() {\n this.unbindDragListeners();\n },\n methods: {\n updateDomData: function updateDomData() {\n var rect = this.$el.getBoundingClientRect();\n this.initX = rect.left + getWindowScrollLeft();\n this.initY = rect.top + getWindowScrollTop();\n this.barWidth = this.$el.offsetWidth;\n this.barHeight = this.$el.offsetHeight;\n },\n setValue: function setValue(event) {\n var handleValue;\n var pageX = event.touches ? event.touches[0].pageX : event.pageX;\n var pageY = event.touches ? event.touches[0].pageY : event.pageY;\n if (this.orientation === 'horizontal') handleValue = (pageX - this.initX) * 100 / this.barWidth;else handleValue = (this.initY + this.barHeight - pageY) * 100 / this.barHeight;\n var newValue = (this.max - this.min) * (handleValue / 100) + this.min;\n if (this.step) {\n var oldValue = this.range ? this.value[this.handleIndex] : this.value;\n var diff = newValue - oldValue;\n if (diff < 0) newValue = oldValue + Math.ceil(newValue / this.step - oldValue / this.step) * this.step;else if (diff > 0) newValue = oldValue + Math.floor(newValue / this.step - oldValue / this.step) * this.step;\n } else {\n newValue = Math.floor(newValue);\n }\n this.updateModel(event, newValue);\n },\n updateModel: function updateModel(event, value) {\n var newValue = parseFloat(value.toFixed(10));\n var modelValue;\n if (this.range) {\n modelValue = this.value ? _toConsumableArray(this.value) : [];\n if (this.handleIndex == 0) {\n if (newValue < this.min) newValue = this.min;else if (newValue >= this.max) newValue = this.max;\n modelValue[0] = newValue;\n } else {\n if (newValue > this.max) newValue = this.max;else if (newValue <= this.min) newValue = this.min;\n modelValue[1] = newValue;\n }\n } else {\n if (newValue < this.min) newValue = this.min;else if (newValue > this.max) newValue = this.max;\n modelValue = newValue;\n }\n this.$emit('update:modelValue', modelValue);\n this.$emit('change', modelValue);\n },\n onDragStart: function onDragStart(event, index) {\n if (this.disabled) {\n return;\n }\n this.$el.setAttribute('data-p-sliding', true);\n this.dragging = true;\n this.updateDomData();\n if (this.range && this.value[0] === this.max) {\n this.handleIndex = 0;\n } else {\n this.handleIndex = index;\n }\n event.currentTarget.focus();\n event.preventDefault();\n },\n onDrag: function onDrag(event) {\n if (this.dragging) {\n this.setValue(event);\n event.preventDefault();\n }\n },\n onDragEnd: function onDragEnd(event) {\n if (this.dragging) {\n this.dragging = false;\n this.$el.setAttribute('data-p-sliding', false);\n this.$emit('slideend', {\n originalEvent: event,\n value: this.value\n });\n }\n },\n onBarClick: function onBarClick(event) {\n if (this.disabled) {\n return;\n }\n if (getAttribute(event.target, 'data-pc-section') !== 'handle') {\n this.updateDomData();\n this.setValue(event);\n }\n },\n onMouseDown: function onMouseDown(event, index) {\n this.bindDragListeners();\n this.onDragStart(event, index);\n },\n onKeyDown: function onKeyDown(event, index) {\n this.handleIndex = index;\n switch (event.code) {\n case 'ArrowDown':\n case 'ArrowLeft':\n this.decrementValue(event, index);\n event.preventDefault();\n break;\n case 'ArrowUp':\n case 'ArrowRight':\n this.incrementValue(event, index);\n event.preventDefault();\n break;\n case 'PageDown':\n this.decrementValue(event, index, true);\n event.preventDefault();\n break;\n case 'PageUp':\n this.incrementValue(event, index, true);\n event.preventDefault();\n break;\n case 'Home':\n this.updateModel(event, this.min);\n event.preventDefault();\n break;\n case 'End':\n this.updateModel(event, this.max);\n event.preventDefault();\n break;\n }\n },\n decrementValue: function decrementValue(event, index) {\n var pageKey = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var newValue;\n if (this.range) {\n if (this.step) newValue = this.value[index] - this.step;else newValue = this.value[index] - 1;\n } else {\n if (this.step) newValue = this.value - this.step;else if (!this.step && pageKey) newValue = this.value - 10;else newValue = this.value - 1;\n }\n this.updateModel(event, newValue);\n event.preventDefault();\n },\n incrementValue: function incrementValue(event, index) {\n var pageKey = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var newValue;\n if (this.range) {\n if (this.step) newValue = this.value[index] + this.step;else newValue = this.value[index] + 1;\n } else {\n if (this.step) newValue = this.value + this.step;else if (!this.step && pageKey) newValue = this.value + 10;else newValue = this.value + 1;\n }\n this.updateModel(event, newValue);\n event.preventDefault();\n },\n bindDragListeners: function bindDragListeners() {\n if (!this.dragListener) {\n this.dragListener = this.onDrag.bind(this);\n document.addEventListener('mousemove', this.dragListener);\n }\n if (!this.dragEndListener) {\n this.dragEndListener = this.onDragEnd.bind(this);\n document.addEventListener('mouseup', this.dragEndListener);\n }\n },\n unbindDragListeners: function unbindDragListeners() {\n if (this.dragListener) {\n document.removeEventListener('mousemove', this.dragListener);\n this.dragListener = null;\n }\n if (this.dragEndListener) {\n document.removeEventListener('mouseup', this.dragEndListener);\n this.dragEndListener = null;\n }\n }\n },\n computed: {\n value: function value() {\n var _this$modelValue3;\n if (this.range) {\n var _this$modelValue$, _this$modelValue, _this$modelValue$2, _this$modelValue2;\n return [(_this$modelValue$ = (_this$modelValue = this.modelValue) === null || _this$modelValue === void 0 ? void 0 : _this$modelValue[0]) !== null && _this$modelValue$ !== void 0 ? _this$modelValue$ : this.min, (_this$modelValue$2 = (_this$modelValue2 = this.modelValue) === null || _this$modelValue2 === void 0 ? void 0 : _this$modelValue2[1]) !== null && _this$modelValue$2 !== void 0 ? _this$modelValue$2 : this.max];\n }\n return (_this$modelValue3 = this.modelValue) !== null && _this$modelValue3 !== void 0 ? _this$modelValue3 : this.min;\n },\n horizontal: function horizontal() {\n return this.orientation === 'horizontal';\n },\n vertical: function vertical() {\n return this.orientation === 'vertical';\n },\n rangeStyle: function rangeStyle() {\n if (this.range) {\n var rangeSliderWidth = this.rangeEndPosition > this.rangeStartPosition ? this.rangeEndPosition - this.rangeStartPosition : this.rangeStartPosition - this.rangeEndPosition;\n var rangeSliderPosition = this.rangeEndPosition > this.rangeStartPosition ? this.rangeStartPosition : this.rangeEndPosition;\n if (this.horizontal) return {\n left: rangeSliderPosition + '%',\n width: rangeSliderWidth + '%'\n };else return {\n bottom: rangeSliderPosition + '%',\n height: rangeSliderWidth + '%'\n };\n } else {\n if (this.horizontal) return {\n width: this.handlePosition + '%'\n };else return {\n height: this.handlePosition + '%'\n };\n }\n },\n handleStyle: function handleStyle() {\n if (this.horizontal) return {\n left: this.handlePosition + '%'\n };else return {\n bottom: this.handlePosition + '%'\n };\n },\n handlePosition: function handlePosition() {\n if (this.value < this.min) return 0;else if (this.value > this.max) return 100;else return (this.value - this.min) * 100 / (this.max - this.min);\n },\n rangeStartPosition: function rangeStartPosition() {\n if (this.value && this.value[0]) return (this.value[0] < this.min ? 0 : this.value[0] - this.min) * 100 / (this.max - this.min);else return 0;\n },\n rangeEndPosition: function rangeEndPosition() {\n if (this.value && this.value.length === 2) return (this.value[1] > this.max ? 100 : this.value[1] - this.min) * 100 / (this.max - this.min);else return 100;\n },\n rangeStartHandleStyle: function rangeStartHandleStyle() {\n if (this.horizontal) return {\n left: this.rangeStartPosition + '%'\n };else return {\n bottom: this.rangeStartPosition + '%'\n };\n },\n rangeEndHandleStyle: function rangeEndHandleStyle() {\n if (this.horizontal) return {\n left: this.rangeEndPosition + '%'\n };else return {\n bottom: this.rangeEndPosition + '%'\n };\n }\n }\n};\n\nvar _hoisted_1 = [\"tabindex\", \"aria-valuemin\", \"aria-valuenow\", \"aria-valuemax\", \"aria-labelledby\", \"aria-label\", \"aria-orientation\"];\nvar _hoisted_2 = [\"tabindex\", \"aria-valuemin\", \"aria-valuenow\", \"aria-valuemax\", \"aria-labelledby\", \"aria-label\", \"aria-orientation\"];\nvar _hoisted_3 = [\"tabindex\", \"aria-valuemin\", \"aria-valuenow\", \"aria-valuemax\", \"aria-labelledby\", \"aria-label\", \"aria-orientation\"];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"div\", mergeProps({\n \"class\": _ctx.cx('root'),\n onClick: _cache[15] || (_cache[15] = function () {\n return $options.onBarClick && $options.onBarClick.apply($options, arguments);\n })\n }, _ctx.ptmi('root'), {\n \"data-p-sliding\": false\n }), [createElementVNode(\"span\", mergeProps({\n \"class\": _ctx.cx('range'),\n style: [_ctx.sx('range'), $options.rangeStyle]\n }, _ctx.ptm('range')), null, 16), !_ctx.range ? (openBlock(), createElementBlock(\"span\", mergeProps({\n key: 0,\n \"class\": _ctx.cx('handle'),\n style: [_ctx.sx('handle'), $options.handleStyle],\n onTouchstartPassive: _cache[0] || (_cache[0] = function ($event) {\n return $options.onDragStart($event);\n }),\n onTouchmovePassive: _cache[1] || (_cache[1] = function ($event) {\n return $options.onDrag($event);\n }),\n onTouchend: _cache[2] || (_cache[2] = function ($event) {\n return $options.onDragEnd($event);\n }),\n onMousedown: _cache[3] || (_cache[3] = function ($event) {\n return $options.onMouseDown($event);\n }),\n onKeydown: _cache[4] || (_cache[4] = function ($event) {\n return $options.onKeyDown($event);\n }),\n tabindex: _ctx.tabindex,\n role: \"slider\",\n \"aria-valuemin\": _ctx.min,\n \"aria-valuenow\": _ctx.modelValue,\n \"aria-valuemax\": _ctx.max,\n \"aria-labelledby\": _ctx.ariaLabelledby,\n \"aria-label\": _ctx.ariaLabel,\n \"aria-orientation\": _ctx.orientation\n }, _ctx.ptm('handle')), null, 16, _hoisted_1)) : createCommentVNode(\"\", true), _ctx.range ? (openBlock(), createElementBlock(\"span\", mergeProps({\n key: 1,\n \"class\": _ctx.cx('handle'),\n style: [_ctx.sx('handle'), $options.rangeStartHandleStyle],\n onTouchstartPassive: _cache[5] || (_cache[5] = function ($event) {\n return $options.onDragStart($event, 0);\n }),\n onTouchmovePassive: _cache[6] || (_cache[6] = function ($event) {\n return $options.onDrag($event);\n }),\n onTouchend: _cache[7] || (_cache[7] = function ($event) {\n return $options.onDragEnd($event);\n }),\n onMousedown: _cache[8] || (_cache[8] = function ($event) {\n return $options.onMouseDown($event, 0);\n }),\n onKeydown: _cache[9] || (_cache[9] = function ($event) {\n return $options.onKeyDown($event, 0);\n }),\n tabindex: _ctx.tabindex,\n role: \"slider\",\n \"aria-valuemin\": _ctx.min,\n \"aria-valuenow\": _ctx.modelValue ? _ctx.modelValue[0] : null,\n \"aria-valuemax\": _ctx.max,\n \"aria-labelledby\": _ctx.ariaLabelledby,\n \"aria-label\": _ctx.ariaLabel,\n \"aria-orientation\": _ctx.orientation\n }, _ctx.ptm('startHandler')), null, 16, _hoisted_2)) : createCommentVNode(\"\", true), _ctx.range ? (openBlock(), createElementBlock(\"span\", mergeProps({\n key: 2,\n \"class\": _ctx.cx('handle'),\n style: [_ctx.sx('handle'), $options.rangeEndHandleStyle],\n onTouchstartPassive: _cache[10] || (_cache[10] = function ($event) {\n return $options.onDragStart($event, 1);\n }),\n onTouchmovePassive: _cache[11] || (_cache[11] = function ($event) {\n return $options.onDrag($event);\n }),\n onTouchend: _cache[12] || (_cache[12] = function ($event) {\n return $options.onDragEnd($event);\n }),\n onMousedown: _cache[13] || (_cache[13] = function ($event) {\n return $options.onMouseDown($event, 1);\n }),\n onKeydown: _cache[14] || (_cache[14] = function ($event) {\n return $options.onKeyDown($event, 1);\n }),\n tabindex: _ctx.tabindex,\n role: \"slider\",\n \"aria-valuemin\": _ctx.min,\n \"aria-valuenow\": _ctx.modelValue ? _ctx.modelValue[1] : null,\n \"aria-valuemax\": _ctx.max,\n \"aria-labelledby\": _ctx.ariaLabelledby,\n \"aria-label\": _ctx.ariaLabel,\n \"aria-orientation\": _ctx.orientation\n }, _ctx.ptm('endHandler')), null, 16, _hoisted_3)) : createCommentVNode(\"\", true)], 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","\n\n\n","\n\n\n\n\n","import BaseIcon from '@primevue/icons/baseicon';\nimport { openBlock, createElementBlock, mergeProps, createElementVNode } from 'vue';\n\nvar script = {\n name: 'TimesCircleIcon',\n \"extends\": BaseIcon\n};\n\nvar _hoisted_1 = /*#__PURE__*/createElementVNode(\"path\", {\n \"fill-rule\": \"evenodd\",\n \"clip-rule\": \"evenodd\",\n d: \"M7 14C5.61553 14 4.26215 13.5895 3.11101 12.8203C1.95987 12.0511 1.06266 10.9579 0.532846 9.67879C0.00303296 8.3997 -0.13559 6.99224 0.134506 5.63437C0.404603 4.2765 1.07129 3.02922 2.05026 2.05026C3.02922 1.07129 4.2765 0.404603 5.63437 0.134506C6.99224 -0.13559 8.3997 0.00303296 9.67879 0.532846C10.9579 1.06266 12.0511 1.95987 12.8203 3.11101C13.5895 4.26215 14 5.61553 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM7 1.16667C5.84628 1.16667 4.71846 1.50879 3.75918 2.14976C2.79989 2.79074 2.05222 3.70178 1.61071 4.76768C1.16919 5.83358 1.05367 7.00647 1.27876 8.13803C1.50384 9.26958 2.05941 10.309 2.87521 11.1248C3.69102 11.9406 4.73042 12.4962 5.86198 12.7212C6.99353 12.9463 8.16642 12.8308 9.23232 12.3893C10.2982 11.9478 11.2093 11.2001 11.8502 10.2408C12.4912 9.28154 12.8333 8.15373 12.8333 7C12.8333 5.45291 12.2188 3.96918 11.1248 2.87521C10.0308 1.78125 8.5471 1.16667 7 1.16667ZM4.66662 9.91668C4.58998 9.91704 4.51404 9.90209 4.44325 9.87271C4.37246 9.84333 4.30826 9.8001 4.2544 9.74557C4.14516 9.6362 4.0838 9.48793 4.0838 9.33335C4.0838 9.17876 4.14516 9.0305 4.2544 8.92113L6.17553 7L4.25443 5.07891C4.15139 4.96832 4.09529 4.82207 4.09796 4.67094C4.10063 4.51982 4.16185 4.37563 4.26872 4.26876C4.3756 4.16188 4.51979 4.10066 4.67091 4.09799C4.82204 4.09532 4.96829 4.15142 5.07887 4.25446L6.99997 6.17556L8.92106 4.25446C9.03164 4.15142 9.1779 4.09532 9.32903 4.09799C9.48015 4.10066 9.62434 4.16188 9.73121 4.26876C9.83809 4.37563 9.89931 4.51982 9.90198 4.67094C9.90464 4.82207 9.84855 4.96832 9.74551 5.07891L7.82441 7L9.74554 8.92113C9.85478 9.0305 9.91614 9.17876 9.91614 9.33335C9.91614 9.48793 9.85478 9.6362 9.74554 9.74557C9.69168 9.8001 9.62748 9.84333 9.55669 9.87271C9.4859 9.90209 9.40996 9.91704 9.33332 9.91668C9.25668 9.91704 9.18073 9.90209 9.10995 9.87271C9.03916 9.84333 8.97495 9.8001 8.9211 9.74557L6.99997 7.82444L5.07884 9.74557C5.02499 9.8001 4.96078 9.84333 4.88999 9.87271C4.81921 9.90209 4.74326 9.91704 4.66662 9.91668Z\",\n fill: \"currentColor\"\n}, null, -1);\nvar _hoisted_2 = [_hoisted_1];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"svg\", mergeProps({\n width: \"14\",\n height: \"14\",\n viewBox: \"0 0 14 14\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, _ctx.pti()), _hoisted_2, 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-chip {\\n display: inline-flex;\\n align-items: center;\\n background: \".concat(dt('chip.background'), \";\\n color: \").concat(dt('chip.color'), \";\\n border-radius: \").concat(dt('chip.border.radius'), \";\\n padding: \").concat(dt('chip.padding.y'), \" \").concat(dt('chip.padding.x'), \";\\n gap: \").concat(dt('chip.gap'), \";\\n}\\n\\n.p-chip-icon {\\n color: \").concat(dt('chip.icon.color'), \";\\n font-size: \").concat(dt('chip.icon.font.size'), \";\\n width: \").concat(dt('chip.icon.size'), \";\\n height: \").concat(dt('chip.icon.size'), \";\\n}\\n\\n.p-chip-image {\\n border-radius: 50%;\\n width: \").concat(dt('chip.image.width'), \";\\n height: \").concat(dt('chip.image.height'), \";\\n margin-left: calc(-1 * \").concat(dt('chip.padding.y'), \");\\n}\\n\\n.p-chip:has(.p-chip-remove-icon) {\\n padding-right: \").concat(dt('chip.padding.y'), \";\\n}\\n\\n.p-chip:has(.p-chip-image) {\\n padding-top: calc(\").concat(dt('chip.padding.y'), \" / 2);\\n padding-bottom: calc(\").concat(dt('chip.padding.y'), \" / 2);\\n}\\n\\n.p-chip-remove-icon {\\n cursor: pointer;\\n font-size: \").concat(dt('chip.remove.icon.size'), \";\\n width: \").concat(dt('chip.remove.icon.size'), \";\\n height: \").concat(dt('chip.remove.icon.size'), \";\\n color: \").concat(dt('chip.remove.icon.color'), \";\\n border-radius: 50%;\\n transition: outline-color \").concat(dt('chip.transition.duration'), \", box-shadow \").concat(dt('chip.transition.duration'), \";\\n outline-color: transparent;\\n}\\n\\n.p-chip-remove-icon:focus-visible {\\n box-shadow: \").concat(dt('chip.remove.icon.focus.ring.shadow'), \";\\n outline: \").concat(dt('chip.remove.icon.focus.ring.width'), \" \").concat(dt('chip.remove.icon.focus.ring.style'), \" \").concat(dt('chip.remove.icon.focus.ring.color'), \";\\n outline-offset: \").concat(dt('chip.remove.icon.focus.ring.offset'), \";\\n}\\n\");\n};\nvar classes = {\n root: 'p-chip p-component',\n image: 'p-chip-image',\n icon: 'p-chip-icon',\n label: 'p-chip-label',\n removeIcon: 'p-chip-remove-icon'\n};\nvar ChipStyle = BaseStyle.extend({\n name: 'chip',\n theme: theme,\n classes: classes\n});\n\nexport { ChipStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import TimesCircleIcon from '@primevue/icons/timescircle';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport ChipStyle from 'primevue/chip/style';\nimport { openBlock, createElementBlock, mergeProps, renderSlot, createBlock, resolveDynamicComponent, createCommentVNode, toDisplayString } from 'vue';\n\nvar script$1 = {\n name: 'BaseChip',\n \"extends\": BaseComponent,\n props: {\n label: {\n type: String,\n \"default\": null\n },\n icon: {\n type: String,\n \"default\": null\n },\n image: {\n type: String,\n \"default\": null\n },\n removable: {\n type: Boolean,\n \"default\": false\n },\n removeIcon: {\n type: String,\n \"default\": undefined\n }\n },\n style: ChipStyle,\n provide: function provide() {\n return {\n $pcChip: this,\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'Chip',\n \"extends\": script$1,\n inheritAttrs: false,\n emits: ['remove'],\n data: function data() {\n return {\n visible: true\n };\n },\n methods: {\n onKeydown: function onKeydown(event) {\n if (event.key === 'Enter' || event.key === 'Backspace') {\n this.close(event);\n }\n },\n close: function close(event) {\n this.visible = false;\n this.$emit('remove', event);\n }\n },\n components: {\n TimesCircleIcon: TimesCircleIcon\n }\n};\n\nvar _hoisted_1 = [\"aria-label\"];\nvar _hoisted_2 = [\"src\"];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return $data.visible ? (openBlock(), createElementBlock(\"div\", mergeProps({\n key: 0,\n \"class\": _ctx.cx('root'),\n \"aria-label\": _ctx.label\n }, _ctx.ptmi('root')), [renderSlot(_ctx.$slots, \"default\", {}, function () {\n return [_ctx.image ? (openBlock(), createElementBlock(\"img\", mergeProps({\n key: 0,\n src: _ctx.image\n }, _ctx.ptm('image'), {\n \"class\": _ctx.cx('image')\n }), null, 16, _hoisted_2)) : _ctx.$slots.icon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.$slots.icon), mergeProps({\n key: 1,\n \"class\": _ctx.cx('icon')\n }, _ctx.ptm('icon')), null, 16, [\"class\"])) : _ctx.icon ? (openBlock(), createElementBlock(\"span\", mergeProps({\n key: 2,\n \"class\": [_ctx.cx('icon'), _ctx.icon]\n }, _ctx.ptm('icon')), null, 16)) : createCommentVNode(\"\", true), _ctx.label ? (openBlock(), createElementBlock(\"div\", mergeProps({\n key: 3,\n \"class\": _ctx.cx('label')\n }, _ctx.ptm('label')), toDisplayString(_ctx.label), 17)) : createCommentVNode(\"\", true)];\n }), _ctx.removable ? renderSlot(_ctx.$slots, \"removeicon\", {\n key: 0,\n removeCallback: $options.close,\n keydownCallback: $options.onKeydown\n }, function () {\n return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.removeIcon ? 'span' : 'TimesCircleIcon'), mergeProps({\n tabindex: \"0\",\n \"class\": [_ctx.cx('removeIcon'), _ctx.removeIcon],\n onClick: $options.close,\n onKeydown: $options.onKeydown\n }, _ctx.ptm('removeIcon')), null, 16, [\"class\", \"onClick\", \"onKeydown\"]))];\n }) : createCommentVNode(\"\", true)], 16, _hoisted_1)) : createCommentVNode(\"\", true);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","\n\n\n\n\n","import { defineStore } from 'pinia'\nimport { ref } from 'vue'\nimport { api } from '@/scripts/api'\nimport type { SystemStats } from '@/types/apiTypes'\n\nexport const useSystemStatsStore = defineStore('systemStats', () => {\n const systemStats = ref(null)\n const isLoading = ref(false)\n const error = ref(null)\n\n async function fetchSystemStats() {\n isLoading.value = true\n error.value = null\n\n try {\n systemStats.value = await api.getSystemStats()\n } catch (err) {\n error.value =\n err instanceof Error\n ? err.message\n : 'An error occurred while fetching system stats'\n console.error('Error fetching system stats:', err)\n } finally {\n isLoading.value = false\n }\n }\n\n return {\n systemStats,\n isLoading,\n error,\n fetchSystemStats\n }\n})\n","import type { Keybinding } from '@/types/keyBindingTypes'\n\nexport const CORE_KEYBINDINGS: Keybinding[] = [\n {\n combo: {\n ctrl: true,\n key: 'Enter'\n },\n commandId: 'Comfy.QueuePrompt'\n },\n {\n combo: {\n ctrl: true,\n shift: true,\n key: 'Enter'\n },\n commandId: 'Comfy.QueuePromptFront'\n },\n {\n combo: {\n ctrl: true,\n alt: true,\n key: 'Enter'\n },\n commandId: 'Comfy.Interrupt'\n },\n {\n combo: {\n key: 'r'\n },\n commandId: 'Comfy.RefreshNodeDefinitions'\n },\n {\n combo: {\n key: 'q'\n },\n commandId: 'Workspace.ToggleSidebarTab.queue'\n },\n {\n combo: {\n key: 'w'\n },\n commandId: 'Workspace.ToggleSidebarTab.workflows'\n },\n {\n combo: {\n key: 'n'\n },\n commandId: 'Workspace.ToggleSidebarTab.node-library'\n },\n {\n combo: {\n key: 'm'\n },\n commandId: 'Workspace.ToggleSidebarTab.model-library'\n },\n {\n combo: {\n key: 's',\n ctrl: true\n },\n commandId: 'Comfy.ExportWorkflow'\n },\n {\n combo: {\n key: 'o',\n ctrl: true\n },\n commandId: 'Comfy.OpenWorkflow'\n },\n {\n combo: {\n key: 'Backspace'\n },\n commandId: 'Comfy.ClearWorkflow'\n },\n {\n combo: {\n key: 'd',\n ctrl: true\n },\n commandId: 'Comfy.LoadDefaultWorkflow'\n },\n {\n combo: {\n key: 'g',\n ctrl: true\n },\n commandId: 'Comfy.Graph.GroupSelectedNodes'\n },\n {\n combo: {\n key: ',',\n ctrl: true\n },\n commandId: 'Comfy.ShowSettingsDialog'\n },\n // For '=' both holding shift and not holding shift\n {\n combo: {\n key: '=',\n alt: true\n },\n commandId: 'Comfy.Canvas.ZoomIn',\n targetSelector: '#graph-canvas'\n },\n {\n combo: {\n key: '+',\n alt: true,\n shift: true\n },\n commandId: 'Comfy.Canvas.ZoomIn',\n targetSelector: '#graph-canvas'\n },\n // For number pad '+'\n {\n combo: {\n key: '+',\n alt: true\n },\n commandId: 'Comfy.Canvas.ZoomIn',\n targetSelector: '#graph-canvas'\n },\n {\n combo: {\n key: '-',\n alt: true\n },\n commandId: 'Comfy.Canvas.ZoomOut',\n targetSelector: '#graph-canvas'\n },\n {\n combo: {\n key: '.'\n },\n commandId: 'Comfy.Canvas.FitView',\n targetSelector: '#graph-canvas'\n },\n {\n combo: {\n key: 'p'\n },\n commandId: 'Comfy.Canvas.ToggleSelected.Pin',\n targetSelector: '#graph-canvas'\n },\n {\n combo: {\n key: 'c',\n alt: true\n },\n commandId: 'Comfy.Canvas.ToggleSelectedNodes.Collapse',\n targetSelector: '#graph-canvas'\n },\n {\n combo: {\n key: 'b',\n ctrl: true\n },\n commandId: 'Comfy.Canvas.ToggleSelectedNodes.Bypass',\n targetSelector: '#graph-canvas'\n },\n {\n combo: {\n key: 'm',\n ctrl: true\n },\n commandId: 'Comfy.Canvas.ToggleSelectedNodes.Mute',\n targetSelector: '#graph-canvas'\n },\n {\n combo: {\n key: '`',\n ctrl: true\n },\n commandId: 'Workspace.ToggleBottomPanelTab.integrated-terminal'\n },\n {\n combo: {\n key: 'f'\n },\n commandId: 'Workspace.ToggleFocusMode'\n }\n]\n","import { defineStore } from 'pinia'\nimport { computed, Ref, ref, toRaw } from 'vue'\nimport { Keybinding, KeyCombo } from '@/types/keyBindingTypes'\nimport { useSettingStore } from './settingStore'\nimport { CORE_KEYBINDINGS } from './coreKeybindings'\nimport type { ComfyExtension } from '@/types/comfy'\n\nexport class KeybindingImpl implements Keybinding {\n commandId: string\n combo: KeyComboImpl\n targetSelector?: string\n\n constructor(obj: Keybinding) {\n this.commandId = obj.commandId\n this.combo = new KeyComboImpl(obj.combo)\n this.targetSelector = obj.targetSelector\n }\n\n equals(other: any): boolean {\n if (toRaw(other) instanceof KeybindingImpl) {\n return (\n this.commandId === other.commandId &&\n this.combo.equals(other.combo) &&\n this.targetSelector === other.targetSelector\n )\n }\n return false\n }\n}\n\nexport class KeyComboImpl implements KeyCombo {\n key: string\n // ctrl or meta(cmd on mac)\n ctrl: boolean\n alt: boolean\n shift: boolean\n\n constructor(obj: KeyCombo) {\n this.key = obj.key\n this.ctrl = obj.ctrl ?? false\n this.alt = obj.alt ?? false\n this.shift = obj.shift ?? false\n }\n\n static fromEvent(event: KeyboardEvent) {\n return new KeyComboImpl({\n key: event.key,\n ctrl: event.ctrlKey || event.metaKey,\n alt: event.altKey,\n shift: event.shiftKey\n })\n }\n\n equals(other: any): boolean {\n if (toRaw(other) instanceof KeyComboImpl) {\n return (\n this.key === other.key &&\n this.ctrl === other.ctrl &&\n this.alt === other.alt &&\n this.shift === other.shift\n )\n }\n return false\n }\n\n serialize(): string {\n return `${this.key}:${this.ctrl}:${this.alt}:${this.shift}`\n }\n\n deserialize(serialized: string): KeyComboImpl {\n const [key, ctrl, alt, shift] = serialized.split(':')\n return new KeyComboImpl({\n key,\n ctrl: ctrl === 'true',\n alt: alt === 'true',\n shift: shift === 'true'\n })\n }\n\n toString(): string {\n return this.getKeySequences().join(' + ')\n }\n\n get hasModifier(): boolean {\n return this.ctrl || this.alt || this.shift\n }\n\n get isModifier(): boolean {\n return ['Control', 'Meta', 'Alt', 'Shift'].includes(this.key)\n }\n\n getKeySequences(): string[] {\n const sequences: string[] = []\n if (this.ctrl) {\n sequences.push('Ctrl')\n }\n if (this.alt) {\n sequences.push('Alt')\n }\n if (this.shift) {\n sequences.push('Shift')\n }\n sequences.push(this.key)\n return sequences\n }\n}\n\nexport const useKeybindingStore = defineStore('keybinding', () => {\n /**\n * Default keybindings provided by core and extensions.\n */\n const defaultKeybindings = ref>({})\n /**\n * User-defined keybindings.\n */\n const userKeybindings = ref>({})\n /**\n * User-defined keybindings that unset default keybindings.\n */\n const userUnsetKeybindings = ref>({})\n\n const keybindingByKeyCombo = computed>(() => {\n const result: Record = {\n ...defaultKeybindings.value,\n ...userKeybindings.value\n }\n\n for (const keybinding of Object.values(userUnsetKeybindings.value)) {\n const serializedCombo = keybinding.combo.serialize()\n if (result[serializedCombo]?.equals(keybinding)) {\n delete result[serializedCombo]\n }\n }\n return result\n })\n\n const keybindings = computed(() =>\n Object.values(keybindingByKeyCombo.value)\n )\n\n function getKeybinding(combo: KeyComboImpl) {\n return keybindingByKeyCombo.value[combo.serialize()]\n }\n\n function createKeybindingsByCommandId(keybindings: KeybindingImpl[]) {\n const result: Record = {}\n for (const keybinding of keybindings) {\n if (!(keybinding.commandId in result)) {\n result[keybinding.commandId] = []\n }\n result[keybinding.commandId].push(keybinding)\n }\n return result\n }\n\n const keybindingsByCommandId = computed>(\n () => {\n return createKeybindingsByCommandId(keybindings.value)\n }\n )\n\n function getKeybindingsByCommandId(commandId: string) {\n return keybindingsByCommandId.value[commandId] ?? []\n }\n\n const defaultKeybindingsByCommandId = computed<\n Record\n >(() => {\n return createKeybindingsByCommandId(Object.values(defaultKeybindings.value))\n })\n\n function getKeybindingByCommandId(commandId: string) {\n return getKeybindingsByCommandId(commandId)[0]\n }\n\n function addKeybinding(\n target: Ref>,\n keybinding: KeybindingImpl,\n { existOk = false }: { existOk: boolean }\n ) {\n if (!existOk && keybinding.combo.serialize() in target.value) {\n throw new Error(\n `Keybinding on ${keybinding.combo} already exists on ${\n target.value[keybinding.combo.serialize()].commandId\n }`\n )\n }\n target.value[keybinding.combo.serialize()] = keybinding\n }\n\n function addDefaultKeybinding(keybinding: KeybindingImpl) {\n addKeybinding(defaultKeybindings, keybinding, { existOk: false })\n }\n\n function addUserKeybinding(keybinding: KeybindingImpl) {\n const defaultKeybinding =\n defaultKeybindings.value[keybinding.combo.serialize()]\n const userUnsetKeybinding =\n userUnsetKeybindings.value[keybinding.combo.serialize()]\n\n // User is adding back a keybinding that was an unsetted default keybinding.\n if (\n keybinding.equals(defaultKeybinding) &&\n keybinding.equals(userUnsetKeybinding)\n ) {\n delete userUnsetKeybindings.value[keybinding.combo.serialize()]\n return\n }\n\n // Unset keybinding on default keybinding if it exists and is not the same as userUnsetKeybinding\n if (defaultKeybinding && !defaultKeybinding.equals(userUnsetKeybinding)) {\n unsetKeybinding(defaultKeybinding)\n }\n\n addKeybinding(userKeybindings, keybinding, { existOk: true })\n }\n\n function unsetKeybinding(keybinding: KeybindingImpl) {\n const serializedCombo = keybinding.combo.serialize()\n if (!(serializedCombo in keybindingByKeyCombo.value)) {\n throw new Error(`Keybinding on ${keybinding.combo} does not exist`)\n }\n\n if (userKeybindings.value[serializedCombo]?.equals(keybinding)) {\n delete userKeybindings.value[serializedCombo]\n return\n }\n\n if (defaultKeybindings.value[serializedCombo]?.equals(keybinding)) {\n addKeybinding(userUnsetKeybindings, keybinding, { existOk: false })\n return\n }\n\n throw new Error(`NOT_REACHED`)\n }\n\n /**\n * Update the keybinding on given command if it is different from the current keybinding.\n *\n * @returns true if the keybinding is updated, false otherwise.\n */\n function updateKeybindingOnCommand(keybinding: KeybindingImpl): boolean {\n const currentKeybinding = getKeybindingByCommandId(keybinding.commandId)\n if (currentKeybinding?.equals(keybinding)) {\n return false\n }\n if (currentKeybinding) {\n unsetKeybinding(currentKeybinding)\n }\n addUserKeybinding(keybinding)\n return true\n }\n\n function loadUserKeybindings() {\n const settingStore = useSettingStore()\n // Unset bindings first as new bindings might conflict with default bindings.\n const unsetBindings = settingStore.get('Comfy.Keybinding.UnsetBindings')\n for (const keybinding of unsetBindings) {\n unsetKeybinding(new KeybindingImpl(keybinding))\n }\n const newBindings = settingStore.get('Comfy.Keybinding.NewBindings')\n for (const keybinding of newBindings) {\n addUserKeybinding(new KeybindingImpl(keybinding))\n }\n }\n\n function loadCoreKeybindings() {\n for (const keybinding of CORE_KEYBINDINGS) {\n addDefaultKeybinding(new KeybindingImpl(keybinding))\n }\n }\n\n function loadExtensionKeybindings(extension: ComfyExtension) {\n if (extension.keybindings) {\n for (const keybinding of extension.keybindings) {\n try {\n addDefaultKeybinding(new KeybindingImpl(keybinding))\n } catch (error) {\n console.warn(\n `Failed to load keybinding for extension ${extension.name}`,\n error\n )\n }\n }\n }\n }\n\n async function persistUserKeybindings() {\n const settingStore = useSettingStore()\n // TODO(https://github.com/Comfy-Org/ComfyUI_frontend/issues/1079):\n // Allow setting multiple values at once in settingStore\n await settingStore.set(\n 'Comfy.Keybinding.NewBindings',\n Object.values(userKeybindings.value)\n )\n await settingStore.set(\n 'Comfy.Keybinding.UnsetBindings',\n Object.values(userUnsetKeybindings.value)\n )\n }\n\n function resetKeybindings() {\n userKeybindings.value = {}\n userUnsetKeybindings.value = {}\n }\n\n function isCommandKeybindingModified(commandId: string): boolean {\n const currentKeybinding: KeybindingImpl | undefined =\n getKeybindingByCommandId(commandId)\n const defaultKeybinding: KeybindingImpl | undefined =\n defaultKeybindingsByCommandId.value[commandId]?.[0]\n\n return !(\n (currentKeybinding === undefined && defaultKeybinding === undefined) ||\n currentKeybinding?.equals(defaultKeybinding)\n )\n }\n\n return {\n keybindings,\n getKeybinding,\n getKeybindingsByCommandId,\n getKeybindingByCommandId,\n addDefaultKeybinding,\n addUserKeybinding,\n unsetKeybinding,\n updateKeybindingOnCommand,\n loadUserKeybindings,\n loadCoreKeybindings,\n loadExtensionKeybindings,\n persistUserKeybindings,\n resetKeybindings,\n isCommandKeybindingModified\n }\n})\n","import { defineStore } from 'pinia'\nimport type { MenuItem } from 'primevue/menuitem'\nimport { ref } from 'vue'\nimport { useCommandStore } from './commandStore'\nimport { ComfyExtension } from '@/types/comfy'\n\nexport const useMenuItemStore = defineStore('menuItem', () => {\n const commandStore = useCommandStore()\n const menuItems = ref([])\n\n const registerMenuGroup = (path: string[], items: MenuItem[]) => {\n let currentLevel = menuItems.value\n\n // Traverse the path, creating nodes if necessary\n for (let i = 0; i < path.length; i++) {\n const segment = path[i]\n let found = currentLevel.find((item) => item.label === segment)\n\n if (!found) {\n // Create a new node if it doesn't exist\n found = {\n label: segment,\n items: []\n }\n currentLevel.push(found)\n }\n\n // Ensure the found item has an 'items' array\n if (!found.items) {\n found.items = []\n }\n\n // Move to the next level\n currentLevel = found.items\n }\n\n if (currentLevel.length > 0) {\n currentLevel.push({\n separator: true\n })\n }\n // Add the new items to the last level\n currentLevel.push(...items)\n }\n\n const registerCommands = (path: string[], commandIds: string[]) => {\n const items = commandIds\n .map((commandId) => commandStore.getCommand(commandId))\n .map(\n (command) =>\n ({\n command: () => commandStore.execute(command.id),\n label: command.menubarLabel,\n icon: command.icon,\n tooltip: command.tooltip,\n comfyCommand: command\n }) as MenuItem\n )\n registerMenuGroup(path, items)\n }\n\n const loadExtensionMenuCommands = (extension: ComfyExtension) => {\n if (!extension.menuCommands) {\n return\n }\n\n const extensionCommandIds = new Set(\n extension.commands?.map((command) => command.id) ?? []\n )\n extension.menuCommands.forEach((menuCommand) => {\n const commands = menuCommand.commands.filter((command) =>\n extensionCommandIds.has(command)\n )\n if (commands.length) {\n registerCommands(menuCommand.path, commands)\n }\n })\n }\n\n // Core menu commands\n registerCommands(['Workflow'], ['Comfy.NewBlankWorkflow'])\n\n registerCommands(\n ['Workflow'],\n ['Comfy.OpenWorkflow', 'Comfy.BrowseTemplates']\n )\n registerCommands(\n ['Workflow'],\n [\n 'Comfy.SaveWorkflow',\n 'Comfy.SaveWorkflowAs',\n 'Comfy.ExportWorkflow',\n 'Comfy.ExportWorkflowAPI'\n ]\n )\n\n registerCommands(['Edit'], ['Comfy.Undo', 'Comfy.Redo'])\n registerCommands(['Edit'], ['Comfy.RefreshNodeDefinitions'])\n registerCommands(['Edit'], ['Comfy.ClearWorkflow'])\n registerCommands(['Edit'], ['Comfy.OpenClipspace'])\n\n registerMenuGroup(\n ['Help'],\n [\n {\n icon: 'pi pi-github',\n label: 'ComfyUI Issues',\n url: 'https://github.com/comfyanonymous/ComfyUI/issues'\n },\n {\n icon: 'pi pi-info-circle',\n label: 'ComfyUI Docs',\n url: 'https://docs.comfy.org/'\n },\n {\n icon: 'pi pi-discord',\n label: 'Comfy-Org',\n url: 'https://www.comfy.org/discord'\n }\n ]\n )\n\n return {\n menuItems,\n registerMenuGroup,\n registerCommands,\n loadExtensionMenuCommands\n }\n})\n","!function(e,t){if(\"object\"==typeof exports&&\"object\"==typeof module)module.exports=t();else if(\"function\"==typeof define&&define.amd)define([],t);else{var i=t();for(var s in i)(\"object\"==typeof exports?exports:e)[s]=i[s]}}(globalThis,(()=>(()=>{\"use strict\";var e={4567:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(n<3?r(o):n>3?r(t,i,o):r(t,i))||o);return n>3&&o&&Object.defineProperty(t,i,o),o},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.AccessibilityManager=void 0;const n=i(9042),o=i(9924),a=i(844),h=i(4725),c=i(2585),l=i(3656);let d=t.AccessibilityManager=class extends a.Disposable{constructor(e,t,i,s){super(),this._terminal=e,this._coreBrowserService=i,this._renderService=s,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce=\"\",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement(\"div\"),this._accessibilityContainer.classList.add(\"xterm-accessibility\"),this._rowContainer=this._coreBrowserService.mainDocument.createElement(\"div\"),this._rowContainer.setAttribute(\"role\",\"list\"),this._rowContainer.classList.add(\"xterm-accessibility-tree\"),this._rowElements=[];for(let e=0;ethis._handleBoundaryFocus(e,0),this._bottomBoundaryFocusListener=e=>this._handleBoundaryFocus(e,1),this._rowElements[0].addEventListener(\"focus\",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener(\"focus\",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement(\"div\"),this._liveRegion.classList.add(\"live-region\"),this._liveRegion.setAttribute(\"aria-live\",\"assertive\"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new o.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error(\"Cannot enable accessibility before Terminal.open\");this._terminal.element.insertAdjacentElement(\"afterbegin\",this._accessibilityContainer),this.register(this._terminal.onResize((e=>this._handleResize(e.rows)))),this.register(this._terminal.onRender((e=>this._refreshRows(e.start,e.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((e=>this._handleChar(e)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(\"\\n\")))),this.register(this._terminal.onA11yTab((e=>this._handleTab(e)))),this.register(this._terminal.onKey((e=>this._handleKey(e.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,l.addDisposableDomListener)(document,\"selectionchange\",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,a.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(e){for(let t=0;t0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,\"\\n\"===e&&(this._liveRegionLineCount++,21===this._liveRegionLineCount&&(this._liveRegion.textContent+=n.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent=\"\",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),/\\p{Control}/u.test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){const i=this._terminal.buffer,s=i.lines.length.toString();for(let r=e;r<=t;r++){const e=i.lines.get(i.ydisp+r),t=[],n=e?.translateToString(!0,void 0,void 0,t)||\"\",o=(i.ydisp+r+1).toString(),a=this._rowElements[r];a&&(0===n.length?(a.innerText=\" \",this._rowColumns.set(a,[0,1])):(a.textContent=n,this._rowColumns.set(a,t)),a.setAttribute(\"aria-posinset\",o),a.setAttribute(\"aria-setsize\",s))}this._announceCharacters()}_announceCharacters(){0!==this._charsToAnnounce.length&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce=\"\")}_handleBoundaryFocus(e,t){const i=e.target,s=this._rowElements[0===t?1:this._rowElements.length-2];if(i.getAttribute(\"aria-posinset\")===(0===t?\"1\":`${this._terminal.buffer.lines.length}`))return;if(e.relatedTarget!==s)return;let r,n;if(0===t?(r=i,n=this._rowElements.pop(),this._rowContainer.removeChild(n)):(r=this._rowElements.shift(),n=i,this._rowContainer.removeChild(r)),r.removeEventListener(\"focus\",this._topBoundaryFocusListener),n.removeEventListener(\"focus\",this._bottomBoundaryFocusListener),0===t){const e=this._createAccessibilityTreeNode();this._rowElements.unshift(e),this._rowContainer.insertAdjacentElement(\"afterbegin\",e)}else{const e=this._createAccessibilityTreeNode();this._rowElements.push(e),this._rowContainer.appendChild(e)}this._rowElements[0].addEventListener(\"focus\",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener(\"focus\",this._bottomBoundaryFocusListener),this._terminal.scrollLines(0===t?-1:1),this._rowElements[0===t?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){if(0===this._rowElements.length)return;const e=document.getSelection();if(!e)return;if(e.isCollapsed)return void(this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection());if(!e.anchorNode||!e.focusNode)return void console.error(\"anchorNode and/or focusNode are null\");let t={node:e.anchorNode,offset:e.anchorOffset},i={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(i.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===i.node&&t.offset>i.offset)&&([t,i]=[i,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;const s=this._rowElements.slice(-1)[0];if(i.node.compareDocumentPosition(s)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(i={node:s,offset:s.textContent?.length??0}),!this._rowContainer.contains(i.node))return;const r=({node:e,offset:t})=>{const i=e instanceof Text?e.parentNode:e;let s=parseInt(i?.getAttribute(\"aria-posinset\"),10)-1;if(isNaN(s))return console.warn(\"row is invalid. Race condition?\"),null;const r=this._rowColumns.get(i);if(!r)return console.warn(\"columns is null. Race condition?\"),null;let n=t=this._terminal.cols&&(++s,n=0),{row:s,column:n}},n=r(t),o=r(i);if(n&&o){if(n.row>o.row||n.row===o.row&&n.column>=o.column)throw new Error(\"invalid range\");this._terminal.select(n.column,n.row,(o.row-n.row)*this._terminal.cols-n.column+o.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener(\"focus\",this._bottomBoundaryFocusListener);for(let e=this._rowContainer.children.length;ee;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener(\"focus\",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const e=this._coreBrowserService.mainDocument.createElement(\"div\");return e.setAttribute(\"role\",\"listitem\"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e{function i(e){return e.replace(/\\r?\\n/g,\"\\r\")}function s(e,t){return t?\"\u001b[200~\"+e+\"\u001b[201~\":e}function r(e,t,r,n){e=s(e=i(e),r.decPrivateModes.bracketedPasteMode&&!0!==n.rawOptions.ignoreBracketedPasteMode),r.triggerDataEvent(e,!0),t.value=\"\"}function n(e,t,i){const s=i.getBoundingClientRect(),r=e.clientX-s.left-10,n=e.clientY-s.top-10;t.style.width=\"20px\",t.style.height=\"20px\",t.style.left=`${r}px`,t.style.top=`${n}px`,t.style.zIndex=\"1000\",t.focus()}Object.defineProperty(t,\"__esModule\",{value:!0}),t.rightClickHandler=t.moveTextAreaUnderMouseCursor=t.paste=t.handlePasteEvent=t.copyHandler=t.bracketTextForPaste=t.prepareTextForTerminal=void 0,t.prepareTextForTerminal=i,t.bracketTextForPaste=s,t.copyHandler=function(e,t){e.clipboardData&&e.clipboardData.setData(\"text/plain\",t.selectionText),e.preventDefault()},t.handlePasteEvent=function(e,t,i,s){e.stopPropagation(),e.clipboardData&&r(e.clipboardData.getData(\"text/plain\"),t,i,s)},t.paste=r,t.moveTextAreaUnderMouseCursor=n,t.rightClickHandler=function(e,t,i,s,r){n(e,t,i),r&&s.rightClickSelect(e),t.value=s.selectionText,t.select()}},7239:(e,t,i)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.ColorContrastCache=void 0;const s=i(1505);t.ColorContrastCache=class{constructor(){this._color=new s.TwoKeyMap,this._css=new s.TwoKeyMap}setCss(e,t,i){this._css.set(e,t,i)}getCss(e,t){return this._css.get(e,t)}setColor(e,t,i){this._color.set(e,t,i)}getColor(e,t){return this._color.get(e,t)}clear(){this._color.clear(),this._css.clear()}}},3656:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.addDisposableDomListener=void 0,t.addDisposableDomListener=function(e,t,i,s){e.addEventListener(t,i,s);let r=!1;return{dispose:()=>{r||(r=!0,e.removeEventListener(t,i,s))}}}},3551:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(n<3?r(o):n>3?r(t,i,o):r(t,i))||o);return n>3&&o&&Object.defineProperty(t,i,o),o},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.Linkifier=void 0;const n=i(3656),o=i(8460),a=i(844),h=i(2585),c=i(4725);let l=t.Linkifier=class extends a.Disposable{get currentLink(){return this._currentLink}constructor(e,t,i,s,r){super(),this._element=e,this._mouseService=t,this._renderService=i,this._bufferService=s,this._linkProviderService=r,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new o.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new o.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,a.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,a.toDisposable)((()=>{this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,n.addDisposableDomListener)(this._element,\"mouseleave\",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,n.addDisposableDomListener)(this._element,\"mousemove\",this._handleMouseMove.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,\"mousedown\",this._handleMouseDown.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,\"mouseup\",this._handleMouseUp.bind(this)))}_handleMouseMove(e){this._lastMouseEvent=e;const t=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!t)return;this._isMouseOut=!1;const i=e.composedPath();for(let e=0;e{e?.forEach((e=>{e.link.dispose&&e.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=e.y);let i=!1;for(const[s,r]of this._linkProviderService.linkProviders.entries())if(t){const t=this._activeProviderReplies?.get(s);t&&(i=this._checkLinkProviderResult(s,e,i))}else r.provideLinks(e.y,(t=>{if(this._isMouseOut)return;const r=t?.map((e=>({link:e})));this._activeProviderReplies?.set(s,r),i=this._checkLinkProviderResult(s,e,i),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)}))}_removeIntersectingLinks(e,t){const i=new Set;for(let s=0;se?this._bufferService.cols:s.link.range.end.x;for(let e=n;e<=o;e++){if(i.has(e)){r.splice(t--,1);break}i.add(e)}}}}_checkLinkProviderResult(e,t,i){if(!this._activeProviderReplies)return i;const s=this._activeProviderReplies.get(e);let r=!1;for(let t=0;tthis._linkAtPosition(e.link,t)));e&&(i=!0,this._handleNewLink(e))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!i)for(let e=0;ethis._linkAtPosition(e.link,t)));if(s){i=!0,this._handleNewLink(s);break}}return i}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._currentLink)return;const t=this._positionFromMouseEvent(e,this._element,this._mouseService);t&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,t)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,t){this._currentLink&&this._lastMouseEvent&&(!e||!t||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=t)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,a.disposeArray)(this._linkCacheDisposables))}_handleNewLink(e){if(!this._lastMouseEvent)return;const t=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);t&&this._linkAtPosition(e.link,t)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:void 0===e.link.decorations||e.link.decorations.underline,pointerCursor:void 0===e.link.decorations||e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:e=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==e&&(this._currentLink.state.decorations.pointerCursor=e,this._currentLink.state.isHovered&&this._element.classList.toggle(\"xterm-cursor-pointer\",e))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:t=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==t&&(this._currentLink.state.decorations.underline=t,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,t))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((e=>{if(!this._currentLink)return;const t=0===e.start?0:e.start+1+this._bufferService.buffer.ydisp,i=this._bufferService.buffer.ydisp+1+e.end;if(this._currentLink.link.range.start.y>=t&&this._currentLink.link.range.end.y<=i&&(this._clearCurrentLink(t,i),this._lastMouseEvent)){const e=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);e&&this._askForLink(e,!1)}}))))}_linkHover(e,t,i){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add(\"xterm-cursor-pointer\")),t.hover&&t.hover(i,t.text)}_fireUnderlineEvent(e,t){const i=e.range,s=this._bufferService.buffer.ydisp,r=this._createLinkUnderlineEvent(i.start.x-1,i.start.y-s-1,i.end.x,i.end.y-s-1,void 0);(t?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(r)}_linkLeave(e,t,i){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove(\"xterm-cursor-pointer\")),t.leave&&t.leave(i,t.text)}_linkAtPosition(e,t){const i=e.range.start.y*this._bufferService.cols+e.range.start.x,s=e.range.end.y*this._bufferService.cols+e.range.end.x,r=t.y*this._bufferService.cols+t.x;return i<=r&&r<=s}_positionFromMouseEvent(e,t,i){const s=i.getCoords(e,t,this._bufferService.cols,this._bufferService.rows);if(s)return{x:s[0],y:s[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,t,i,s,r){return{x1:e,y1:t,x2:i,y2:s,cols:this._bufferService.cols,fg:r}}};t.Linkifier=l=s([r(1,c.IMouseService),r(2,c.IRenderService),r(3,h.IBufferService),r(4,c.ILinkProviderService)],l)},9042:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.tooMuchOutput=t.promptLabel=void 0,t.promptLabel=\"Terminal input\",t.tooMuchOutput=\"Too much output to announce, navigate to rows manually to read\"},3730:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(n<3?r(o):n>3?r(t,i,o):r(t,i))||o);return n>3&&o&&Object.defineProperty(t,i,o),o},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.OscLinkProvider=void 0;const n=i(511),o=i(2585);let a=t.OscLinkProvider=class{constructor(e,t,i){this._bufferService=e,this._optionsService=t,this._oscLinkService=i}provideLinks(e,t){const i=this._bufferService.buffer.lines.get(e-1);if(!i)return void t(void 0);const s=[],r=this._optionsService.rawOptions.linkHandler,o=new n.CellData,a=i.getTrimmedLength();let c=-1,l=-1,d=!1;for(let t=0;tr?r.activate(e,t,n):h(0,t),hover:(e,t)=>r?.hover?.(e,t,n),leave:(e,t)=>r?.leave?.(e,t,n)})}d=!1,o.hasExtendedAttrs()&&o.extended.urlId?(l=t,c=o.extended.urlId):(l=-1,c=-1)}}t(s)}};function h(e,t){if(confirm(`Do you want to navigate to ${t}?\\n\\nWARNING: This link could potentially be dangerous`)){const e=window.open();if(e){try{e.opener=null}catch{}e.location.href=t}else console.warn(\"Opening link blocked as opener could not be cleared\")}}t.OscLinkProvider=a=s([r(0,o.IBufferService),r(1,o.IOptionsService),r(2,o.IOscLinkService)],a)},6193:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.RenderDebouncer=void 0,t.RenderDebouncer=class{constructor(e,t){this._renderCallback=e,this._coreBrowserService=t,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(e){return this._refreshCallbacks.push(e),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(e,t,i){this._rowCount=i,e=void 0!==e?e:0,t=void 0!==t?t:this._rowCount-1,this._rowStart=void 0!==this._rowStart?Math.min(this._rowStart,e):e,this._rowEnd=void 0!==this._rowEnd?Math.max(this._rowEnd,t):t,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,void 0===this._rowStart||void 0===this._rowEnd||void 0===this._rowCount)return void this._runRefreshCallbacks();const e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const e of this._refreshCallbacks)e(0);this._refreshCallbacks=[]}}},3236:(e,t,i)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.Terminal=void 0;const s=i(3614),r=i(3656),n=i(3551),o=i(9042),a=i(3730),h=i(1680),c=i(3107),l=i(5744),d=i(2950),_=i(1296),u=i(428),f=i(4269),v=i(5114),p=i(8934),g=i(3230),m=i(9312),S=i(4725),C=i(6731),b=i(8055),w=i(8969),y=i(8460),E=i(844),k=i(6114),L=i(8437),D=i(2584),R=i(7399),x=i(5941),A=i(9074),B=i(2585),T=i(5435),M=i(4567),O=i(779);class P extends w.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(e={}){super(e),this.browser=k,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new E.MutableDisposable),this._onCursorMove=this.register(new y.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new y.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new y.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new y.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new y.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new y.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new y.EventEmitter),this._onBlur=this.register(new y.EventEmitter),this._onA11yCharEmitter=this.register(new y.EventEmitter),this._onA11yTabEmitter=this.register(new y.EventEmitter),this._onWillOpen=this.register(new y.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(A.DecorationService),this._instantiationService.setService(B.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(O.LinkProviderService),this._instantiationService.setService(S.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(a.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((e,t)=>this.refresh(e,t)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((e=>this._reportWindowsOptions(e)))),this.register(this._inputHandler.onColor((e=>this._handleColorEvent(e)))),this.register((0,y.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,y.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,y.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,y.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((e=>this._afterResize(e.cols,e.rows)))),this.register((0,E.toDisposable)((()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)})))}_handleColorEvent(e){if(this._themeService)for(const t of e){let e,i=\"\";switch(t.index){case 256:e=\"foreground\",i=\"10\";break;case 257:e=\"background\",i=\"11\";break;case 258:e=\"cursor\",i=\"12\";break;default:e=\"ansi\",i=\"4;\"+t.index}switch(t.type){case 0:const s=b.color.toColorRGB(\"ansi\"===e?this._themeService.colors.ansi[t.index]:this._themeService.colors[e]);this.coreService.triggerDataEvent(`${D.C0.ESC}]${i};${(0,x.toRgbString)(s)}${D.C1_ESCAPED.ST}`);break;case 1:if(\"ansi\"===e)this._themeService.modifyColors((e=>e.ansi[t.index]=b.channels.toColor(...t.color)));else{const i=e;this._themeService.modifyColors((e=>e[i]=b.channels.toColor(...t.color)))}break;case 2:this._themeService.restoreColor(t.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(e){e?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(M.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(e){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(D.C0.ESC+\"[I\"),this.element.classList.add(\"focus\"),this._showCursor(),this._onFocus.fire()}blur(){return this.textarea?.blur()}_handleTextAreaBlur(){this.textarea.value=\"\",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(D.C0.ESC+\"[O\"),this.element.classList.remove(\"focus\"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const e=this.buffer.ybase+this.buffer.y,t=this.buffer.lines.get(e);if(!t)return;const i=Math.min(this.buffer.x,this.cols-1),s=this._renderService.dimensions.css.cell.height,r=t.getWidth(i),n=this._renderService.dimensions.css.cell.width*r,o=this.buffer.y*this._renderService.dimensions.css.cell.height,a=i*this._renderService.dimensions.css.cell.width;this.textarea.style.left=a+\"px\",this.textarea.style.top=o+\"px\",this.textarea.style.width=n+\"px\",this.textarea.style.height=s+\"px\",this.textarea.style.lineHeight=s+\"px\",this.textarea.style.zIndex=\"-5\"}_initGlobal(){this._bindKeys(),this.register((0,r.addDisposableDomListener)(this.element,\"copy\",(e=>{this.hasSelection()&&(0,s.copyHandler)(e,this._selectionService)})));const e=e=>(0,s.handlePasteEvent)(e,this.textarea,this.coreService,this.optionsService);this.register((0,r.addDisposableDomListener)(this.textarea,\"paste\",e)),this.register((0,r.addDisposableDomListener)(this.element,\"paste\",e)),k.isFirefox?this.register((0,r.addDisposableDomListener)(this.element,\"mousedown\",(e=>{2===e.button&&(0,s.rightClickHandler)(e,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,r.addDisposableDomListener)(this.element,\"contextmenu\",(e=>{(0,s.rightClickHandler)(e,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),k.isLinux&&this.register((0,r.addDisposableDomListener)(this.element,\"auxclick\",(e=>{1===e.button&&(0,s.moveTextAreaUnderMouseCursor)(e,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,r.addDisposableDomListener)(this.textarea,\"keyup\",(e=>this._keyUp(e)),!0)),this.register((0,r.addDisposableDomListener)(this.textarea,\"keydown\",(e=>this._keyDown(e)),!0)),this.register((0,r.addDisposableDomListener)(this.textarea,\"keypress\",(e=>this._keyPress(e)),!0)),this.register((0,r.addDisposableDomListener)(this.textarea,\"compositionstart\",(()=>this._compositionHelper.compositionstart()))),this.register((0,r.addDisposableDomListener)(this.textarea,\"compositionupdate\",(e=>this._compositionHelper.compositionupdate(e)))),this.register((0,r.addDisposableDomListener)(this.textarea,\"compositionend\",(()=>this._compositionHelper.compositionend()))),this.register((0,r.addDisposableDomListener)(this.textarea,\"input\",(e=>this._inputEvent(e)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(e){if(!e)throw new Error(\"Terminal requires a parent element.\");if(e.isConnected||this._logService.debug(\"Terminal.open was called on an element that was not attached to the DOM\"),this.element?.ownerDocument.defaultView&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=e.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement(\"div\"),this.element.dir=\"ltr\",this.element.classList.add(\"terminal\"),this.element.classList.add(\"xterm\"),e.appendChild(this.element);const t=this._document.createDocumentFragment();this._viewportElement=this._document.createElement(\"div\"),this._viewportElement.classList.add(\"xterm-viewport\"),t.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement(\"div\"),this._viewportScrollArea.classList.add(\"xterm-scroll-area\"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement(\"div\"),this.screenElement.classList.add(\"xterm-screen\"),this.register((0,r.addDisposableDomListener)(this.screenElement,\"mousemove\",(e=>this.updateCursorStyle(e)))),this._helperContainer=this._document.createElement(\"div\"),this._helperContainer.classList.add(\"xterm-helpers\"),this.screenElement.appendChild(this._helperContainer),t.appendChild(this.screenElement),this.textarea=this._document.createElement(\"textarea\"),this.textarea.classList.add(\"xterm-helper-textarea\"),this.textarea.setAttribute(\"aria-label\",o.promptLabel),k.isChromeOS||this.textarea.setAttribute(\"aria-multiline\",\"false\"),this.textarea.setAttribute(\"autocorrect\",\"off\"),this.textarea.setAttribute(\"autocapitalize\",\"off\"),this.textarea.setAttribute(\"spellcheck\",\"false\"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(v.CoreBrowserService,this.textarea,e.ownerDocument.defaultView??window,this._document??\"undefined\"!=typeof window?window.document:null)),this._instantiationService.setService(S.ICoreBrowserService,this._coreBrowserService),this.register((0,r.addDisposableDomListener)(this.textarea,\"focus\",(e=>this._handleTextAreaFocus(e)))),this.register((0,r.addDisposableDomListener)(this.textarea,\"blur\",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(u.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(S.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(C.ThemeService),this._instantiationService.setService(S.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(f.CharacterJoinerService),this._instantiationService.setService(S.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(g.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(S.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((e=>this._onRender.fire(e)))),this.onResize((e=>this._renderService.resize(e.cols,e.rows))),this._compositionView=this._document.createElement(\"div\"),this._compositionView.classList.add(\"composition-view\"),this._compositionHelper=this._instantiationService.createInstance(d.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(p.MouseService),this._instantiationService.setService(S.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(n.Linkifier,this.screenElement)),this.element.appendChild(t);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(h.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((e=>this.scrollLines(e.amount,e.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(m.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(S.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((e=>this.scrollLines(e.amount,e.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((e=>this._renderService.handleSelectionChanged(e.start,e.end,e.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((e=>{this.textarea.value=e,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((e=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,r.addDisposableDomListener)(this._viewportElement,\"scroll\",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(c.BufferDecorationRenderer,this.screenElement)),this.register((0,r.addDisposableDomListener)(this.element,\"mousedown\",(e=>this._selectionService.handleMouseDown(e)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add(\"enable-mouse-events\")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(M.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange(\"screenReaderMode\",(e=>this._handleScreenReaderModeOptionChange(e)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(l.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange(\"overviewRulerWidth\",(e=>{!this._overviewRulerRenderer&&e&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(l.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(_.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const e=this,t=this.element;function i(t){const i=e._mouseService.getMouseReportCoords(t,e.screenElement);if(!i)return!1;let s,r;switch(t.overrideType||t.type){case\"mousemove\":r=32,void 0===t.buttons?(s=3,void 0!==t.button&&(s=t.button<3?t.button:3)):s=1&t.buttons?0:4&t.buttons?1:2&t.buttons?2:3;break;case\"mouseup\":r=0,s=t.button<3?t.button:3;break;case\"mousedown\":r=1,s=t.button<3?t.button:3;break;case\"wheel\":if(e._customWheelEventHandler&&!1===e._customWheelEventHandler(t))return!1;if(0===e.viewport.getLinesScrolled(t))return!1;r=t.deltaY<0?0:1,s=4;break;default:return!1}return!(void 0===r||void 0===s||s>4)&&e.coreMouseService.triggerMouseEvent({col:i.col,row:i.row,x:i.x,y:i.y,button:s,action:r,ctrl:t.ctrlKey,alt:t.altKey,shift:t.shiftKey})}const s={mouseup:null,wheel:null,mousedrag:null,mousemove:null},n={mouseup:e=>(i(e),e.buttons||(this._document.removeEventListener(\"mouseup\",s.mouseup),s.mousedrag&&this._document.removeEventListener(\"mousemove\",s.mousedrag)),this.cancel(e)),wheel:e=>(i(e),this.cancel(e,!0)),mousedrag:e=>{e.buttons&&i(e)},mousemove:e=>{e.buttons||i(e)}};this.register(this.coreMouseService.onProtocolChange((e=>{e?(\"debug\"===this.optionsService.rawOptions.logLevel&&this._logService.debug(\"Binding to mouse events:\",this.coreMouseService.explainEvents(e)),this.element.classList.add(\"enable-mouse-events\"),this._selectionService.disable()):(this._logService.debug(\"Unbinding from mouse events.\"),this.element.classList.remove(\"enable-mouse-events\"),this._selectionService.enable()),8&e?s.mousemove||(t.addEventListener(\"mousemove\",n.mousemove),s.mousemove=n.mousemove):(t.removeEventListener(\"mousemove\",s.mousemove),s.mousemove=null),16&e?s.wheel||(t.addEventListener(\"wheel\",n.wheel,{passive:!1}),s.wheel=n.wheel):(t.removeEventListener(\"wheel\",s.wheel),s.wheel=null),2&e?s.mouseup||(s.mouseup=n.mouseup):(this._document.removeEventListener(\"mouseup\",s.mouseup),s.mouseup=null),4&e?s.mousedrag||(s.mousedrag=n.mousedrag):(this._document.removeEventListener(\"mousemove\",s.mousedrag),s.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,r.addDisposableDomListener)(t,\"mousedown\",(e=>{if(e.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(e))return i(e),s.mouseup&&this._document.addEventListener(\"mouseup\",s.mouseup),s.mousedrag&&this._document.addEventListener(\"mousemove\",s.mousedrag),this.cancel(e)}))),this.register((0,r.addDisposableDomListener)(t,\"wheel\",(e=>{if(!s.wheel){if(this._customWheelEventHandler&&!1===this._customWheelEventHandler(e))return!1;if(!this.buffer.hasScrollback){const t=this.viewport.getLinesScrolled(e);if(0===t)return;const i=D.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?\"O\":\"[\")+(e.deltaY<0?\"A\":\"B\");let s=\"\";for(let e=0;e{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(e),this.cancel(e)}),{passive:!0})),this.register((0,r.addDisposableDomListener)(t,\"touchmove\",(e=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(e)?void 0:this.cancel(e)}),{passive:!1}))}refresh(e,t){this._renderService?.refreshRows(e,t)}updateCursorStyle(e){this._selectionService?.shouldColumnSelect(e)?this.element.classList.add(\"column-select\"):this.element.classList.remove(\"column-select\")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(e,t,i=0){1===i?(super.scrollLines(e,t,i),this.refresh(0,this.rows-1)):this.viewport?.scrollLines(e)}paste(e){(0,s.paste)(e,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(e){this._customKeyEventHandler=e}attachCustomWheelEventHandler(e){this._customWheelEventHandler=e}registerLinkProvider(e){return this._linkProviderService.registerLinkProvider(e)}registerCharacterJoiner(e){if(!this._characterJoinerService)throw new Error(\"Terminal must be opened first\");const t=this._characterJoinerService.register(e);return this.refresh(0,this.rows-1),t}deregisterCharacterJoiner(e){if(!this._characterJoinerService)throw new Error(\"Terminal must be opened first\");this._characterJoinerService.deregister(e)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(e){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)}registerDecoration(e){return this._decorationService.registerDecoration(e)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(e,t,i){this._selectionService.setSelection(e,t,i)}getSelection(){return this._selectionService?this._selectionService.selectionText:\"\"}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){this._selectionService?.clearSelection()}selectAll(){this._selectionService?.selectAll()}selectLines(e,t){this._selectionService?.selectLines(e,t)}_keyDown(e){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&!1===this._customKeyEventHandler(e))return!1;const t=this.browser.isMac&&this.options.macOptionIsMeta&&e.altKey;if(!t&&!this._compositionHelper.keydown(e))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;t||\"Dead\"!==e.key&&\"AltGraph\"!==e.key||(this._unprocessedDeadKey=!0);const i=(0,R.evaluateKeyboardEvent)(e,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),3===i.type||2===i.type){const t=this.rows-1;return this.scrollLines(2===i.type?-t:t),this.cancel(e,!0)}return 1===i.type&&this.selectAll(),!!this._isThirdLevelShift(this.browser,e)||(i.cancel&&this.cancel(e,!0),!i.key||!!(e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&1===e.key.length&&e.key.charCodeAt(0)>=65&&e.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(i.key!==D.C0.ETX&&i.key!==D.C0.CR||(this.textarea.value=\"\"),this._onKey.fire({key:i.key,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(i.key,!0),!this.optionsService.rawOptions.screenReaderMode||e.altKey||e.ctrlKey?this.cancel(e,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(e,t){const i=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey||e.isWindows&&t.getModifierState(\"AltGraph\");return\"keypress\"===t.type?i:i&&(!t.keyCode||t.keyCode>47)}_keyUp(e){this._keyDownSeen=!1,this._customKeyEventHandler&&!1===this._customKeyEventHandler(e)||(function(e){return 16===e.keyCode||17===e.keyCode||18===e.keyCode}(e)||this.focus(),this.updateCursorStyle(e),this._keyPressHandled=!1)}_keyPress(e){let t;if(this._keyPressHandled=!1,this._keyDownHandled)return!1;if(this._customKeyEventHandler&&!1===this._customKeyEventHandler(e))return!1;if(this.cancel(e),e.charCode)t=e.charCode;else if(null===e.which||void 0===e.which)t=e.keyCode;else{if(0===e.which||0===e.charCode)return!1;t=e.which}return!(!t||(e.altKey||e.ctrlKey||e.metaKey)&&!this._isThirdLevelShift(this.browser,e)||(t=String.fromCharCode(t),this._onKey.fire({key:t,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(t,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(e){if(e.data&&\"insertText\"===e.inputType&&(!e.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const t=e.data;return this.coreService.triggerDataEvent(t,!0),this.cancel(e),!0}return!1}resize(e,t){e!==this.cols||t!==this.rows?super.resize(e,t):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(e,t){this._charSizeService?.measure(),this.viewport?.syncScrollArea(!0)}clear(){if(0!==this.buffer.ybase||0!==this.buffer.y){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let e=1;e{Object.defineProperty(t,\"__esModule\",{value:!0}),t.TimeBasedDebouncer=void 0,t.TimeBasedDebouncer=class{constructor(e,t=1e3){this._renderCallback=e,this._debounceThresholdMS=t,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(e,t,i){this._rowCount=i,e=void 0!==e?e:0,t=void 0!==t?t:this._rowCount-1,this._rowStart=void 0!==this._rowStart?Math.min(this._rowStart,e):e,this._rowEnd=void 0!==this._rowEnd?Math.max(this._rowEnd,t):t;const s=Date.now();if(s-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=s,this._innerRefresh();else if(!this._additionalRefreshRequested){const e=s-this._lastRefreshMs,t=this._debounceThresholdMS-e;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),t)}}_innerRefresh(){if(void 0===this._rowStart||void 0===this._rowEnd||void 0===this._rowCount)return;const e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t)}}},1680:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(n<3?r(o):n>3?r(t,i,o):r(t,i))||o);return n>3&&o&&Object.defineProperty(t,i,o),o},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.Viewport=void 0;const n=i(3656),o=i(4725),a=i(8460),h=i(844),c=i(2585);let l=t.Viewport=class extends h.Disposable{constructor(e,t,i,s,r,o,h,c){super(),this._viewportElement=e,this._scrollArea=t,this._bufferService=i,this._optionsService=s,this._charSizeService=r,this._renderService=o,this._coreBrowserService=h,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new a.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,n.addDisposableDomListener)(this._viewportElement,\"scroll\",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((e=>this._activeBuffer=e.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((e=>this._renderDimensions=e))),this._handleThemeChange(c.colors),this.register(c.onChangeColors((e=>this._handleThemeChange(e)))),this.register(this._optionsService.onSpecificOptionChange(\"scrollback\",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(e){this._viewportElement.style.backgroundColor=e.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(e){if(e)return this._innerRefresh(),void(null!==this._refreshAnimationFrame&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));null===this._refreshAnimationFrame&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const e=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==e&&(this._lastRecordedBufferHeight=e,this._scrollArea.style.height=this._lastRecordedBufferHeight+\"px\")}const e=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==e&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=e),this._refreshAnimationFrame=null}syncScrollArea(e=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(e);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(e)}_handleScroll(e){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const t=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:t,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||-1===this._smoothScrollState.origin||-1===this._smoothScrollState.target)return;const e=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(e*(this._smoothScrollState.target-this._smoothScrollState.origin)),e<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(e,t){const i=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(t<0&&0!==this._viewportElement.scrollTop||t>0&&i0&&(i=e),s=\"\"}}return{bufferElements:r,cursorElement:i}}getLinesScrolled(e){if(0===e.deltaY||e.shiftKey)return 0;let t=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(t/=this._currentRowHeight+0,this._wheelPartialScroll+=t,t=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(t*=this._bufferService.rows),t}_applyScrollModifier(e,t){const i=this._optionsService.rawOptions.fastScrollModifier;return\"alt\"===i&&t.altKey||\"ctrl\"===i&&t.ctrlKey||\"shift\"===i&&t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(e){this._lastTouchY=e.touches[0].pageY}handleTouchMove(e){const t=this._lastTouchY-e.touches[0].pageY;return this._lastTouchY=e.touches[0].pageY,0!==t&&(this._viewportElement.scrollTop+=t,this._bubbleScroll(e,t))}};t.Viewport=l=s([r(2,c.IBufferService),r(3,c.IOptionsService),r(4,o.ICharSizeService),r(5,o.IRenderService),r(6,o.ICoreBrowserService),r(7,o.IThemeService)],l)},3107:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(n<3?r(o):n>3?r(t,i,o):r(t,i))||o);return n>3&&o&&Object.defineProperty(t,i,o),o},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.BufferDecorationRenderer=void 0;const n=i(4725),o=i(844),a=i(2585);let h=t.BufferDecorationRenderer=class extends o.Disposable{constructor(e,t,i,s,r){super(),this._screenElement=e,this._bufferService=t,this._coreBrowserService=i,this._decorationService=s,this._renderService=r,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement(\"div\"),this._container.classList.add(\"xterm-decoration-container\"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((e=>this._removeDecoration(e)))),this.register((0,o.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){void 0===this._animationFrame&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const e of this._decorationService.decorations)this._renderDecoration(e);this._dimensionsChanged=!1}_renderDecoration(e){this._refreshStyle(e),this._dimensionsChanged&&this._refreshXPosition(e)}_createElement(e){const t=this._coreBrowserService.mainDocument.createElement(\"div\");t.classList.add(\"xterm-decoration\"),t.classList.toggle(\"xterm-decoration-top-layer\",\"top\"===e?.options?.layer),t.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,t.style.height=(e.options.height||1)*this._renderService.dimensions.css.cell.height+\"px\",t.style.top=(e.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+\"px\",t.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const i=e.options.x??0;return i&&i>this._bufferService.cols&&(t.style.display=\"none\"),this._refreshXPosition(e,t),t}_refreshStyle(e){const t=e.marker.line-this._bufferService.buffers.active.ydisp;if(t<0||t>=this._bufferService.rows)e.element&&(e.element.style.display=\"none\",e.onRenderEmitter.fire(e.element));else{let i=this._decorationElements.get(e);i||(i=this._createElement(e),e.element=i,this._decorationElements.set(e,i),this._container.appendChild(i),e.onDispose((()=>{this._decorationElements.delete(e),i.remove()}))),i.style.top=t*this._renderService.dimensions.css.cell.height+\"px\",i.style.display=this._altBufferIsActive?\"none\":\"block\",e.onRenderEmitter.fire(i)}}_refreshXPosition(e,t=e.element){if(!t)return;const i=e.options.x??0;\"right\"===(e.options.anchor||\"left\")?t.style.right=i?i*this._renderService.dimensions.css.cell.width+\"px\":\"\":t.style.left=i?i*this._renderService.dimensions.css.cell.width+\"px\":\"\"}_removeDecoration(e){this._decorationElements.get(e)?.remove(),this._decorationElements.delete(e),e.dispose()}};t.BufferDecorationRenderer=h=s([r(1,a.IBufferService),r(2,n.ICoreBrowserService),r(3,a.IDecorationService),r(4,n.IRenderService)],h)},5871:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.ColorZoneStore=void 0,t.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(e){if(e.options.overviewRulerOptions){for(const t of this._zones)if(t.color===e.options.overviewRulerOptions.color&&t.position===e.options.overviewRulerOptions.position){if(this._lineIntersectsZone(t,e.marker.line))return;if(this._lineAdjacentToZone(t,e.marker.line,e.options.overviewRulerOptions.position))return void this._addLineToZone(t,e.marker.line)}if(this._zonePoolIndex=e.startBufferLine&&t<=e.endBufferLine}_lineAdjacentToZone(e,t,i){return t>=e.startBufferLine-this._linePadding[i||\"full\"]&&t<=e.endBufferLine+this._linePadding[i||\"full\"]}_addLineToZone(e,t){e.startBufferLine=Math.min(e.startBufferLine,t),e.endBufferLine=Math.max(e.endBufferLine,t)}}},5744:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(n<3?r(o):n>3?r(t,i,o):r(t,i))||o);return n>3&&o&&Object.defineProperty(t,i,o),o},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.OverviewRulerRenderer=void 0;const n=i(5871),o=i(4725),a=i(844),h=i(2585),c={full:0,left:0,center:0,right:0},l={full:0,left:0,center:0,right:0},d={full:0,left:0,center:0,right:0};let _=t.OverviewRulerRenderer=class extends a.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(e,t,i,s,r,o,h){super(),this._viewportElement=e,this._screenElement=t,this._bufferService=i,this._decorationService=s,this._renderService=r,this._optionsService=o,this._coreBrowserService=h,this._colorZoneStore=new n.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement(\"canvas\"),this._canvas.classList.add(\"xterm-decoration-overview-ruler\"),this._refreshCanvasDimensions(),this._viewportElement.parentElement?.insertBefore(this._canvas,this._viewportElement);const c=this._canvas.getContext(\"2d\");if(!c)throw new Error(\"Ctx cannot be null\");this._ctx=c,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,a.toDisposable)((()=>{this._canvas?.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?\"none\":\"block\"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange(\"overviewRulerWidth\",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const e=Math.floor(this._canvas.width/3),t=Math.ceil(this._canvas.width/3);l.full=this._canvas.width,l.left=e,l.center=t,l.right=e,this._refreshDrawHeightConstants(),d.full=0,d.left=0,d.center=l.left,d.right=l.left+l.center}_refreshDrawHeightConstants(){c.full=Math.round(2*this._coreBrowserService.dpr);const e=this._canvas.height/this._bufferService.buffer.lines.length,t=Math.round(Math.max(Math.min(e,12),6)*this._coreBrowserService.dpr);c.left=t,c.center=t,c.right=t}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const e of this._decorationService.decorations)this._colorZoneStore.addDecoration(e);this._ctx.lineWidth=1;const e=this._colorZoneStore.zones;for(const t of e)\"full\"!==t.position&&this._renderColorZone(t);for(const t of e)\"full\"===t.position&&this._renderColorZone(t);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(e){this._ctx.fillStyle=e.color,this._ctx.fillRect(d[e.position||\"full\"],Math.round((this._canvas.height-1)*(e.startBufferLine/this._bufferService.buffers.active.lines.length)-c[e.position||\"full\"]/2),l[e.position||\"full\"],Math.round((this._canvas.height-1)*((e.endBufferLine-e.startBufferLine)/this._bufferService.buffers.active.lines.length)+c[e.position||\"full\"]))}_queueRefresh(e,t){this._shouldUpdateDimensions=e||this._shouldUpdateDimensions,this._shouldUpdateAnchor=t||this._shouldUpdateAnchor,void 0===this._animationFrame&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};t.OverviewRulerRenderer=_=s([r(2,h.IBufferService),r(3,h.IDecorationService),r(4,o.IRenderService),r(5,h.IOptionsService),r(6,o.ICoreBrowserService)],_)},2950:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(n<3?r(o):n>3?r(t,i,o):r(t,i))||o);return n>3&&o&&Object.defineProperty(t,i,o),o},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.CompositionHelper=void 0;const n=i(4725),o=i(2585),a=i(2584);let h=t.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(e,t,i,s,r,n){this._textarea=e,this._compositionView=t,this._bufferService=i,this._optionsService=s,this._coreService=r,this._renderService=n,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=\"\"}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent=\"\",this._dataAlreadySent=\"\",this._compositionView.classList.add(\"active\")}compositionupdate(e){this._compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(e){if(this._isComposing||this._isSendingComposition){if(229===e.keyCode)return!1;if(16===e.keyCode||17===e.keyCode||18===e.keyCode)return!1;this._finalizeComposition(!1)}return 229!==e.keyCode||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(e){if(this._compositionView.classList.remove(\"active\"),this._isComposing=!1,e){const e={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let t;this._isSendingComposition=!1,e.start+=this._dataAlreadySent.length,t=this._isComposing?this._textarea.value.substring(e.start,e.end):this._textarea.value.substring(e.start),t.length>0&&this._coreService.triggerDataEvent(t,!0)}}),0)}else{this._isSendingComposition=!1;const e=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(e,!0)}}_handleAnyTextareaChanges(){const e=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const t=this._textarea.value,i=t.replace(e,\"\");this._dataAlreadySent=i,t.length>e.length?this._coreService.triggerDataEvent(i,!0):t.lengththis.updateCompositionElements(!0)),0)}}};t.CompositionHelper=h=s([r(2,o.IBufferService),r(3,o.IOptionsService),r(4,o.ICoreService),r(5,n.IRenderService)],h)},9806:(e,t)=>{function i(e,t,i){const s=i.getBoundingClientRect(),r=e.getComputedStyle(i),n=parseInt(r.getPropertyValue(\"padding-left\")),o=parseInt(r.getPropertyValue(\"padding-top\"));return[t.clientX-s.left-n,t.clientY-s.top-o]}Object.defineProperty(t,\"__esModule\",{value:!0}),t.getCoords=t.getCoordsRelativeToElement=void 0,t.getCoordsRelativeToElement=i,t.getCoords=function(e,t,s,r,n,o,a,h,c){if(!o)return;const l=i(e,t,s);return l?(l[0]=Math.ceil((l[0]+(c?a/2:0))/a),l[1]=Math.ceil(l[1]/h),l[0]=Math.min(Math.max(l[0],1),r+(c?1:0)),l[1]=Math.min(Math.max(l[1],1),n),l):void 0}},9504:(e,t,i)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.moveToCellSequence=void 0;const s=i(2584);function r(e,t,i,s){const r=e-n(e,i),a=t-n(t,i),l=Math.abs(r-a)-function(e,t,i){let s=0;const r=e-n(e,i),a=t-n(t,i);for(let n=0;n=0&&et?\"A\":\"B\"}function a(e,t,i,s,r,n){let o=e,a=t,h=\"\";for(;o!==i||a!==s;)o+=r?1:-1,r&&o>n.cols-1?(h+=n.buffer.translateBufferLineToString(a,!1,e,o),o=0,e=0,a++):!r&&o<0&&(h+=n.buffer.translateBufferLineToString(a,!1,0,e+1),o=n.cols-1,e=o,a--);return h+n.buffer.translateBufferLineToString(a,!1,e,o)}function h(e,t){const i=t?\"O\":\"[\";return s.C0.ESC+i+e}function c(e,t){e=Math.floor(e);let i=\"\";for(let s=0;s0?s-n(s,o):t;const _=s,u=function(e,t,i,s,o,a){let h;return h=r(i,s,o,a).length>0?s-n(s,o):t,e=i&&he?\"D\":\"C\",c(Math.abs(o-e),h(d,s));d=l>t?\"D\":\"C\";const _=Math.abs(l-t);return c(function(e,t){return t.cols-e}(l>t?e:o,i)+(_-1)*i.cols+1+((l>t?o:e)-1),h(d,s))}},1296:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(n<3?r(o):n>3?r(t,i,o):r(t,i))||o);return n>3&&o&&Object.defineProperty(t,i,o),o},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.DomRenderer=void 0;const n=i(3787),o=i(2550),a=i(2223),h=i(6171),c=i(6052),l=i(4725),d=i(8055),_=i(8460),u=i(844),f=i(2585),v=\"xterm-dom-renderer-owner-\",p=\"xterm-rows\",g=\"xterm-fg-\",m=\"xterm-bg-\",S=\"xterm-focus\",C=\"xterm-selection\";let b=1,w=t.DomRenderer=class extends u.Disposable{constructor(e,t,i,s,r,a,l,d,f,g,m,S,w){super(),this._terminal=e,this._document=t,this._element=i,this._screenElement=s,this._viewportElement=r,this._helperContainer=a,this._linkifier2=l,this._charSizeService=f,this._optionsService=g,this._bufferService=m,this._coreBrowserService=S,this._themeService=w,this._terminalClass=b++,this._rowElements=[],this._selectionRenderModel=(0,c.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new _.EventEmitter).event,this._rowContainer=this._document.createElement(\"div\"),this._rowContainer.classList.add(p),this._rowContainer.style.lineHeight=\"normal\",this._rowContainer.setAttribute(\"aria-hidden\",\"true\"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement(\"div\"),this._selectionContainer.classList.add(C),this._selectionContainer.setAttribute(\"aria-hidden\",\"true\"),this.dimensions=(0,h.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((e=>this._injectCss(e)))),this._injectCss(this._themeService.colors),this._rowFactory=d.createInstance(n.DomRendererRowFactory,document),this._element.classList.add(v+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((e=>this._handleLinkHover(e)))),this.register(this._linkifier2.onHideLinkUnderline((e=>this._handleLinkLeave(e)))),this.register((0,u.toDisposable)((()=>{this._element.classList.remove(v+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new o.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const e=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*e,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*e),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/e),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/e),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const e of this._rowElements)e.style.width=`${this.dimensions.css.canvas.width}px`,e.style.height=`${this.dimensions.css.cell.height}px`,e.style.lineHeight=`${this.dimensions.css.cell.height}px`,e.style.overflow=\"hidden\";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement(\"style\"),this._screenElement.appendChild(this._dimensionsStyleElement));const t=`${this._terminalSelector} .${p} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=t,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(e){this._themeStyleElement||(this._themeStyleElement=this._document.createElement(\"style\"),this._screenElement.appendChild(this._themeStyleElement));let t=`${this._terminalSelector} .${p} { color: ${e.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;t+=`${this._terminalSelector} .${p} .xterm-dim { color: ${d.color.multiplyOpacity(e.foreground,.5).css};}`,t+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const i=`blink_underline_${this._terminalClass}`,s=`blink_bar_${this._terminalClass}`,r=`blink_block_${this._terminalClass}`;t+=`@keyframes ${i} { 50% { border-bottom-style: hidden; }}`,t+=`@keyframes ${s} { 50% { box-shadow: none; }}`,t+=`@keyframes ${r} { 0% { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css}; } 50% { background-color: inherit; color: ${e.cursor.css}; }}`,t+=`${this._terminalSelector} .${p}.${S} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${i} 1s step-end infinite;}${this._terminalSelector} .${p}.${S} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${s} 1s step-end infinite;}${this._terminalSelector} .${p}.${S} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${r} 1s step-end infinite;}${this._terminalSelector} .${p} .xterm-cursor.xterm-cursor-block { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css};}${this._terminalSelector} .${p} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${e.cursor.css} !important; color: ${e.cursorAccent.css} !important;}${this._terminalSelector} .${p} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${e.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${p} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${e.cursor.css} inset;}${this._terminalSelector} .${p} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${e.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,t+=`${this._terminalSelector} .${C} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${C} div { position: absolute; background-color: ${e.selectionBackgroundOpaque.css};}${this._terminalSelector} .${C} div { position: absolute; background-color: ${e.selectionInactiveBackgroundOpaque.css};}`;for(const[i,s]of e.ansi.entries())t+=`${this._terminalSelector} .${g}${i} { color: ${s.css}; }${this._terminalSelector} .${g}${i}.xterm-dim { color: ${d.color.multiplyOpacity(s,.5).css}; }${this._terminalSelector} .${m}${i} { background-color: ${s.css}; }`;t+=`${this._terminalSelector} .${g}${a.INVERTED_DEFAULT_COLOR} { color: ${d.color.opaque(e.background).css}; }${this._terminalSelector} .${g}${a.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${d.color.multiplyOpacity(d.color.opaque(e.background),.5).css}; }${this._terminalSelector} .${m}${a.INVERTED_DEFAULT_COLOR} { background-color: ${e.foreground.css}; }`,this._themeStyleElement.textContent=t}_setDefaultSpacing(){const e=this.dimensions.css.cell.width-this._widthCache.get(\"W\",!1,!1);this._rowContainer.style.letterSpacing=`${e}px`,this._rowFactory.defaultSpacing=e}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(e,t){for(let e=this._rowElements.length;e<=t;e++){const e=this._document.createElement(\"div\");this._rowContainer.appendChild(e),this._rowElements.push(e)}for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(e,t){this._refreshRowElements(e,t),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(S),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(S),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(e,t,i){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(e,t,i),this.renderRows(0,this._bufferService.rows-1),!e||!t)return;this._selectionRenderModel.update(this._terminal,e,t,i);const s=this._selectionRenderModel.viewportStartRow,r=this._selectionRenderModel.viewportEndRow,n=this._selectionRenderModel.viewportCappedStartRow,o=this._selectionRenderModel.viewportCappedEndRow;if(n>=this._bufferService.rows||o<0)return;const a=this._document.createDocumentFragment();if(i){const i=e[0]>t[0];a.appendChild(this._createSelectionElement(n,i?t[0]:e[0],i?e[0]:t[0],o-n+1))}else{const i=s===n?e[0]:0,h=n===r?t[0]:this._bufferService.cols;a.appendChild(this._createSelectionElement(n,i,h));const c=o-n-1;if(a.appendChild(this._createSelectionElement(n+1,0,this._bufferService.cols,c)),n!==o){const e=r===o?t[0]:this._bufferService.cols;a.appendChild(this._createSelectionElement(o,0,e))}}this._selectionContainer.appendChild(a)}_createSelectionElement(e,t,i,s=1){const r=this._document.createElement(\"div\"),n=t*this.dimensions.css.cell.width;let o=this.dimensions.css.cell.width*(i-t);return n+o>this.dimensions.css.canvas.width&&(o=this.dimensions.css.canvas.width-n),r.style.height=s*this.dimensions.css.cell.height+\"px\",r.style.top=e*this.dimensions.css.cell.height+\"px\",r.style.left=`${n}px`,r.style.width=`${o}px`,r}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const e of this._rowElements)e.replaceChildren()}renderRows(e,t){const i=this._bufferService.buffer,s=i.ybase+i.y,r=Math.min(i.x,this._bufferService.cols-1),n=this._optionsService.rawOptions.cursorBlink,o=this._optionsService.rawOptions.cursorStyle,a=this._optionsService.rawOptions.cursorInactiveStyle;for(let h=e;h<=t;h++){const e=h+i.ydisp,t=this._rowElements[h],c=i.lines.get(e);if(!t||!c)break;t.replaceChildren(...this._rowFactory.createRow(c,e,e===s,o,a,r,n,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${v}${this._terminalClass}`}_handleLinkHover(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)}_handleLinkLeave(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)}_setCellUnderline(e,t,i,s,r,n){i<0&&(e=0),s<0&&(t=0);const o=this._bufferService.rows-1;i=Math.max(Math.min(i,o),0),s=Math.max(Math.min(s,o),0),r=Math.min(r,this._bufferService.cols);const a=this._bufferService.buffer,h=a.ybase+a.y,c=Math.min(a.x,r-1),l=this._optionsService.rawOptions.cursorBlink,d=this._optionsService.rawOptions.cursorStyle,_=this._optionsService.rawOptions.cursorInactiveStyle;for(let o=i;o<=s;++o){const u=o+a.ydisp,f=this._rowElements[o],v=a.lines.get(u);if(!f||!v)break;f.replaceChildren(...this._rowFactory.createRow(v,u,u===h,d,_,c,l,this.dimensions.css.cell.width,this._widthCache,n?o===i?e:0:-1,n?(o===s?t:r)-1:-1))}}};t.DomRenderer=w=s([r(7,f.IInstantiationService),r(8,l.ICharSizeService),r(9,f.IOptionsService),r(10,f.IBufferService),r(11,l.ICoreBrowserService),r(12,l.IThemeService)],w)},3787:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(n<3?r(o):n>3?r(t,i,o):r(t,i))||o);return n>3&&o&&Object.defineProperty(t,i,o),o},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.DomRendererRowFactory=void 0;const n=i(2223),o=i(643),a=i(511),h=i(2585),c=i(8055),l=i(4725),d=i(4269),_=i(6171),u=i(3734);let f=t.DomRendererRowFactory=class{constructor(e,t,i,s,r,n,o){this._document=e,this._characterJoinerService=t,this._optionsService=i,this._coreBrowserService=s,this._coreService=r,this._decorationService=n,this._themeService=o,this._workCell=new a.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(e,t,i){this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=i}createRow(e,t,i,s,r,a,h,l,_,f,p){const g=[],m=this._characterJoinerService.getJoinedCharacters(t),S=this._themeService.colors;let C,b=e.getNoBgTrimmedLength();i&&b0&&M===m[0][0]){O=!0;const t=m.shift();I=new d.JoinedCellData(this._workCell,e.translateToString(!0,t[0],t[1]),t[1]-t[0]),P=t[1]-1,b=I.getWidth()}const H=this._isCellInSelection(M,t),F=i&&M===a,W=T&&M>=f&&M<=p;let U=!1;this._decorationService.forEachDecorationAtCell(M,t,void 0,(e=>{U=!0}));let N=I.getChars()||o.WHITESPACE_CELL_CHAR;if(\" \"===N&&(I.isUnderline()||I.isOverline())&&(N=\" \"),A=b*l-_.get(N,I.isBold(),I.isItalic()),C){if(w&&(H&&x||!H&&!x&&I.bg===E)&&(H&&x&&S.selectionForeground||I.fg===k)&&I.extended.ext===L&&W===D&&A===R&&!F&&!O&&!U){I.isInvisible()?y+=o.WHITESPACE_CELL_CHAR:y+=N,w++;continue}w&&(C.textContent=y),C=this._document.createElement(\"span\"),w=0,y=\"\"}else C=this._document.createElement(\"span\");if(E=I.bg,k=I.fg,L=I.extended.ext,D=W,R=A,x=H,O&&a>=M&&a<=P&&(a=M),!this._coreService.isCursorHidden&&F&&this._coreService.isCursorInitialized)if(B.push(\"xterm-cursor\"),this._coreBrowserService.isFocused)h&&B.push(\"xterm-cursor-blink\"),B.push(\"bar\"===s?\"xterm-cursor-bar\":\"underline\"===s?\"xterm-cursor-underline\":\"xterm-cursor-block\");else if(r)switch(r){case\"outline\":B.push(\"xterm-cursor-outline\");break;case\"block\":B.push(\"xterm-cursor-block\");break;case\"bar\":B.push(\"xterm-cursor-bar\");break;case\"underline\":B.push(\"xterm-cursor-underline\")}if(I.isBold()&&B.push(\"xterm-bold\"),I.isItalic()&&B.push(\"xterm-italic\"),I.isDim()&&B.push(\"xterm-dim\"),y=I.isInvisible()?o.WHITESPACE_CELL_CHAR:I.getChars()||o.WHITESPACE_CELL_CHAR,I.isUnderline()&&(B.push(`xterm-underline-${I.extended.underlineStyle}`),\" \"===y&&(y=\" \"),!I.isUnderlineColorDefault()))if(I.isUnderlineColorRGB())C.style.textDecorationColor=`rgb(${u.AttributeData.toColorRGB(I.getUnderlineColor()).join(\",\")})`;else{let e=I.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&I.isBold()&&e<8&&(e+=8),C.style.textDecorationColor=S.ansi[e].css}I.isOverline()&&(B.push(\"xterm-overline\"),\" \"===y&&(y=\" \")),I.isStrikethrough()&&B.push(\"xterm-strikethrough\"),W&&(C.style.textDecoration=\"underline\");let $=I.getFgColor(),j=I.getFgColorMode(),z=I.getBgColor(),K=I.getBgColorMode();const q=!!I.isInverse();if(q){const e=$;$=z,z=e;const t=j;j=K,K=t}let V,G,X,J=!1;switch(this._decorationService.forEachDecorationAtCell(M,t,void 0,(e=>{\"top\"!==e.options.layer&&J||(e.backgroundColorRGB&&(K=50331648,z=e.backgroundColorRGB.rgba>>8&16777215,V=e.backgroundColorRGB),e.foregroundColorRGB&&(j=50331648,$=e.foregroundColorRGB.rgba>>8&16777215,G=e.foregroundColorRGB),J=\"top\"===e.options.layer)})),!J&&H&&(V=this._coreBrowserService.isFocused?S.selectionBackgroundOpaque:S.selectionInactiveBackgroundOpaque,z=V.rgba>>8&16777215,K=50331648,J=!0,S.selectionForeground&&(j=50331648,$=S.selectionForeground.rgba>>8&16777215,G=S.selectionForeground)),J&&B.push(\"xterm-decoration-top\"),K){case 16777216:case 33554432:X=S.ansi[z],B.push(`xterm-bg-${z}`);break;case 50331648:X=c.channels.toColor(z>>16,z>>8&255,255&z),this._addStyle(C,`background-color:#${v((z>>>0).toString(16),\"0\",6)}`);break;default:q?(X=S.foreground,B.push(`xterm-bg-${n.INVERTED_DEFAULT_COLOR}`)):X=S.background}switch(V||I.isDim()&&(V=c.color.multiplyOpacity(X,.5)),j){case 16777216:case 33554432:I.isBold()&&$<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&($+=8),this._applyMinimumContrast(C,X,S.ansi[$],I,V,void 0)||B.push(`xterm-fg-${$}`);break;case 50331648:const e=c.channels.toColor($>>16&255,$>>8&255,255&$);this._applyMinimumContrast(C,X,e,I,V,G)||this._addStyle(C,`color:#${v($.toString(16),\"0\",6)}`);break;default:this._applyMinimumContrast(C,X,S.foreground,I,V,G)||q&&B.push(`xterm-fg-${n.INVERTED_DEFAULT_COLOR}`)}B.length&&(C.className=B.join(\" \"),B.length=0),F||O||U?C.textContent=y:w++,A!==this.defaultSpacing&&(C.style.letterSpacing=`${A}px`),g.push(C),M=P}return C&&w&&(C.textContent=y),g}_applyMinimumContrast(e,t,i,s,r,n){if(1===this._optionsService.rawOptions.minimumContrastRatio||(0,_.treatGlyphAsBackgroundColor)(s.getCode()))return!1;const o=this._getContrastCache(s);let a;if(r||n||(a=o.getColor(t.rgba,i.rgba)),void 0===a){const e=this._optionsService.rawOptions.minimumContrastRatio/(s.isDim()?2:1);a=c.color.ensureContrastRatio(r||t,n||i,e),o.setColor((r||t).rgba,(n||i).rgba,a??null)}return!!a&&(this._addStyle(e,`color:${a.css}`),!0)}_getContrastCache(e){return e.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(e,t){e.setAttribute(\"style\",`${e.getAttribute(\"style\")||\"\"}${t};`)}_isCellInSelection(e,t){const i=this._selectionStart,s=this._selectionEnd;return!(!i||!s)&&(this._columnSelectMode?i[0]<=s[0]?e>=i[0]&&t>=i[1]&&e=i[1]&&e>=s[0]&&t<=s[1]:t>i[1]&&t=i[0]&&e=i[0])}};function v(e,t,i){for(;e.length{Object.defineProperty(t,\"__esModule\",{value:!0}),t.WidthCache=void 0,t.WidthCache=class{constructor(e,t){this._flat=new Float32Array(256),this._font=\"\",this._fontSize=0,this._weight=\"normal\",this._weightBold=\"bold\",this._measureElements=[],this._container=e.createElement(\"div\"),this._container.classList.add(\"xterm-width-cache-measure-container\"),this._container.setAttribute(\"aria-hidden\",\"true\"),this._container.style.whiteSpace=\"pre\",this._container.style.fontKerning=\"none\";const i=e.createElement(\"span\");i.classList.add(\"xterm-char-measure-element\");const s=e.createElement(\"span\");s.classList.add(\"xterm-char-measure-element\"),s.style.fontWeight=\"bold\";const r=e.createElement(\"span\");r.classList.add(\"xterm-char-measure-element\"),r.style.fontStyle=\"italic\";const n=e.createElement(\"span\");n.classList.add(\"xterm-char-measure-element\"),n.style.fontWeight=\"bold\",n.style.fontStyle=\"italic\",this._measureElements=[i,s,r,n],this._container.appendChild(i),this._container.appendChild(s),this._container.appendChild(r),this._container.appendChild(n),t.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(e,t,i,s){e===this._font&&t===this._fontSize&&i===this._weight&&s===this._weightBold||(this._font=e,this._fontSize=t,this._weight=i,this._weightBold=s,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${i}`,this._measureElements[1].style.fontWeight=`${s}`,this._measureElements[2].style.fontWeight=`${i}`,this._measureElements[3].style.fontWeight=`${s}`,this.clear())}get(e,t,i){let s=0;if(!t&&!i&&1===e.length&&(s=e.charCodeAt(0))<256){if(-9999!==this._flat[s])return this._flat[s];const t=this._measure(e,0);return t>0&&(this._flat[s]=t),t}let r=e;t&&(r+=\"B\"),i&&(r+=\"I\");let n=this._holey.get(r);if(void 0===n){let s=0;t&&(s|=1),i&&(s|=2),n=this._measure(e,s),n>0&&this._holey.set(r,n)}return n}_measure(e,t){const i=this._measureElements[t];return i.textContent=e.repeat(32),i.offsetWidth/32}}},2223:(e,t,i)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.TEXT_BASELINE=t.DIM_OPACITY=t.INVERTED_DEFAULT_COLOR=void 0;const s=i(6114);t.INVERTED_DEFAULT_COLOR=257,t.DIM_OPACITY=.5,t.TEXT_BASELINE=s.isFirefox||s.isLegacyEdge?\"bottom\":\"ideographic\"},6171:(e,t)=>{function i(e){return 57508<=e&&e<=57558}function s(e){return e>=128512&&e<=128591||e>=127744&&e<=128511||e>=128640&&e<=128767||e>=9728&&e<=9983||e>=9984&&e<=10175||e>=65024&&e<=65039||e>=129280&&e<=129535||e>=127462&&e<=127487}Object.defineProperty(t,\"__esModule\",{value:!0}),t.computeNextVariantOffset=t.createRenderDimensions=t.treatGlyphAsBackgroundColor=t.allowRescaling=t.isEmoji=t.isRestrictedPowerlineGlyph=t.isPowerlineGlyph=t.throwIfFalsy=void 0,t.throwIfFalsy=function(e){if(!e)throw new Error(\"value must not be falsy\");return e},t.isPowerlineGlyph=i,t.isRestrictedPowerlineGlyph=function(e){return 57520<=e&&e<=57527},t.isEmoji=s,t.allowRescaling=function(e,t,r,n){return 1===t&&r>Math.ceil(1.5*n)&&void 0!==e&&e>255&&!s(e)&&!i(e)&&!function(e){return 57344<=e&&e<=63743}(e)},t.treatGlyphAsBackgroundColor=function(e){return i(e)||function(e){return 9472<=e&&e<=9631}(e)},t.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},t.computeNextVariantOffset=function(e,t,i=0){return(e-(2*Math.round(t)-i))%(2*Math.round(t))}},6052:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.createSelectionRenderModel=void 0;class i{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(e,t,i,s=!1){if(this.selectionStart=t,this.selectionEnd=i,!t||!i||t[0]===i[0]&&t[1]===i[1])return void this.clear();const r=e.buffers.active.ydisp,n=t[1]-r,o=i[1]-r,a=Math.max(n,0),h=Math.min(o,e.rows-1);a>=e.rows||h<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=s,this.viewportStartRow=n,this.viewportEndRow=o,this.viewportCappedStartRow=a,this.viewportCappedEndRow=h,this.startCol=t[0],this.endCol=i[0])}isCellSelected(e,t,i){return!!this.hasSelection&&(i-=e.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?t>=this.startCol&&i>=this.viewportCappedStartRow&&t=this.viewportCappedStartRow&&t>=this.endCol&&i<=this.viewportCappedEndRow:i>this.viewportStartRow&&i=this.startCol&&t=this.startCol)}}t.createSelectionRenderModel=function(){return new i}},456:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.SelectionModel=void 0,t.SelectionModel=class{constructor(e){this._bufferService=e,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?e%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)-1]:[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[Math.max(e,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const e=this.selectionStart,t=this.selectionEnd;return!(!e||!t)&&(e[1]>t[1]||e[1]===t[1]&&e[0]>t[0])}handleTrim(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(n<3?r(o):n>3?r(t,i,o):r(t,i))||o);return n>3&&o&&Object.defineProperty(t,i,o),o},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.CharSizeService=void 0;const n=i(2585),o=i(8460),a=i(844);let h=t.CharSizeService=class extends a.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(e,t,i){super(),this._optionsService=i,this.width=0,this.height=0,this._onCharSizeChange=this.register(new o.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new d(this._optionsService))}catch{this._measureStrategy=this.register(new l(e,t,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange([\"fontFamily\",\"fontSize\"],(()=>this.measure())))}measure(){const e=this._measureStrategy.measure();e.width===this.width&&e.height===this.height||(this.width=e.width,this.height=e.height,this._onCharSizeChange.fire())}};t.CharSizeService=h=s([r(2,n.IOptionsService)],h);class c extends a.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(e,t){void 0!==e&&e>0&&void 0!==t&&t>0&&(this._result.width=e,this._result.height=t)}}class l extends c{constructor(e,t,i){super(),this._document=e,this._parentElement=t,this._optionsService=i,this._measureElement=this._document.createElement(\"span\"),this._measureElement.classList.add(\"xterm-char-measure-element\"),this._measureElement.textContent=\"W\".repeat(32),this._measureElement.setAttribute(\"aria-hidden\",\"true\"),this._measureElement.style.whiteSpace=\"pre\",this._measureElement.style.fontKerning=\"none\",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class d extends c{constructor(e){super(),this._optionsService=e,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext(\"2d\");const t=this._ctx.measureText(\"W\");if(!(\"width\"in t&&\"fontBoundingBoxAscent\"in t&&\"fontBoundingBoxDescent\"in t))throw new Error(\"Required font metrics not supported\")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const e=this._ctx.measureText(\"W\");return this._validateAndSet(e.width,e.fontBoundingBoxAscent+e.fontBoundingBoxDescent),this._result}}},4269:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(n<3?r(o):n>3?r(t,i,o):r(t,i))||o);return n>3&&o&&Object.defineProperty(t,i,o),o},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.CharacterJoinerService=t.JoinedCellData=void 0;const n=i(3734),o=i(643),a=i(511),h=i(2585);class c extends n.AttributeData{constructor(e,t,i){super(),this.content=0,this.combinedData=\"\",this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=i}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw new Error(\"not implemented\")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}t.JoinedCellData=c;let l=t.CharacterJoinerService=class e{constructor(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new a.CellData}register(e){const t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id}deregister(e){for(let t=0;t1){const e=this._getJoinedRanges(s,a,n,t,r);for(let t=0;t1){const e=this._getJoinedRanges(s,a,n,t,r);for(let t=0;t{Object.defineProperty(t,\"__esModule\",{value:!0}),t.CoreBrowserService=void 0;const s=i(844),r=i(8460),n=i(3656);class o extends s.Disposable{constructor(e,t,i){super(),this._textarea=e,this._window=t,this.mainDocument=i,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new a(this._window),this._onDprChange=this.register(new r.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new r.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((e=>this._screenDprMonitor.setWindow(e)))),this.register((0,r.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener(\"focus\",(()=>this._isFocused=!0)),this._textarea.addEventListener(\"blur\",(()=>this._isFocused=!1))}get window(){return this._window}set window(e){this._window!==e&&(this._window=e,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return void 0===this._cachedIsFocused&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}t.CoreBrowserService=o;class a extends s.Disposable{constructor(e){super(),this._parentWindow=e,this._windowResizeListener=this.register(new s.MutableDisposable),this._onDprChange=this.register(new r.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,s.toDisposable)((()=>this.clearListener())))}setWindow(e){this._parentWindow=e,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,n.addDisposableDomListener)(this._parentWindow,\"resize\",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){this._outerListener&&(this._resolutionMediaMatchList?.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(e,t,i)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.LinkProviderService=void 0;const s=i(844);class r extends s.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,s.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(e){return this.linkProviders.push(e),{dispose:()=>{const t=this.linkProviders.indexOf(e);-1!==t&&this.linkProviders.splice(t,1)}}}}t.LinkProviderService=r},8934:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(n<3?r(o):n>3?r(t,i,o):r(t,i))||o);return n>3&&o&&Object.defineProperty(t,i,o),o},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.MouseService=void 0;const n=i(4725),o=i(9806);let a=t.MouseService=class{constructor(e,t){this._renderService=e,this._charSizeService=t}getCoords(e,t,i,s,r){return(0,o.getCoords)(window,e,t,i,s,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,r)}getMouseReportCoords(e,t){const i=(0,o.getCoordsRelativeToElement)(window,e,t);if(this._charSizeService.hasValidSize)return i[0]=Math.min(Math.max(i[0],0),this._renderService.dimensions.css.canvas.width-1),i[1]=Math.min(Math.max(i[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(i[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(i[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(i[0]),y:Math.floor(i[1])}}};t.MouseService=a=s([r(0,n.IRenderService),r(1,n.ICharSizeService)],a)},3230:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(n<3?r(o):n>3?r(t,i,o):r(t,i))||o);return n>3&&o&&Object.defineProperty(t,i,o),o},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.RenderService=void 0;const n=i(6193),o=i(4725),a=i(8460),h=i(844),c=i(7226),l=i(2585);let d=t.RenderService=class extends h.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(e,t,i,s,r,o,l,d){super(),this._rowCount=e,this._charSizeService=s,this._renderer=this.register(new h.MutableDisposable),this._pausedResizeTask=new c.DebouncedIdleTask,this._observerDisposable=this.register(new h.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new a.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new a.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new a.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new a.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new n.RenderDebouncer(((e,t)=>this._renderRows(e,t)),l),this.register(this._renderDebouncer),this.register(l.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(o.onResize((()=>this._fullRefresh()))),this.register(o.buffers.onBufferActivate((()=>this._renderer.value?.clear()))),this.register(i.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(r.onDecorationRegistered((()=>this._fullRefresh()))),this.register(r.onDecorationRemoved((()=>this._fullRefresh()))),this.register(i.onMultipleOptionChange([\"customGlyphs\",\"drawBoldTextInBrightColors\",\"letterSpacing\",\"lineHeight\",\"fontFamily\",\"fontSize\",\"fontWeight\",\"fontWeightBold\",\"minimumContrastRatio\",\"rescaleOverlappingGlyphs\"],(()=>{this.clear(),this.handleResize(o.cols,o.rows),this._fullRefresh()}))),this.register(i.onMultipleOptionChange([\"cursorBlink\",\"cursorStyle\"],(()=>this.refreshRows(o.buffer.y,o.buffer.y,!0)))),this.register(d.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(l.window,t),this.register(l.onWindowChange((e=>this._registerIntersectionObserver(e,t))))}_registerIntersectionObserver(e,t){if(\"IntersectionObserver\"in e){const i=new e.IntersectionObserver((e=>this._handleIntersectionChange(e[e.length-1])),{threshold:0});i.observe(t),this._observerDisposable.value=(0,h.toDisposable)((()=>i.disconnect()))}}_handleIntersectionChange(e){this._isPaused=void 0===e.isIntersecting?0===e.intersectionRatio:!e.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(e,t,i=!1){this._isPaused?this._needsFullRefresh=!0:(i||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(e,t,this._rowCount))}_renderRows(e,t){this._renderer.value&&(e=Math.min(e,this._rowCount-1),t=Math.min(t,this._rowCount-1),this._renderer.value.renderRows(e,t),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:e,end:t}),this._onRender.fire({start:e,end:t}),this._isNextRenderRedrawOnly=!0)}resize(e,t){this._rowCount=t,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(e){this._renderer.value=e,this._renderer.value&&(this._renderer.value.onRequestRedraw((e=>this.refreshRows(e.start,e.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(e){return this._renderDebouncer.addRefreshCallback(e)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){this._renderer.value&&(this._renderer.value.clearTextureAtlas?.(),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(e,t){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>this._renderer.value?.handleResize(e,t))):this._renderer.value.handleResize(e,t),this._fullRefresh())}handleCharSizeChanged(){this._renderer.value?.handleCharSizeChanged()}handleBlur(){this._renderer.value?.handleBlur()}handleFocus(){this._renderer.value?.handleFocus()}handleSelectionChanged(e,t,i){this._selectionState.start=e,this._selectionState.end=t,this._selectionState.columnSelectMode=i,this._renderer.value?.handleSelectionChanged(e,t,i)}handleCursorMove(){this._renderer.value?.handleCursorMove()}clear(){this._renderer.value?.clear()}};t.RenderService=d=s([r(2,l.IOptionsService),r(3,o.ICharSizeService),r(4,l.IDecorationService),r(5,l.IBufferService),r(6,o.ICoreBrowserService),r(7,o.IThemeService)],d)},9312:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(n<3?r(o):n>3?r(t,i,o):r(t,i))||o);return n>3&&o&&Object.defineProperty(t,i,o),o},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.SelectionService=void 0;const n=i(9806),o=i(9504),a=i(456),h=i(4725),c=i(8460),l=i(844),d=i(6114),_=i(4841),u=i(511),f=i(2585),v=String.fromCharCode(160),p=new RegExp(v,\"g\");let g=t.SelectionService=class extends l.Disposable{constructor(e,t,i,s,r,n,o,h,d){super(),this._element=e,this._screenElement=t,this._linkifier=i,this._bufferService=s,this._coreService=r,this._mouseService=n,this._optionsService=o,this._renderService=h,this._coreBrowserService=d,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new u.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new c.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new c.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new c.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new c.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=e=>this._handleMouseMove(e),this._mouseUpListener=e=>this._handleMouseUp(e),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((e=>this._handleTrim(e))),this.register(this._bufferService.buffers.onBufferActivate((e=>this._handleBufferActivate(e)))),this.enable(),this._model=new a.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,l.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;return!(!e||!t||e[0]===t[0]&&e[1]===t[1])}get selectionText(){const e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;if(!e||!t)return\"\";const i=this._bufferService.buffer,s=[];if(3===this._activeSelectionMode){if(e[0]===t[0])return\"\";const r=e[0]e.replace(p,\" \"))).join(d.isWindows?\"\\r\\n\":\"\\n\")}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(e){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),d.isLinux&&e&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:3===this._activeSelectionMode})}_isClickInSelection(e){const t=this._getMouseBufferCoords(e),i=this._model.finalSelectionStart,s=this._model.finalSelectionEnd;return!!(i&&s&&t)&&this._areCoordsInSelection(t,i,s)}isCellInSelection(e,t){const i=this._model.finalSelectionStart,s=this._model.finalSelectionEnd;return!(!i||!s)&&this._areCoordsInSelection([e,t],i,s)}_areCoordsInSelection(e,t,i){return e[1]>t[1]&&e[1]=t[0]&&e[0]=t[0]}_selectWordAtCursor(e,t){const i=this._linkifier.currentLink?.link?.range;if(i)return this._model.selectionStart=[i.start.x-1,i.start.y-1],this._model.selectionStartLength=(0,_.getRangeLength)(i,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const s=this._getMouseBufferCoords(e);return!!s&&(this._selectWordAt(s,t),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()}_handleTrim(e){this._model.handleTrim(e)&&this.refresh()}_getMouseBufferCoords(e){const t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(t)return t[0]--,t[1]--,t[1]+=this._bufferService.buffer.ydisp,t}_getMouseEventScrollAmount(e){let t=(0,n.getCoordsRelativeToElement)(this._coreBrowserService.window,e,this._screenElement)[1];const i=this._renderService.dimensions.css.canvas.height;return t>=0&&t<=i?0:(t>i&&(t-=i),t=Math.min(Math.max(t,-50),50),t/=50,t/Math.abs(t)+Math.round(14*t))}shouldForceSelection(e){return d.isMac?e.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:e.shiftKey}handleMouseDown(e){if(this._mouseDownTimeStamp=e.timeStamp,(2!==e.button||!this.hasSelection)&&0===e.button){if(!this._enabled){if(!this.shouldForceSelection(e))return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._handleIncrementalClick(e):1===e.detail?this._handleSingleClick(e):2===e.detail?this._handleDoubleClick(e):3===e.detail&&this._handleTripleClick(e),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener(\"mousemove\",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener(\"mouseup\",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener(\"mousemove\",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener(\"mouseup\",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))}_handleSingleClick(e){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(e)?3:0,this._model.selectionStart=this._getMouseBufferCoords(e),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const t=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);t&&t.length!==this._model.selectionStart[0]&&0===t.hasWidth(this._model.selectionStart[0])&&this._model.selectionStart[0]++}_handleDoubleClick(e){this._selectWordAtCursor(e,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(e){const t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=2,this._selectLineAt(t[1]))}shouldColumnSelect(e){return e.altKey&&!(d.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(e){if(e.stopImmediatePropagation(),!this._model.selectionStart)return;const t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),!this._model.selectionEnd)return void this.refresh(!0);2===this._activeSelectionMode?this._model.selectionEnd[1]0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const i=this._bufferService.buffer;if(this._model.selectionEnd[1]0?(3!==this._activeSelectionMode&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(e.ydisp+this._bufferService.rows,e.lines.length-1)):(3!==this._activeSelectionMode&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=e.ydisp),this.refresh()}}_handleMouseUp(e){const t=e.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&t<500&&e.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const t=this._mouseService.getCoords(e,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(t&&void 0!==t[0]&&void 0!==t[1]){const e=(0,o.moveToCellSequence)(t[0]-1,t[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(e,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd,i=!(!e||!t||e[0]===t[0]&&e[1]===t[1]);i?e&&t&&(this._oldSelectionStart&&this._oldSelectionEnd&&e[0]===this._oldSelectionStart[0]&&e[1]===this._oldSelectionStart[1]&&t[0]===this._oldSelectionEnd[0]&&t[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(e,t,i)):this._oldHasSelection&&this._fireOnSelectionChange(e,t,i)}_fireOnSelectionChange(e,t,i){this._oldSelectionStart=e,this._oldSelectionEnd=t,this._oldHasSelection=i,this._onSelectionChange.fire()}_handleBufferActivate(e){this.clearSelection(),this._trimListener.dispose(),this._trimListener=e.activeBuffer.lines.onTrim((e=>this._handleTrim(e)))}_convertViewportColToCharacterIndex(e,t){let i=t;for(let s=0;t>=s;s++){const r=e.loadCell(s,this._workCell).getChars().length;0===this._workCell.getWidth()?i--:r>1&&t!==s&&(i+=r-1)}return i}setSelection(e,t,i){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[e,t],this._model.selectionStartLength=i,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(e){this._isClickInSelection(e)||(this._selectWordAtCursor(e,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(e,t,i=!0,s=!0){if(e[0]>=this._bufferService.cols)return;const r=this._bufferService.buffer,n=r.lines.get(e[1]);if(!n)return;const o=r.translateBufferLineToString(e[1],!1);let a=this._convertViewportColToCharacterIndex(n,e[0]),h=a;const c=e[0]-a;let l=0,d=0,_=0,u=0;if(\" \"===o.charAt(a)){for(;a>0&&\" \"===o.charAt(a-1);)a--;for(;h1&&(u+=s-1,h+=s-1);t>0&&a>0&&!this._isCharWordSeparator(n.loadCell(t-1,this._workCell));){n.loadCell(t-1,this._workCell);const e=this._workCell.getChars().length;0===this._workCell.getWidth()?(l++,t--):e>1&&(_+=e-1,a-=e-1),a--,t--}for(;i1&&(u+=e-1,h+=e-1),h++,i++}}h++;let f=a+c-l+_,v=Math.min(this._bufferService.cols,h-a+l+d-_-u);if(t||\"\"!==o.slice(a,h).trim()){if(i&&0===f&&32!==n.getCodePoint(0)){const t=r.lines.get(e[1]-1);if(t&&n.isWrapped&&32!==t.getCodePoint(this._bufferService.cols-1)){const t=this._getWordAt([this._bufferService.cols-1,e[1]-1],!1,!0,!1);if(t){const e=this._bufferService.cols-t.start;f-=e,v+=e}}}if(s&&f+v===this._bufferService.cols&&32!==n.getCodePoint(this._bufferService.cols-1)){const t=r.lines.get(e[1]+1);if(t?.isWrapped&&32!==t.getCodePoint(0)){const t=this._getWordAt([0,e[1]+1],!1,!1,!0);t&&(v+=t.length)}}return{start:f,length:v}}}_selectWordAt(e,t){const i=this._getWordAt(e,t);if(i){for(;i.start<0;)i.start+=this._bufferService.cols,e[1]--;this._model.selectionStart=[i.start,e[1]],this._model.selectionStartLength=i.length}}_selectToWordAt(e){const t=this._getWordAt(e,!0);if(t){let i=e[1];for(;t.start<0;)t.start+=this._bufferService.cols,i--;if(!this._model.areSelectionValuesReversed())for(;t.start+t.length>this._bufferService.cols;)t.length-=this._bufferService.cols,i++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,i]}}_isCharWordSeparator(e){return 0!==e.getWidth()&&this._optionsService.rawOptions.wordSeparator.indexOf(e.getChars())>=0}_selectLineAt(e){const t=this._bufferService.buffer.getWrappedRangeForLine(e),i={start:{x:0,y:t.first},end:{x:this._bufferService.cols-1,y:t.last}};this._model.selectionStart=[0,t.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,_.getRangeLength)(i,this._bufferService.cols)}};t.SelectionService=g=s([r(3,f.IBufferService),r(4,f.ICoreService),r(5,h.IMouseService),r(6,f.IOptionsService),r(7,h.IRenderService),r(8,h.ICoreBrowserService)],g)},4725:(e,t,i)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.ILinkProviderService=t.IThemeService=t.ICharacterJoinerService=t.ISelectionService=t.IRenderService=t.IMouseService=t.ICoreBrowserService=t.ICharSizeService=void 0;const s=i(8343);t.ICharSizeService=(0,s.createDecorator)(\"CharSizeService\"),t.ICoreBrowserService=(0,s.createDecorator)(\"CoreBrowserService\"),t.IMouseService=(0,s.createDecorator)(\"MouseService\"),t.IRenderService=(0,s.createDecorator)(\"RenderService\"),t.ISelectionService=(0,s.createDecorator)(\"SelectionService\"),t.ICharacterJoinerService=(0,s.createDecorator)(\"CharacterJoinerService\"),t.IThemeService=(0,s.createDecorator)(\"ThemeService\"),t.ILinkProviderService=(0,s.createDecorator)(\"LinkProviderService\")},6731:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(n<3?r(o):n>3?r(t,i,o):r(t,i))||o);return n>3&&o&&Object.defineProperty(t,i,o),o},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.ThemeService=t.DEFAULT_ANSI_COLORS=void 0;const n=i(7239),o=i(8055),a=i(8460),h=i(844),c=i(2585),l=o.css.toColor(\"#ffffff\"),d=o.css.toColor(\"#000000\"),_=o.css.toColor(\"#ffffff\"),u=o.css.toColor(\"#000000\"),f={css:\"rgba(255, 255, 255, 0.3)\",rgba:4294967117};t.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const e=[o.css.toColor(\"#2e3436\"),o.css.toColor(\"#cc0000\"),o.css.toColor(\"#4e9a06\"),o.css.toColor(\"#c4a000\"),o.css.toColor(\"#3465a4\"),o.css.toColor(\"#75507b\"),o.css.toColor(\"#06989a\"),o.css.toColor(\"#d3d7cf\"),o.css.toColor(\"#555753\"),o.css.toColor(\"#ef2929\"),o.css.toColor(\"#8ae234\"),o.css.toColor(\"#fce94f\"),o.css.toColor(\"#729fcf\"),o.css.toColor(\"#ad7fa8\"),o.css.toColor(\"#34e2e2\"),o.css.toColor(\"#eeeeec\")],t=[0,95,135,175,215,255];for(let i=0;i<216;i++){const s=t[i/36%6|0],r=t[i/6%6|0],n=t[i%6];e.push({css:o.channels.toCss(s,r,n),rgba:o.channels.toRgba(s,r,n)})}for(let t=0;t<24;t++){const i=8+10*t;e.push({css:o.channels.toCss(i,i,i),rgba:o.channels.toRgba(i,i,i)})}return e})());let v=t.ThemeService=class extends h.Disposable{get colors(){return this._colors}constructor(e){super(),this._optionsService=e,this._contrastCache=new n.ColorContrastCache,this._halfContrastCache=new n.ColorContrastCache,this._onChangeColors=this.register(new a.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:l,background:d,cursor:_,cursorAccent:u,selectionForeground:void 0,selectionBackgroundTransparent:f,selectionBackgroundOpaque:o.color.blend(d,f),selectionInactiveBackgroundTransparent:f,selectionInactiveBackgroundOpaque:o.color.blend(d,f),ansi:t.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange(\"minimumContrastRatio\",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange(\"theme\",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(e={}){const i=this._colors;if(i.foreground=p(e.foreground,l),i.background=p(e.background,d),i.cursor=p(e.cursor,_),i.cursorAccent=p(e.cursorAccent,u),i.selectionBackgroundTransparent=p(e.selectionBackground,f),i.selectionBackgroundOpaque=o.color.blend(i.background,i.selectionBackgroundTransparent),i.selectionInactiveBackgroundTransparent=p(e.selectionInactiveBackground,i.selectionBackgroundTransparent),i.selectionInactiveBackgroundOpaque=o.color.blend(i.background,i.selectionInactiveBackgroundTransparent),i.selectionForeground=e.selectionForeground?p(e.selectionForeground,o.NULL_COLOR):void 0,i.selectionForeground===o.NULL_COLOR&&(i.selectionForeground=void 0),o.color.isOpaque(i.selectionBackgroundTransparent)){const e=.3;i.selectionBackgroundTransparent=o.color.opacity(i.selectionBackgroundTransparent,e)}if(o.color.isOpaque(i.selectionInactiveBackgroundTransparent)){const e=.3;i.selectionInactiveBackgroundTransparent=o.color.opacity(i.selectionInactiveBackgroundTransparent,e)}if(i.ansi=t.DEFAULT_ANSI_COLORS.slice(),i.ansi[0]=p(e.black,t.DEFAULT_ANSI_COLORS[0]),i.ansi[1]=p(e.red,t.DEFAULT_ANSI_COLORS[1]),i.ansi[2]=p(e.green,t.DEFAULT_ANSI_COLORS[2]),i.ansi[3]=p(e.yellow,t.DEFAULT_ANSI_COLORS[3]),i.ansi[4]=p(e.blue,t.DEFAULT_ANSI_COLORS[4]),i.ansi[5]=p(e.magenta,t.DEFAULT_ANSI_COLORS[5]),i.ansi[6]=p(e.cyan,t.DEFAULT_ANSI_COLORS[6]),i.ansi[7]=p(e.white,t.DEFAULT_ANSI_COLORS[7]),i.ansi[8]=p(e.brightBlack,t.DEFAULT_ANSI_COLORS[8]),i.ansi[9]=p(e.brightRed,t.DEFAULT_ANSI_COLORS[9]),i.ansi[10]=p(e.brightGreen,t.DEFAULT_ANSI_COLORS[10]),i.ansi[11]=p(e.brightYellow,t.DEFAULT_ANSI_COLORS[11]),i.ansi[12]=p(e.brightBlue,t.DEFAULT_ANSI_COLORS[12]),i.ansi[13]=p(e.brightMagenta,t.DEFAULT_ANSI_COLORS[13]),i.ansi[14]=p(e.brightCyan,t.DEFAULT_ANSI_COLORS[14]),i.ansi[15]=p(e.brightWhite,t.DEFAULT_ANSI_COLORS[15]),e.extendedAnsi){const s=Math.min(i.ansi.length-16,e.extendedAnsi.length);for(let r=0;r{Object.defineProperty(t,\"__esModule\",{value:!0}),t.CircularList=void 0;const s=i(8460),r=i(844);class n extends r.Disposable{constructor(e){super(),this._maxLength=e,this.onDeleteEmitter=this.register(new s.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new s.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new s.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(e){if(this._maxLength===e)return;const t=new Array(e);for(let i=0;ithis._length)for(let t=this._length;t=e;t--)this._array[this._getCyclicIndex(t+i.length)]=this._array[this._getCyclicIndex(t)];for(let t=0;tthis._maxLength){const e=this._length+i.length-this._maxLength;this._startIndex+=e,this._length=this._maxLength,this.onTrimEmitter.fire(e)}else this._length+=i.length}trimStart(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.onTrimEmitter.fire(e)}shiftElements(e,t,i){if(!(t<=0)){if(e<0||e>=this._length)throw new Error(\"start argument out of range\");if(e+i<0)throw new Error(\"Cannot shift elements in list beyond index 0\");if(i>0){for(let s=t-1;s>=0;s--)this.set(e+s+i,this.get(e+s));const s=e+t+i-this._length;if(s>0)for(this._length+=s;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let s=0;s{Object.defineProperty(t,\"__esModule\",{value:!0}),t.clone=void 0,t.clone=function e(t,i=5){if(\"object\"!=typeof t)return t;const s=Array.isArray(t)?[]:{};for(const r in t)s[r]=i<=1?t[r]:t[r]&&e(t[r],i-1);return s}},8055:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.contrastRatio=t.toPaddedHex=t.rgba=t.rgb=t.css=t.color=t.channels=t.NULL_COLOR=void 0;let i=0,s=0,r=0,n=0;var o,a,h,c,l;function d(e){const t=e.toString(16);return t.length<2?\"0\"+t:t}function _(e,t){return e>>0},e.toColor=function(t,i,s,r){return{css:e.toCss(t,i,s,r),rgba:e.toRgba(t,i,s,r)}}}(o||(t.channels=o={})),function(e){function t(e,t){return n=Math.round(255*t),[i,s,r]=l.toChannels(e.rgba),{css:o.toCss(i,s,r,n),rgba:o.toRgba(i,s,r,n)}}e.blend=function(e,t){if(n=(255&t.rgba)/255,1===n)return{css:t.css,rgba:t.rgba};const a=t.rgba>>24&255,h=t.rgba>>16&255,c=t.rgba>>8&255,l=e.rgba>>24&255,d=e.rgba>>16&255,_=e.rgba>>8&255;return i=l+Math.round((a-l)*n),s=d+Math.round((h-d)*n),r=_+Math.round((c-_)*n),{css:o.toCss(i,s,r),rgba:o.toRgba(i,s,r)}},e.isOpaque=function(e){return 255==(255&e.rgba)},e.ensureContrastRatio=function(e,t,i){const s=l.ensureContrastRatio(e.rgba,t.rgba,i);if(s)return o.toColor(s>>24&255,s>>16&255,s>>8&255)},e.opaque=function(e){const t=(255|e.rgba)>>>0;return[i,s,r]=l.toChannels(t),{css:o.toCss(i,s,r),rgba:t}},e.opacity=t,e.multiplyOpacity=function(e,i){return n=255&e.rgba,t(e,n*i/255)},e.toColorRGB=function(e){return[e.rgba>>24&255,e.rgba>>16&255,e.rgba>>8&255]}}(a||(t.color=a={})),function(e){let t,a;try{const e=document.createElement(\"canvas\");e.width=1,e.height=1;const i=e.getContext(\"2d\",{willReadFrequently:!0});i&&(t=i,t.globalCompositeOperation=\"copy\",a=t.createLinearGradient(0,0,1,1))}catch{}e.toColor=function(e){if(e.match(/#[\\da-f]{3,8}/i))switch(e.length){case 4:return i=parseInt(e.slice(1,2).repeat(2),16),s=parseInt(e.slice(2,3).repeat(2),16),r=parseInt(e.slice(3,4).repeat(2),16),o.toColor(i,s,r);case 5:return i=parseInt(e.slice(1,2).repeat(2),16),s=parseInt(e.slice(2,3).repeat(2),16),r=parseInt(e.slice(3,4).repeat(2),16),n=parseInt(e.slice(4,5).repeat(2),16),o.toColor(i,s,r,n);case 7:return{css:e,rgba:(parseInt(e.slice(1),16)<<8|255)>>>0};case 9:return{css:e,rgba:parseInt(e.slice(1),16)>>>0}}const h=e.match(/rgba?\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*(,\\s*(0|1|\\d?\\.(\\d+))\\s*)?\\)/);if(h)return i=parseInt(h[1]),s=parseInt(h[2]),r=parseInt(h[3]),n=Math.round(255*(void 0===h[5]?1:parseFloat(h[5]))),o.toColor(i,s,r,n);if(!t||!a)throw new Error(\"css.toColor: Unsupported css format\");if(t.fillStyle=a,t.fillStyle=e,\"string\"!=typeof t.fillStyle)throw new Error(\"css.toColor: Unsupported css format\");if(t.fillRect(0,0,1,1),[i,s,r,n]=t.getImageData(0,0,1,1).data,255!==n)throw new Error(\"css.toColor: Unsupported css format\");return{rgba:o.toRgba(i,s,r,n),css:e}}}(h||(t.css=h={})),function(e){function t(e,t,i){const s=e/255,r=t/255,n=i/255;return.2126*(s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))}e.relativeLuminance=function(e){return t(e>>16&255,e>>8&255,255&e)},e.relativeLuminance2=t}(c||(t.rgb=c={})),function(e){function t(e,t,i){const s=e>>24&255,r=e>>16&255,n=e>>8&255;let o=t>>24&255,a=t>>16&255,h=t>>8&255,l=_(c.relativeLuminance2(o,a,h),c.relativeLuminance2(s,r,n));for(;l0||a>0||h>0);)o-=Math.max(0,Math.ceil(.1*o)),a-=Math.max(0,Math.ceil(.1*a)),h-=Math.max(0,Math.ceil(.1*h)),l=_(c.relativeLuminance2(o,a,h),c.relativeLuminance2(s,r,n));return(o<<24|a<<16|h<<8|255)>>>0}function a(e,t,i){const s=e>>24&255,r=e>>16&255,n=e>>8&255;let o=t>>24&255,a=t>>16&255,h=t>>8&255,l=_(c.relativeLuminance2(o,a,h),c.relativeLuminance2(s,r,n));for(;l>>0}e.blend=function(e,t){if(n=(255&t)/255,1===n)return t;const a=t>>24&255,h=t>>16&255,c=t>>8&255,l=e>>24&255,d=e>>16&255,_=e>>8&255;return i=l+Math.round((a-l)*n),s=d+Math.round((h-d)*n),r=_+Math.round((c-_)*n),o.toRgba(i,s,r)},e.ensureContrastRatio=function(e,i,s){const r=c.relativeLuminance(e>>8),n=c.relativeLuminance(i>>8);if(_(r,n)>8));if(o_(r,c.relativeLuminance(t>>8))?n:t}return n}const o=a(e,i,s),h=_(r,c.relativeLuminance(o>>8));if(h_(r,c.relativeLuminance(n>>8))?o:n}return o}},e.reduceLuminance=t,e.increaseLuminance=a,e.toChannels=function(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]}}(l||(t.rgba=l={})),t.toPaddedHex=d,t.contrastRatio=_},8969:(e,t,i)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.CoreTerminal=void 0;const s=i(844),r=i(2585),n=i(4348),o=i(7866),a=i(744),h=i(7302),c=i(6975),l=i(8460),d=i(1753),_=i(1480),u=i(7994),f=i(9282),v=i(5435),p=i(5981),g=i(2660);let m=!1;class S extends s.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new l.EventEmitter),this._onScroll.event((e=>{this._onScrollApi?.fire(e.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(e){for(const t in e)this.optionsService.options[t]=e[t]}constructor(e){super(),this._windowsWrappingHeuristics=this.register(new s.MutableDisposable),this._onBinary=this.register(new l.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new l.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new l.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new l.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new l.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new l.EventEmitter),this._instantiationService=new n.InstantiationService,this.optionsService=this.register(new h.OptionsService(e)),this._instantiationService.setService(r.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(a.BufferService)),this._instantiationService.setService(r.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(o.LogService)),this._instantiationService.setService(r.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(c.CoreService)),this._instantiationService.setService(r.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(d.CoreMouseService)),this._instantiationService.setService(r.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(_.UnicodeService)),this._instantiationService.setService(r.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(u.CharsetService),this._instantiationService.setService(r.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(g.OscLinkService),this._instantiationService.setService(r.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new v.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,l.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,l.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,l.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,l.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange([\"windowsMode\",\"windowsPty\"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((e=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll((e=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new p.WriteBuffer(((e,t)=>this._inputHandler.parse(e,t)))),this.register((0,l.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(e,t){this._writeBuffer.write(e,t)}writeSync(e,t){this._logService.logLevel<=r.LogLevelEnum.WARN&&!m&&(this._logService.warn(\"writeSync is unreliable and will be removed soon.\"),m=!0),this._writeBuffer.writeSync(e,t)}input(e,t=!0){this.coreService.triggerDataEvent(e,t)}resize(e,t){isNaN(e)||isNaN(t)||(e=Math.max(e,a.MINIMUM_COLS),t=Math.max(t,a.MINIMUM_ROWS),this._bufferService.resize(e,t))}scroll(e,t=!1){this._bufferService.scroll(e,t)}scrollLines(e,t,i){this._bufferService.scrollLines(e,t,i)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){const t=e-this._bufferService.buffer.ydisp;0!==t&&this.scrollLines(t)}registerEscHandler(e,t){return this._inputHandler.registerEscHandler(e,t)}registerDcsHandler(e,t){return this._inputHandler.registerDcsHandler(e,t)}registerCsiHandler(e,t){return this._inputHandler.registerCsiHandler(e,t)}registerOscHandler(e,t){return this._inputHandler.registerOscHandler(e,t)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let e=!1;const t=this.optionsService.rawOptions.windowsPty;t&&void 0!==t.buildNumber&&void 0!==t.buildNumber?e=!!(\"conpty\"===t.backend&&t.buildNumber<21376):this.optionsService.rawOptions.windowsMode&&(e=!0),e?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const e=[];e.push(this.onLineFeed(f.updateWindowsModeWrappedState.bind(null,this._bufferService))),e.push(this.registerCsiHandler({final:\"H\"},(()=>((0,f.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,s.toDisposable)((()=>{for(const t of e)t.dispose()}))}}}t.CoreTerminal=S},8460:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.runAndSubscribe=t.forwardEvent=t.EventEmitter=void 0,t.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=e=>(this._listeners.push(e),{dispose:()=>{if(!this._disposed)for(let t=0;tt.fire(e)))},t.runAndSubscribe=function(e,t){return t(void 0),e((e=>t(e)))}},5435:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(n<3?r(o):n>3?r(t,i,o):r(t,i))||o);return n>3&&o&&Object.defineProperty(t,i,o),o},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.InputHandler=t.WindowsOptionsReportType=void 0;const n=i(2584),o=i(7116),a=i(2015),h=i(844),c=i(482),l=i(8437),d=i(8460),_=i(643),u=i(511),f=i(3734),v=i(2585),p=i(1480),g=i(6242),m=i(6351),S=i(5941),C={\"(\":0,\")\":1,\"*\":2,\"+\":3,\"-\":1,\".\":2},b=131072;function w(e,t){if(e>24)return t.setWinLines||!1;switch(e){case 1:return!!t.restoreWin;case 2:return!!t.minimizeWin;case 3:return!!t.setWinPosition;case 4:return!!t.setWinSizePixels;case 5:return!!t.raiseWin;case 6:return!!t.lowerWin;case 7:return!!t.refreshWin;case 8:return!!t.setWinSizeChars;case 9:return!!t.maximizeWin;case 10:return!!t.fullscreenWin;case 11:return!!t.getWinState;case 13:return!!t.getWinPosition;case 14:return!!t.getWinSizePixels;case 15:return!!t.getScreenSizePixels;case 16:return!!t.getCellSizePixels;case 18:return!!t.getWinSizeChars;case 19:return!!t.getScreenSizeChars;case 20:return!!t.getIconTitle;case 21:return!!t.getWinTitle;case 22:return!!t.pushTitle;case 23:return!!t.popTitle;case 24:return!!t.setWinLines}return!1}var y;!function(e){e[e.GET_WIN_SIZE_PIXELS=0]=\"GET_WIN_SIZE_PIXELS\",e[e.GET_CELL_SIZE_PIXELS=1]=\"GET_CELL_SIZE_PIXELS\"}(y||(t.WindowsOptionsReportType=y={}));let E=0;class k extends h.Disposable{getAttrData(){return this._curAttrData}constructor(e,t,i,s,r,h,_,f,v=new a.EscapeSequenceParser){super(),this._bufferService=e,this._charsetService=t,this._coreService=i,this._logService=s,this._optionsService=r,this._oscLinkService=h,this._coreMouseService=_,this._unicodeService=f,this._parser=v,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new c.StringToUtf32,this._utf8Decoder=new c.Utf8ToUtf32,this._workCell=new u.CellData,this._windowTitle=\"\",this._iconName=\"\",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=l.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=l.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new d.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new d.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new d.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new d.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new d.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new d.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new d.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new d.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new d.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new d.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new d.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new d.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new d.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new L(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((e=>this._activeBuffer=e.activeBuffer))),this._parser.setCsiHandlerFallback(((e,t)=>{this._logService.debug(\"Unknown CSI code: \",{identifier:this._parser.identToString(e),params:t.toArray()})})),this._parser.setEscHandlerFallback((e=>{this._logService.debug(\"Unknown ESC code: \",{identifier:this._parser.identToString(e)})})),this._parser.setExecuteHandlerFallback((e=>{this._logService.debug(\"Unknown EXECUTE code: \",{code:e})})),this._parser.setOscHandlerFallback(((e,t,i)=>{this._logService.debug(\"Unknown OSC code: \",{identifier:e,action:t,data:i})})),this._parser.setDcsHandlerFallback(((e,t,i)=>{\"HOOK\"===t&&(i=i.toArray()),this._logService.debug(\"Unknown DCS code: \",{identifier:this._parser.identToString(e),action:t,payload:i})})),this._parser.setPrintHandler(((e,t,i)=>this.print(e,t,i))),this._parser.registerCsiHandler({final:\"@\"},(e=>this.insertChars(e))),this._parser.registerCsiHandler({intermediates:\" \",final:\"@\"},(e=>this.scrollLeft(e))),this._parser.registerCsiHandler({final:\"A\"},(e=>this.cursorUp(e))),this._parser.registerCsiHandler({intermediates:\" \",final:\"A\"},(e=>this.scrollRight(e))),this._parser.registerCsiHandler({final:\"B\"},(e=>this.cursorDown(e))),this._parser.registerCsiHandler({final:\"C\"},(e=>this.cursorForward(e))),this._parser.registerCsiHandler({final:\"D\"},(e=>this.cursorBackward(e))),this._parser.registerCsiHandler({final:\"E\"},(e=>this.cursorNextLine(e))),this._parser.registerCsiHandler({final:\"F\"},(e=>this.cursorPrecedingLine(e))),this._parser.registerCsiHandler({final:\"G\"},(e=>this.cursorCharAbsolute(e))),this._parser.registerCsiHandler({final:\"H\"},(e=>this.cursorPosition(e))),this._parser.registerCsiHandler({final:\"I\"},(e=>this.cursorForwardTab(e))),this._parser.registerCsiHandler({final:\"J\"},(e=>this.eraseInDisplay(e,!1))),this._parser.registerCsiHandler({prefix:\"?\",final:\"J\"},(e=>this.eraseInDisplay(e,!0))),this._parser.registerCsiHandler({final:\"K\"},(e=>this.eraseInLine(e,!1))),this._parser.registerCsiHandler({prefix:\"?\",final:\"K\"},(e=>this.eraseInLine(e,!0))),this._parser.registerCsiHandler({final:\"L\"},(e=>this.insertLines(e))),this._parser.registerCsiHandler({final:\"M\"},(e=>this.deleteLines(e))),this._parser.registerCsiHandler({final:\"P\"},(e=>this.deleteChars(e))),this._parser.registerCsiHandler({final:\"S\"},(e=>this.scrollUp(e))),this._parser.registerCsiHandler({final:\"T\"},(e=>this.scrollDown(e))),this._parser.registerCsiHandler({final:\"X\"},(e=>this.eraseChars(e))),this._parser.registerCsiHandler({final:\"Z\"},(e=>this.cursorBackwardTab(e))),this._parser.registerCsiHandler({final:\"`\"},(e=>this.charPosAbsolute(e))),this._parser.registerCsiHandler({final:\"a\"},(e=>this.hPositionRelative(e))),this._parser.registerCsiHandler({final:\"b\"},(e=>this.repeatPrecedingCharacter(e))),this._parser.registerCsiHandler({final:\"c\"},(e=>this.sendDeviceAttributesPrimary(e))),this._parser.registerCsiHandler({prefix:\">\",final:\"c\"},(e=>this.sendDeviceAttributesSecondary(e))),this._parser.registerCsiHandler({final:\"d\"},(e=>this.linePosAbsolute(e))),this._parser.registerCsiHandler({final:\"e\"},(e=>this.vPositionRelative(e))),this._parser.registerCsiHandler({final:\"f\"},(e=>this.hVPosition(e))),this._parser.registerCsiHandler({final:\"g\"},(e=>this.tabClear(e))),this._parser.registerCsiHandler({final:\"h\"},(e=>this.setMode(e))),this._parser.registerCsiHandler({prefix:\"?\",final:\"h\"},(e=>this.setModePrivate(e))),this._parser.registerCsiHandler({final:\"l\"},(e=>this.resetMode(e))),this._parser.registerCsiHandler({prefix:\"?\",final:\"l\"},(e=>this.resetModePrivate(e))),this._parser.registerCsiHandler({final:\"m\"},(e=>this.charAttributes(e))),this._parser.registerCsiHandler({final:\"n\"},(e=>this.deviceStatus(e))),this._parser.registerCsiHandler({prefix:\"?\",final:\"n\"},(e=>this.deviceStatusPrivate(e))),this._parser.registerCsiHandler({intermediates:\"!\",final:\"p\"},(e=>this.softReset(e))),this._parser.registerCsiHandler({intermediates:\" \",final:\"q\"},(e=>this.setCursorStyle(e))),this._parser.registerCsiHandler({final:\"r\"},(e=>this.setScrollRegion(e))),this._parser.registerCsiHandler({final:\"s\"},(e=>this.saveCursor(e))),this._parser.registerCsiHandler({final:\"t\"},(e=>this.windowOptions(e))),this._parser.registerCsiHandler({final:\"u\"},(e=>this.restoreCursor(e))),this._parser.registerCsiHandler({intermediates:\"'\",final:\"}\"},(e=>this.insertColumns(e))),this._parser.registerCsiHandler({intermediates:\"'\",final:\"~\"},(e=>this.deleteColumns(e))),this._parser.registerCsiHandler({intermediates:'\"',final:\"q\"},(e=>this.selectProtected(e))),this._parser.registerCsiHandler({intermediates:\"$\",final:\"p\"},(e=>this.requestMode(e,!0))),this._parser.registerCsiHandler({prefix:\"?\",intermediates:\"$\",final:\"p\"},(e=>this.requestMode(e,!1))),this._parser.setExecuteHandler(n.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(n.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(n.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(n.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(n.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(n.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(n.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(n.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(n.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(n.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(n.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(n.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new g.OscHandler((e=>(this.setTitle(e),this.setIconName(e),!0)))),this._parser.registerOscHandler(1,new g.OscHandler((e=>this.setIconName(e)))),this._parser.registerOscHandler(2,new g.OscHandler((e=>this.setTitle(e)))),this._parser.registerOscHandler(4,new g.OscHandler((e=>this.setOrReportIndexedColor(e)))),this._parser.registerOscHandler(8,new g.OscHandler((e=>this.setHyperlink(e)))),this._parser.registerOscHandler(10,new g.OscHandler((e=>this.setOrReportFgColor(e)))),this._parser.registerOscHandler(11,new g.OscHandler((e=>this.setOrReportBgColor(e)))),this._parser.registerOscHandler(12,new g.OscHandler((e=>this.setOrReportCursorColor(e)))),this._parser.registerOscHandler(104,new g.OscHandler((e=>this.restoreIndexedColor(e)))),this._parser.registerOscHandler(110,new g.OscHandler((e=>this.restoreFgColor(e)))),this._parser.registerOscHandler(111,new g.OscHandler((e=>this.restoreBgColor(e)))),this._parser.registerOscHandler(112,new g.OscHandler((e=>this.restoreCursorColor(e)))),this._parser.registerEscHandler({final:\"7\"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:\"8\"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:\"D\"},(()=>this.index())),this._parser.registerEscHandler({final:\"E\"},(()=>this.nextLine())),this._parser.registerEscHandler({final:\"H\"},(()=>this.tabSet())),this._parser.registerEscHandler({final:\"M\"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:\"=\"},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:\">\"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:\"c\"},(()=>this.fullReset())),this._parser.registerEscHandler({final:\"n\"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:\"o\"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:\"|\"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:\"}\"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:\"~\"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:\"%\",final:\"@\"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:\"%\",final:\"G\"},(()=>this.selectDefaultCharset()));for(const e in o.CHARSETS)this._parser.registerEscHandler({intermediates:\"(\",final:e},(()=>this.selectCharset(\"(\"+e))),this._parser.registerEscHandler({intermediates:\")\",final:e},(()=>this.selectCharset(\")\"+e))),this._parser.registerEscHandler({intermediates:\"*\",final:e},(()=>this.selectCharset(\"*\"+e))),this._parser.registerEscHandler({intermediates:\"+\",final:e},(()=>this.selectCharset(\"+\"+e))),this._parser.registerEscHandler({intermediates:\"-\",final:e},(()=>this.selectCharset(\"-\"+e))),this._parser.registerEscHandler({intermediates:\".\",final:e},(()=>this.selectCharset(\".\"+e))),this._parser.registerEscHandler({intermediates:\"/\",final:e},(()=>this.selectCharset(\"/\"+e)));this._parser.registerEscHandler({intermediates:\"#\",final:\"8\"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((e=>(this._logService.error(\"Parsing error: \",e),e))),this._parser.registerDcsHandler({intermediates:\"$\",final:\"q\"},new m.DcsHandler(((e,t)=>this.requestStatusString(e,t))))}_preserveStack(e,t,i,s){this._parseStack.paused=!0,this._parseStack.cursorStartX=e,this._parseStack.cursorStartY=t,this._parseStack.decodedLength=i,this._parseStack.position=s}_logSlowResolvingAsync(e){this._logService.logLevel<=v.LogLevelEnum.WARN&&Promise.race([e,new Promise(((e,t)=>setTimeout((()=>t(\"#SLOW_TIMEOUT\")),5e3)))]).catch((e=>{if(\"#SLOW_TIMEOUT\"!==e)throw e;console.warn(\"async parser handler taking longer than 5000 ms\")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(e,t){let i,s=this._activeBuffer.x,r=this._activeBuffer.y,n=0;const o=this._parseStack.paused;if(o){if(i=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,t))return this._logSlowResolvingAsync(i),i;s=this._parseStack.cursorStartX,r=this._parseStack.cursorStartY,this._parseStack.paused=!1,e.length>b&&(n=this._parseStack.position+b)}if(this._logService.logLevel<=v.LogLevelEnum.DEBUG&&this._logService.debug(\"parsing data\"+(\"string\"==typeof e?` \"${e}\"`:` \"${Array.prototype.map.call(e,(e=>String.fromCharCode(e))).join(\"\")}\"`),\"string\"==typeof e?e.split(\"\").map((e=>e.charCodeAt(0))):e),this._parseBuffer.lengthb)for(let t=n;t0&&2===f.getWidth(this._activeBuffer.x-1)&&f.setCellFromCodepoint(this._activeBuffer.x-1,0,1,u);let v=this._parser.precedingJoinState;for(let g=t;ga)if(h){const e=f;let t=this._activeBuffer.x-m;for(this._activeBuffer.x=m,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),f=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),m>0&&f instanceof l.BufferLine&&f.copyCellsFrom(e,t,0,m,!1);t=0;)f.setCellFromCodepoint(this._activeBuffer.x++,0,0,u)}else if(d&&(f.insertCells(this._activeBuffer.x,r-m,this._activeBuffer.getNullCell(u)),2===f.getWidth(a-1)&&f.setCellFromCodepoint(a-1,_.NULL_CELL_CODE,_.NULL_CELL_WIDTH,u)),f.setCellFromCodepoint(this._activeBuffer.x++,s,r,u),r>0)for(;--r;)f.setCellFromCodepoint(this._activeBuffer.x++,0,0,u)}this._parser.precedingJoinState=v,this._activeBuffer.x0&&0===f.getWidth(this._activeBuffer.x)&&!f.hasContent(this._activeBuffer.x)&&f.setCellFromCodepoint(this._activeBuffer.x,0,1,u),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(e,t){return\"t\"!==e.final||e.prefix||e.intermediates?this._parser.registerCsiHandler(e,t):this._parser.registerCsiHandler(e,(e=>!w(e.params[0],this._optionsService.rawOptions.windowOptions)||t(e)))}registerDcsHandler(e,t){return this._parser.registerDcsHandler(e,new m.DcsHandler(t))}registerEscHandler(e,t){return this._parser.registerEscHandler(e,t)}registerOscHandler(e,t){return this._parser.registerOscHandler(e,new g.OscHandler(t))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(0===this._activeBuffer.x&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)?.isWrapped){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const e=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);e.hasWidth(this._activeBuffer.x)&&!e.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const e=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-e),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(e=this._bufferService.cols-1){this._activeBuffer.x=Math.min(e,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(e,t){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=e,this._activeBuffer.y=this._activeBuffer.scrollTop+t):(this._activeBuffer.x=e,this._activeBuffer.y=t),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(e,t){this._restrictCursor(),this._setCursor(this._activeBuffer.x+e,this._activeBuffer.y+t)}cursorUp(e){const t=this._activeBuffer.y-this._activeBuffer.scrollTop;return t>=0?this._moveCursor(0,-Math.min(t,e.params[0]||1)):this._moveCursor(0,-(e.params[0]||1)),!0}cursorDown(e){const t=this._activeBuffer.scrollBottom-this._activeBuffer.y;return t>=0?this._moveCursor(0,Math.min(t,e.params[0]||1)):this._moveCursor(0,e.params[0]||1),!0}cursorForward(e){return this._moveCursor(e.params[0]||1,0),!0}cursorBackward(e){return this._moveCursor(-(e.params[0]||1),0),!0}cursorNextLine(e){return this.cursorDown(e),this._activeBuffer.x=0,!0}cursorPrecedingLine(e){return this.cursorUp(e),this._activeBuffer.x=0,!0}cursorCharAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(e){return this._setCursor(e.length>=2?(e.params[1]||1)-1:0,(e.params[0]||1)-1),!0}charPosAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(e){return this._moveCursor(e.params[0]||1,0),!0}linePosAbsolute(e){return this._setCursor(this._activeBuffer.x,(e.params[0]||1)-1),!0}vPositionRelative(e){return this._moveCursor(0,e.params[0]||1),!0}hVPosition(e){return this.cursorPosition(e),!0}tabClear(e){const t=e.params[0];return 0===t?delete this._activeBuffer.tabs[this._activeBuffer.x]:3===t&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(e){const t=e.params[0];return 1===t&&(this._curAttrData.bg|=536870912),2!==t&&0!==t||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(e,t,i,s=!1,r=!1){const n=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);n.replaceCells(t,i,this._activeBuffer.getNullCell(this._eraseAttrData()),r),s&&(n.isWrapped=!1)}_resetBufferLine(e,t=!1){const i=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);i&&(i.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),t),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+e),i.isWrapped=!1)}eraseInDisplay(e,t=!1){let i;switch(this._restrictCursor(this._bufferService.cols),e.params[0]){case 0:for(i=this._activeBuffer.y,this._dirtyRowTracker.markDirty(i),this._eraseInBufferLine(i++,this._activeBuffer.x,this._bufferService.cols,0===this._activeBuffer.x,t);i=this._bufferService.cols&&(this._activeBuffer.lines.get(i+1).isWrapped=!1);i--;)this._resetBufferLine(i,t);this._dirtyRowTracker.markDirty(0);break;case 2:for(i=this._bufferService.rows,this._dirtyRowTracker.markDirty(i-1);i--;)this._resetBufferLine(i,t);this._dirtyRowTracker.markDirty(0);break;case 3:const e=this._activeBuffer.lines.length-this._bufferService.rows;e>0&&(this._activeBuffer.lines.trimStart(e),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-e,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-e,0),this._onScroll.fire(0))}return!0}eraseInLine(e,t=!1){switch(this._restrictCursor(this._bufferService.cols),e.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,0===this._activeBuffer.x,t);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,t);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,t)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.y65535?2:1}let h=a;for(let e=1;e0||(this._is(\"xterm\")||this._is(\"rxvt-unicode\")||this._is(\"screen\")?this._coreService.triggerDataEvent(n.C0.ESC+\"[?1;2c\"):this._is(\"linux\")&&this._coreService.triggerDataEvent(n.C0.ESC+\"[?6c\")),!0}sendDeviceAttributesSecondary(e){return e.params[0]>0||(this._is(\"xterm\")?this._coreService.triggerDataEvent(n.C0.ESC+\"[>0;276;0c\"):this._is(\"rxvt-unicode\")?this._coreService.triggerDataEvent(n.C0.ESC+\"[>85;95;0c\"):this._is(\"linux\")?this._coreService.triggerDataEvent(e.params[0]+\"c\"):this._is(\"screen\")&&this._coreService.triggerDataEvent(n.C0.ESC+\"[>83;40003;0c\")),!0}_is(e){return 0===(this._optionsService.rawOptions.termName+\"\").indexOf(e)}setMode(e){for(let t=0;te?1:2,u=e.params[0];return f=u,v=t?2===u?4:4===u?_(o.modes.insertMode):12===u?3:20===u?_(d.convertEol):0:1===u?_(i.applicationCursorKeys):3===u?d.windowOptions.setWinLines?80===h?2:132===h?1:0:0:6===u?_(i.origin):7===u?_(i.wraparound):8===u?3:9===u?_(\"X10\"===s):12===u?_(d.cursorBlink):25===u?_(!o.isCursorHidden):45===u?_(i.reverseWraparound):66===u?_(i.applicationKeypad):67===u?4:1e3===u?_(\"VT200\"===s):1002===u?_(\"DRAG\"===s):1003===u?_(\"ANY\"===s):1004===u?_(i.sendFocus):1005===u?4:1006===u?_(\"SGR\"===r):1015===u?4:1016===u?_(\"SGR_PIXELS\"===r):1048===u?1:47===u||1047===u||1049===u?_(c===l):2004===u?_(i.bracketedPasteMode):0,o.triggerDataEvent(`${n.C0.ESC}[${t?\"\":\"?\"}${f};${v}$y`),!0;var f,v}_updateAttrColor(e,t,i,s,r){return 2===t?(e|=50331648,e&=-16777216,e|=f.AttributeData.fromColorRGB([i,s,r])):5===t&&(e&=-50331904,e|=33554432|255&i),e}_extractColor(e,t,i){const s=[0,0,-1,0,0,0];let r=0,n=0;do{if(s[n+r]=e.params[t+n],e.hasSubParams(t+n)){const i=e.getSubParams(t+n);let o=0;do{5===s[1]&&(r=1),s[n+o+1+r]=i[o]}while(++o=2||2===s[1]&&n+r>=5)break;s[1]&&(r=1)}while(++n+t5)&&(e=1),t.extended.underlineStyle=e,t.fg|=268435456,0===e&&(t.fg&=-268435457),t.updateExtended()}_processSGR0(e){e.fg=l.DEFAULT_ATTR_DATA.fg,e.bg=l.DEFAULT_ATTR_DATA.bg,e.extended=e.extended.clone(),e.extended.underlineStyle=0,e.extended.underlineColor&=-67108864,e.updateExtended()}charAttributes(e){if(1===e.length&&0===e.params[0])return this._processSGR0(this._curAttrData),!0;const t=e.length;let i;const s=this._curAttrData;for(let r=0;r=30&&i<=37?(s.fg&=-50331904,s.fg|=16777216|i-30):i>=40&&i<=47?(s.bg&=-50331904,s.bg|=16777216|i-40):i>=90&&i<=97?(s.fg&=-50331904,s.fg|=16777224|i-90):i>=100&&i<=107?(s.bg&=-50331904,s.bg|=16777224|i-100):0===i?this._processSGR0(s):1===i?s.fg|=134217728:3===i?s.bg|=67108864:4===i?(s.fg|=268435456,this._processUnderline(e.hasSubParams(r)?e.getSubParams(r)[0]:1,s)):5===i?s.fg|=536870912:7===i?s.fg|=67108864:8===i?s.fg|=1073741824:9===i?s.fg|=2147483648:2===i?s.bg|=134217728:21===i?this._processUnderline(2,s):22===i?(s.fg&=-134217729,s.bg&=-134217729):23===i?s.bg&=-67108865:24===i?(s.fg&=-268435457,this._processUnderline(0,s)):25===i?s.fg&=-536870913:27===i?s.fg&=-67108865:28===i?s.fg&=-1073741825:29===i?s.fg&=2147483647:39===i?(s.fg&=-67108864,s.fg|=16777215&l.DEFAULT_ATTR_DATA.fg):49===i?(s.bg&=-67108864,s.bg|=16777215&l.DEFAULT_ATTR_DATA.bg):38===i||48===i||58===i?r+=this._extractColor(e,r,s):53===i?s.bg|=1073741824:55===i?s.bg&=-1073741825:59===i?(s.extended=s.extended.clone(),s.extended.underlineColor=-1,s.updateExtended()):100===i?(s.fg&=-67108864,s.fg|=16777215&l.DEFAULT_ATTR_DATA.fg,s.bg&=-67108864,s.bg|=16777215&l.DEFAULT_ATTR_DATA.bg):this._logService.debug(\"Unknown SGR attribute: %d.\",i);return!0}deviceStatus(e){switch(e.params[0]){case 5:this._coreService.triggerDataEvent(`${n.C0.ESC}[0n`);break;case 6:const e=this._activeBuffer.y+1,t=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${n.C0.ESC}[${e};${t}R`)}return!0}deviceStatusPrivate(e){if(6===e.params[0]){const e=this._activeBuffer.y+1,t=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${n.C0.ESC}[?${e};${t}R`)}return!0}softReset(e){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=l.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(e){const t=e.params[0]||1;switch(t){case 1:case 2:this._optionsService.options.cursorStyle=\"block\";break;case 3:case 4:this._optionsService.options.cursorStyle=\"underline\";break;case 5:case 6:this._optionsService.options.cursorStyle=\"bar\"}const i=t%2==1;return this._optionsService.options.cursorBlink=i,!0}setScrollRegion(e){const t=e.params[0]||1;let i;return(e.length<2||(i=e.params[1])>this._bufferService.rows||0===i)&&(i=this._bufferService.rows),i>t&&(this._activeBuffer.scrollTop=t-1,this._activeBuffer.scrollBottom=i-1,this._setCursor(0,0)),!0}windowOptions(e){if(!w(e.params[0],this._optionsService.rawOptions.windowOptions))return!0;const t=e.length>1?e.params[1]:0;switch(e.params[0]){case 14:2!==t&&this._onRequestWindowsOptionsReport.fire(y.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(y.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${n.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:0!==t&&2!==t||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),0!==t&&1!==t||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:0!==t&&2!==t||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),0!==t&&1!==t||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(e){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(e){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(e){return this._windowTitle=e,this._onTitleChange.fire(e),!0}setIconName(e){return this._iconName=e,!0}setOrReportIndexedColor(e){const t=[],i=e.split(\";\");for(;i.length>1;){const e=i.shift(),s=i.shift();if(/^\\d+$/.exec(e)){const i=parseInt(e);if(D(i))if(\"?\"===s)t.push({type:0,index:i});else{const e=(0,S.parseColor)(s);e&&t.push({type:1,index:i,color:e})}}}return t.length&&this._onColor.fire(t),!0}setHyperlink(e){const t=e.split(\";\");return!(t.length<2)&&(t[1]?this._createHyperlink(t[0],t[1]):!t[0]&&this._finishHyperlink())}_createHyperlink(e,t){this._getCurrentLinkId()&&this._finishHyperlink();const i=e.split(\":\");let s;const r=i.findIndex((e=>e.startsWith(\"id=\")));return-1!==r&&(s=i[r].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:s,uri:t}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(e,t){const i=e.split(\";\");for(let e=0;e=this._specialColors.length);++e,++t)if(\"?\"===i[e])this._onColor.fire([{type:0,index:this._specialColors[t]}]);else{const s=(0,S.parseColor)(i[e]);s&&this._onColor.fire([{type:1,index:this._specialColors[t],color:s}])}return!0}setOrReportFgColor(e){return this._setOrReportSpecialColor(e,0)}setOrReportBgColor(e){return this._setOrReportSpecialColor(e,1)}setOrReportCursorColor(e){return this._setOrReportSpecialColor(e,2)}restoreIndexedColor(e){if(!e)return this._onColor.fire([{type:2}]),!0;const t=[],i=e.split(\";\");for(let e=0;e=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const e=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,e,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=l.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=l.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(e){return this._charsetService.setgLevel(e),!0}screenAlignmentPattern(){const e=new u.CellData;e.content=1<<22|\"E\".charCodeAt(0),e.fg=this._curAttrData.fg,e.bg=this._curAttrData.bg,this._setCursor(0,0);for(let t=0;t(this._coreService.triggerDataEvent(`${n.C0.ESC}${e}${n.C0.ESC}\\\\`),!0))('\"q'===e?`P1$r${this._curAttrData.isProtected()?1:0}\"q`:'\"p'===e?'P1$r61;1\"p':\"r\"===e?`P1$r${i.scrollTop+1};${i.scrollBottom+1}r`:\"m\"===e?\"P1$r0m\":\" q\"===e?`P1$r${{block:2,underline:4,bar:6}[s.cursorStyle]-(s.cursorBlink?1:0)} q`:\"P0$r\")}markRangeDirty(e,t){this._dirtyRowTracker.markRangeDirty(e,t)}}t.InputHandler=k;let L=class{constructor(e){this._bufferService=e,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(e){ethis.end&&(this.end=e)}markRangeDirty(e,t){e>t&&(E=e,e=t,t=E),ethis.end&&(this.end=t)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function D(e){return 0<=e&&e<256}L=s([r(0,v.IBufferService)],L)},844:(e,t)=>{function i(e){for(const t of e)t.dispose();e.length=0}Object.defineProperty(t,\"__esModule\",{value:!0}),t.getDisposeArrayDisposable=t.disposeArray=t.toDisposable=t.MutableDisposable=t.Disposable=void 0,t.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const e of this._disposables)e.dispose();this._disposables.length=0}register(e){return this._disposables.push(e),e}unregister(e){const t=this._disposables.indexOf(e);-1!==t&&this._disposables.splice(t,1)}},t.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}},t.toDisposable=function(e){return{dispose:e}},t.disposeArray=i,t.getDisposeArrayDisposable=function(e){return{dispose:()=>i(e)}}},1505:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.FourKeyMap=t.TwoKeyMap=void 0;class i{constructor(){this._data={}}set(e,t,i){this._data[e]||(this._data[e]={}),this._data[e][t]=i}get(e,t){return this._data[e]?this._data[e][t]:void 0}clear(){this._data={}}}t.TwoKeyMap=i,t.FourKeyMap=class{constructor(){this._data=new i}set(e,t,s,r,n){this._data.get(e,t)||this._data.set(e,t,new i),this._data.get(e,t).set(s,r,n)}get(e,t,i,s){return this._data.get(e,t)?.get(i,s)}clear(){this._data.clear()}}},6114:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.isChromeOS=t.isLinux=t.isWindows=t.isIphone=t.isIpad=t.isMac=t.getSafariVersion=t.isSafari=t.isLegacyEdge=t.isFirefox=t.isNode=void 0,t.isNode=\"undefined\"!=typeof process&&\"title\"in process;const i=t.isNode?\"node\":navigator.userAgent,s=t.isNode?\"node\":navigator.platform;t.isFirefox=i.includes(\"Firefox\"),t.isLegacyEdge=i.includes(\"Edge\"),t.isSafari=/^((?!chrome|android).)*safari/i.test(i),t.getSafariVersion=function(){if(!t.isSafari)return 0;const e=i.match(/Version\\/(\\d+)/);return null===e||e.length<2?0:parseInt(e[1])},t.isMac=[\"Macintosh\",\"MacIntel\",\"MacPPC\",\"Mac68K\"].includes(s),t.isIpad=\"iPad\"===s,t.isIphone=\"iPhone\"===s,t.isWindows=[\"Windows\",\"Win16\",\"Win32\",\"WinCE\"].includes(s),t.isLinux=s.indexOf(\"Linux\")>=0,t.isChromeOS=/\\bCrOS\\b/.test(i)},6106:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.SortedList=void 0;let i=0;t.SortedList=class{constructor(e){this._getKey=e,this._array=[]}clear(){this._array.length=0}insert(e){0!==this._array.length?(i=this._search(this._getKey(e)),this._array.splice(i,0,e)):this._array.push(e)}delete(e){if(0===this._array.length)return!1;const t=this._getKey(e);if(void 0===t)return!1;if(i=this._search(t),-1===i)return!1;if(this._getKey(this._array[i])!==t)return!1;do{if(this._array[i]===e)return this._array.splice(i,1),!0}while(++i=this._array.length)&&this._getKey(this._array[i])===e))do{yield this._array[i]}while(++i=this._array.length)&&this._getKey(this._array[i])===e))do{t(this._array[i])}while(++i=t;){let s=t+i>>1;const r=this._getKey(this._array[s]);if(r>e)i=s-1;else{if(!(r0&&this._getKey(this._array[s-1])===e;)s--;return s}t=s+1}}return t}}},7226:(e,t,i)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.DebouncedIdleTask=t.IdleTaskQueue=t.PriorityTaskQueue=void 0;const s=i(6114);class r{constructor(){this._tasks=[],this._i=0}enqueue(e){this._tasks.push(e),this._start()}flush(){for(;this._ir)return s-t<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(s-t))}ms`),void this._start();s=r}this.clear()}}class n extends r{_requestCallback(e){return setTimeout((()=>e(this._createDeadline(16))))}_cancelCallback(e){clearTimeout(e)}_createDeadline(e){const t=Date.now()+e;return{timeRemaining:()=>Math.max(0,t-Date.now())}}}t.PriorityTaskQueue=n,t.IdleTaskQueue=!s.isNode&&\"requestIdleCallback\"in window?class extends r{_requestCallback(e){return requestIdleCallback(e)}_cancelCallback(e){cancelIdleCallback(e)}}:n,t.DebouncedIdleTask=class{constructor(){this._queue=new t.IdleTaskQueue}set(e){this._queue.clear(),this._queue.enqueue(e)}flush(){this._queue.flush()}}},9282:(e,t,i)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.updateWindowsModeWrappedState=void 0;const s=i(643);t.updateWindowsModeWrappedState=function(e){const t=e.buffer.lines.get(e.buffer.ybase+e.buffer.y-1),i=t?.get(e.cols-1),r=e.buffer.lines.get(e.buffer.ybase+e.buffer.y);r&&i&&(r.isWrapped=i[s.CHAR_DATA_CODE_INDEX]!==s.NULL_CELL_CODE&&i[s.CHAR_DATA_CODE_INDEX]!==s.WHITESPACE_CELL_CODE)}},3734:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.ExtendedAttrs=t.AttributeData=void 0;class i{constructor(){this.fg=0,this.bg=0,this.extended=new s}static toColorRGB(e){return[e>>>16&255,e>>>8&255,255&e]}static fromColorRGB(e){return(255&e[0])<<16|(255&e[1])<<8|255&e[2]}clone(){const e=new i;return e.fg=this.fg,e.bg=this.bg,e.extended=this.extended.clone(),e}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&0!==this.extended.underlineStyle?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return 50331648==(50331648&this.fg)}isBgRGB(){return 50331648==(50331648&this.bg)}isFgPalette(){return 16777216==(50331648&this.fg)||33554432==(50331648&this.fg)}isBgPalette(){return 16777216==(50331648&this.bg)||33554432==(50331648&this.bg)}isFgDefault(){return 0==(50331648&this.fg)}isBgDefault(){return 0==(50331648&this.bg)}isAttributeDefault(){return 0===this.fg&&0===this.bg}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?50331648==(50331648&this.extended.underlineColor):this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?16777216==(50331648&this.extended.underlineColor)||33554432==(50331648&this.extended.underlineColor):this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?0==(50331648&this.extended.underlineColor):this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}t.AttributeData=i;class s{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(e){this._ext&=-67108864,this._ext|=67108863&e}get urlId(){return this._urlId}set urlId(e){this._urlId=e}get underlineVariantOffset(){const e=(3758096384&this._ext)>>29;return e<0?4294967288^e:e}set underlineVariantOffset(e){this._ext&=536870911,this._ext|=e<<29&3758096384}constructor(e=0,t=0){this._ext=0,this._urlId=0,this._ext=e,this._urlId=t}clone(){return new s(this._ext,this._urlId)}isEmpty(){return 0===this.underlineStyle&&0===this._urlId}}t.ExtendedAttrs=s},9092:(e,t,i)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.Buffer=t.MAX_BUFFER_SIZE=void 0;const s=i(6349),r=i(7226),n=i(3734),o=i(8437),a=i(4634),h=i(511),c=i(643),l=i(4863),d=i(7116);t.MAX_BUFFER_SIZE=4294967295,t.Buffer=class{constructor(e,t,i){this._hasScrollback=e,this._optionsService=t,this._bufferService=i,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=o.DEFAULT_ATTR_DATA.clone(),this.savedCharset=d.DEFAULT_CHARSET,this.markers=[],this._nullCell=h.CellData.fromCharData([0,c.NULL_CELL_CHAR,c.NULL_CELL_WIDTH,c.NULL_CELL_CODE]),this._whitespaceCell=h.CellData.fromCharData([0,c.WHITESPACE_CELL_CHAR,c.WHITESPACE_CELL_WIDTH,c.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new r.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new s.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new n.ExtendedAttrs),this._nullCell}getWhitespaceCell(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new n.ExtendedAttrs),this._whitespaceCell}getBlankLine(e,t){return new o.BufferLine(this._bufferService.cols,this.getNullCell(e),t)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const e=this.ybase+this.y-this.ydisp;return e>=0&&et.MAX_BUFFER_SIZE?t.MAX_BUFFER_SIZE:i}fillViewportRows(e){if(0===this.lines.length){void 0===e&&(e=o.DEFAULT_ATTR_DATA);let t=this._rows;for(;t--;)this.lines.push(this.getBlankLine(e))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new s.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(e,t){const i=this.getNullCell(o.DEFAULT_ATTR_DATA);let s=0;const r=this._getCorrectBufferLength(t);if(r>this.lines.maxLength&&(this.lines.maxLength=r),this.lines.length>0){if(this._cols0&&this.lines.length<=this.ybase+this.y+n+1?(this.ybase--,n++,this.ydisp>0&&this.ydisp--):this.lines.push(new o.BufferLine(e,i)));else for(let e=this._rows;e>t;e--)this.lines.length>t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(r0&&(this.lines.trimStart(e),this.ybase=Math.max(this.ybase-e,0),this.ydisp=Math.max(this.ydisp-e,0),this.savedY=Math.max(this.savedY-e,0)),this.lines.maxLength=r}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,t-1),n&&(this.y+=n),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=t-1,this._isReflowEnabled&&(this._reflow(e,t),this._cols>e))for(let t=0;t.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let e=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,e=!1);let t=0;for(;this._memoryCleanupPosition100)return!0;return e}get _isReflowEnabled(){const e=this._optionsService.rawOptions.windowsPty;return e&&e.buildNumber?this._hasScrollback&&\"conpty\"===e.backend&&e.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(e,t){this._cols!==e&&(e>this._cols?this._reflowLarger(e,t):this._reflowSmaller(e,t))}_reflowLarger(e,t){const i=(0,a.reflowLargerGetLinesToRemove)(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(o.DEFAULT_ATTR_DATA));if(i.length>0){const s=(0,a.reflowLargerCreateNewLayout)(this.lines,i);(0,a.reflowLargerApplyNewLayout)(this.lines,s.layout),this._reflowLargerAdjustViewport(e,t,s.countRemoved)}}_reflowLargerAdjustViewport(e,t,i){const s=this.getNullCell(o.DEFAULT_ATTR_DATA);let r=i;for(;r-- >0;)0===this.ybase?(this.y>0&&this.y--,this.lines.length=0;n--){let h=this.lines.get(n);if(!h||!h.isWrapped&&h.getTrimmedLength()<=e)continue;const c=[h];for(;h.isWrapped&&n>0;)h=this.lines.get(--n),c.unshift(h);const l=this.ybase+this.y;if(l>=n&&l0&&(s.push({start:n+c.length+r,newLines:v}),r+=v.length),c.push(...v);let p=_.length-1,g=_[p];0===g&&(p--,g=_[p]);let m=c.length-u-1,S=d;for(;m>=0;){const e=Math.min(S,g);if(void 0===c[p])break;if(c[p].copyCellsFrom(c[m],S-e,g-e,e,!0),g-=e,0===g&&(p--,g=_[p]),S-=e,0===S){m--;const e=Math.max(m,0);S=(0,a.getWrappedLineTrimmedLength)(c,e,this._cols)}}for(let t=0;t0;)0===this.ybase?this.y0){const e=[],t=[];for(let e=0;e=0;c--)if(a&&a.start>n+h){for(let e=a.newLines.length-1;e>=0;e--)this.lines.set(c--,a.newLines[e]);c++,e.push({index:n+1,amount:a.newLines.length}),h+=a.newLines.length,a=s[++o]}else this.lines.set(c,t[n--]);let c=0;for(let t=e.length-1;t>=0;t--)e[t].index+=c,this.lines.onInsertEmitter.fire(e[t]),c+=e[t].amount;const l=Math.max(0,i+r-this.lines.maxLength);l>0&&this.lines.onTrimEmitter.fire(l)}}translateBufferLineToString(e,t,i=0,s){const r=this.lines.get(e);return r?r.translateToString(t,i,s):\"\"}getWrappedRangeForLine(e){let t=e,i=e;for(;t>0&&this.lines.get(t).isWrapped;)t--;for(;i+10;);return e>=this._cols?this._cols-1:e<0?0:e}nextStop(e){for(null==e&&(e=this.x);!this.tabs[++e]&&e=this._cols?this._cols-1:e<0?0:e}clearMarkers(e){this._isClearing=!0;for(let t=0;t{t.line-=e,t.line<0&&t.dispose()}))),t.register(this.lines.onInsert((e=>{t.line>=e.index&&(t.line+=e.amount)}))),t.register(this.lines.onDelete((e=>{t.line>=e.index&&t.linee.index&&(t.line-=e.amount)}))),t.register(t.onDispose((()=>this._removeMarker(t)))),t}_removeMarker(e){this._isClearing||this.markers.splice(this.markers.indexOf(e),1)}}},8437:(e,t,i)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.BufferLine=t.DEFAULT_ATTR_DATA=void 0;const s=i(3734),r=i(511),n=i(643),o=i(482);t.DEFAULT_ATTR_DATA=Object.freeze(new s.AttributeData);let a=0;class h{constructor(e,t,i=!1){this.isWrapped=i,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*e);const s=t||r.CellData.fromCharData([0,n.NULL_CELL_CHAR,n.NULL_CELL_WIDTH,n.NULL_CELL_CODE]);for(let t=0;t>22,2097152&t?this._combined[e].charCodeAt(this._combined[e].length-1):i]}set(e,t){this._data[3*e+1]=t[n.CHAR_DATA_ATTR_INDEX],t[n.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[e]=t[1],this._data[3*e+0]=2097152|e|t[n.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*e+0]=t[n.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|t[n.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(e){return this._data[3*e+0]>>22}hasWidth(e){return 12582912&this._data[3*e+0]}getFg(e){return this._data[3*e+1]}getBg(e){return this._data[3*e+2]}hasContent(e){return 4194303&this._data[3*e+0]}getCodePoint(e){const t=this._data[3*e+0];return 2097152&t?this._combined[e].charCodeAt(this._combined[e].length-1):2097151&t}isCombined(e){return 2097152&this._data[3*e+0]}getString(e){const t=this._data[3*e+0];return 2097152&t?this._combined[e]:2097151&t?(0,o.stringFromCodePoint)(2097151&t):\"\"}isProtected(e){return 536870912&this._data[3*e+2]}loadCell(e,t){return a=3*e,t.content=this._data[a+0],t.fg=this._data[a+1],t.bg=this._data[a+2],2097152&t.content&&(t.combinedData=this._combined[e]),268435456&t.bg&&(t.extended=this._extendedAttrs[e]),t}setCell(e,t){2097152&t.content&&(this._combined[e]=t.combinedData),268435456&t.bg&&(this._extendedAttrs[e]=t.extended),this._data[3*e+0]=t.content,this._data[3*e+1]=t.fg,this._data[3*e+2]=t.bg}setCellFromCodepoint(e,t,i,s){268435456&s.bg&&(this._extendedAttrs[e]=s.extended),this._data[3*e+0]=t|i<<22,this._data[3*e+1]=s.fg,this._data[3*e+2]=s.bg}addCodepointToCell(e,t,i){let s=this._data[3*e+0];2097152&s?this._combined[e]+=(0,o.stringFromCodePoint)(t):2097151&s?(this._combined[e]=(0,o.stringFromCodePoint)(2097151&s)+(0,o.stringFromCodePoint)(t),s&=-2097152,s|=2097152):s=t|1<<22,i&&(s&=-12582913,s|=i<<22),this._data[3*e+0]=s}insertCells(e,t,i){if((e%=this.length)&&2===this.getWidth(e-1)&&this.setCellFromCodepoint(e-1,0,1,i),t=0;--i)this.setCell(e+t+i,this.loadCell(e+i,s));for(let s=0;sthis.length){if(this._data.buffer.byteLength>=4*i)this._data=new Uint32Array(this._data.buffer,0,i);else{const e=new Uint32Array(i);e.set(this._data),this._data=e}for(let i=this.length;i=e&&delete this._combined[s]}const s=Object.keys(this._extendedAttrs);for(let t=0;t=e&&delete this._extendedAttrs[i]}}return this.length=e,4*i*2=0;--e)if(4194303&this._data[3*e+0])return e+(this._data[3*e+0]>>22);return 0}getNoBgTrimmedLength(){for(let e=this.length-1;e>=0;--e)if(4194303&this._data[3*e+0]||50331648&this._data[3*e+2])return e+(this._data[3*e+0]>>22);return 0}copyCellsFrom(e,t,i,s,r){const n=e._data;if(r)for(let r=s-1;r>=0;r--){for(let e=0;e<3;e++)this._data[3*(i+r)+e]=n[3*(t+r)+e];268435456&n[3*(t+r)+2]&&(this._extendedAttrs[i+r]=e._extendedAttrs[t+r])}else for(let r=0;r=t&&(this._combined[r-t+i]=e._combined[r])}}translateToString(e,t,i,s){t=t??0,i=i??this.length,e&&(i=Math.min(i,this.getTrimmedLength())),s&&(s.length=0);let r=\"\";for(;t>22||1}return s&&s.push(t),r}}t.BufferLine=h},4841:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.getRangeLength=void 0,t.getRangeLength=function(e,t){if(e.start.y>e.end.y)throw new Error(`Buffer range end (${e.end.x}, ${e.end.y}) cannot be before start (${e.start.x}, ${e.start.y})`);return t*(e.end.y-e.start.y)+(e.end.x-e.start.x+1)}},4634:(e,t)=>{function i(e,t,i){if(t===e.length-1)return e[t].getTrimmedLength();const s=!e[t].hasContent(i-1)&&1===e[t].getWidth(i-1),r=2===e[t+1].getWidth(0);return s&&r?i-1:i}Object.defineProperty(t,\"__esModule\",{value:!0}),t.getWrappedLineTrimmedLength=t.reflowSmallerGetNewLineLengths=t.reflowLargerApplyNewLayout=t.reflowLargerCreateNewLayout=t.reflowLargerGetLinesToRemove=void 0,t.reflowLargerGetLinesToRemove=function(e,t,s,r,n){const o=[];for(let a=0;a=a&&r0&&(e>d||0===l[e].getTrimmedLength());e--)v++;v>0&&(o.push(a+l.length-v),o.push(v)),a+=l.length-1}return o},t.reflowLargerCreateNewLayout=function(e,t){const i=[];let s=0,r=t[s],n=0;for(let o=0;oi(e,r,t))).reduce(((e,t)=>e+t));let o=0,a=0,h=0;for(;hc&&(o-=c,a++);const l=2===e[a].getWidth(o-1);l&&o--;const d=l?s-1:s;r.push(d),h+=d}return r},t.getWrappedLineTrimmedLength=i},5295:(e,t,i)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.BufferSet=void 0;const s=i(8460),r=i(844),n=i(9092);class o extends r.Disposable{constructor(e,t){super(),this._optionsService=e,this._bufferService=t,this._onBufferActivate=this.register(new s.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange(\"scrollback\",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange(\"tabStopWidth\",(()=>this.setupTabStops())))}reset(){this._normal=new n.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new n.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(e){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(e),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(e,t){this._normal.resize(e,t),this._alt.resize(e,t),this.setupTabStops(e)}setupTabStops(e){this._normal.setupTabStops(e),this._alt.setupTabStops(e)}}t.BufferSet=o},511:(e,t,i)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.CellData=void 0;const s=i(482),r=i(643),n=i(3734);class o extends n.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new n.ExtendedAttrs,this.combinedData=\"\"}static fromCharData(e){const t=new o;return t.setFromCharData(e),t}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,s.stringFromCodePoint)(2097151&this.content):\"\"}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(e){this.fg=e[r.CHAR_DATA_ATTR_INDEX],this.bg=0;let t=!1;if(e[r.CHAR_DATA_CHAR_INDEX].length>2)t=!0;else if(2===e[r.CHAR_DATA_CHAR_INDEX].length){const i=e[r.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=i&&i<=56319){const s=e[r.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=s&&s<=57343?this.content=1024*(i-55296)+s-56320+65536|e[r.CHAR_DATA_WIDTH_INDEX]<<22:t=!0}else t=!0}else this.content=e[r.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|e[r.CHAR_DATA_WIDTH_INDEX]<<22;t&&(this.combinedData=e[r.CHAR_DATA_CHAR_INDEX],this.content=2097152|e[r.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}t.CellData=o},643:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.WHITESPACE_CELL_CODE=t.WHITESPACE_CELL_WIDTH=t.WHITESPACE_CELL_CHAR=t.NULL_CELL_CODE=t.NULL_CELL_WIDTH=t.NULL_CELL_CHAR=t.CHAR_DATA_CODE_INDEX=t.CHAR_DATA_WIDTH_INDEX=t.CHAR_DATA_CHAR_INDEX=t.CHAR_DATA_ATTR_INDEX=t.DEFAULT_EXT=t.DEFAULT_ATTR=t.DEFAULT_COLOR=void 0,t.DEFAULT_COLOR=0,t.DEFAULT_ATTR=256|t.DEFAULT_COLOR<<9,t.DEFAULT_EXT=0,t.CHAR_DATA_ATTR_INDEX=0,t.CHAR_DATA_CHAR_INDEX=1,t.CHAR_DATA_WIDTH_INDEX=2,t.CHAR_DATA_CODE_INDEX=3,t.NULL_CELL_CHAR=\"\",t.NULL_CELL_WIDTH=1,t.NULL_CELL_CODE=0,t.WHITESPACE_CELL_CHAR=\" \",t.WHITESPACE_CELL_WIDTH=1,t.WHITESPACE_CELL_CODE=32},4863:(e,t,i)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.Marker=void 0;const s=i(8460),r=i(844);class n{get id(){return this._id}constructor(e){this.line=e,this.isDisposed=!1,this._disposables=[],this._id=n._nextId++,this._onDispose=this.register(new s.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,r.disposeArray)(this._disposables),this._disposables.length=0)}register(e){return this._disposables.push(e),e}}t.Marker=n,n._nextId=1},7116:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.DEFAULT_CHARSET=t.CHARSETS=void 0,t.CHARSETS={},t.DEFAULT_CHARSET=t.CHARSETS.B,t.CHARSETS[0]={\"`\":\"◆\",a:\"▒\",b:\"␉\",c:\"␌\",d:\"␍\",e:\"␊\",f:\"°\",g:\"±\",h:\"␤\",i:\"␋\",j:\"┘\",k:\"┐\",l:\"┌\",m:\"└\",n:\"┼\",o:\"⎺\",p:\"⎻\",q:\"─\",r:\"⎼\",s:\"⎽\",t:\"├\",u:\"┤\",v:\"┴\",w:\"┬\",x:\"│\",y:\"≤\",z:\"≥\",\"{\":\"π\",\"|\":\"≠\",\"}\":\"£\",\"~\":\"·\"},t.CHARSETS.A={\"#\":\"£\"},t.CHARSETS.B=void 0,t.CHARSETS[4]={\"#\":\"£\",\"@\":\"¾\",\"[\":\"ij\",\"\\\\\":\"½\",\"]\":\"|\",\"{\":\"¨\",\"|\":\"f\",\"}\":\"¼\",\"~\":\"´\"},t.CHARSETS.C=t.CHARSETS[5]={\"[\":\"Ä\",\"\\\\\":\"Ö\",\"]\":\"Å\",\"^\":\"Ü\",\"`\":\"é\",\"{\":\"ä\",\"|\":\"ö\",\"}\":\"å\",\"~\":\"ü\"},t.CHARSETS.R={\"#\":\"£\",\"@\":\"à\",\"[\":\"°\",\"\\\\\":\"ç\",\"]\":\"§\",\"{\":\"é\",\"|\":\"ù\",\"}\":\"è\",\"~\":\"¨\"},t.CHARSETS.Q={\"@\":\"à\",\"[\":\"â\",\"\\\\\":\"ç\",\"]\":\"ê\",\"^\":\"î\",\"`\":\"ô\",\"{\":\"é\",\"|\":\"ù\",\"}\":\"è\",\"~\":\"û\"},t.CHARSETS.K={\"@\":\"§\",\"[\":\"Ä\",\"\\\\\":\"Ö\",\"]\":\"Ü\",\"{\":\"ä\",\"|\":\"ö\",\"}\":\"ü\",\"~\":\"ß\"},t.CHARSETS.Y={\"#\":\"£\",\"@\":\"§\",\"[\":\"°\",\"\\\\\":\"ç\",\"]\":\"é\",\"`\":\"ù\",\"{\":\"à\",\"|\":\"ò\",\"}\":\"è\",\"~\":\"ì\"},t.CHARSETS.E=t.CHARSETS[6]={\"@\":\"Ä\",\"[\":\"Æ\",\"\\\\\":\"Ø\",\"]\":\"Å\",\"^\":\"Ü\",\"`\":\"ä\",\"{\":\"æ\",\"|\":\"ø\",\"}\":\"å\",\"~\":\"ü\"},t.CHARSETS.Z={\"#\":\"£\",\"@\":\"§\",\"[\":\"¡\",\"\\\\\":\"Ñ\",\"]\":\"¿\",\"{\":\"°\",\"|\":\"ñ\",\"}\":\"ç\"},t.CHARSETS.H=t.CHARSETS[7]={\"@\":\"É\",\"[\":\"Ä\",\"\\\\\":\"Ö\",\"]\":\"Å\",\"^\":\"Ü\",\"`\":\"é\",\"{\":\"ä\",\"|\":\"ö\",\"}\":\"å\",\"~\":\"ü\"},t.CHARSETS[\"=\"]={\"#\":\"ù\",\"@\":\"à\",\"[\":\"é\",\"\\\\\":\"ç\",\"]\":\"ê\",\"^\":\"î\",_:\"è\",\"`\":\"ô\",\"{\":\"ä\",\"|\":\"ö\",\"}\":\"ü\",\"~\":\"û\"}},2584:(e,t)=>{var i,s,r;Object.defineProperty(t,\"__esModule\",{value:!0}),t.C1_ESCAPED=t.C1=t.C0=void 0,function(e){e.NUL=\"\\0\",e.SOH=\"\u0001\",e.STX=\"\u0002\",e.ETX=\"\u0003\",e.EOT=\"\u0004\",e.ENQ=\"\u0005\",e.ACK=\"\u0006\",e.BEL=\"\u0007\",e.BS=\"\\b\",e.HT=\"\\t\",e.LF=\"\\n\",e.VT=\"\\v\",e.FF=\"\\f\",e.CR=\"\\r\",e.SO=\"\u000e\",e.SI=\"\u000f\",e.DLE=\"\u0010\",e.DC1=\"\u0011\",e.DC2=\"\u0012\",e.DC3=\"\u0013\",e.DC4=\"\u0014\",e.NAK=\"\u0015\",e.SYN=\"\u0016\",e.ETB=\"\u0017\",e.CAN=\"\u0018\",e.EM=\"\u0019\",e.SUB=\"\u001a\",e.ESC=\"\u001b\",e.FS=\"\u001c\",e.GS=\"\u001d\",e.RS=\"\u001e\",e.US=\"\u001f\",e.SP=\" \",e.DEL=\"\"}(i||(t.C0=i={})),function(e){e.PAD=\"€\",e.HOP=\"\",e.BPH=\"‚\",e.NBH=\"ƒ\",e.IND=\"„\",e.NEL=\"…\",e.SSA=\"†\",e.ESA=\"‡\",e.HTS=\"ˆ\",e.HTJ=\"‰\",e.VTS=\"Š\",e.PLD=\"‹\",e.PLU=\"Œ\",e.RI=\"\",e.SS2=\"Ž\",e.SS3=\"\",e.DCS=\"\",e.PU1=\"‘\",e.PU2=\"’\",e.STS=\"“\",e.CCH=\"”\",e.MW=\"•\",e.SPA=\"–\",e.EPA=\"—\",e.SOS=\"˜\",e.SGCI=\"™\",e.SCI=\"š\",e.CSI=\"›\",e.ST=\"œ\",e.OSC=\"\",e.PM=\"ž\",e.APC=\"Ÿ\"}(s||(t.C1=s={})),function(e){e.ST=`${i.ESC}\\\\`}(r||(t.C1_ESCAPED=r={}))},7399:(e,t,i)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.evaluateKeyboardEvent=void 0;const s=i(2584),r={48:[\"0\",\")\"],49:[\"1\",\"!\"],50:[\"2\",\"@\"],51:[\"3\",\"#\"],52:[\"4\",\"$\"],53:[\"5\",\"%\"],54:[\"6\",\"^\"],55:[\"7\",\"&\"],56:[\"8\",\"*\"],57:[\"9\",\"(\"],186:[\";\",\":\"],187:[\"=\",\"+\"],188:[\",\",\"<\"],189:[\"-\",\"_\"],190:[\".\",\">\"],191:[\"/\",\"?\"],192:[\"`\",\"~\"],219:[\"[\",\"{\"],220:[\"\\\\\",\"|\"],221:[\"]\",\"}\"],222:[\"'\",'\"']};t.evaluateKeyboardEvent=function(e,t,i,n){const o={type:0,cancel:!1,key:void 0},a=(e.shiftKey?1:0)|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0);switch(e.keyCode){case 0:\"UIKeyInputUpArrow\"===e.key?o.key=t?s.C0.ESC+\"OA\":s.C0.ESC+\"[A\":\"UIKeyInputLeftArrow\"===e.key?o.key=t?s.C0.ESC+\"OD\":s.C0.ESC+\"[D\":\"UIKeyInputRightArrow\"===e.key?o.key=t?s.C0.ESC+\"OC\":s.C0.ESC+\"[C\":\"UIKeyInputDownArrow\"===e.key&&(o.key=t?s.C0.ESC+\"OB\":s.C0.ESC+\"[B\");break;case 8:o.key=e.ctrlKey?\"\\b\":s.C0.DEL,e.altKey&&(o.key=s.C0.ESC+o.key);break;case 9:if(e.shiftKey){o.key=s.C0.ESC+\"[Z\";break}o.key=s.C0.HT,o.cancel=!0;break;case 13:o.key=e.altKey?s.C0.ESC+s.C0.CR:s.C0.CR,o.cancel=!0;break;case 27:o.key=s.C0.ESC,e.altKey&&(o.key=s.C0.ESC+s.C0.ESC),o.cancel=!0;break;case 37:if(e.metaKey)break;a?(o.key=s.C0.ESC+\"[1;\"+(a+1)+\"D\",o.key===s.C0.ESC+\"[1;3D\"&&(o.key=s.C0.ESC+(i?\"b\":\"[1;5D\"))):o.key=t?s.C0.ESC+\"OD\":s.C0.ESC+\"[D\";break;case 39:if(e.metaKey)break;a?(o.key=s.C0.ESC+\"[1;\"+(a+1)+\"C\",o.key===s.C0.ESC+\"[1;3C\"&&(o.key=s.C0.ESC+(i?\"f\":\"[1;5C\"))):o.key=t?s.C0.ESC+\"OC\":s.C0.ESC+\"[C\";break;case 38:if(e.metaKey)break;a?(o.key=s.C0.ESC+\"[1;\"+(a+1)+\"A\",i||o.key!==s.C0.ESC+\"[1;3A\"||(o.key=s.C0.ESC+\"[1;5A\")):o.key=t?s.C0.ESC+\"OA\":s.C0.ESC+\"[A\";break;case 40:if(e.metaKey)break;a?(o.key=s.C0.ESC+\"[1;\"+(a+1)+\"B\",i||o.key!==s.C0.ESC+\"[1;3B\"||(o.key=s.C0.ESC+\"[1;5B\")):o.key=t?s.C0.ESC+\"OB\":s.C0.ESC+\"[B\";break;case 45:e.shiftKey||e.ctrlKey||(o.key=s.C0.ESC+\"[2~\");break;case 46:o.key=a?s.C0.ESC+\"[3;\"+(a+1)+\"~\":s.C0.ESC+\"[3~\";break;case 36:o.key=a?s.C0.ESC+\"[1;\"+(a+1)+\"H\":t?s.C0.ESC+\"OH\":s.C0.ESC+\"[H\";break;case 35:o.key=a?s.C0.ESC+\"[1;\"+(a+1)+\"F\":t?s.C0.ESC+\"OF\":s.C0.ESC+\"[F\";break;case 33:e.shiftKey?o.type=2:e.ctrlKey?o.key=s.C0.ESC+\"[5;\"+(a+1)+\"~\":o.key=s.C0.ESC+\"[5~\";break;case 34:e.shiftKey?o.type=3:e.ctrlKey?o.key=s.C0.ESC+\"[6;\"+(a+1)+\"~\":o.key=s.C0.ESC+\"[6~\";break;case 112:o.key=a?s.C0.ESC+\"[1;\"+(a+1)+\"P\":s.C0.ESC+\"OP\";break;case 113:o.key=a?s.C0.ESC+\"[1;\"+(a+1)+\"Q\":s.C0.ESC+\"OQ\";break;case 114:o.key=a?s.C0.ESC+\"[1;\"+(a+1)+\"R\":s.C0.ESC+\"OR\";break;case 115:o.key=a?s.C0.ESC+\"[1;\"+(a+1)+\"S\":s.C0.ESC+\"OS\";break;case 116:o.key=a?s.C0.ESC+\"[15;\"+(a+1)+\"~\":s.C0.ESC+\"[15~\";break;case 117:o.key=a?s.C0.ESC+\"[17;\"+(a+1)+\"~\":s.C0.ESC+\"[17~\";break;case 118:o.key=a?s.C0.ESC+\"[18;\"+(a+1)+\"~\":s.C0.ESC+\"[18~\";break;case 119:o.key=a?s.C0.ESC+\"[19;\"+(a+1)+\"~\":s.C0.ESC+\"[19~\";break;case 120:o.key=a?s.C0.ESC+\"[20;\"+(a+1)+\"~\":s.C0.ESC+\"[20~\";break;case 121:o.key=a?s.C0.ESC+\"[21;\"+(a+1)+\"~\":s.C0.ESC+\"[21~\";break;case 122:o.key=a?s.C0.ESC+\"[23;\"+(a+1)+\"~\":s.C0.ESC+\"[23~\";break;case 123:o.key=a?s.C0.ESC+\"[24;\"+(a+1)+\"~\":s.C0.ESC+\"[24~\";break;default:if(!e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)if(i&&!n||!e.altKey||e.metaKey)!i||e.altKey||e.ctrlKey||e.shiftKey||!e.metaKey?e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.keyCode>=48&&1===e.key.length?o.key=e.key:e.key&&e.ctrlKey&&(\"_\"===e.key&&(o.key=s.C0.US),\"@\"===e.key&&(o.key=s.C0.NUL)):65===e.keyCode&&(o.type=1);else{const t=r[e.keyCode],i=t?.[e.shiftKey?1:0];if(i)o.key=s.C0.ESC+i;else if(e.keyCode>=65&&e.keyCode<=90){const t=e.ctrlKey?e.keyCode-64:e.keyCode+32;let i=String.fromCharCode(t);e.shiftKey&&(i=i.toUpperCase()),o.key=s.C0.ESC+i}else if(32===e.keyCode)o.key=s.C0.ESC+(e.ctrlKey?s.C0.NUL:\" \");else if(\"Dead\"===e.key&&e.code.startsWith(\"Key\")){let t=e.code.slice(3,4);e.shiftKey||(t=t.toLowerCase()),o.key=s.C0.ESC+t,o.cancel=!0}}else e.keyCode>=65&&e.keyCode<=90?o.key=String.fromCharCode(e.keyCode-64):32===e.keyCode?o.key=s.C0.NUL:e.keyCode>=51&&e.keyCode<=55?o.key=String.fromCharCode(e.keyCode-51+27):56===e.keyCode?o.key=s.C0.DEL:219===e.keyCode?o.key=s.C0.ESC:220===e.keyCode?o.key=s.C0.FS:221===e.keyCode&&(o.key=s.C0.GS)}return o}},482:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.Utf8ToUtf32=t.StringToUtf32=t.utf32ToString=t.stringFromCodePoint=void 0,t.stringFromCodePoint=function(e){return e>65535?(e-=65536,String.fromCharCode(55296+(e>>10))+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)},t.utf32ToString=function(e,t=0,i=e.length){let s=\"\";for(let r=t;r65535?(t-=65536,s+=String.fromCharCode(55296+(t>>10))+String.fromCharCode(t%1024+56320)):s+=String.fromCharCode(t)}return s},t.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){const i=e.length;if(!i)return 0;let s=0,r=0;if(this._interim){const i=e.charCodeAt(r++);56320<=i&&i<=57343?t[s++]=1024*(this._interim-55296)+i-56320+65536:(t[s++]=this._interim,t[s++]=i),this._interim=0}for(let n=r;n=i)return this._interim=r,s;const o=e.charCodeAt(n);56320<=o&&o<=57343?t[s++]=1024*(r-55296)+o-56320+65536:(t[s++]=r,t[s++]=o)}else 65279!==r&&(t[s++]=r)}return s}},t.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){const i=e.length;if(!i)return 0;let s,r,n,o,a=0,h=0,c=0;if(this.interim[0]){let s=!1,r=this.interim[0];r&=192==(224&r)?31:224==(240&r)?15:7;let n,o=0;for(;(n=63&this.interim[++o])&&o<4;)r<<=6,r|=n;const h=192==(224&this.interim[0])?2:224==(240&this.interim[0])?3:4,l=h-o;for(;c=i)return 0;if(n=e[c++],128!=(192&n)){c--,s=!0;break}this.interim[o++]=n,r<<=6,r|=63&n}s||(2===h?r<128?c--:t[a++]=r:3===h?r<2048||r>=55296&&r<=57343||65279===r||(t[a++]=r):r<65536||r>1114111||(t[a++]=r)),this.interim.fill(0)}const l=i-4;let d=c;for(;d=i)return this.interim[0]=s,a;if(r=e[d++],128!=(192&r)){d--;continue}if(h=(31&s)<<6|63&r,h<128){d--;continue}t[a++]=h}else if(224==(240&s)){if(d>=i)return this.interim[0]=s,a;if(r=e[d++],128!=(192&r)){d--;continue}if(d>=i)return this.interim[0]=s,this.interim[1]=r,a;if(n=e[d++],128!=(192&n)){d--;continue}if(h=(15&s)<<12|(63&r)<<6|63&n,h<2048||h>=55296&&h<=57343||65279===h)continue;t[a++]=h}else if(240==(248&s)){if(d>=i)return this.interim[0]=s,a;if(r=e[d++],128!=(192&r)){d--;continue}if(d>=i)return this.interim[0]=s,this.interim[1]=r,a;if(n=e[d++],128!=(192&n)){d--;continue}if(d>=i)return this.interim[0]=s,this.interim[1]=r,this.interim[2]=n,a;if(o=e[d++],128!=(192&o)){d--;continue}if(h=(7&s)<<18|(63&r)<<12|(63&n)<<6|63&o,h<65536||h>1114111)continue;t[a++]=h}}return a}}},225:(e,t,i)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.UnicodeV6=void 0;const s=i(1480),r=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],n=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let o;t.UnicodeV6=class{constructor(){if(this.version=\"6\",!o){o=new Uint8Array(65536),o.fill(1),o[0]=0,o.fill(0,1,32),o.fill(0,127,160),o.fill(2,4352,4448),o[9001]=2,o[9002]=2,o.fill(2,11904,42192),o[12351]=1,o.fill(2,44032,55204),o.fill(2,63744,64256),o.fill(2,65040,65050),o.fill(2,65072,65136),o.fill(2,65280,65377),o.fill(2,65504,65511);for(let e=0;et[r][1])return!1;for(;r>=s;)if(i=s+r>>1,e>t[i][1])s=i+1;else{if(!(e=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let i=this.wcwidth(e),r=0===i&&0!==t;if(r){const e=s.UnicodeService.extractWidth(t);0===e?r=!1:e>i&&(i=e)}return s.UnicodeService.createPropertyValue(0,i,r)}}},5981:(e,t,i)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.WriteBuffer=void 0;const s=i(8460),r=i(844);class n extends r.Disposable{constructor(e){super(),this._action=e,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new s.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(e,t){if(void 0!==t&&this._syncCalls>t)return void(this._syncCalls=0);if(this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let i;for(this._isSyncWriting=!0;i=this._writeBuffer.shift();){this._action(i);const e=this._callbacks.shift();e&&e()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(e,t){if(this._pendingData>5e7)throw new Error(\"write data discarded, use flow control to avoid losing data\");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t)}_innerWrite(e=0,t=!0){const i=e||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const e=this._writeBuffer[this._bufferOffset],s=this._action(e,t);if(s){const e=e=>Date.now()-i>=12?setTimeout((()=>this._innerWrite(0,e))):this._innerWrite(i,e);return void s.catch((e=>(queueMicrotask((()=>{throw e})),Promise.resolve(!1)))).then(e)}const r=this._callbacks[this._bufferOffset];if(r&&r(),this._bufferOffset++,this._pendingData-=e.length,Date.now()-i>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}t.WriteBuffer=n},5941:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.toRgbString=t.parseColor=void 0;const i=/^([\\da-f])\\/([\\da-f])\\/([\\da-f])$|^([\\da-f]{2})\\/([\\da-f]{2})\\/([\\da-f]{2})$|^([\\da-f]{3})\\/([\\da-f]{3})\\/([\\da-f]{3})$|^([\\da-f]{4})\\/([\\da-f]{4})\\/([\\da-f]{4})$/,s=/^[\\da-f]+$/;function r(e,t){const i=e.toString(16),s=i.length<2?\"0\"+i:i;switch(t){case 4:return i[0];case 8:return s;case 12:return(s+s).slice(0,3);default:return s+s}}t.parseColor=function(e){if(!e)return;let t=e.toLowerCase();if(0===t.indexOf(\"rgb:\")){t=t.slice(4);const e=i.exec(t);if(e){const t=e[1]?15:e[4]?255:e[7]?4095:65535;return[Math.round(parseInt(e[1]||e[4]||e[7]||e[10],16)/t*255),Math.round(parseInt(e[2]||e[5]||e[8]||e[11],16)/t*255),Math.round(parseInt(e[3]||e[6]||e[9]||e[12],16)/t*255)]}}else if(0===t.indexOf(\"#\")&&(t=t.slice(1),s.exec(t)&&[3,6,9,12].includes(t.length))){const e=t.length/3,i=[0,0,0];for(let s=0;s<3;++s){const r=parseInt(t.slice(e*s,e*s+e),16);i[s]=1===e?r<<4:2===e?r:3===e?r>>4:r>>8}return i}},t.toRgbString=function(e,t=16){const[i,s,n]=e;return`rgb:${r(i,t)}/${r(s,t)}/${r(n,t)}`}},5770:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.PAYLOAD_LIMIT=void 0,t.PAYLOAD_LIMIT=1e7},6351:(e,t,i)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.DcsHandler=t.DcsParser=void 0;const s=i(482),r=i(8742),n=i(5770),o=[];t.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=o,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=o}registerHandler(e,t){void 0===this._handlers[e]&&(this._handlers[e]=[]);const i=this._handlers[e];return i.push(t),{dispose:()=>{const e=i.indexOf(t);-1!==e&&i.splice(e,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}reset(){if(this._active.length)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].unhook(!1);this._stack.paused=!1,this._active=o,this._ident=0}hook(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||o,this._active.length)for(let e=this._active.length-1;e>=0;e--)this._active[e].hook(t);else this._handlerFb(this._ident,\"HOOK\",t)}put(e,t,i){if(this._active.length)for(let s=this._active.length-1;s>=0;s--)this._active[s].put(e,t,i);else this._handlerFb(this._ident,\"PUT\",(0,s.utf32ToString)(e,t,i))}unhook(e,t=!0){if(this._active.length){let i=!1,s=this._active.length-1,r=!1;if(this._stack.paused&&(s=this._stack.loopPosition-1,i=t,r=this._stack.fallThrough,this._stack.paused=!1),!r&&!1===i){for(;s>=0&&(i=this._active[s].unhook(e),!0!==i);s--)if(i instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=s,this._stack.fallThrough=!1,i;s--}for(;s>=0;s--)if(i=this._active[s].unhook(!1),i instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=s,this._stack.fallThrough=!0,i}else this._handlerFb(this._ident,\"UNHOOK\",e);this._active=o,this._ident=0}};const a=new r.Params;a.addParam(0),t.DcsHandler=class{constructor(e){this._handler=e,this._data=\"\",this._params=a,this._hitLimit=!1}hook(e){this._params=e.length>1||e.params[0]?e.clone():a,this._data=\"\",this._hitLimit=!1}put(e,t,i){this._hitLimit||(this._data+=(0,s.utf32ToString)(e,t,i),this._data.length>n.PAYLOAD_LIMIT&&(this._data=\"\",this._hitLimit=!0))}unhook(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data,this._params),t instanceof Promise))return t.then((e=>(this._params=a,this._data=\"\",this._hitLimit=!1,e)));return this._params=a,this._data=\"\",this._hitLimit=!1,t}}},2015:(e,t,i)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.EscapeSequenceParser=t.VT500_TRANSITION_TABLE=t.TransitionTable=void 0;const s=i(844),r=i(8742),n=i(6242),o=i(6351);class a{constructor(e){this.table=new Uint8Array(e)}setDefault(e,t){this.table.fill(e<<4|t)}add(e,t,i,s){this.table[t<<8|e]=i<<4|s}addMany(e,t,i,s){for(let r=0;rt)),i=(e,i)=>t.slice(e,i),s=i(32,127),r=i(0,24);r.push(25),r.push.apply(r,i(28,32));const n=i(0,14);let o;for(o in e.setDefault(1,0),e.addMany(s,0,2,0),n)e.addMany([24,26,153,154],o,3,0),e.addMany(i(128,144),o,3,0),e.addMany(i(144,152),o,3,0),e.add(156,o,0,0),e.add(27,o,11,1),e.add(157,o,4,8),e.addMany([152,158,159],o,0,7),e.add(155,o,11,3),e.add(144,o,11,9);return e.addMany(r,0,3,0),e.addMany(r,1,3,1),e.add(127,1,0,1),e.addMany(r,8,0,8),e.addMany(r,3,3,3),e.add(127,3,0,3),e.addMany(r,4,3,4),e.add(127,4,0,4),e.addMany(r,6,3,6),e.addMany(r,5,3,5),e.add(127,5,0,5),e.addMany(r,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(s,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(i(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(s,7,0,7),e.addMany(r,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(i(64,127),3,7,0),e.addMany(i(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(i(48,60),4,8,4),e.addMany(i(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(i(32,64),6,0,6),e.add(127,6,0,6),e.addMany(i(64,127),6,0,0),e.addMany(i(32,48),3,9,5),e.addMany(i(32,48),5,9,5),e.addMany(i(48,64),5,0,6),e.addMany(i(64,127),5,7,0),e.addMany(i(32,48),4,9,5),e.addMany(i(32,48),1,9,2),e.addMany(i(32,48),2,9,2),e.addMany(i(48,127),2,10,0),e.addMany(i(48,80),1,10,0),e.addMany(i(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(i(96,127),1,10,0),e.add(80,1,11,9),e.addMany(r,9,0,9),e.add(127,9,0,9),e.addMany(i(28,32),9,0,9),e.addMany(i(32,48),9,9,12),e.addMany(i(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(r,11,0,11),e.addMany(i(32,128),11,0,11),e.addMany(i(28,32),11,0,11),e.addMany(r,10,0,10),e.add(127,10,0,10),e.addMany(i(28,32),10,0,10),e.addMany(i(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(i(32,48),10,9,12),e.addMany(r,12,0,12),e.add(127,12,0,12),e.addMany(i(28,32),12,0,12),e.addMany(i(32,48),12,9,12),e.addMany(i(48,64),12,0,11),e.addMany(i(64,127),12,12,13),e.addMany(i(64,127),10,12,13),e.addMany(i(64,127),9,12,13),e.addMany(r,13,13,13),e.addMany(s,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(h,0,2,0),e.add(h,8,5,8),e.add(h,6,0,6),e.add(h,11,0,11),e.add(h,13,13,13),e}();class c extends s.Disposable{constructor(e=t.VT500_TRANSITION_TABLE){super(),this._transitions=e,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new r.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(e,t,i)=>{},this._executeHandlerFb=e=>{},this._csiHandlerFb=(e,t)=>{},this._escHandlerFb=e=>{},this._errorHandlerFb=e=>e,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,s.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new n.OscParser),this._dcsParser=this.register(new o.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:\"\\\\\"},(()=>!0))}_identifier(e,t=[64,126]){let i=0;if(e.prefix){if(e.prefix.length>1)throw new Error(\"only one byte as prefix supported\");if(i=e.prefix.charCodeAt(0),i&&60>i||i>63)throw new Error(\"prefix must be in range 0x3c .. 0x3f\")}if(e.intermediates){if(e.intermediates.length>2)throw new Error(\"only two bytes as intermediates are supported\");for(let t=0;ts||s>47)throw new Error(\"intermediate must be in range 0x20 .. 0x2f\");i<<=8,i|=s}}if(1!==e.final.length)throw new Error(\"final must be a single byte\");const s=e.final.charCodeAt(0);if(t[0]>s||s>t[1])throw new Error(`final must be in range ${t[0]} .. ${t[1]}`);return i<<=8,i|=s,i}identToString(e){const t=[];for(;e;)t.push(String.fromCharCode(255&e)),e>>=8;return t.reverse().join(\"\")}setPrintHandler(e){this._printHandler=e}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(e,t){const i=this._identifier(e,[48,126]);void 0===this._escHandlers[i]&&(this._escHandlers[i]=[]);const s=this._escHandlers[i];return s.push(t),{dispose:()=>{const e=s.indexOf(t);-1!==e&&s.splice(e,1)}}}clearEscHandler(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]}setEscHandlerFallback(e){this._escHandlerFb=e}setExecuteHandler(e,t){this._executeHandlers[e.charCodeAt(0)]=t}clearExecuteHandler(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]}setExecuteHandlerFallback(e){this._executeHandlerFb=e}registerCsiHandler(e,t){const i=this._identifier(e);void 0===this._csiHandlers[i]&&(this._csiHandlers[i]=[]);const s=this._csiHandlers[i];return s.push(t),{dispose:()=>{const e=s.indexOf(t);-1!==e&&s.splice(e,1)}}}clearCsiHandler(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]}setCsiHandlerFallback(e){this._csiHandlerFb=e}registerDcsHandler(e,t){return this._dcsParser.registerHandler(this._identifier(e),t)}clearDcsHandler(e){this._dcsParser.clearHandler(this._identifier(e))}setDcsHandlerFallback(e){this._dcsParser.setHandlerFallback(e)}registerOscHandler(e,t){return this._oscParser.registerHandler(e,t)}clearOscHandler(e){this._oscParser.clearHandler(e)}setOscHandlerFallback(e){this._oscParser.setHandlerFallback(e)}setErrorHandler(e){this._errorHandler=e}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,0!==this._parseStack.state&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(e,t,i,s,r){this._parseStack.state=e,this._parseStack.handlers=t,this._parseStack.handlerPos=i,this._parseStack.transition=s,this._parseStack.chunkPos=r}parse(e,t,i){let s,r=0,n=0,o=0;if(this._parseStack.state)if(2===this._parseStack.state)this._parseStack.state=0,o=this._parseStack.chunkPos+1;else{if(void 0===i||1===this._parseStack.state)throw this._parseStack.state=1,new Error(\"improper continuation due to previous async handler, giving up parsing\");const t=this._parseStack.handlers;let n=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(!1===i&&n>-1)for(;n>=0&&(s=t[n](this._params),!0!==s);n--)if(s instanceof Promise)return this._parseStack.handlerPos=n,s;this._parseStack.handlers=[];break;case 4:if(!1===i&&n>-1)for(;n>=0&&(s=t[n](),!0!==s);n--)if(s instanceof Promise)return this._parseStack.handlerPos=n,s;this._parseStack.handlers=[];break;case 6:if(r=e[this._parseStack.chunkPos],s=this._dcsParser.unhook(24!==r&&26!==r,i),s)return s;27===r&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(r=e[this._parseStack.chunkPos],s=this._oscParser.end(24!==r&&26!==r,i),s)return s;27===r&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,o=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let i=o;i>4){case 2:for(let s=i+1;;++s){if(s>=t||(r=e[s])<32||r>126&&r=t||(r=e[s])<32||r>126&&r=t||(r=e[s])<32||r>126&&r=t||(r=e[s])<32||r>126&&r=0&&(s=o[a](this._params),!0!==s);a--)if(s instanceof Promise)return this._preserveStack(3,o,a,n,i),s;a<0&&this._csiHandlerFb(this._collect<<8|r,this._params),this.precedingJoinState=0;break;case 8:do{switch(r){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(r-48)}}while(++i47&&r<60);i--;break;case 9:this._collect<<=8,this._collect|=r;break;case 10:const c=this._escHandlers[this._collect<<8|r];let l=c?c.length-1:-1;for(;l>=0&&(s=c[l](),!0!==s);l--)if(s instanceof Promise)return this._preserveStack(4,c,l,n,i),s;l<0&&this._escHandlerFb(this._collect<<8|r),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|r,this._params);break;case 13:for(let s=i+1;;++s)if(s>=t||24===(r=e[s])||26===r||27===r||r>127&&r=t||(r=e[s])<32||r>127&&r{Object.defineProperty(t,\"__esModule\",{value:!0}),t.OscHandler=t.OscParser=void 0;const s=i(5770),r=i(482),n=[];t.OscParser=class{constructor(){this._state=0,this._active=n,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(e,t){void 0===this._handlers[e]&&(this._handlers[e]=[]);const i=this._handlers[e];return i.push(t),{dispose:()=>{const e=i.indexOf(t);-1!==e&&i.splice(e,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=n}reset(){if(2===this._state)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].end(!1);this._stack.paused=!1,this._active=n,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||n,this._active.length)for(let e=this._active.length-1;e>=0;e--)this._active[e].start();else this._handlerFb(this._id,\"START\")}_put(e,t,i){if(this._active.length)for(let s=this._active.length-1;s>=0;s--)this._active[s].put(e,t,i);else this._handlerFb(this._id,\"PUT\",(0,r.utf32ToString)(e,t,i))}start(){this.reset(),this._state=1}put(e,t,i){if(3!==this._state){if(1===this._state)for(;t0&&this._put(e,t,i)}}end(e,t=!0){if(0!==this._state){if(3!==this._state)if(1===this._state&&this._start(),this._active.length){let i=!1,s=this._active.length-1,r=!1;if(this._stack.paused&&(s=this._stack.loopPosition-1,i=t,r=this._stack.fallThrough,this._stack.paused=!1),!r&&!1===i){for(;s>=0&&(i=this._active[s].end(e),!0!==i);s--)if(i instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=s,this._stack.fallThrough=!1,i;s--}for(;s>=0;s--)if(i=this._active[s].end(!1),i instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=s,this._stack.fallThrough=!0,i}else this._handlerFb(this._id,\"END\",e);this._active=n,this._id=-1,this._state=0}}},t.OscHandler=class{constructor(e){this._handler=e,this._data=\"\",this._hitLimit=!1}start(){this._data=\"\",this._hitLimit=!1}put(e,t,i){this._hitLimit||(this._data+=(0,r.utf32ToString)(e,t,i),this._data.length>s.PAYLOAD_LIMIT&&(this._data=\"\",this._hitLimit=!0))}end(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data),t instanceof Promise))return t.then((e=>(this._data=\"\",this._hitLimit=!1,e)));return this._data=\"\",this._hitLimit=!1,t}}},8742:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.Params=void 0;const i=2147483647;class s{static fromArray(e){const t=new s;if(!e.length)return t;for(let i=Array.isArray(e[0])?1:0;i256)throw new Error(\"maxSubParamsLength must not be greater than 256\");this.params=new Int32Array(e),this.length=0,this._subParams=new Int32Array(t),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(e),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const e=new s(this.maxLength,this.maxSubParamsLength);return e.params.set(this.params),e.length=this.length,e._subParams.set(this._subParams),e._subParamsLength=this._subParamsLength,e._subParamsIdx.set(this._subParamsIdx),e._rejectDigits=this._rejectDigits,e._rejectSubDigits=this._rejectSubDigits,e._digitIsSub=this._digitIsSub,e}toArray(){const e=[];for(let t=0;t>8,s=255&this._subParamsIdx[t];s-i>0&&e.push(Array.prototype.slice.call(this._subParams,i,s))}return e}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(e){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(e<-1)throw new Error(\"values lesser than -1 are not allowed\");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=e>i?i:e}}addSubParam(e){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(e<-1)throw new Error(\"values lesser than -1 are not allowed\");this._subParams[this._subParamsLength++]=e>i?i:e,this._subParamsIdx[this.length-1]++}}hasSubParams(e){return(255&this._subParamsIdx[e])-(this._subParamsIdx[e]>>8)>0}getSubParams(e){const t=this._subParamsIdx[e]>>8,i=255&this._subParamsIdx[e];return i-t>0?this._subParams.subarray(t,i):null}getSubParamsAll(){const e={};for(let t=0;t>8,s=255&this._subParamsIdx[t];s-i>0&&(e[t]=this._subParams.slice(i,s))}return e}addDigit(e){let t;if(this._rejectDigits||!(t=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const s=this._digitIsSub?this._subParams:this.params,r=s[t-1];s[t-1]=~r?Math.min(10*r+e,i):e}}t.Params=s},5741:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.AddonManager=void 0,t.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let e=this._addons.length-1;e>=0;e--)this._addons[e].instance.dispose()}loadAddon(e,t){const i={instance:t,dispose:t.dispose,isDisposed:!1};this._addons.push(i),t.dispose=()=>this._wrappedAddonDispose(i),t.activate(e)}_wrappedAddonDispose(e){if(e.isDisposed)return;let t=-1;for(let i=0;i{Object.defineProperty(t,\"__esModule\",{value:!0}),t.BufferApiView=void 0;const s=i(3785),r=i(511);t.BufferApiView=class{constructor(e,t){this._buffer=e,this.type=t}init(e){return this._buffer=e,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(e){const t=this._buffer.lines.get(e);if(t)return new s.BufferLineApiView(t)}getNullCell(){return new r.CellData}}},3785:(e,t,i)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.BufferLineApiView=void 0;const s=i(511);t.BufferLineApiView=class{constructor(e){this._line=e}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(e,t){if(!(e<0||e>=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new s.CellData)}translateToString(e,t,i){return this._line.translateToString(e,t,i)}}},8285:(e,t,i)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.BufferNamespaceApi=void 0;const s=i(8771),r=i(8460),n=i(844);class o extends n.Disposable{constructor(e){super(),this._core=e,this._onBufferChange=this.register(new r.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new s.BufferApiView(this._core.buffers.normal,\"normal\"),this._alternate=new s.BufferApiView(this._core.buffers.alt,\"alternate\"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error(\"Active buffer is neither normal nor alternate\")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}t.BufferNamespaceApi=o},7975:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.ParserApi=void 0,t.ParserApi=class{constructor(e){this._core=e}registerCsiHandler(e,t){return this._core.registerCsiHandler(e,(e=>t(e.toArray())))}addCsiHandler(e,t){return this.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._core.registerDcsHandler(e,((e,i)=>t(e,i.toArray())))}addDcsHandler(e,t){return this.registerDcsHandler(e,t)}registerEscHandler(e,t){return this._core.registerEscHandler(e,t)}addEscHandler(e,t){return this.registerEscHandler(e,t)}registerOscHandler(e,t){return this._core.registerOscHandler(e,t)}addOscHandler(e,t){return this.registerOscHandler(e,t)}}},7090:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.UnicodeApi=void 0,t.UnicodeApi=class{constructor(e){this._core=e}register(e){this._core.unicodeService.register(e)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(e){this._core.unicodeService.activeVersion=e}}},744:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(n<3?r(o):n>3?r(t,i,o):r(t,i))||o);return n>3&&o&&Object.defineProperty(t,i,o),o},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.BufferService=t.MINIMUM_ROWS=t.MINIMUM_COLS=void 0;const n=i(8460),o=i(844),a=i(5295),h=i(2585);t.MINIMUM_COLS=2,t.MINIMUM_ROWS=1;let c=t.BufferService=class extends o.Disposable{get buffer(){return this.buffers.active}constructor(e){super(),this.isUserScrolling=!1,this._onResize=this.register(new n.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new n.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(e.rawOptions.cols||0,t.MINIMUM_COLS),this.rows=Math.max(e.rawOptions.rows||0,t.MINIMUM_ROWS),this.buffers=this.register(new a.BufferSet(e,this))}resize(e,t){this.cols=e,this.rows=t,this.buffers.resize(e,t),this._onResize.fire({cols:e,rows:t})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(e,t=!1){const i=this.buffer;let s;s=this._cachedBlankLine,s&&s.length===this.cols&&s.getFg(0)===e.fg&&s.getBg(0)===e.bg||(s=i.getBlankLine(e,t),this._cachedBlankLine=s),s.isWrapped=t;const r=i.ybase+i.scrollTop,n=i.ybase+i.scrollBottom;if(0===i.scrollTop){const e=i.lines.isFull;n===i.lines.length-1?e?i.lines.recycle().copyFrom(s):i.lines.push(s.clone()):i.lines.splice(n+1,0,s.clone()),e?this.isUserScrolling&&(i.ydisp=Math.max(i.ydisp-1,0)):(i.ybase++,this.isUserScrolling||i.ydisp++)}else{const e=n-r+1;i.lines.shiftElements(r+1,e-1,-1),i.lines.set(n,s.clone())}this.isUserScrolling||(i.ydisp=i.ybase),this._onScroll.fire(i.ydisp)}scrollLines(e,t,i){const s=this.buffer;if(e<0){if(0===s.ydisp)return;this.isUserScrolling=!0}else e+s.ydisp>=s.ybase&&(this.isUserScrolling=!1);const r=s.ydisp;s.ydisp=Math.max(Math.min(s.ydisp+e,s.ybase),0),r!==s.ydisp&&(t||this._onScroll.fire(s.ydisp))}};t.BufferService=c=s([r(0,h.IOptionsService)],c)},7994:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.CharsetService=void 0,t.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(e){this.glevel=e,this.charset=this._charsets[e]}setgCharset(e,t){this._charsets[e]=t,this.glevel===e&&(this.charset=t)}}},1753:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(n<3?r(o):n>3?r(t,i,o):r(t,i))||o);return n>3&&o&&Object.defineProperty(t,i,o),o},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.CoreMouseService=void 0;const n=i(2585),o=i(8460),a=i(844),h={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:e=>4!==e.button&&1===e.action&&(e.ctrl=!1,e.alt=!1,e.shift=!1,!0)},VT200:{events:19,restrict:e=>32!==e.action},DRAG:{events:23,restrict:e=>32!==e.action||3!==e.button},ANY:{events:31,restrict:e=>!0}};function c(e,t){let i=(e.ctrl?16:0)|(e.shift?4:0)|(e.alt?8:0);return 4===e.button?(i|=64,i|=e.action):(i|=3&e.button,4&e.button&&(i|=64),8&e.button&&(i|=128),32===e.action?i|=32:0!==e.action||t||(i|=3)),i}const l=String.fromCharCode,d={DEFAULT:e=>{const t=[c(e,!1)+32,e.col+32,e.row+32];return t[0]>255||t[1]>255||t[2]>255?\"\":`\u001b[M${l(t[0])}${l(t[1])}${l(t[2])}`},SGR:e=>{const t=0===e.action&&4!==e.button?\"m\":\"M\";return`\u001b[<${c(e,!0)};${e.col};${e.row}${t}`},SGR_PIXELS:e=>{const t=0===e.action&&4!==e.button?\"m\":\"M\";return`\u001b[<${c(e,!0)};${e.x};${e.y}${t}`}};let _=t.CoreMouseService=class extends a.Disposable{constructor(e,t){super(),this._bufferService=e,this._coreService=t,this._protocols={},this._encodings={},this._activeProtocol=\"\",this._activeEncoding=\"\",this._lastEvent=null,this._onProtocolChange=this.register(new o.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const e of Object.keys(h))this.addProtocol(e,h[e]);for(const e of Object.keys(d))this.addEncoding(e,d[e]);this.reset()}addProtocol(e,t){this._protocols[e]=t}addEncoding(e,t){this._encodings[e]=t}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return 0!==this._protocols[this._activeProtocol].events}set activeProtocol(e){if(!this._protocols[e])throw new Error(`unknown protocol \"${e}\"`);this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(e){if(!this._encodings[e])throw new Error(`unknown encoding \"${e}\"`);this._activeEncoding=e}reset(){this.activeProtocol=\"NONE\",this.activeEncoding=\"DEFAULT\",this._lastEvent=null}triggerMouseEvent(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows)return!1;if(4===e.button&&32===e.action)return!1;if(3===e.button&&32!==e.action)return!1;if(4!==e.button&&(2===e.action||3===e.action))return!1;if(e.col++,e.row++,32===e.action&&this._lastEvent&&this._equalEvents(this._lastEvent,e,\"SGR_PIXELS\"===this._activeEncoding))return!1;if(!this._protocols[this._activeProtocol].restrict(e))return!1;const t=this._encodings[this._activeEncoding](e);return t&&(\"DEFAULT\"===this._activeEncoding?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0}explainEvents(e){return{down:!!(1&e),up:!!(2&e),drag:!!(4&e),move:!!(8&e),wheel:!!(16&e)}}_equalEvents(e,t,i){if(i){if(e.x!==t.x)return!1;if(e.y!==t.y)return!1}else{if(e.col!==t.col)return!1;if(e.row!==t.row)return!1}return e.button===t.button&&e.action===t.action&&e.ctrl===t.ctrl&&e.alt===t.alt&&e.shift===t.shift}};t.CoreMouseService=_=s([r(0,n.IBufferService),r(1,n.ICoreService)],_)},6975:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(n<3?r(o):n>3?r(t,i,o):r(t,i))||o);return n>3&&o&&Object.defineProperty(t,i,o),o},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.CoreService=void 0;const n=i(1439),o=i(8460),a=i(844),h=i(2585),c=Object.freeze({insertMode:!1}),l=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let d=t.CoreService=class extends a.Disposable{constructor(e,t,i){super(),this._bufferService=e,this._logService=t,this._optionsService=i,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new o.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new o.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new o.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new o.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,n.clone)(c),this.decPrivateModes=(0,n.clone)(l)}reset(){this.modes=(0,n.clone)(c),this.decPrivateModes=(0,n.clone)(l)}triggerDataEvent(e,t=!1){if(this._optionsService.rawOptions.disableStdin)return;const i=this._bufferService.buffer;t&&this._optionsService.rawOptions.scrollOnUserInput&&i.ybase!==i.ydisp&&this._onRequestScrollToBottom.fire(),t&&this._onUserInput.fire(),this._logService.debug(`sending data \"${e}\"`,(()=>e.split(\"\").map((e=>e.charCodeAt(0))))),this._onData.fire(e)}triggerBinaryEvent(e){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary \"${e}\"`,(()=>e.split(\"\").map((e=>e.charCodeAt(0))))),this._onBinary.fire(e))}};t.CoreService=d=s([r(0,h.IBufferService),r(1,h.ILogService),r(2,h.IOptionsService)],d)},9074:(e,t,i)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.DecorationService=void 0;const s=i(8055),r=i(8460),n=i(844),o=i(6106);let a=0,h=0;class c extends n.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new o.SortedList((e=>e?.marker.line)),this._onDecorationRegistered=this.register(new r.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new r.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,n.toDisposable)((()=>this.reset())))}registerDecoration(e){if(e.marker.isDisposed)return;const t=new l(e);if(t){const e=t.marker.onDispose((()=>t.dispose()));t.onDispose((()=>{t&&(this._decorations.delete(t)&&this._onDecorationRemoved.fire(t),e.dispose())})),this._decorations.insert(t),this._onDecorationRegistered.fire(t)}return t}reset(){for(const e of this._decorations.values())e.dispose();this._decorations.clear()}*getDecorationsAtCell(e,t,i){let s=0,r=0;for(const n of this._decorations.getKeyIterator(t))s=n.options.x??0,r=s+(n.options.width??1),e>=s&&e{a=t.options.x??0,h=a+(t.options.width??1),e>=a&&e{Object.defineProperty(t,\"__esModule\",{value:!0}),t.InstantiationService=t.ServiceCollection=void 0;const s=i(2585),r=i(8343);class n{constructor(...e){this._entries=new Map;for(const[t,i]of e)this.set(t,i)}set(e,t){const i=this._entries.get(e);return this._entries.set(e,t),i}forEach(e){for(const[t,i]of this._entries.entries())e(t,i)}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}}t.ServiceCollection=n,t.InstantiationService=class{constructor(){this._services=new n,this._services.set(s.IInstantiationService,this)}setService(e,t){this._services.set(e,t)}getService(e){return this._services.get(e)}createInstance(e,...t){const i=(0,r.getServiceDependencies)(e).sort(((e,t)=>e.index-t.index)),s=[];for(const t of i){const i=this._services.get(t.id);if(!i)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${t.id}.`);s.push(i)}const n=i.length>0?i[0].index:t.length;if(t.length!==n)throw new Error(`[createInstance] First service dependency of ${e.name} at position ${n+1} conflicts with ${t.length} static arguments`);return new e(...[...t,...s])}}},7866:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(n<3?r(o):n>3?r(t,i,o):r(t,i))||o);return n>3&&o&&Object.defineProperty(t,i,o),o},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.traceCall=t.setTraceLogger=t.LogService=void 0;const n=i(844),o=i(2585),a={trace:o.LogLevelEnum.TRACE,debug:o.LogLevelEnum.DEBUG,info:o.LogLevelEnum.INFO,warn:o.LogLevelEnum.WARN,error:o.LogLevelEnum.ERROR,off:o.LogLevelEnum.OFF};let h,c=t.LogService=class extends n.Disposable{get logLevel(){return this._logLevel}constructor(e){super(),this._optionsService=e,this._logLevel=o.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange(\"logLevel\",(()=>this._updateLogLevel()))),h=this}_updateLogLevel(){this._logLevel=a[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;tJSON.stringify(e))).join(\", \")})`);const t=s.apply(this,e);return h.trace(`GlyphRenderer#${s.name} return`,t),t}}},7302:(e,t,i)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.OptionsService=t.DEFAULT_OPTIONS=void 0;const s=i(8460),r=i(844),n=i(6114);t.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:\"block\",cursorWidth:1,cursorInactiveStyle:\"outline\",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:\"alt\",fastScrollSensitivity:5,fontFamily:\"courier-new, courier, monospace\",fontSize:15,fontWeight:\"normal\",fontWeightBold:\"bold\",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:\"info\",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:n.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:\" ()[]{}',\\\"`\",altClickMovesCursor:!0,convertEol:!1,termName:\"xterm\",cancelEvents:!1,overviewRulerWidth:0};const o=[\"normal\",\"bold\",\"100\",\"200\",\"300\",\"400\",\"500\",\"600\",\"700\",\"800\",\"900\"];class a extends r.Disposable{constructor(e){super(),this._onOptionChange=this.register(new s.EventEmitter),this.onOptionChange=this._onOptionChange.event;const i={...t.DEFAULT_OPTIONS};for(const t in e)if(t in i)try{const s=e[t];i[t]=this._sanitizeAndValidateOption(t,s)}catch(e){console.error(e)}this.rawOptions=i,this.options={...i},this._setupOptions(),this.register((0,r.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(e,t){return this.onOptionChange((i=>{i===e&&t(this.rawOptions[e])}))}onMultipleOptionChange(e,t){return this.onOptionChange((i=>{-1!==e.indexOf(i)&&t()}))}_setupOptions(){const e=e=>{if(!(e in t.DEFAULT_OPTIONS))throw new Error(`No option with key \"${e}\"`);return this.rawOptions[e]},i=(e,i)=>{if(!(e in t.DEFAULT_OPTIONS))throw new Error(`No option with key \"${e}\"`);i=this._sanitizeAndValidateOption(e,i),this.rawOptions[e]!==i&&(this.rawOptions[e]=i,this._onOptionChange.fire(e))};for(const t in this.rawOptions){const s={get:e.bind(this,t),set:i.bind(this,t)};Object.defineProperty(this.options,t,s)}}_sanitizeAndValidateOption(e,i){switch(e){case\"cursorStyle\":if(i||(i=t.DEFAULT_OPTIONS[e]),!function(e){return\"block\"===e||\"underline\"===e||\"bar\"===e}(i))throw new Error(`\"${i}\" is not a valid value for ${e}`);break;case\"wordSeparator\":i||(i=t.DEFAULT_OPTIONS[e]);break;case\"fontWeight\":case\"fontWeightBold\":if(\"number\"==typeof i&&1<=i&&i<=1e3)break;i=o.includes(i)?i:t.DEFAULT_OPTIONS[e];break;case\"cursorWidth\":i=Math.floor(i);case\"lineHeight\":case\"tabStopWidth\":if(i<1)throw new Error(`${e} cannot be less than 1, value: ${i}`);break;case\"minimumContrastRatio\":i=Math.max(1,Math.min(21,Math.round(10*i)/10));break;case\"scrollback\":if((i=Math.min(i,4294967295))<0)throw new Error(`${e} cannot be less than 0, value: ${i}`);break;case\"fastScrollSensitivity\":case\"scrollSensitivity\":if(i<=0)throw new Error(`${e} cannot be less than or equal to 0, value: ${i}`);break;case\"rows\":case\"cols\":if(!i&&0!==i)throw new Error(`${e} must be numeric, value: ${i}`);break;case\"windowsPty\":i=i??{}}return i}}t.OptionsService=a},2660:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(n<3?r(o):n>3?r(t,i,o):r(t,i))||o);return n>3&&o&&Object.defineProperty(t,i,o),o},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.OscLinkService=void 0;const n=i(2585);let o=t.OscLinkService=class{constructor(e){this._bufferService=e,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(e){const t=this._bufferService.buffer;if(void 0===e.id){const i=t.addMarker(t.ybase+t.y),s={data:e,id:this._nextId++,lines:[i]};return i.onDispose((()=>this._removeMarkerFromLink(s,i))),this._dataByLinkId.set(s.id,s),s.id}const i=e,s=this._getEntryIdKey(i),r=this._entriesWithId.get(s);if(r)return this.addLineToLink(r.id,t.ybase+t.y),r.id;const n=t.addMarker(t.ybase+t.y),o={id:this._nextId++,key:this._getEntryIdKey(i),data:i,lines:[n]};return n.onDispose((()=>this._removeMarkerFromLink(o,n))),this._entriesWithId.set(o.key,o),this._dataByLinkId.set(o.id,o),o.id}addLineToLink(e,t){const i=this._dataByLinkId.get(e);if(i&&i.lines.every((e=>e.line!==t))){const e=this._bufferService.buffer.addMarker(t);i.lines.push(e),e.onDispose((()=>this._removeMarkerFromLink(i,e)))}}getLinkData(e){return this._dataByLinkId.get(e)?.data}_getEntryIdKey(e){return`${e.id};;${e.uri}`}_removeMarkerFromLink(e,t){const i=e.lines.indexOf(t);-1!==i&&(e.lines.splice(i,1),0===e.lines.length&&(void 0!==e.data.id&&this._entriesWithId.delete(e.key),this._dataByLinkId.delete(e.id)))}};t.OscLinkService=o=s([r(0,n.IBufferService)],o)},8343:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.createDecorator=t.getServiceDependencies=t.serviceRegistry=void 0;const i=\"di$target\",s=\"di$dependencies\";t.serviceRegistry=new Map,t.getServiceDependencies=function(e){return e[s]||[]},t.createDecorator=function(e){if(t.serviceRegistry.has(e))return t.serviceRegistry.get(e);const r=function(e,t,n){if(3!==arguments.length)throw new Error(\"@IServiceName-decorator can only be used to decorate a parameter\");!function(e,t,r){t[i]===t?t[s].push({id:e,index:r}):(t[s]=[{id:e,index:r}],t[i]=t)}(r,e,n)};return r.toString=()=>e,t.serviceRegistry.set(e,r),r}},2585:(e,t,i)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.IDecorationService=t.IUnicodeService=t.IOscLinkService=t.IOptionsService=t.ILogService=t.LogLevelEnum=t.IInstantiationService=t.ICharsetService=t.ICoreService=t.ICoreMouseService=t.IBufferService=void 0;const s=i(8343);var r;t.IBufferService=(0,s.createDecorator)(\"BufferService\"),t.ICoreMouseService=(0,s.createDecorator)(\"CoreMouseService\"),t.ICoreService=(0,s.createDecorator)(\"CoreService\"),t.ICharsetService=(0,s.createDecorator)(\"CharsetService\"),t.IInstantiationService=(0,s.createDecorator)(\"InstantiationService\"),function(e){e[e.TRACE=0]=\"TRACE\",e[e.DEBUG=1]=\"DEBUG\",e[e.INFO=2]=\"INFO\",e[e.WARN=3]=\"WARN\",e[e.ERROR=4]=\"ERROR\",e[e.OFF=5]=\"OFF\"}(r||(t.LogLevelEnum=r={})),t.ILogService=(0,s.createDecorator)(\"LogService\"),t.IOptionsService=(0,s.createDecorator)(\"OptionsService\"),t.IOscLinkService=(0,s.createDecorator)(\"OscLinkService\"),t.IUnicodeService=(0,s.createDecorator)(\"UnicodeService\"),t.IDecorationService=(0,s.createDecorator)(\"DecorationService\")},1480:(e,t,i)=>{Object.defineProperty(t,\"__esModule\",{value:!0}),t.UnicodeService=void 0;const s=i(8460),r=i(225);class n{static extractShouldJoin(e){return 0!=(1&e)}static extractWidth(e){return e>>1&3}static extractCharKind(e){return e>>3}static createPropertyValue(e,t,i=!1){return(16777215&e)<<3|(3&t)<<1|(i?1:0)}constructor(){this._providers=Object.create(null),this._active=\"\",this._onChange=new s.EventEmitter,this.onChange=this._onChange.event;const e=new r.UnicodeV6;this.register(e),this._active=e.version,this._activeProvider=e}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(e){if(!this._providers[e])throw new Error(`unknown Unicode version \"${e}\"`);this._active=e,this._activeProvider=this._providers[e],this._onChange.fire(e)}register(e){this._providers[e.version]=e}wcwidth(e){return this._activeProvider.wcwidth(e)}getStringCellWidth(e){let t=0,i=0;const s=e.length;for(let r=0;r=s)return t+this.wcwidth(o);const i=e.charCodeAt(r);56320<=i&&i<=57343?o=1024*(o-55296)+i-56320+65536:t+=this.wcwidth(i)}const a=this.charProperties(o,i);let h=n.extractWidth(a);n.extractShouldJoin(a)&&(h-=n.extractWidth(i)),t+=h,i=a}return t}charProperties(e,t){return this._activeProvider.charProperties(e,t)}}t.UnicodeService=n}},t={};function i(s){var r=t[s];if(void 0!==r)return r.exports;var n=t[s]={exports:{}};return e[s].call(n.exports,n,n.exports,i),n.exports}var s={};return(()=>{var e=s;Object.defineProperty(e,\"__esModule\",{value:!0}),e.Terminal=void 0;const t=i(9042),r=i(3236),n=i(844),o=i(5741),a=i(8285),h=i(7975),c=i(7090),l=[\"cols\",\"rows\"];class d extends n.Disposable{constructor(e){super(),this._core=this.register(new r.Terminal(e)),this._addonManager=this.register(new o.AddonManager),this._publicOptions={...this._core.options};const t=e=>this._core.options[e],i=(e,t)=>{this._checkReadonlyOptions(e),this._core.options[e]=t};for(const e in this._core.options){const s={get:t.bind(this,e),set:i.bind(this,e)};Object.defineProperty(this._publicOptions,e,s)}}_checkReadonlyOptions(e){if(l.includes(e))throw new Error(`Option \"${e}\" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error(\"You must set the allowProposedApi option to true to use proposed API\")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new h.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new c.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new a.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const e=this._core.coreService.decPrivateModes;let t=\"none\";switch(this._core.coreMouseService.activeProtocol){case\"X10\":t=\"x10\";break;case\"VT200\":t=\"vt200\";break;case\"DRAG\":t=\"drag\";break;case\"ANY\":t=\"any\"}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,wraparoundMode:e.wraparound}}get options(){return this._publicOptions}set options(e){for(const t in e)this._publicOptions[t]=e[t]}blur(){this._core.blur()}focus(){this._core.focus()}input(e,t=!0){this._core.input(e,t)}resize(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)}open(e){this._core.open(e)}attachCustomKeyEventHandler(e){this._core.attachCustomKeyEventHandler(e)}attachCustomWheelEventHandler(e){this._core.attachCustomWheelEventHandler(e)}registerLinkProvider(e){return this._core.registerLinkProvider(e)}registerCharacterJoiner(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)}deregisterCharacterJoiner(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)}registerMarker(e=0){return this._verifyIntegers(e),this._core.registerMarker(e)}registerDecoration(e){return this._checkProposedApi(),this._verifyPositiveIntegers(e.x??0,e.width??0,e.height??0),this._core.registerDecoration(e)}hasSelection(){return this._core.hasSelection()}select(e,t,i){this._verifyIntegers(e,t,i),this._core.select(e,t,i)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)}dispose(){super.dispose()}scrollLines(e){this._verifyIntegers(e),this._core.scrollLines(e)}scrollPages(e){this._verifyIntegers(e),this._core.scrollPages(e)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(e){this._verifyIntegers(e),this._core.scrollToLine(e)}clear(){this._core.clear()}write(e,t){this._core.write(e,t)}writeln(e,t){this._core.write(e),this._core.write(\"\\r\\n\",t)}paste(e){this._core.paste(e)}refresh(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(e){this._addonManager.loadAddon(this,e)}static get strings(){return t}_verifyIntegers(...e){for(const t of e)if(t===1/0||isNaN(t)||t%1!=0)throw new Error(\"This API only accepts integers\")}_verifyPositiveIntegers(...e){for(const t of e)if(t&&(t===1/0||isNaN(t)||t%1!=0||t<0))throw new Error(\"This API only accepts positive integers\")}}e.Terminal=d})(),s})()));\n//# sourceMappingURL=xterm.js.map","!function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof exports?exports.FitAddon=t():e.FitAddon=t()}(self,(()=>(()=>{\"use strict\";var e={};return(()=>{var t=e;Object.defineProperty(t,\"__esModule\",{value:!0}),t.FitAddon=void 0,t.FitAddon=class{activate(e){this._terminal=e}dispose(){}fit(){const e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;const t=this._terminal._core;this._terminal.rows===e.rows&&this._terminal.cols===e.cols||(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal)return;if(!this._terminal.element||!this._terminal.element.parentElement)return;const e=this._terminal._core,t=e._renderService.dimensions;if(0===t.css.cell.width||0===t.css.cell.height)return;const r=0===this._terminal.options.scrollback?0:e.viewport.scrollBarWidth,i=window.getComputedStyle(this._terminal.element.parentElement),o=parseInt(i.getPropertyValue(\"height\")),s=Math.max(0,parseInt(i.getPropertyValue(\"width\"))),n=window.getComputedStyle(this._terminal.element),l=o-(parseInt(n.getPropertyValue(\"padding-top\"))+parseInt(n.getPropertyValue(\"padding-bottom\"))),a=s-(parseInt(n.getPropertyValue(\"padding-right\"))+parseInt(n.getPropertyValue(\"padding-left\")))-r;return{cols:Math.max(2,Math.floor(a/t.css.cell.width)),rows:Math.max(1,Math.floor(l/t.css.cell.height))}}}})(),e})()));\n//# sourceMappingURL=addon-fit.js.map","import BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-progressspinner {\\n position: relative;\\n margin: 0 auto;\\n width: 100px;\\n height: 100px;\\n display: inline-block;\\n}\\n\\n.p-progressspinner::before {\\n content: \\\"\\\";\\n display: block;\\n padding-top: 100%;\\n}\\n\\n.p-progressspinner-spin {\\n height: 100%;\\n transform-origin: center center;\\n width: 100%;\\n position: absolute;\\n top: 0;\\n bottom: 0;\\n left: 0;\\n right: 0;\\n margin: auto;\\n animation: p-progressspinner-rotate 2s linear infinite;\\n}\\n\\n.p-progressspinner-circle {\\n stroke-dasharray: 89, 200;\\n stroke-dashoffset: 0;\\n stroke: \".concat(dt('progressspinner.color.1'), \";\\n animation: p-progressspinner-dash 1.5s ease-in-out infinite, p-progressspinner-color 6s ease-in-out infinite;\\n stroke-linecap: round;\\n}\\n\\n@keyframes p-progressspinner-rotate {\\n 100% {\\n transform: rotate(360deg);\\n }\\n}\\n@keyframes p-progressspinner-dash {\\n 0% {\\n stroke-dasharray: 1, 200;\\n stroke-dashoffset: 0;\\n }\\n 50% {\\n stroke-dasharray: 89, 200;\\n stroke-dashoffset: -35px;\\n }\\n 100% {\\n stroke-dasharray: 89, 200;\\n stroke-dashoffset: -124px;\\n }\\n}\\n@keyframes p-progressspinner-color {\\n 100%,\\n 0% {\\n stroke: \").concat(dt('progressspinner.color.1'), \";\\n }\\n 40% {\\n stroke: \").concat(dt('progressspinner.color.2'), \";\\n }\\n 66% {\\n stroke: \").concat(dt('progressspinner.color.3'), \";\\n }\\n 80%,\\n 90% {\\n stroke: \").concat(dt('progressspinner.color.4'), \";\\n }\\n}\\n\");\n};\nvar classes = {\n root: 'p-progressspinner',\n spin: 'p-progressspinner-spin',\n circle: 'p-progressspinner-circle'\n};\nvar ProgressSpinnerStyle = BaseStyle.extend({\n name: 'progressspinner',\n theme: theme,\n classes: classes\n});\n\nexport { ProgressSpinnerStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseComponent from '@primevue/core/basecomponent';\nimport ProgressSpinnerStyle from 'primevue/progressspinner/style';\nimport { openBlock, createElementBlock, mergeProps, createElementVNode } from 'vue';\n\nvar script$1 = {\n name: 'BaseProgressSpinner',\n \"extends\": BaseComponent,\n props: {\n strokeWidth: {\n type: String,\n \"default\": '2'\n },\n fill: {\n type: String,\n \"default\": 'none'\n },\n animationDuration: {\n type: String,\n \"default\": '2s'\n }\n },\n style: ProgressSpinnerStyle,\n provide: function provide() {\n return {\n $pcProgressSpinner: this,\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'ProgressSpinner',\n \"extends\": script$1,\n inheritAttrs: false,\n computed: {\n svgStyle: function svgStyle() {\n return {\n 'animation-duration': this.animationDuration\n };\n }\n }\n};\n\nvar _hoisted_1 = [\"fill\", \"stroke-width\"];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"div\", mergeProps({\n \"class\": _ctx.cx('root'),\n role: \"progressbar\"\n }, _ctx.ptmi('root')), [(openBlock(), createElementBlock(\"svg\", mergeProps({\n \"class\": _ctx.cx('spin'),\n viewBox: \"25 25 50 50\",\n style: $options.svgStyle\n }, _ctx.ptm('spin')), [createElementVNode(\"circle\", mergeProps({\n \"class\": _ctx.cx('circle'),\n cx: \"50\",\n cy: \"50\",\n r: \"20\",\n fill: _ctx.fill,\n \"stroke-width\": _ctx.strokeWidth,\n strokeMiterlimit: \"10\"\n }, _ctx.ptm('circle')), null, 16, _hoisted_1)], 16))], 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import { ref, computed } from 'vue'\nimport { defineStore } from 'pinia'\nimport { api } from '@/scripts/api'\nimport { ComfyWorkflow } from './workflowStore'\nimport type { ComfyNode, ComfyWorkflowJSON } from '@/types/comfyWorkflow'\nimport type {\n ExecutedWsMessage,\n ExecutingWsMessage,\n ExecutionCachedWsMessage,\n ExecutionStartWsMessage,\n ProgressWsMessage,\n StatusWsMessage\n} from '@/types/apiTypes'\n\nexport interface QueuedPrompt {\n nodes: Record\n workflow?: ComfyWorkflow\n}\n\nexport const useExecutionStore = defineStore('execution', () => {\n const clientId = ref(null)\n const activePromptId = ref(null)\n const queuedPrompts = ref>({})\n const executingNodeId = ref(null)\n const executingNode = computed(() => {\n if (!executingNodeId.value) return null\n\n const workflow: ComfyWorkflow | undefined = activePrompt.value?.workflow\n if (!workflow) return null\n\n const canvasState: ComfyWorkflowJSON | null =\n workflow.changeTracker?.activeState ?? null\n if (!canvasState) return null\n\n return (\n canvasState.nodes.find(\n (n: ComfyNode) => String(n.id) === executingNodeId.value\n ) ?? null\n )\n })\n\n // This is the progress of the currently executing node, if any\n const _executingNodeProgress = ref(null)\n const executingNodeProgress = computed(() =>\n _executingNodeProgress.value\n ? Math.round(\n (_executingNodeProgress.value.value /\n _executingNodeProgress.value.max) *\n 100\n )\n : null\n )\n\n const activePrompt = computed(\n () => queuedPrompts.value[activePromptId.value ?? '']\n )\n\n const totalNodesToExecute = computed(() => {\n if (!activePrompt.value) return 0\n return Object.values(activePrompt.value.nodes).length\n })\n\n const isIdle = computed(() => !activePromptId.value)\n\n const nodesExecuted = computed(() => {\n if (!activePrompt.value) return 0\n return Object.values(activePrompt.value.nodes).filter(Boolean).length\n })\n\n const executionProgress = computed(() => {\n if (!activePrompt.value) return 0\n const total = totalNodesToExecute.value\n const done = nodesExecuted.value\n return Math.round((done / total) * 100)\n })\n\n function bindExecutionEvents() {\n api.addEventListener(\n 'execution_start',\n handleExecutionStart as EventListener\n )\n api.addEventListener(\n 'execution_cached',\n handleExecutionCached as EventListener\n )\n api.addEventListener('executed', handleExecuted as EventListener)\n api.addEventListener('executing', handleExecuting as EventListener)\n api.addEventListener('progress', handleProgress as EventListener)\n api.addEventListener('status', handleStatus as EventListener)\n }\n\n function unbindExecutionEvents() {\n api.removeEventListener(\n 'execution_start',\n handleExecutionStart as EventListener\n )\n api.removeEventListener(\n 'execution_cached',\n handleExecutionCached as EventListener\n )\n api.removeEventListener('executed', handleExecuted as EventListener)\n api.removeEventListener('executing', handleExecuting as EventListener)\n api.removeEventListener('progress', handleProgress as EventListener)\n api.removeEventListener('status', handleStatus as EventListener)\n }\n\n function handleExecutionStart(e: CustomEvent) {\n activePromptId.value = e.detail.prompt_id\n queuedPrompts.value[activePromptId.value] ??= { nodes: {} }\n }\n\n function handleExecutionCached(e: CustomEvent) {\n if (!activePrompt.value) return\n for (const n of e.detail.nodes) {\n activePrompt.value.nodes[n] = true\n }\n }\n\n function handleExecuted(e: CustomEvent) {\n if (!activePrompt.value) return\n activePrompt.value.nodes[e.detail.node] = true\n }\n\n function handleExecuting(e: CustomEvent) {\n // Clear the current node progress when a new node starts executing\n _executingNodeProgress.value = null\n\n if (!activePrompt.value) return\n\n if (executingNodeId.value && activePrompt.value) {\n // Seems sometimes nodes that are cached fire executing but not executed\n activePrompt.value.nodes[executingNodeId.value] = true\n }\n executingNodeId.value = e.detail ? String(e.detail) : null\n if (!executingNodeId.value) {\n if (activePromptId.value) {\n delete queuedPrompts.value[activePromptId.value]\n }\n activePromptId.value = null\n }\n }\n\n function handleProgress(e: CustomEvent) {\n _executingNodeProgress.value = e.detail\n }\n\n function handleStatus(e: CustomEvent) {\n if (api.clientId) {\n clientId.value = api.clientId\n\n // Once we've received the clientId we no longer need to listen\n api.removeEventListener('status', handleStatus as EventListener)\n }\n }\n\n function storePrompt({\n nodes,\n id,\n workflow\n }: {\n nodes: string[]\n id: string\n workflow: ComfyWorkflow\n }) {\n queuedPrompts.value[id] ??= { nodes: {} }\n const queuedPrompt = queuedPrompts.value[id]\n queuedPrompt.nodes = {\n ...nodes.reduce((p: Record, n) => {\n p[n] = false\n return p\n }, {}),\n ...queuedPrompt.nodes\n }\n queuedPrompt.workflow = workflow\n\n console.debug(\n `queued task ${id} with ${Object.values(queuedPrompt.nodes).length} nodes`\n )\n }\n\n return {\n isIdle,\n clientId,\n activePromptId,\n queuedPrompts,\n executingNodeId,\n activePrompt,\n totalNodesToExecute,\n nodesExecuted,\n executionProgress,\n executingNode,\n executingNodeProgress,\n bindExecutionEvents,\n unbindExecutionEvents,\n storePrompt\n }\n})\n","import * as Vue from 'vue'\n\nvar isVue2 = false\nvar isVue3 = true\nvar Vue2 = undefined\n\nfunction install() {}\n\nexport function set(target, key, val) {\n if (Array.isArray(target)) {\n target.length = Math.max(target.length, key)\n target.splice(key, 1, val)\n return val\n }\n target[key] = val\n return val\n}\n\nexport function del(target, key) {\n if (Array.isArray(target)) {\n target.splice(key, 1)\n return\n }\n delete target[key]\n}\n\nexport * from 'vue'\nexport {\n Vue,\n Vue2,\n isVue2,\n isVue3,\n install,\n}\n","import { shallowRef, watchEffect, readonly, ref, watch, customRef, getCurrentScope, onScopeDispose, effectScope, getCurrentInstance, provide, inject, isVue3, version, isRef, unref, computed, reactive, toRefs as toRefs$1, toRef as toRef$1, isVue2, set as set$1, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive } from 'vue-demi';\n\nfunction computedEager(fn, options) {\n var _a;\n const result = shallowRef();\n watchEffect(() => {\n result.value = fn();\n }, {\n ...options,\n flush: (_a = options == null ? void 0 : options.flush) != null ? _a : \"sync\"\n });\n return readonly(result);\n}\n\nfunction computedWithControl(source, fn) {\n let v = void 0;\n let track;\n let trigger;\n const dirty = ref(true);\n const update = () => {\n dirty.value = true;\n trigger();\n };\n watch(source, update, { flush: \"sync\" });\n const get = typeof fn === \"function\" ? fn : fn.get;\n const set = typeof fn === \"function\" ? void 0 : fn.set;\n const result = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n if (dirty.value) {\n v = get(v);\n dirty.value = false;\n }\n track();\n return v;\n },\n set(v2) {\n set == null ? void 0 : set(v2);\n }\n };\n });\n if (Object.isExtensible(result))\n result.trigger = update;\n return result;\n}\n\nfunction tryOnScopeDispose(fn) {\n if (getCurrentScope()) {\n onScopeDispose(fn);\n return true;\n }\n return false;\n}\n\nfunction createEventHook() {\n const fns = /* @__PURE__ */ new Set();\n const off = (fn) => {\n fns.delete(fn);\n };\n const on = (fn) => {\n fns.add(fn);\n const offFn = () => off(fn);\n tryOnScopeDispose(offFn);\n return {\n off: offFn\n };\n };\n const trigger = (...args) => {\n return Promise.all(Array.from(fns).map((fn) => fn(...args)));\n };\n return {\n on,\n off,\n trigger\n };\n}\n\nfunction createGlobalState(stateFactory) {\n let initialized = false;\n let state;\n const scope = effectScope(true);\n return (...args) => {\n if (!initialized) {\n state = scope.run(() => stateFactory(...args));\n initialized = true;\n }\n return state;\n };\n}\n\nconst localProvidedStateMap = /* @__PURE__ */ new WeakMap();\n\nconst provideLocal = (key, value) => {\n var _a;\n const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;\n if (instance == null)\n throw new Error(\"provideLocal must be called in setup\");\n if (!localProvidedStateMap.has(instance))\n localProvidedStateMap.set(instance, /* @__PURE__ */ Object.create(null));\n const localProvidedState = localProvidedStateMap.get(instance);\n localProvidedState[key] = value;\n provide(key, value);\n};\n\nconst injectLocal = (...args) => {\n var _a;\n const key = args[0];\n const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;\n if (instance == null)\n throw new Error(\"injectLocal must be called in setup\");\n if (localProvidedStateMap.has(instance) && key in localProvidedStateMap.get(instance))\n return localProvidedStateMap.get(instance)[key];\n return inject(...args);\n};\n\nfunction createInjectionState(composable, options) {\n const key = (options == null ? void 0 : options.injectionKey) || Symbol(composable.name || \"InjectionState\");\n const defaultValue = options == null ? void 0 : options.defaultValue;\n const useProvidingState = (...args) => {\n const state = composable(...args);\n provideLocal(key, state);\n return state;\n };\n const useInjectedState = () => injectLocal(key, defaultValue);\n return [useProvidingState, useInjectedState];\n}\n\nfunction createSharedComposable(composable) {\n let subscribers = 0;\n let state;\n let scope;\n const dispose = () => {\n subscribers -= 1;\n if (scope && subscribers <= 0) {\n scope.stop();\n state = void 0;\n scope = void 0;\n }\n };\n return (...args) => {\n subscribers += 1;\n if (!state) {\n scope = effectScope(true);\n state = scope.run(() => composable(...args));\n }\n tryOnScopeDispose(dispose);\n return state;\n };\n}\n\nfunction extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {\n if (!isVue3 && !version.startsWith(\"2.7.\")) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] extendRef only works in Vue 2.7 or above.\");\n return;\n }\n for (const [key, value] of Object.entries(extend)) {\n if (key === \"value\")\n continue;\n if (isRef(value) && unwrap) {\n Object.defineProperty(ref, key, {\n get() {\n return value.value;\n },\n set(v) {\n value.value = v;\n },\n enumerable\n });\n } else {\n Object.defineProperty(ref, key, { value, enumerable });\n }\n }\n return ref;\n}\n\nfunction get(obj, key) {\n if (key == null)\n return unref(obj);\n return unref(obj)[key];\n}\n\nfunction isDefined(v) {\n return unref(v) != null;\n}\n\nfunction makeDestructurable(obj, arr) {\n if (typeof Symbol !== \"undefined\") {\n const clone = { ...obj };\n Object.defineProperty(clone, Symbol.iterator, {\n enumerable: false,\n value() {\n let index = 0;\n return {\n next: () => ({\n value: arr[index++],\n done: index > arr.length\n })\n };\n }\n });\n return clone;\n } else {\n return Object.assign([...arr], obj);\n }\n}\n\nfunction toValue(r) {\n return typeof r === \"function\" ? r() : unref(r);\n}\nconst resolveUnref = toValue;\n\nfunction reactify(fn, options) {\n const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? unref : toValue;\n return function(...args) {\n return computed(() => fn.apply(this, args.map((i) => unrefFn(i))));\n };\n}\n\nfunction reactifyObject(obj, optionsOrKeys = {}) {\n let keys = [];\n let options;\n if (Array.isArray(optionsOrKeys)) {\n keys = optionsOrKeys;\n } else {\n options = optionsOrKeys;\n const { includeOwnProperties = true } = optionsOrKeys;\n keys.push(...Object.keys(obj));\n if (includeOwnProperties)\n keys.push(...Object.getOwnPropertyNames(obj));\n }\n return Object.fromEntries(\n keys.map((key) => {\n const value = obj[key];\n return [\n key,\n typeof value === \"function\" ? reactify(value.bind(obj), options) : value\n ];\n })\n );\n}\n\nfunction toReactive(objectRef) {\n if (!isRef(objectRef))\n return reactive(objectRef);\n const proxy = new Proxy({}, {\n get(_, p, receiver) {\n return unref(Reflect.get(objectRef.value, p, receiver));\n },\n set(_, p, value) {\n if (isRef(objectRef.value[p]) && !isRef(value))\n objectRef.value[p].value = value;\n else\n objectRef.value[p] = value;\n return true;\n },\n deleteProperty(_, p) {\n return Reflect.deleteProperty(objectRef.value, p);\n },\n has(_, p) {\n return Reflect.has(objectRef.value, p);\n },\n ownKeys() {\n return Object.keys(objectRef.value);\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true\n };\n }\n });\n return reactive(proxy);\n}\n\nfunction reactiveComputed(fn) {\n return toReactive(computed(fn));\n}\n\nfunction reactiveOmit(obj, ...keys) {\n const flatKeys = keys.flat();\n const predicate = flatKeys[0];\n return reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => !predicate(toValue(v), k))) : Object.fromEntries(Object.entries(toRefs$1(obj)).filter((e) => !flatKeys.includes(e[0]))));\n}\n\nconst isClient = typeof window !== \"undefined\" && typeof document !== \"undefined\";\nconst isWorker = typeof WorkerGlobalScope !== \"undefined\" && globalThis instanceof WorkerGlobalScope;\nconst isDef = (val) => typeof val !== \"undefined\";\nconst notNullish = (val) => val != null;\nconst assert = (condition, ...infos) => {\n if (!condition)\n console.warn(...infos);\n};\nconst toString = Object.prototype.toString;\nconst isObject = (val) => toString.call(val) === \"[object Object]\";\nconst now = () => Date.now();\nconst timestamp = () => +Date.now();\nconst clamp = (n, min, max) => Math.min(max, Math.max(min, n));\nconst noop = () => {\n};\nconst rand = (min, max) => {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n};\nconst hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key);\nconst isIOS = /* @__PURE__ */ getIsIOS();\nfunction getIsIOS() {\n var _a, _b;\n return isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((_b = window == null ? void 0 : window.navigator) == null ? void 0 : _b.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));\n}\n\nfunction createFilterWrapper(filter, fn) {\n function wrapper(...args) {\n return new Promise((resolve, reject) => {\n Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);\n });\n }\n return wrapper;\n}\nconst bypassFilter = (invoke) => {\n return invoke();\n};\nfunction debounceFilter(ms, options = {}) {\n let timer;\n let maxTimer;\n let lastRejector = noop;\n const _clearTimeout = (timer2) => {\n clearTimeout(timer2);\n lastRejector();\n lastRejector = noop;\n };\n const filter = (invoke) => {\n const duration = toValue(ms);\n const maxDuration = toValue(options.maxWait);\n if (timer)\n _clearTimeout(timer);\n if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {\n if (maxTimer) {\n _clearTimeout(maxTimer);\n maxTimer = null;\n }\n return Promise.resolve(invoke());\n }\n return new Promise((resolve, reject) => {\n lastRejector = options.rejectOnCancel ? reject : resolve;\n if (maxDuration && !maxTimer) {\n maxTimer = setTimeout(() => {\n if (timer)\n _clearTimeout(timer);\n maxTimer = null;\n resolve(invoke());\n }, maxDuration);\n }\n timer = setTimeout(() => {\n if (maxTimer)\n _clearTimeout(maxTimer);\n maxTimer = null;\n resolve(invoke());\n }, duration);\n });\n };\n return filter;\n}\nfunction throttleFilter(...args) {\n let lastExec = 0;\n let timer;\n let isLeading = true;\n let lastRejector = noop;\n let lastValue;\n let ms;\n let trailing;\n let leading;\n let rejectOnCancel;\n if (!isRef(args[0]) && typeof args[0] === \"object\")\n ({ delay: ms, trailing = true, leading = true, rejectOnCancel = false } = args[0]);\n else\n [ms, trailing = true, leading = true, rejectOnCancel = false] = args;\n const clear = () => {\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n lastRejector();\n lastRejector = noop;\n }\n };\n const filter = (_invoke) => {\n const duration = toValue(ms);\n const elapsed = Date.now() - lastExec;\n const invoke = () => {\n return lastValue = _invoke();\n };\n clear();\n if (duration <= 0) {\n lastExec = Date.now();\n return invoke();\n }\n if (elapsed > duration && (leading || !isLeading)) {\n lastExec = Date.now();\n invoke();\n } else if (trailing) {\n lastValue = new Promise((resolve, reject) => {\n lastRejector = rejectOnCancel ? reject : resolve;\n timer = setTimeout(() => {\n lastExec = Date.now();\n isLeading = true;\n resolve(invoke());\n clear();\n }, Math.max(0, duration - elapsed));\n });\n }\n if (!leading && !timer)\n timer = setTimeout(() => isLeading = true, duration);\n isLeading = false;\n return lastValue;\n };\n return filter;\n}\nfunction pausableFilter(extendFilter = bypassFilter) {\n const isActive = ref(true);\n function pause() {\n isActive.value = false;\n }\n function resume() {\n isActive.value = true;\n }\n const eventFilter = (...args) => {\n if (isActive.value)\n extendFilter(...args);\n };\n return { isActive: readonly(isActive), pause, resume, eventFilter };\n}\n\nconst directiveHooks = {\n mounted: isVue3 ? \"mounted\" : \"inserted\",\n updated: isVue3 ? \"updated\" : \"componentUpdated\",\n unmounted: isVue3 ? \"unmounted\" : \"unbind\"\n};\n\nfunction cacheStringFunction(fn) {\n const cache = /* @__PURE__ */ Object.create(null);\n return (str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\n}\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, \"-$1\").toLowerCase());\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction((str) => {\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\n\nfunction promiseTimeout(ms, throwOnTimeout = false, reason = \"Timeout\") {\n return new Promise((resolve, reject) => {\n if (throwOnTimeout)\n setTimeout(() => reject(reason), ms);\n else\n setTimeout(resolve, ms);\n });\n}\nfunction identity(arg) {\n return arg;\n}\nfunction createSingletonPromise(fn) {\n let _promise;\n function wrapper() {\n if (!_promise)\n _promise = fn();\n return _promise;\n }\n wrapper.reset = async () => {\n const _prev = _promise;\n _promise = void 0;\n if (_prev)\n await _prev;\n };\n return wrapper;\n}\nfunction invoke(fn) {\n return fn();\n}\nfunction containsProp(obj, ...props) {\n return props.some((k) => k in obj);\n}\nfunction increaseWithUnit(target, delta) {\n var _a;\n if (typeof target === \"number\")\n return target + delta;\n const value = ((_a = target.match(/^-?\\d+\\.?\\d*/)) == null ? void 0 : _a[0]) || \"\";\n const unit = target.slice(value.length);\n const result = Number.parseFloat(value) + delta;\n if (Number.isNaN(result))\n return target;\n return result + unit;\n}\nfunction objectPick(obj, keys, omitUndefined = false) {\n return keys.reduce((n, k) => {\n if (k in obj) {\n if (!omitUndefined || obj[k] !== void 0)\n n[k] = obj[k];\n }\n return n;\n }, {});\n}\nfunction objectOmit(obj, keys, omitUndefined = false) {\n return Object.fromEntries(Object.entries(obj).filter(([key, value]) => {\n return (!omitUndefined || value !== void 0) && !keys.includes(key);\n }));\n}\nfunction objectEntries(obj) {\n return Object.entries(obj);\n}\nfunction getLifeCycleTarget(target) {\n return target || getCurrentInstance();\n}\n\nfunction toRef(...args) {\n if (args.length !== 1)\n return toRef$1(...args);\n const r = args[0];\n return typeof r === \"function\" ? readonly(customRef(() => ({ get: r, set: noop }))) : ref(r);\n}\nconst resolveRef = toRef;\n\nfunction reactivePick(obj, ...keys) {\n const flatKeys = keys.flat();\n const predicate = flatKeys[0];\n return reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => predicate(toValue(v), k))) : Object.fromEntries(flatKeys.map((k) => [k, toRef(obj, k)])));\n}\n\nfunction refAutoReset(defaultValue, afterMs = 1e4) {\n return customRef((track, trigger) => {\n let value = toValue(defaultValue);\n let timer;\n const resetAfter = () => setTimeout(() => {\n value = toValue(defaultValue);\n trigger();\n }, toValue(afterMs));\n tryOnScopeDispose(() => {\n clearTimeout(timer);\n });\n return {\n get() {\n track();\n return value;\n },\n set(newValue) {\n value = newValue;\n trigger();\n clearTimeout(timer);\n timer = resetAfter();\n }\n };\n });\n}\n\nfunction useDebounceFn(fn, ms = 200, options = {}) {\n return createFilterWrapper(\n debounceFilter(ms, options),\n fn\n );\n}\n\nfunction refDebounced(value, ms = 200, options = {}) {\n const debounced = ref(value.value);\n const updater = useDebounceFn(() => {\n debounced.value = value.value;\n }, ms, options);\n watch(value, () => updater());\n return debounced;\n}\n\nfunction refDefault(source, defaultValue) {\n return computed({\n get() {\n var _a;\n return (_a = source.value) != null ? _a : defaultValue;\n },\n set(value) {\n source.value = value;\n }\n });\n}\n\nfunction useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {\n return createFilterWrapper(\n throttleFilter(ms, trailing, leading, rejectOnCancel),\n fn\n );\n}\n\nfunction refThrottled(value, delay = 200, trailing = true, leading = true) {\n if (delay <= 0)\n return value;\n const throttled = ref(value.value);\n const updater = useThrottleFn(() => {\n throttled.value = value.value;\n }, delay, trailing, leading);\n watch(value, () => updater());\n return throttled;\n}\n\nfunction refWithControl(initial, options = {}) {\n let source = initial;\n let track;\n let trigger;\n const ref = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n return get();\n },\n set(v) {\n set(v);\n }\n };\n });\n function get(tracking = true) {\n if (tracking)\n track();\n return source;\n }\n function set(value, triggering = true) {\n var _a, _b;\n if (value === source)\n return;\n const old = source;\n if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)\n return;\n source = value;\n (_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);\n if (triggering)\n trigger();\n }\n const untrackedGet = () => get(false);\n const silentSet = (v) => set(v, false);\n const peek = () => get(false);\n const lay = (v) => set(v, false);\n return extendRef(\n ref,\n {\n get,\n set,\n untrackedGet,\n silentSet,\n peek,\n lay\n },\n { enumerable: true }\n );\n}\nconst controlledRef = refWithControl;\n\nfunction set(...args) {\n if (args.length === 2) {\n const [ref, value] = args;\n ref.value = value;\n }\n if (args.length === 3) {\n if (isVue2) {\n set$1(...args);\n } else {\n const [target, key, value] = args;\n target[key] = value;\n }\n }\n}\n\nfunction watchWithFilter(source, cb, options = {}) {\n const {\n eventFilter = bypassFilter,\n ...watchOptions\n } = options;\n return watch(\n source,\n createFilterWrapper(\n eventFilter,\n cb\n ),\n watchOptions\n );\n}\n\nfunction watchPausable(source, cb, options = {}) {\n const {\n eventFilter: filter,\n ...watchOptions\n } = options;\n const { eventFilter, pause, resume, isActive } = pausableFilter(filter);\n const stop = watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter\n }\n );\n return { stop, pause, resume, isActive };\n}\n\nfunction syncRef(left, right, ...[options]) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true,\n direction = \"both\",\n transform = {}\n } = options || {};\n const watchers = [];\n const transformLTR = \"ltr\" in transform && transform.ltr || ((v) => v);\n const transformRTL = \"rtl\" in transform && transform.rtl || ((v) => v);\n if (direction === \"both\" || direction === \"ltr\") {\n watchers.push(watchPausable(\n left,\n (newValue) => {\n watchers.forEach((w) => w.pause());\n right.value = transformLTR(newValue);\n watchers.forEach((w) => w.resume());\n },\n { flush, deep, immediate }\n ));\n }\n if (direction === \"both\" || direction === \"rtl\") {\n watchers.push(watchPausable(\n right,\n (newValue) => {\n watchers.forEach((w) => w.pause());\n left.value = transformRTL(newValue);\n watchers.forEach((w) => w.resume());\n },\n { flush, deep, immediate }\n ));\n }\n const stop = () => {\n watchers.forEach((w) => w.stop());\n };\n return stop;\n}\n\nfunction syncRefs(source, targets, options = {}) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true\n } = options;\n if (!Array.isArray(targets))\n targets = [targets];\n return watch(\n source,\n (newValue) => targets.forEach((target) => target.value = newValue),\n { flush, deep, immediate }\n );\n}\n\nfunction toRefs(objectRef, options = {}) {\n if (!isRef(objectRef))\n return toRefs$1(objectRef);\n const result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {};\n for (const key in objectRef.value) {\n result[key] = customRef(() => ({\n get() {\n return objectRef.value[key];\n },\n set(v) {\n var _a;\n const replaceRef = (_a = toValue(options.replaceRef)) != null ? _a : true;\n if (replaceRef) {\n if (Array.isArray(objectRef.value)) {\n const copy = [...objectRef.value];\n copy[key] = v;\n objectRef.value = copy;\n } else {\n const newObject = { ...objectRef.value, [key]: v };\n Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value));\n objectRef.value = newObject;\n }\n } else {\n objectRef.value[key] = v;\n }\n }\n }));\n }\n return result;\n}\n\nfunction tryOnBeforeMount(fn, sync = true, target) {\n const instance = getLifeCycleTarget(target);\n if (instance)\n onBeforeMount(fn, target);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnBeforeUnmount(fn, target) {\n const instance = getLifeCycleTarget(target);\n if (instance)\n onBeforeUnmount(fn, target);\n}\n\nfunction tryOnMounted(fn, sync = true, target) {\n const instance = getLifeCycleTarget();\n if (instance)\n onMounted(fn, target);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnUnmounted(fn, target) {\n const instance = getLifeCycleTarget(target);\n if (instance)\n onUnmounted(fn, target);\n}\n\nfunction createUntil(r, isNot = false) {\n function toMatch(condition, { flush = \"sync\", deep = false, timeout, throwOnTimeout } = {}) {\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(\n r,\n (v) => {\n if (condition(v) !== isNot) {\n if (stop)\n stop();\n else\n nextTick(() => stop == null ? void 0 : stop());\n resolve(v);\n }\n },\n {\n flush,\n deep,\n immediate: true\n }\n );\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(\n promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => stop == null ? void 0 : stop())\n );\n }\n return Promise.race(promises);\n }\n function toBe(value, options) {\n if (!isRef(value))\n return toMatch((v) => v === value, options);\n const { flush = \"sync\", deep = false, timeout, throwOnTimeout } = options != null ? options : {};\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(\n [r, value],\n ([v1, v2]) => {\n if (isNot !== (v1 === v2)) {\n if (stop)\n stop();\n else\n nextTick(() => stop == null ? void 0 : stop());\n resolve(v1);\n }\n },\n {\n flush,\n deep,\n immediate: true\n }\n );\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(\n promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => {\n stop == null ? void 0 : stop();\n return toValue(r);\n })\n );\n }\n return Promise.race(promises);\n }\n function toBeTruthy(options) {\n return toMatch((v) => Boolean(v), options);\n }\n function toBeNull(options) {\n return toBe(null, options);\n }\n function toBeUndefined(options) {\n return toBe(void 0, options);\n }\n function toBeNaN(options) {\n return toMatch(Number.isNaN, options);\n }\n function toContains(value, options) {\n return toMatch((v) => {\n const array = Array.from(v);\n return array.includes(value) || array.includes(toValue(value));\n }, options);\n }\n function changed(options) {\n return changedTimes(1, options);\n }\n function changedTimes(n = 1, options) {\n let count = -1;\n return toMatch(() => {\n count += 1;\n return count >= n;\n }, options);\n }\n if (Array.isArray(toValue(r))) {\n const instance = {\n toMatch,\n toContains,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n } else {\n const instance = {\n toMatch,\n toBe,\n toBeTruthy,\n toBeNull,\n toBeNaN,\n toBeUndefined,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n }\n}\nfunction until(r) {\n return createUntil(r);\n}\n\nfunction defaultComparator(value, othVal) {\n return value === othVal;\n}\nfunction useArrayDifference(...args) {\n var _a;\n const list = args[0];\n const values = args[1];\n let compareFn = (_a = args[2]) != null ? _a : defaultComparator;\n if (typeof compareFn === \"string\") {\n const key = compareFn;\n compareFn = (value, othVal) => value[key] === othVal[key];\n }\n return computed(() => toValue(list).filter((x) => toValue(values).findIndex((y) => compareFn(x, y)) === -1));\n}\n\nfunction useArrayEvery(list, fn) {\n return computed(() => toValue(list).every((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction useArrayFilter(list, fn) {\n return computed(() => toValue(list).map((i) => toValue(i)).filter(fn));\n}\n\nfunction useArrayFind(list, fn) {\n return computed(() => toValue(\n toValue(list).find((element, index, array) => fn(toValue(element), index, array))\n ));\n}\n\nfunction useArrayFindIndex(list, fn) {\n return computed(() => toValue(list).findIndex((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction findLast(arr, cb) {\n let index = arr.length;\n while (index-- > 0) {\n if (cb(arr[index], index, arr))\n return arr[index];\n }\n return void 0;\n}\nfunction useArrayFindLast(list, fn) {\n return computed(() => toValue(\n !Array.prototype.findLast ? findLast(toValue(list), (element, index, array) => fn(toValue(element), index, array)) : toValue(list).findLast((element, index, array) => fn(toValue(element), index, array))\n ));\n}\n\nfunction isArrayIncludesOptions(obj) {\n return isObject(obj) && containsProp(obj, \"formIndex\", \"comparator\");\n}\nfunction useArrayIncludes(...args) {\n var _a;\n const list = args[0];\n const value = args[1];\n let comparator = args[2];\n let formIndex = 0;\n if (isArrayIncludesOptions(comparator)) {\n formIndex = (_a = comparator.fromIndex) != null ? _a : 0;\n comparator = comparator.comparator;\n }\n if (typeof comparator === \"string\") {\n const key = comparator;\n comparator = (element, value2) => element[key] === toValue(value2);\n }\n comparator = comparator != null ? comparator : (element, value2) => element === toValue(value2);\n return computed(() => toValue(list).slice(formIndex).some((element, index, array) => comparator(\n toValue(element),\n toValue(value),\n index,\n toValue(array)\n )));\n}\n\nfunction useArrayJoin(list, separator) {\n return computed(() => toValue(list).map((i) => toValue(i)).join(toValue(separator)));\n}\n\nfunction useArrayMap(list, fn) {\n return computed(() => toValue(list).map((i) => toValue(i)).map(fn));\n}\n\nfunction useArrayReduce(list, reducer, ...args) {\n const reduceCallback = (sum, value, index) => reducer(toValue(sum), toValue(value), index);\n return computed(() => {\n const resolved = toValue(list);\n return args.length ? resolved.reduce(reduceCallback, toValue(args[0])) : resolved.reduce(reduceCallback);\n });\n}\n\nfunction useArraySome(list, fn) {\n return computed(() => toValue(list).some((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction uniq(array) {\n return Array.from(new Set(array));\n}\nfunction uniqueElementsBy(array, fn) {\n return array.reduce((acc, v) => {\n if (!acc.some((x) => fn(v, x, array)))\n acc.push(v);\n return acc;\n }, []);\n}\nfunction useArrayUnique(list, compareFn) {\n return computed(() => {\n const resolvedList = toValue(list).map((element) => toValue(element));\n return compareFn ? uniqueElementsBy(resolvedList, compareFn) : uniq(resolvedList);\n });\n}\n\nfunction useCounter(initialValue = 0, options = {}) {\n let _initialValue = unref(initialValue);\n const count = ref(initialValue);\n const {\n max = Number.POSITIVE_INFINITY,\n min = Number.NEGATIVE_INFINITY\n } = options;\n const inc = (delta = 1) => count.value = Math.max(Math.min(max, count.value + delta), min);\n const dec = (delta = 1) => count.value = Math.min(Math.max(min, count.value - delta), max);\n const get = () => count.value;\n const set = (val) => count.value = Math.max(min, Math.min(max, val));\n const reset = (val = _initialValue) => {\n _initialValue = val;\n return set(val);\n };\n return { count, inc, dec, get, set, reset };\n}\n\nconst REGEX_PARSE = /^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[T\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/i;\nconst REGEX_FORMAT = /[YMDHhms]o|\\[([^\\]]+)\\]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;\nfunction defaultMeridiem(hours, minutes, isLowercase, hasPeriod) {\n let m = hours < 12 ? \"AM\" : \"PM\";\n if (hasPeriod)\n m = m.split(\"\").reduce((acc, curr) => acc += `${curr}.`, \"\");\n return isLowercase ? m.toLowerCase() : m;\n}\nfunction formatOrdinal(num) {\n const suffixes = [\"th\", \"st\", \"nd\", \"rd\"];\n const v = num % 100;\n return num + (suffixes[(v - 20) % 10] || suffixes[v] || suffixes[0]);\n}\nfunction formatDate(date, formatStr, options = {}) {\n var _a;\n const years = date.getFullYear();\n const month = date.getMonth();\n const days = date.getDate();\n const hours = date.getHours();\n const minutes = date.getMinutes();\n const seconds = date.getSeconds();\n const milliseconds = date.getMilliseconds();\n const day = date.getDay();\n const meridiem = (_a = options.customMeridiem) != null ? _a : defaultMeridiem;\n const matches = {\n Yo: () => formatOrdinal(years),\n YY: () => String(years).slice(-2),\n YYYY: () => years,\n M: () => month + 1,\n Mo: () => formatOrdinal(month + 1),\n MM: () => `${month + 1}`.padStart(2, \"0\"),\n MMM: () => date.toLocaleDateString(toValue(options.locales), { month: \"short\" }),\n MMMM: () => date.toLocaleDateString(toValue(options.locales), { month: \"long\" }),\n D: () => String(days),\n Do: () => formatOrdinal(days),\n DD: () => `${days}`.padStart(2, \"0\"),\n H: () => String(hours),\n Ho: () => formatOrdinal(hours),\n HH: () => `${hours}`.padStart(2, \"0\"),\n h: () => `${hours % 12 || 12}`.padStart(1, \"0\"),\n ho: () => formatOrdinal(hours % 12 || 12),\n hh: () => `${hours % 12 || 12}`.padStart(2, \"0\"),\n m: () => String(minutes),\n mo: () => formatOrdinal(minutes),\n mm: () => `${minutes}`.padStart(2, \"0\"),\n s: () => String(seconds),\n so: () => formatOrdinal(seconds),\n ss: () => `${seconds}`.padStart(2, \"0\"),\n SSS: () => `${milliseconds}`.padStart(3, \"0\"),\n d: () => day,\n dd: () => date.toLocaleDateString(toValue(options.locales), { weekday: \"narrow\" }),\n ddd: () => date.toLocaleDateString(toValue(options.locales), { weekday: \"short\" }),\n dddd: () => date.toLocaleDateString(toValue(options.locales), { weekday: \"long\" }),\n A: () => meridiem(hours, minutes),\n AA: () => meridiem(hours, minutes, false, true),\n a: () => meridiem(hours, minutes, true),\n aa: () => meridiem(hours, minutes, true, true)\n };\n return formatStr.replace(REGEX_FORMAT, (match, $1) => {\n var _a2, _b;\n return (_b = $1 != null ? $1 : (_a2 = matches[match]) == null ? void 0 : _a2.call(matches)) != null ? _b : match;\n });\n}\nfunction normalizeDate(date) {\n if (date === null)\n return new Date(Number.NaN);\n if (date === void 0)\n return /* @__PURE__ */ new Date();\n if (date instanceof Date)\n return new Date(date);\n if (typeof date === \"string\" && !/Z$/i.test(date)) {\n const d = date.match(REGEX_PARSE);\n if (d) {\n const m = d[2] - 1 || 0;\n const ms = (d[7] || \"0\").substring(0, 3);\n return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);\n }\n }\n return new Date(date);\n}\nfunction useDateFormat(date, formatStr = \"HH:mm:ss\", options = {}) {\n return computed(() => formatDate(normalizeDate(toValue(date)), toValue(formatStr), options));\n}\n\nfunction useIntervalFn(cb, interval = 1e3, options = {}) {\n const {\n immediate = true,\n immediateCallback = false\n } = options;\n let timer = null;\n const isActive = ref(false);\n function clean() {\n if (timer) {\n clearInterval(timer);\n timer = null;\n }\n }\n function pause() {\n isActive.value = false;\n clean();\n }\n function resume() {\n const intervalValue = toValue(interval);\n if (intervalValue <= 0)\n return;\n isActive.value = true;\n if (immediateCallback)\n cb();\n clean();\n timer = setInterval(cb, intervalValue);\n }\n if (immediate && isClient)\n resume();\n if (isRef(interval) || typeof interval === \"function\") {\n const stopWatch = watch(interval, () => {\n if (isActive.value && isClient)\n resume();\n });\n tryOnScopeDispose(stopWatch);\n }\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nfunction useInterval(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n immediate = true,\n callback\n } = options;\n const counter = ref(0);\n const update = () => counter.value += 1;\n const reset = () => {\n counter.value = 0;\n };\n const controls = useIntervalFn(\n callback ? () => {\n update();\n callback(counter.value);\n } : update,\n interval,\n { immediate }\n );\n if (exposeControls) {\n return {\n counter,\n reset,\n ...controls\n };\n } else {\n return counter;\n }\n}\n\nfunction useLastChanged(source, options = {}) {\n var _a;\n const ms = ref((_a = options.initialValue) != null ? _a : null);\n watch(\n source,\n () => ms.value = timestamp(),\n options\n );\n return ms;\n}\n\nfunction useTimeoutFn(cb, interval, options = {}) {\n const {\n immediate = true\n } = options;\n const isPending = ref(false);\n let timer = null;\n function clear() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n }\n function stop() {\n isPending.value = false;\n clear();\n }\n function start(...args) {\n clear();\n isPending.value = true;\n timer = setTimeout(() => {\n isPending.value = false;\n timer = null;\n cb(...args);\n }, toValue(interval));\n }\n if (immediate) {\n isPending.value = true;\n if (isClient)\n start();\n }\n tryOnScopeDispose(stop);\n return {\n isPending: readonly(isPending),\n start,\n stop\n };\n}\n\nfunction useTimeout(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n callback\n } = options;\n const controls = useTimeoutFn(\n callback != null ? callback : noop,\n interval,\n options\n );\n const ready = computed(() => !controls.isPending.value);\n if (exposeControls) {\n return {\n ready,\n ...controls\n };\n } else {\n return ready;\n }\n}\n\nfunction useToNumber(value, options = {}) {\n const {\n method = \"parseFloat\",\n radix,\n nanToZero\n } = options;\n return computed(() => {\n let resolved = toValue(value);\n if (typeof resolved === \"string\")\n resolved = Number[method](resolved, radix);\n if (nanToZero && Number.isNaN(resolved))\n resolved = 0;\n return resolved;\n });\n}\n\nfunction useToString(value) {\n return computed(() => `${toValue(value)}`);\n}\n\nfunction useToggle(initialValue = false, options = {}) {\n const {\n truthyValue = true,\n falsyValue = false\n } = options;\n const valueIsRef = isRef(initialValue);\n const _value = ref(initialValue);\n function toggle(value) {\n if (arguments.length) {\n _value.value = value;\n return _value.value;\n } else {\n const truthy = toValue(truthyValue);\n _value.value = _value.value === truthy ? toValue(falsyValue) : truthy;\n return _value.value;\n }\n }\n if (valueIsRef)\n return toggle;\n else\n return [_value, toggle];\n}\n\nfunction watchArray(source, cb, options) {\n let oldList = (options == null ? void 0 : options.immediate) ? [] : [...source instanceof Function ? source() : Array.isArray(source) ? source : toValue(source)];\n return watch(source, (newList, _, onCleanup) => {\n const oldListRemains = Array.from({ length: oldList.length });\n const added = [];\n for (const obj of newList) {\n let found = false;\n for (let i = 0; i < oldList.length; i++) {\n if (!oldListRemains[i] && obj === oldList[i]) {\n oldListRemains[i] = true;\n found = true;\n break;\n }\n }\n if (!found)\n added.push(obj);\n }\n const removed = oldList.filter((_2, i) => !oldListRemains[i]);\n cb(newList, oldList, added, removed, onCleanup);\n oldList = [...newList];\n }, options);\n}\n\nfunction watchAtMost(source, cb, options) {\n const {\n count,\n ...watchOptions\n } = options;\n const current = ref(0);\n const stop = watchWithFilter(\n source,\n (...args) => {\n current.value += 1;\n if (current.value >= toValue(count))\n nextTick(() => stop());\n cb(...args);\n },\n watchOptions\n );\n return { count: current, stop };\n}\n\nfunction watchDebounced(source, cb, options = {}) {\n const {\n debounce = 0,\n maxWait = void 0,\n ...watchOptions\n } = options;\n return watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter: debounceFilter(debounce, { maxWait })\n }\n );\n}\n\nfunction watchDeep(source, cb, options) {\n return watch(\n source,\n cb,\n {\n ...options,\n deep: true\n }\n );\n}\n\nfunction watchIgnorable(source, cb, options = {}) {\n const {\n eventFilter = bypassFilter,\n ...watchOptions\n } = options;\n const filteredCb = createFilterWrapper(\n eventFilter,\n cb\n );\n let ignoreUpdates;\n let ignorePrevAsyncUpdates;\n let stop;\n if (watchOptions.flush === \"sync\") {\n const ignore = ref(false);\n ignorePrevAsyncUpdates = () => {\n };\n ignoreUpdates = (updater) => {\n ignore.value = true;\n updater();\n ignore.value = false;\n };\n stop = watch(\n source,\n (...args) => {\n if (!ignore.value)\n filteredCb(...args);\n },\n watchOptions\n );\n } else {\n const disposables = [];\n const ignoreCounter = ref(0);\n const syncCounter = ref(0);\n ignorePrevAsyncUpdates = () => {\n ignoreCounter.value = syncCounter.value;\n };\n disposables.push(\n watch(\n source,\n () => {\n syncCounter.value++;\n },\n { ...watchOptions, flush: \"sync\" }\n )\n );\n ignoreUpdates = (updater) => {\n const syncCounterPrev = syncCounter.value;\n updater();\n ignoreCounter.value += syncCounter.value - syncCounterPrev;\n };\n disposables.push(\n watch(\n source,\n (...args) => {\n const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value;\n ignoreCounter.value = 0;\n syncCounter.value = 0;\n if (ignore)\n return;\n filteredCb(...args);\n },\n watchOptions\n )\n );\n stop = () => {\n disposables.forEach((fn) => fn());\n };\n }\n return { stop, ignoreUpdates, ignorePrevAsyncUpdates };\n}\n\nfunction watchImmediate(source, cb, options) {\n return watch(\n source,\n cb,\n {\n ...options,\n immediate: true\n }\n );\n}\n\nfunction watchOnce(source, cb, options) {\n const stop = watch(source, (...args) => {\n nextTick(() => stop());\n return cb(...args);\n }, options);\n return stop;\n}\n\nfunction watchThrottled(source, cb, options = {}) {\n const {\n throttle = 0,\n trailing = true,\n leading = true,\n ...watchOptions\n } = options;\n return watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter: throttleFilter(throttle, trailing, leading)\n }\n );\n}\n\nfunction watchTriggerable(source, cb, options = {}) {\n let cleanupFn;\n function onEffect() {\n if (!cleanupFn)\n return;\n const fn = cleanupFn;\n cleanupFn = void 0;\n fn();\n }\n function onCleanup(callback) {\n cleanupFn = callback;\n }\n const _cb = (value, oldValue) => {\n onEffect();\n return cb(value, oldValue, onCleanup);\n };\n const res = watchIgnorable(source, _cb, options);\n const { ignoreUpdates } = res;\n const trigger = () => {\n let res2;\n ignoreUpdates(() => {\n res2 = _cb(getWatchSources(source), getOldValue(source));\n });\n return res2;\n };\n return {\n ...res,\n trigger\n };\n}\nfunction getWatchSources(sources) {\n if (isReactive(sources))\n return sources;\n if (Array.isArray(sources))\n return sources.map((item) => toValue(item));\n return toValue(sources);\n}\nfunction getOldValue(source) {\n return Array.isArray(source) ? source.map(() => void 0) : void 0;\n}\n\nfunction whenever(source, cb, options) {\n const stop = watch(\n source,\n (v, ov, onInvalidate) => {\n if (v) {\n if (options == null ? void 0 : options.once)\n nextTick(() => stop());\n cb(v, ov, onInvalidate);\n }\n },\n {\n ...options,\n once: false\n }\n );\n return stop;\n}\n\nexport { assert, refAutoReset as autoResetRef, bypassFilter, camelize, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, getLifeCycleTarget, hasOwn, hyphenate, identity, watchIgnorable as ignorableWatch, increaseWithUnit, injectLocal, invoke, isClient, isDef, isDefined, isIOS, isObject, isWorker, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, provideLocal, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRef, toRefs, toValue, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };\n","import * as Vue from 'vue'\n\nvar isVue2 = false\nvar isVue3 = true\nvar Vue2 = undefined\n\nfunction install() {}\n\nexport function set(target, key, val) {\n if (Array.isArray(target)) {\n target.length = Math.max(target.length, key)\n target.splice(key, 1, val)\n return val\n }\n target[key] = val\n return val\n}\n\nexport function del(target, key) {\n if (Array.isArray(target)) {\n target.splice(key, 1)\n return\n }\n delete target[key]\n}\n\nexport * from 'vue'\nexport {\n Vue,\n Vue2,\n isVue2,\n isVue3,\n install,\n}\n","import { noop, makeDestructurable, camelize, toValue, isClient, isObject, tryOnScopeDispose, isIOS, tryOnMounted, notNullish, objectOmit, promiseTimeout, until, increaseWithUnit, objectEntries, createSingletonPromise, useTimeoutFn, pausableWatch, toRef, createEventHook, computedWithControl, timestamp, pausableFilter, watchIgnorable, debounceFilter, createFilterWrapper, bypassFilter, toRefs, useIntervalFn, containsProp, hasOwn, throttleFilter, useDebounceFn, useThrottleFn, clamp, syncRef, objectPick, tryOnUnmounted, watchWithFilter, tryOnBeforeUnmount, identity, isDef, whenever, isWorker } from '@vueuse/shared';\nexport * from '@vueuse/shared';\nimport { isRef, ref, shallowRef, watchEffect, computed, inject, isVue3, version, defineComponent, h, TransitionGroup, shallowReactive, Fragment, watch, getCurrentInstance, customRef, onUpdated, onMounted, isVue2, readonly, reactive, nextTick, markRaw, unref, getCurrentScope, set, del, isReadonly, onBeforeUpdate } from 'vue-demi';\n\nfunction computedAsync(evaluationCallback, initialState, optionsOrRef) {\n let options;\n if (isRef(optionsOrRef)) {\n options = {\n evaluating: optionsOrRef\n };\n } else {\n options = optionsOrRef || {};\n }\n const {\n lazy = false,\n evaluating = void 0,\n shallow = true,\n onError = noop\n } = options;\n const started = ref(!lazy);\n const current = shallow ? shallowRef(initialState) : ref(initialState);\n let counter = 0;\n watchEffect(async (onInvalidate) => {\n if (!started.value)\n return;\n counter++;\n const counterAtBeginning = counter;\n let hasFinished = false;\n if (evaluating) {\n Promise.resolve().then(() => {\n evaluating.value = true;\n });\n }\n try {\n const result = await evaluationCallback((cancelCallback) => {\n onInvalidate(() => {\n if (evaluating)\n evaluating.value = false;\n if (!hasFinished)\n cancelCallback();\n });\n });\n if (counterAtBeginning === counter)\n current.value = result;\n } catch (e) {\n onError(e);\n } finally {\n if (evaluating && counterAtBeginning === counter)\n evaluating.value = false;\n hasFinished = true;\n }\n });\n if (lazy) {\n return computed(() => {\n started.value = true;\n return current.value;\n });\n } else {\n return current;\n }\n}\n\nfunction computedInject(key, options, defaultSource, treatDefaultAsFactory) {\n let source = inject(key);\n if (defaultSource)\n source = inject(key, defaultSource);\n if (treatDefaultAsFactory)\n source = inject(key, defaultSource, treatDefaultAsFactory);\n if (typeof options === \"function\") {\n return computed((ctx) => options(source, ctx));\n } else {\n return computed({\n get: (ctx) => options.get(source, ctx),\n set: options.set\n });\n }\n}\n\nfunction createReusableTemplate(options = {}) {\n if (!isVue3 && !version.startsWith(\"2.7.\")) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] createReusableTemplate only works in Vue 2.7 or above.\");\n return;\n }\n const {\n inheritAttrs = true\n } = options;\n const render = shallowRef();\n const define = /* #__PURE__ */ defineComponent({\n setup(_, { slots }) {\n return () => {\n render.value = slots.default;\n };\n }\n });\n const reuse = /* #__PURE__ */ defineComponent({\n inheritAttrs,\n setup(_, { attrs, slots }) {\n return () => {\n var _a;\n if (!render.value && process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] Failed to find the definition of reusable template\");\n const vnode = (_a = render.value) == null ? void 0 : _a.call(render, { ...keysToCamelKebabCase(attrs), $slots: slots });\n return inheritAttrs && (vnode == null ? void 0 : vnode.length) === 1 ? vnode[0] : vnode;\n };\n }\n });\n return makeDestructurable(\n { define, reuse },\n [define, reuse]\n );\n}\nfunction keysToCamelKebabCase(obj) {\n const newObj = {};\n for (const key in obj)\n newObj[camelize(key)] = obj[key];\n return newObj;\n}\n\nfunction createTemplatePromise(options = {}) {\n if (!isVue3) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] createTemplatePromise only works in Vue 3 or above.\");\n return;\n }\n let index = 0;\n const instances = ref([]);\n function create(...args) {\n const props = shallowReactive({\n key: index++,\n args,\n promise: void 0,\n resolve: () => {\n },\n reject: () => {\n },\n isResolving: false,\n options\n });\n instances.value.push(props);\n props.promise = new Promise((_resolve, _reject) => {\n props.resolve = (v) => {\n props.isResolving = true;\n return _resolve(v);\n };\n props.reject = _reject;\n }).finally(() => {\n props.promise = void 0;\n const index2 = instances.value.indexOf(props);\n if (index2 !== -1)\n instances.value.splice(index2, 1);\n });\n return props.promise;\n }\n function start(...args) {\n if (options.singleton && instances.value.length > 0)\n return instances.value[0].promise;\n return create(...args);\n }\n const component = /* #__PURE__ */ defineComponent((_, { slots }) => {\n const renderList = () => instances.value.map((props) => {\n var _a;\n return h(Fragment, { key: props.key }, (_a = slots.default) == null ? void 0 : _a.call(slots, props));\n });\n if (options.transition)\n return () => h(TransitionGroup, options.transition, renderList);\n return renderList;\n });\n component.start = start;\n return component;\n}\n\nfunction createUnrefFn(fn) {\n return function(...args) {\n return fn.apply(this, args.map((i) => toValue(i)));\n };\n}\n\nfunction unrefElement(elRef) {\n var _a;\n const plain = toValue(elRef);\n return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;\n}\n\nconst defaultWindow = isClient ? window : void 0;\nconst defaultDocument = isClient ? window.document : void 0;\nconst defaultNavigator = isClient ? window.navigator : void 0;\nconst defaultLocation = isClient ? window.location : void 0;\n\nfunction useEventListener(...args) {\n let target;\n let events;\n let listeners;\n let options;\n if (typeof args[0] === \"string\" || Array.isArray(args[0])) {\n [events, listeners, options] = args;\n target = defaultWindow;\n } else {\n [target, events, listeners, options] = args;\n }\n if (!target)\n return noop;\n if (!Array.isArray(events))\n events = [events];\n if (!Array.isArray(listeners))\n listeners = [listeners];\n const cleanups = [];\n const cleanup = () => {\n cleanups.forEach((fn) => fn());\n cleanups.length = 0;\n };\n const register = (el, event, listener, options2) => {\n el.addEventListener(event, listener, options2);\n return () => el.removeEventListener(event, listener, options2);\n };\n const stopWatch = watch(\n () => [unrefElement(target), toValue(options)],\n ([el, options2]) => {\n cleanup();\n if (!el)\n return;\n const optionsClone = isObject(options2) ? { ...options2 } : options2;\n cleanups.push(\n ...events.flatMap((event) => {\n return listeners.map((listener) => register(el, event, listener, optionsClone));\n })\n );\n },\n { immediate: true, flush: \"post\" }\n );\n const stop = () => {\n stopWatch();\n cleanup();\n };\n tryOnScopeDispose(stop);\n return stop;\n}\n\nlet _iOSWorkaround = false;\nfunction onClickOutside(target, handler, options = {}) {\n const { window = defaultWindow, ignore = [], capture = true, detectIframe = false } = options;\n if (!window)\n return noop;\n if (isIOS && !_iOSWorkaround) {\n _iOSWorkaround = true;\n Array.from(window.document.body.children).forEach((el) => el.addEventListener(\"click\", noop));\n window.document.documentElement.addEventListener(\"click\", noop);\n }\n let shouldListen = true;\n const shouldIgnore = (event) => {\n return ignore.some((target2) => {\n if (typeof target2 === \"string\") {\n return Array.from(window.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el));\n } else {\n const el = unrefElement(target2);\n return el && (event.target === el || event.composedPath().includes(el));\n }\n });\n };\n const listener = (event) => {\n const el = unrefElement(target);\n if (!el || el === event.target || event.composedPath().includes(el))\n return;\n if (event.detail === 0)\n shouldListen = !shouldIgnore(event);\n if (!shouldListen) {\n shouldListen = true;\n return;\n }\n handler(event);\n };\n const cleanup = [\n useEventListener(window, \"click\", listener, { passive: true, capture }),\n useEventListener(window, \"pointerdown\", (e) => {\n const el = unrefElement(target);\n shouldListen = !shouldIgnore(e) && !!(el && !e.composedPath().includes(el));\n }, { passive: true }),\n detectIframe && useEventListener(window, \"blur\", (event) => {\n setTimeout(() => {\n var _a;\n const el = unrefElement(target);\n if (((_a = window.document.activeElement) == null ? void 0 : _a.tagName) === \"IFRAME\" && !(el == null ? void 0 : el.contains(window.document.activeElement))) {\n handler(event);\n }\n }, 0);\n })\n ].filter(Boolean);\n const stop = () => cleanup.forEach((fn) => fn());\n return stop;\n}\n\nfunction createKeyPredicate(keyFilter) {\n if (typeof keyFilter === \"function\")\n return keyFilter;\n else if (typeof keyFilter === \"string\")\n return (event) => event.key === keyFilter;\n else if (Array.isArray(keyFilter))\n return (event) => keyFilter.includes(event.key);\n return () => true;\n}\nfunction onKeyStroke(...args) {\n let key;\n let handler;\n let options = {};\n if (args.length === 3) {\n key = args[0];\n handler = args[1];\n options = args[2];\n } else if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n key = true;\n handler = args[0];\n options = args[1];\n } else {\n key = args[0];\n handler = args[1];\n }\n } else {\n key = true;\n handler = args[0];\n }\n const {\n target = defaultWindow,\n eventName = \"keydown\",\n passive = false,\n dedupe = false\n } = options;\n const predicate = createKeyPredicate(key);\n const listener = (e) => {\n if (e.repeat && toValue(dedupe))\n return;\n if (predicate(e))\n handler(e);\n };\n return useEventListener(target, eventName, listener, passive);\n}\nfunction onKeyDown(key, handler, options = {}) {\n return onKeyStroke(key, handler, { ...options, eventName: \"keydown\" });\n}\nfunction onKeyPressed(key, handler, options = {}) {\n return onKeyStroke(key, handler, { ...options, eventName: \"keypress\" });\n}\nfunction onKeyUp(key, handler, options = {}) {\n return onKeyStroke(key, handler, { ...options, eventName: \"keyup\" });\n}\n\nconst DEFAULT_DELAY = 500;\nconst DEFAULT_THRESHOLD = 10;\nfunction onLongPress(target, handler, options) {\n var _a, _b;\n const elementRef = computed(() => unrefElement(target));\n let timeout;\n let posStart;\n let startTimestamp;\n let hasLongPressed = false;\n function clear() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = void 0;\n }\n posStart = void 0;\n startTimestamp = void 0;\n hasLongPressed = false;\n }\n function onRelease(ev) {\n var _a2, _b2, _c;\n const [_startTimestamp, _posStart, _hasLongPressed] = [startTimestamp, posStart, hasLongPressed];\n clear();\n if (!(options == null ? void 0 : options.onMouseUp) || !_posStart || !_startTimestamp)\n return;\n if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n return;\n if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n ev.preventDefault();\n if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n ev.stopPropagation();\n const dx = ev.x - _posStart.x;\n const dy = ev.y - _posStart.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n options.onMouseUp(ev.timeStamp - _startTimestamp, distance, _hasLongPressed);\n }\n function onDown(ev) {\n var _a2, _b2, _c, _d;\n if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n return;\n clear();\n if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n ev.preventDefault();\n if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n ev.stopPropagation();\n posStart = {\n x: ev.x,\n y: ev.y\n };\n startTimestamp = ev.timeStamp;\n timeout = setTimeout(\n () => {\n hasLongPressed = true;\n handler(ev);\n },\n (_d = options == null ? void 0 : options.delay) != null ? _d : DEFAULT_DELAY\n );\n }\n function onMove(ev) {\n var _a2, _b2, _c, _d;\n if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n return;\n if (!posStart || (options == null ? void 0 : options.distanceThreshold) === false)\n return;\n if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n ev.preventDefault();\n if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n ev.stopPropagation();\n const dx = ev.x - posStart.x;\n const dy = ev.y - posStart.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n if (distance >= ((_d = options == null ? void 0 : options.distanceThreshold) != null ? _d : DEFAULT_THRESHOLD))\n clear();\n }\n const listenerOptions = {\n capture: (_a = options == null ? void 0 : options.modifiers) == null ? void 0 : _a.capture,\n once: (_b = options == null ? void 0 : options.modifiers) == null ? void 0 : _b.once\n };\n const cleanup = [\n useEventListener(elementRef, \"pointerdown\", onDown, listenerOptions),\n useEventListener(elementRef, \"pointermove\", onMove, listenerOptions),\n useEventListener(elementRef, [\"pointerup\", \"pointerleave\"], onRelease, listenerOptions)\n ];\n const stop = () => cleanup.forEach((fn) => fn());\n return stop;\n}\n\nfunction isFocusedElementEditable() {\n const { activeElement, body } = document;\n if (!activeElement)\n return false;\n if (activeElement === body)\n return false;\n switch (activeElement.tagName) {\n case \"INPUT\":\n case \"TEXTAREA\":\n return true;\n }\n return activeElement.hasAttribute(\"contenteditable\");\n}\nfunction isTypedCharValid({\n keyCode,\n metaKey,\n ctrlKey,\n altKey\n}) {\n if (metaKey || ctrlKey || altKey)\n return false;\n if (keyCode >= 48 && keyCode <= 57)\n return true;\n if (keyCode >= 65 && keyCode <= 90)\n return true;\n if (keyCode >= 97 && keyCode <= 122)\n return true;\n return false;\n}\nfunction onStartTyping(callback, options = {}) {\n const { document: document2 = defaultDocument } = options;\n const keydown = (event) => {\n if (!isFocusedElementEditable() && isTypedCharValid(event)) {\n callback(event);\n }\n };\n if (document2)\n useEventListener(document2, \"keydown\", keydown, { passive: true });\n}\n\nfunction templateRef(key, initialValue = null) {\n const instance = getCurrentInstance();\n let _trigger = () => {\n };\n const element = customRef((track, trigger) => {\n _trigger = trigger;\n return {\n get() {\n var _a, _b;\n track();\n return (_b = (_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.$refs[key]) != null ? _b : initialValue;\n },\n set() {\n }\n };\n });\n tryOnMounted(_trigger);\n onUpdated(_trigger);\n return element;\n}\n\nfunction useMounted() {\n const isMounted = ref(false);\n const instance = getCurrentInstance();\n if (instance) {\n onMounted(() => {\n isMounted.value = true;\n }, isVue2 ? void 0 : instance);\n }\n return isMounted;\n}\n\nfunction useSupported(callback) {\n const isMounted = useMounted();\n return computed(() => {\n isMounted.value;\n return Boolean(callback());\n });\n}\n\nfunction useMutationObserver(target, callback, options = {}) {\n const { window = defaultWindow, ...mutationOptions } = options;\n let observer;\n const isSupported = useSupported(() => window && \"MutationObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const targets = computed(() => {\n const value = toValue(target);\n const items = (Array.isArray(value) ? value : [value]).map(unrefElement).filter(notNullish);\n return new Set(items);\n });\n const stopWatch = watch(\n () => targets.value,\n (targets2) => {\n cleanup();\n if (isSupported.value && targets2.size) {\n observer = new MutationObserver(callback);\n targets2.forEach((el) => observer.observe(el, mutationOptions));\n }\n },\n { immediate: true, flush: \"post\" }\n );\n const takeRecords = () => {\n return observer == null ? void 0 : observer.takeRecords();\n };\n const stop = () => {\n stopWatch();\n cleanup();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop,\n takeRecords\n };\n}\n\nfunction useActiveElement(options = {}) {\n var _a;\n const {\n window = defaultWindow,\n deep = true,\n triggerOnRemoval = false\n } = options;\n const document = (_a = options.document) != null ? _a : window == null ? void 0 : window.document;\n const getDeepActiveElement = () => {\n var _a2;\n let element = document == null ? void 0 : document.activeElement;\n if (deep) {\n while (element == null ? void 0 : element.shadowRoot)\n element = (_a2 = element == null ? void 0 : element.shadowRoot) == null ? void 0 : _a2.activeElement;\n }\n return element;\n };\n const activeElement = ref();\n const trigger = () => {\n activeElement.value = getDeepActiveElement();\n };\n if (window) {\n useEventListener(window, \"blur\", (event) => {\n if (event.relatedTarget !== null)\n return;\n trigger();\n }, true);\n useEventListener(window, \"focus\", trigger, true);\n }\n if (triggerOnRemoval) {\n useMutationObserver(document, (mutations) => {\n mutations.filter((m) => m.removedNodes.length).map((n) => Array.from(n.removedNodes)).flat().forEach((node) => {\n if (node === activeElement.value)\n trigger();\n });\n }, {\n childList: true,\n subtree: true\n });\n }\n trigger();\n return activeElement;\n}\n\nfunction useRafFn(fn, options = {}) {\n const {\n immediate = true,\n fpsLimit = void 0,\n window = defaultWindow\n } = options;\n const isActive = ref(false);\n const intervalLimit = fpsLimit ? 1e3 / fpsLimit : null;\n let previousFrameTimestamp = 0;\n let rafId = null;\n function loop(timestamp) {\n if (!isActive.value || !window)\n return;\n if (!previousFrameTimestamp)\n previousFrameTimestamp = timestamp;\n const delta = timestamp - previousFrameTimestamp;\n if (intervalLimit && delta < intervalLimit) {\n rafId = window.requestAnimationFrame(loop);\n return;\n }\n previousFrameTimestamp = timestamp;\n fn({ delta, timestamp });\n rafId = window.requestAnimationFrame(loop);\n }\n function resume() {\n if (!isActive.value && window) {\n isActive.value = true;\n previousFrameTimestamp = 0;\n rafId = window.requestAnimationFrame(loop);\n }\n }\n function pause() {\n isActive.value = false;\n if (rafId != null && window) {\n window.cancelAnimationFrame(rafId);\n rafId = null;\n }\n }\n if (immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive: readonly(isActive),\n pause,\n resume\n };\n}\n\nfunction useAnimate(target, keyframes, options) {\n let config;\n let animateOptions;\n if (isObject(options)) {\n config = options;\n animateOptions = objectOmit(options, [\"window\", \"immediate\", \"commitStyles\", \"persist\", \"onReady\", \"onError\"]);\n } else {\n config = { duration: options };\n animateOptions = options;\n }\n const {\n window = defaultWindow,\n immediate = true,\n commitStyles,\n persist,\n playbackRate: _playbackRate = 1,\n onReady,\n onError = (e) => {\n console.error(e);\n }\n } = config;\n const isSupported = useSupported(() => window && HTMLElement && \"animate\" in HTMLElement.prototype);\n const animate = shallowRef(void 0);\n const store = shallowReactive({\n startTime: null,\n currentTime: null,\n timeline: null,\n playbackRate: _playbackRate,\n pending: false,\n playState: immediate ? \"idle\" : \"paused\",\n replaceState: \"active\"\n });\n const pending = computed(() => store.pending);\n const playState = computed(() => store.playState);\n const replaceState = computed(() => store.replaceState);\n const startTime = computed({\n get() {\n return store.startTime;\n },\n set(value) {\n store.startTime = value;\n if (animate.value)\n animate.value.startTime = value;\n }\n });\n const currentTime = computed({\n get() {\n return store.currentTime;\n },\n set(value) {\n store.currentTime = value;\n if (animate.value) {\n animate.value.currentTime = value;\n syncResume();\n }\n }\n });\n const timeline = computed({\n get() {\n return store.timeline;\n },\n set(value) {\n store.timeline = value;\n if (animate.value)\n animate.value.timeline = value;\n }\n });\n const playbackRate = computed({\n get() {\n return store.playbackRate;\n },\n set(value) {\n store.playbackRate = value;\n if (animate.value)\n animate.value.playbackRate = value;\n }\n });\n const play = () => {\n if (animate.value) {\n try {\n animate.value.play();\n syncResume();\n } catch (e) {\n syncPause();\n onError(e);\n }\n } else {\n update();\n }\n };\n const pause = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.pause();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n const reverse = () => {\n var _a;\n if (!animate.value)\n update();\n try {\n (_a = animate.value) == null ? void 0 : _a.reverse();\n syncResume();\n } catch (e) {\n syncPause();\n onError(e);\n }\n };\n const finish = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.finish();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n const cancel = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.cancel();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n watch(() => unrefElement(target), (el) => {\n if (el)\n update();\n });\n watch(() => keyframes, (value) => {\n if (animate.value)\n update();\n if (!unrefElement(target) && animate.value) {\n animate.value.effect = new KeyframeEffect(\n unrefElement(target),\n toValue(value),\n animateOptions\n );\n }\n }, { deep: true });\n tryOnMounted(() => update(true), false);\n tryOnScopeDispose(cancel);\n function update(init) {\n const el = unrefElement(target);\n if (!isSupported.value || !el)\n return;\n if (!animate.value)\n animate.value = el.animate(toValue(keyframes), animateOptions);\n if (persist)\n animate.value.persist();\n if (_playbackRate !== 1)\n animate.value.playbackRate = _playbackRate;\n if (init && !immediate)\n animate.value.pause();\n else\n syncResume();\n onReady == null ? void 0 : onReady(animate.value);\n }\n useEventListener(animate, [\"cancel\", \"finish\", \"remove\"], syncPause);\n useEventListener(animate, \"finish\", () => {\n var _a;\n if (commitStyles)\n (_a = animate.value) == null ? void 0 : _a.commitStyles();\n });\n const { resume: resumeRef, pause: pauseRef } = useRafFn(() => {\n if (!animate.value)\n return;\n store.pending = animate.value.pending;\n store.playState = animate.value.playState;\n store.replaceState = animate.value.replaceState;\n store.startTime = animate.value.startTime;\n store.currentTime = animate.value.currentTime;\n store.timeline = animate.value.timeline;\n store.playbackRate = animate.value.playbackRate;\n }, { immediate: false });\n function syncResume() {\n if (isSupported.value)\n resumeRef();\n }\n function syncPause() {\n if (isSupported.value && window)\n window.requestAnimationFrame(pauseRef);\n }\n return {\n isSupported,\n animate,\n // actions\n play,\n pause,\n reverse,\n finish,\n cancel,\n // state\n pending,\n playState,\n replaceState,\n startTime,\n currentTime,\n timeline,\n playbackRate\n };\n}\n\nfunction useAsyncQueue(tasks, options) {\n const {\n interrupt = true,\n onError = noop,\n onFinished = noop,\n signal\n } = options || {};\n const promiseState = {\n aborted: \"aborted\",\n fulfilled: \"fulfilled\",\n pending: \"pending\",\n rejected: \"rejected\"\n };\n const initialResult = Array.from(Array.from({ length: tasks.length }), () => ({ state: promiseState.pending, data: null }));\n const result = reactive(initialResult);\n const activeIndex = ref(-1);\n if (!tasks || tasks.length === 0) {\n onFinished();\n return {\n activeIndex,\n result\n };\n }\n function updateResult(state, res) {\n activeIndex.value++;\n result[activeIndex.value].data = res;\n result[activeIndex.value].state = state;\n }\n tasks.reduce((prev, curr) => {\n return prev.then((prevRes) => {\n var _a;\n if (signal == null ? void 0 : signal.aborted) {\n updateResult(promiseState.aborted, new Error(\"aborted\"));\n return;\n }\n if (((_a = result[activeIndex.value]) == null ? void 0 : _a.state) === promiseState.rejected && interrupt) {\n onFinished();\n return;\n }\n const done = curr(prevRes).then((currentRes) => {\n updateResult(promiseState.fulfilled, currentRes);\n if (activeIndex.value === tasks.length - 1)\n onFinished();\n return currentRes;\n });\n if (!signal)\n return done;\n return Promise.race([done, whenAborted(signal)]);\n }).catch((e) => {\n if (signal == null ? void 0 : signal.aborted) {\n updateResult(promiseState.aborted, e);\n return e;\n }\n updateResult(promiseState.rejected, e);\n onError();\n return e;\n });\n }, Promise.resolve());\n return {\n activeIndex,\n result\n };\n}\nfunction whenAborted(signal) {\n return new Promise((resolve, reject) => {\n const error = new Error(\"aborted\");\n if (signal.aborted)\n reject(error);\n else\n signal.addEventListener(\"abort\", () => reject(error), { once: true });\n });\n}\n\nfunction useAsyncState(promise, initialState, options) {\n const {\n immediate = true,\n delay = 0,\n onError = noop,\n onSuccess = noop,\n resetOnExecute = true,\n shallow = true,\n throwError\n } = options != null ? options : {};\n const state = shallow ? shallowRef(initialState) : ref(initialState);\n const isReady = ref(false);\n const isLoading = ref(false);\n const error = shallowRef(void 0);\n async function execute(delay2 = 0, ...args) {\n if (resetOnExecute)\n state.value = initialState;\n error.value = void 0;\n isReady.value = false;\n isLoading.value = true;\n if (delay2 > 0)\n await promiseTimeout(delay2);\n const _promise = typeof promise === \"function\" ? promise(...args) : promise;\n try {\n const data = await _promise;\n state.value = data;\n isReady.value = true;\n onSuccess(data);\n } catch (e) {\n error.value = e;\n onError(e);\n if (throwError)\n throw e;\n } finally {\n isLoading.value = false;\n }\n return state.value;\n }\n if (immediate)\n execute(delay);\n const shell = {\n state,\n isReady,\n isLoading,\n error,\n execute\n };\n function waitUntilIsLoaded() {\n return new Promise((resolve, reject) => {\n until(isLoading).toBe(false).then(() => resolve(shell)).catch(reject);\n });\n }\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilIsLoaded().then(onFulfilled, onRejected);\n }\n };\n}\n\nconst defaults = {\n array: (v) => JSON.stringify(v),\n object: (v) => JSON.stringify(v),\n set: (v) => JSON.stringify(Array.from(v)),\n map: (v) => JSON.stringify(Object.fromEntries(v)),\n null: () => \"\"\n};\nfunction getDefaultSerialization(target) {\n if (!target)\n return defaults.null;\n if (target instanceof Map)\n return defaults.map;\n else if (target instanceof Set)\n return defaults.set;\n else if (Array.isArray(target))\n return defaults.array;\n else\n return defaults.object;\n}\n\nfunction useBase64(target, options) {\n const base64 = ref(\"\");\n const promise = ref();\n function execute() {\n if (!isClient)\n return;\n promise.value = new Promise((resolve, reject) => {\n try {\n const _target = toValue(target);\n if (_target == null) {\n resolve(\"\");\n } else if (typeof _target === \"string\") {\n resolve(blobToBase64(new Blob([_target], { type: \"text/plain\" })));\n } else if (_target instanceof Blob) {\n resolve(blobToBase64(_target));\n } else if (_target instanceof ArrayBuffer) {\n resolve(window.btoa(String.fromCharCode(...new Uint8Array(_target))));\n } else if (_target instanceof HTMLCanvasElement) {\n resolve(_target.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n } else if (_target instanceof HTMLImageElement) {\n const img = _target.cloneNode(false);\n img.crossOrigin = \"Anonymous\";\n imgLoaded(img).then(() => {\n const canvas = document.createElement(\"canvas\");\n const ctx = canvas.getContext(\"2d\");\n canvas.width = img.width;\n canvas.height = img.height;\n ctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n resolve(canvas.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n }).catch(reject);\n } else if (typeof _target === \"object\") {\n const _serializeFn = (options == null ? void 0 : options.serializer) || getDefaultSerialization(_target);\n const serialized = _serializeFn(_target);\n return resolve(blobToBase64(new Blob([serialized], { type: \"application/json\" })));\n } else {\n reject(new Error(\"target is unsupported types\"));\n }\n } catch (error) {\n reject(error);\n }\n });\n promise.value.then((res) => base64.value = res);\n return promise.value;\n }\n if (isRef(target) || typeof target === \"function\")\n watch(target, execute, { immediate: true });\n else\n execute();\n return {\n base64,\n promise,\n execute\n };\n}\nfunction imgLoaded(img) {\n return new Promise((resolve, reject) => {\n if (!img.complete) {\n img.onload = () => {\n resolve();\n };\n img.onerror = reject;\n } else {\n resolve();\n }\n });\n}\nfunction blobToBase64(blob) {\n return new Promise((resolve, reject) => {\n const fr = new FileReader();\n fr.onload = (e) => {\n resolve(e.target.result);\n };\n fr.onerror = reject;\n fr.readAsDataURL(blob);\n });\n}\n\nfunction useBattery(options = {}) {\n const { navigator = defaultNavigator } = options;\n const events = [\"chargingchange\", \"chargingtimechange\", \"dischargingtimechange\", \"levelchange\"];\n const isSupported = useSupported(() => navigator && \"getBattery\" in navigator && typeof navigator.getBattery === \"function\");\n const charging = ref(false);\n const chargingTime = ref(0);\n const dischargingTime = ref(0);\n const level = ref(1);\n let battery;\n function updateBatteryInfo() {\n charging.value = this.charging;\n chargingTime.value = this.chargingTime || 0;\n dischargingTime.value = this.dischargingTime || 0;\n level.value = this.level;\n }\n if (isSupported.value) {\n navigator.getBattery().then((_battery) => {\n battery = _battery;\n updateBatteryInfo.call(battery);\n useEventListener(battery, events, updateBatteryInfo, { passive: true });\n });\n }\n return {\n isSupported,\n charging,\n chargingTime,\n dischargingTime,\n level\n };\n}\n\nfunction useBluetooth(options) {\n let {\n acceptAllDevices = false\n } = options || {};\n const {\n filters = void 0,\n optionalServices = void 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => navigator && \"bluetooth\" in navigator);\n const device = shallowRef(void 0);\n const error = shallowRef(null);\n watch(device, () => {\n connectToBluetoothGATTServer();\n });\n async function requestDevice() {\n if (!isSupported.value)\n return;\n error.value = null;\n if (filters && filters.length > 0)\n acceptAllDevices = false;\n try {\n device.value = await (navigator == null ? void 0 : navigator.bluetooth.requestDevice({\n acceptAllDevices,\n filters,\n optionalServices\n }));\n } catch (err) {\n error.value = err;\n }\n }\n const server = ref();\n const isConnected = computed(() => {\n var _a;\n return ((_a = server.value) == null ? void 0 : _a.connected) || false;\n });\n async function connectToBluetoothGATTServer() {\n error.value = null;\n if (device.value && device.value.gatt) {\n device.value.addEventListener(\"gattserverdisconnected\", () => {\n });\n try {\n server.value = await device.value.gatt.connect();\n } catch (err) {\n error.value = err;\n }\n }\n }\n tryOnMounted(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.connect();\n });\n tryOnScopeDispose(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.disconnect();\n });\n return {\n isSupported,\n isConnected,\n // Device:\n device,\n requestDevice,\n // Server:\n server,\n // Errors:\n error\n };\n}\n\nfunction useMediaQuery(query, options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"matchMedia\" in window && typeof window.matchMedia === \"function\");\n let mediaQuery;\n const matches = ref(false);\n const handler = (event) => {\n matches.value = event.matches;\n };\n const cleanup = () => {\n if (!mediaQuery)\n return;\n if (\"removeEventListener\" in mediaQuery)\n mediaQuery.removeEventListener(\"change\", handler);\n else\n mediaQuery.removeListener(handler);\n };\n const stopWatch = watchEffect(() => {\n if (!isSupported.value)\n return;\n cleanup();\n mediaQuery = window.matchMedia(toValue(query));\n if (\"addEventListener\" in mediaQuery)\n mediaQuery.addEventListener(\"change\", handler);\n else\n mediaQuery.addListener(handler);\n matches.value = mediaQuery.matches;\n });\n tryOnScopeDispose(() => {\n stopWatch();\n cleanup();\n mediaQuery = void 0;\n });\n return matches;\n}\n\nconst breakpointsTailwind = {\n \"sm\": 640,\n \"md\": 768,\n \"lg\": 1024,\n \"xl\": 1280,\n \"2xl\": 1536\n};\nconst breakpointsBootstrapV5 = {\n xs: 0,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1400\n};\nconst breakpointsVuetifyV2 = {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1264,\n xl: 1904\n};\nconst breakpointsVuetifyV3 = {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1280,\n xl: 1920,\n xxl: 2560\n};\nconst breakpointsVuetify = breakpointsVuetifyV2;\nconst breakpointsAntDesign = {\n xs: 480,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1600\n};\nconst breakpointsQuasar = {\n xs: 0,\n sm: 600,\n md: 1024,\n lg: 1440,\n xl: 1920\n};\nconst breakpointsSematic = {\n mobileS: 320,\n mobileM: 375,\n mobileL: 425,\n tablet: 768,\n laptop: 1024,\n laptopL: 1440,\n desktop4K: 2560\n};\nconst breakpointsMasterCss = {\n \"3xs\": 360,\n \"2xs\": 480,\n \"xs\": 600,\n \"sm\": 768,\n \"md\": 1024,\n \"lg\": 1280,\n \"xl\": 1440,\n \"2xl\": 1600,\n \"3xl\": 1920,\n \"4xl\": 2560\n};\nconst breakpointsPrimeFlex = {\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200\n};\n\nfunction useBreakpoints(breakpoints, options = {}) {\n function getValue(k, delta) {\n let v = toValue(breakpoints[toValue(k)]);\n if (delta != null)\n v = increaseWithUnit(v, delta);\n if (typeof v === \"number\")\n v = `${v}px`;\n return v;\n }\n const { window = defaultWindow, strategy = \"min-width\" } = options;\n function match(query) {\n if (!window)\n return false;\n return window.matchMedia(query).matches;\n }\n const greaterOrEqual = (k) => {\n return useMediaQuery(() => `(min-width: ${getValue(k)})`, options);\n };\n const smallerOrEqual = (k) => {\n return useMediaQuery(() => `(max-width: ${getValue(k)})`, options);\n };\n const shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => {\n Object.defineProperty(shortcuts, k, {\n get: () => strategy === \"min-width\" ? greaterOrEqual(k) : smallerOrEqual(k),\n enumerable: true,\n configurable: true\n });\n return shortcuts;\n }, {});\n function current() {\n const points = Object.keys(breakpoints).map((i) => [i, greaterOrEqual(i)]);\n return computed(() => points.filter(([, v]) => v.value).map(([k]) => k));\n }\n return Object.assign(shortcutMethods, {\n greaterOrEqual,\n smallerOrEqual,\n greater(k) {\n return useMediaQuery(() => `(min-width: ${getValue(k, 0.1)})`, options);\n },\n smaller(k) {\n return useMediaQuery(() => `(max-width: ${getValue(k, -0.1)})`, options);\n },\n between(a, b) {\n return useMediaQuery(() => `(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`, options);\n },\n isGreater(k) {\n return match(`(min-width: ${getValue(k, 0.1)})`);\n },\n isGreaterOrEqual(k) {\n return match(`(min-width: ${getValue(k)})`);\n },\n isSmaller(k) {\n return match(`(max-width: ${getValue(k, -0.1)})`);\n },\n isSmallerOrEqual(k) {\n return match(`(max-width: ${getValue(k)})`);\n },\n isInBetween(a, b) {\n return match(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`);\n },\n current,\n active() {\n const bps = current();\n return computed(() => bps.value.length === 0 ? \"\" : bps.value.at(-1));\n }\n });\n}\n\nfunction useBroadcastChannel(options) {\n const {\n name,\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"BroadcastChannel\" in window);\n const isClosed = ref(false);\n const channel = ref();\n const data = ref();\n const error = shallowRef(null);\n const post = (data2) => {\n if (channel.value)\n channel.value.postMessage(data2);\n };\n const close = () => {\n if (channel.value)\n channel.value.close();\n isClosed.value = true;\n };\n if (isSupported.value) {\n tryOnMounted(() => {\n error.value = null;\n channel.value = new BroadcastChannel(name);\n channel.value.addEventListener(\"message\", (e) => {\n data.value = e.data;\n }, { passive: true });\n channel.value.addEventListener(\"messageerror\", (e) => {\n error.value = e;\n }, { passive: true });\n channel.value.addEventListener(\"close\", () => {\n isClosed.value = true;\n });\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n isSupported,\n channel,\n data,\n post,\n close,\n error,\n isClosed\n };\n}\n\nconst WRITABLE_PROPERTIES = [\n \"hash\",\n \"host\",\n \"hostname\",\n \"href\",\n \"pathname\",\n \"port\",\n \"protocol\",\n \"search\"\n];\nfunction useBrowserLocation(options = {}) {\n const { window = defaultWindow } = options;\n const refs = Object.fromEntries(\n WRITABLE_PROPERTIES.map((key) => [key, ref()])\n );\n for (const [key, ref2] of objectEntries(refs)) {\n watch(ref2, (value) => {\n if (!(window == null ? void 0 : window.location) || window.location[key] === value)\n return;\n window.location[key] = value;\n });\n }\n const buildState = (trigger) => {\n var _a;\n const { state: state2, length } = (window == null ? void 0 : window.history) || {};\n const { origin } = (window == null ? void 0 : window.location) || {};\n for (const key of WRITABLE_PROPERTIES)\n refs[key].value = (_a = window == null ? void 0 : window.location) == null ? void 0 : _a[key];\n return reactive({\n trigger,\n state: state2,\n length,\n origin,\n ...refs\n });\n };\n const state = ref(buildState(\"load\"));\n if (window) {\n useEventListener(window, \"popstate\", () => state.value = buildState(\"popstate\"), { passive: true });\n useEventListener(window, \"hashchange\", () => state.value = buildState(\"hashchange\"), { passive: true });\n }\n return state;\n}\n\nfunction useCached(refValue, comparator = (a, b) => a === b, watchOptions) {\n const cachedValue = ref(refValue.value);\n watch(() => refValue.value, (value) => {\n if (!comparator(value, cachedValue.value))\n cachedValue.value = value;\n }, watchOptions);\n return cachedValue;\n}\n\nfunction usePermission(permissionDesc, options = {}) {\n const {\n controls = false,\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"permissions\" in navigator);\n let permissionStatus;\n const desc = typeof permissionDesc === \"string\" ? { name: permissionDesc } : permissionDesc;\n const state = ref();\n const onChange = () => {\n if (permissionStatus)\n state.value = permissionStatus.state;\n };\n const query = createSingletonPromise(async () => {\n if (!isSupported.value)\n return;\n if (!permissionStatus) {\n try {\n permissionStatus = await navigator.permissions.query(desc);\n useEventListener(permissionStatus, \"change\", onChange);\n onChange();\n } catch (e) {\n state.value = \"prompt\";\n }\n }\n return permissionStatus;\n });\n query();\n if (controls) {\n return {\n state,\n isSupported,\n query\n };\n } else {\n return state;\n }\n}\n\nfunction useClipboard(options = {}) {\n const {\n navigator = defaultNavigator,\n read = false,\n source,\n copiedDuring = 1500,\n legacy = false\n } = options;\n const isClipboardApiSupported = useSupported(() => navigator && \"clipboard\" in navigator);\n const permissionRead = usePermission(\"clipboard-read\");\n const permissionWrite = usePermission(\"clipboard-write\");\n const isSupported = computed(() => isClipboardApiSupported.value || legacy);\n const text = ref(\"\");\n const copied = ref(false);\n const timeout = useTimeoutFn(() => copied.value = false, copiedDuring);\n function updateText() {\n if (isClipboardApiSupported.value && isAllowed(permissionRead.value)) {\n navigator.clipboard.readText().then((value) => {\n text.value = value;\n });\n } else {\n text.value = legacyRead();\n }\n }\n if (isSupported.value && read)\n useEventListener([\"copy\", \"cut\"], updateText);\n async function copy(value = toValue(source)) {\n if (isSupported.value && value != null) {\n if (isClipboardApiSupported.value && isAllowed(permissionWrite.value))\n await navigator.clipboard.writeText(value);\n else\n legacyCopy(value);\n text.value = value;\n copied.value = true;\n timeout.start();\n }\n }\n function legacyCopy(value) {\n const ta = document.createElement(\"textarea\");\n ta.value = value != null ? value : \"\";\n ta.style.position = \"absolute\";\n ta.style.opacity = \"0\";\n document.body.appendChild(ta);\n ta.select();\n document.execCommand(\"copy\");\n ta.remove();\n }\n function legacyRead() {\n var _a, _b, _c;\n return (_c = (_b = (_a = document == null ? void 0 : document.getSelection) == null ? void 0 : _a.call(document)) == null ? void 0 : _b.toString()) != null ? _c : \"\";\n }\n function isAllowed(status) {\n return status === \"granted\" || status === \"prompt\";\n }\n return {\n isSupported,\n text,\n copied,\n copy\n };\n}\n\nfunction useClipboardItems(options = {}) {\n const {\n navigator = defaultNavigator,\n read = false,\n source,\n copiedDuring = 1500\n } = options;\n const isSupported = useSupported(() => navigator && \"clipboard\" in navigator);\n const content = ref([]);\n const copied = ref(false);\n const timeout = useTimeoutFn(() => copied.value = false, copiedDuring);\n function updateContent() {\n if (isSupported.value) {\n navigator.clipboard.read().then((items) => {\n content.value = items;\n });\n }\n }\n if (isSupported.value && read)\n useEventListener([\"copy\", \"cut\"], updateContent);\n async function copy(value = toValue(source)) {\n if (isSupported.value && value != null) {\n await navigator.clipboard.write(value);\n content.value = value;\n copied.value = true;\n timeout.start();\n }\n }\n return {\n isSupported,\n content,\n copied,\n copy\n };\n}\n\nfunction cloneFnJSON(source) {\n return JSON.parse(JSON.stringify(source));\n}\nfunction useCloned(source, options = {}) {\n const cloned = ref({});\n const {\n manual,\n clone = cloneFnJSON,\n // watch options\n deep = true,\n immediate = true\n } = options;\n function sync() {\n cloned.value = clone(toValue(source));\n }\n if (!manual && (isRef(source) || typeof source === \"function\")) {\n watch(source, sync, {\n ...options,\n deep,\n immediate\n });\n } else {\n sync();\n }\n return { cloned, sync };\n}\n\nconst _global = typeof globalThis !== \"undefined\" ? globalThis : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : {};\nconst globalKey = \"__vueuse_ssr_handlers__\";\nconst handlers = /* @__PURE__ */ getHandlers();\nfunction getHandlers() {\n if (!(globalKey in _global))\n _global[globalKey] = _global[globalKey] || {};\n return _global[globalKey];\n}\nfunction getSSRHandler(key, fallback) {\n return handlers[key] || fallback;\n}\nfunction setSSRHandler(key, fn) {\n handlers[key] = fn;\n}\n\nfunction guessSerializerType(rawInit) {\n return rawInit == null ? \"any\" : rawInit instanceof Set ? \"set\" : rawInit instanceof Map ? \"map\" : rawInit instanceof Date ? \"date\" : typeof rawInit === \"boolean\" ? \"boolean\" : typeof rawInit === \"string\" ? \"string\" : typeof rawInit === \"object\" ? \"object\" : !Number.isNaN(rawInit) ? \"number\" : \"any\";\n}\n\nconst StorageSerializers = {\n boolean: {\n read: (v) => v === \"true\",\n write: (v) => String(v)\n },\n object: {\n read: (v) => JSON.parse(v),\n write: (v) => JSON.stringify(v)\n },\n number: {\n read: (v) => Number.parseFloat(v),\n write: (v) => String(v)\n },\n any: {\n read: (v) => v,\n write: (v) => String(v)\n },\n string: {\n read: (v) => v,\n write: (v) => String(v)\n },\n map: {\n read: (v) => new Map(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v.entries()))\n },\n set: {\n read: (v) => new Set(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v))\n },\n date: {\n read: (v) => new Date(v),\n write: (v) => v.toISOString()\n }\n};\nconst customStorageEventName = \"vueuse-storage\";\nfunction useStorage(key, defaults, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n },\n initOnMounted\n } = options;\n const data = (shallow ? shallowRef : ref)(typeof defaults === \"function\" ? defaults() : defaults);\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorage\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n if (!storage)\n return data;\n const rawInit = toValue(defaults);\n const type = guessSerializerType(rawInit);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n const { pause: pauseWatch, resume: resumeWatch } = pausableWatch(\n data,\n () => write(data.value),\n { flush, deep, eventFilter }\n );\n if (window && listenToStorageChanges) {\n tryOnMounted(() => {\n if (storage instanceof Storage)\n useEventListener(window, \"storage\", update);\n else\n useEventListener(window, customStorageEventName, updateFromCustomEvent);\n if (initOnMounted)\n update();\n });\n }\n if (!initOnMounted)\n update();\n function dispatchWriteEvent(oldValue, newValue) {\n if (window && !(storage instanceof Storage)) {\n window.dispatchEvent(new CustomEvent(customStorageEventName, {\n detail: {\n key,\n oldValue,\n newValue,\n storageArea: storage\n }\n }));\n }\n }\n function write(v) {\n try {\n const oldValue = storage.getItem(key);\n if (v == null) {\n dispatchWriteEvent(oldValue, null);\n storage.removeItem(key);\n } else {\n const serialized = serializer.write(v);\n if (oldValue !== serialized) {\n storage.setItem(key, serialized);\n dispatchWriteEvent(oldValue, serialized);\n }\n }\n } catch (e) {\n onError(e);\n }\n }\n function read(event) {\n const rawValue = event ? event.newValue : storage.getItem(key);\n if (rawValue == null) {\n if (writeDefaults && rawInit != null)\n storage.setItem(key, serializer.write(rawInit));\n return rawInit;\n } else if (!event && mergeDefaults) {\n const value = serializer.read(rawValue);\n if (typeof mergeDefaults === \"function\")\n return mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n return { ...rawInit, ...value };\n return value;\n } else if (typeof rawValue !== \"string\") {\n return rawValue;\n } else {\n return serializer.read(rawValue);\n }\n }\n function update(event) {\n if (event && event.storageArea !== storage)\n return;\n if (event && event.key == null) {\n data.value = rawInit;\n return;\n }\n if (event && event.key !== key)\n return;\n pauseWatch();\n try {\n if ((event == null ? void 0 : event.newValue) !== serializer.write(data.value))\n data.value = read(event);\n } catch (e) {\n onError(e);\n } finally {\n if (event)\n nextTick(resumeWatch);\n else\n resumeWatch();\n }\n }\n function updateFromCustomEvent(event) {\n update(event.detail);\n }\n return data;\n}\n\nfunction usePreferredDark(options) {\n return useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n}\n\nconst CSS_DISABLE_TRANS = \"*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}\";\nfunction useColorMode(options = {}) {\n const {\n selector = \"html\",\n attribute = \"class\",\n initialValue = \"auto\",\n window = defaultWindow,\n storage,\n storageKey = \"vueuse-color-scheme\",\n listenToStorageChanges = true,\n storageRef,\n emitAuto,\n disableTransition = true\n } = options;\n const modes = {\n auto: \"\",\n light: \"light\",\n dark: \"dark\",\n ...options.modes || {}\n };\n const preferredDark = usePreferredDark({ window });\n const system = computed(() => preferredDark.value ? \"dark\" : \"light\");\n const store = storageRef || (storageKey == null ? toRef(initialValue) : useStorage(storageKey, initialValue, storage, { window, listenToStorageChanges }));\n const state = computed(() => store.value === \"auto\" ? system.value : store.value);\n const updateHTMLAttrs = getSSRHandler(\n \"updateHTMLAttrs\",\n (selector2, attribute2, value) => {\n const el = typeof selector2 === \"string\" ? window == null ? void 0 : window.document.querySelector(selector2) : unrefElement(selector2);\n if (!el)\n return;\n const classesToAdd = /* @__PURE__ */ new Set();\n const classesToRemove = /* @__PURE__ */ new Set();\n let attributeToChange = null;\n if (attribute2 === \"class\") {\n const current = value.split(/\\s/g);\n Object.values(modes).flatMap((i) => (i || \"\").split(/\\s/g)).filter(Boolean).forEach((v) => {\n if (current.includes(v))\n classesToAdd.add(v);\n else\n classesToRemove.add(v);\n });\n } else {\n attributeToChange = { key: attribute2, value };\n }\n if (classesToAdd.size === 0 && classesToRemove.size === 0 && attributeToChange === null)\n return;\n let style;\n if (disableTransition) {\n style = window.document.createElement(\"style\");\n style.appendChild(document.createTextNode(CSS_DISABLE_TRANS));\n window.document.head.appendChild(style);\n }\n for (const c of classesToAdd) {\n el.classList.add(c);\n }\n for (const c of classesToRemove) {\n el.classList.remove(c);\n }\n if (attributeToChange) {\n el.setAttribute(attributeToChange.key, attributeToChange.value);\n }\n if (disableTransition) {\n window.getComputedStyle(style).opacity;\n document.head.removeChild(style);\n }\n }\n );\n function defaultOnChanged(mode) {\n var _a;\n updateHTMLAttrs(selector, attribute, (_a = modes[mode]) != null ? _a : mode);\n }\n function onChanged(mode) {\n if (options.onChanged)\n options.onChanged(mode, defaultOnChanged);\n else\n defaultOnChanged(mode);\n }\n watch(state, onChanged, { flush: \"post\", immediate: true });\n tryOnMounted(() => onChanged(state.value));\n const auto = computed({\n get() {\n return emitAuto ? store.value : state.value;\n },\n set(v) {\n store.value = v;\n }\n });\n try {\n return Object.assign(auto, { store, system, state });\n } catch (e) {\n return auto;\n }\n}\n\nfunction useConfirmDialog(revealed = ref(false)) {\n const confirmHook = createEventHook();\n const cancelHook = createEventHook();\n const revealHook = createEventHook();\n let _resolve = noop;\n const reveal = (data) => {\n revealHook.trigger(data);\n revealed.value = true;\n return new Promise((resolve) => {\n _resolve = resolve;\n });\n };\n const confirm = (data) => {\n revealed.value = false;\n confirmHook.trigger(data);\n _resolve({ data, isCanceled: false });\n };\n const cancel = (data) => {\n revealed.value = false;\n cancelHook.trigger(data);\n _resolve({ data, isCanceled: true });\n };\n return {\n isRevealed: computed(() => revealed.value),\n reveal,\n confirm,\n cancel,\n onReveal: revealHook.on,\n onConfirm: confirmHook.on,\n onCancel: cancelHook.on\n };\n}\n\nfunction useCssVar(prop, target, options = {}) {\n const { window = defaultWindow, initialValue, observe = false } = options;\n const variable = ref(initialValue);\n const elRef = computed(() => {\n var _a;\n return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);\n });\n function updateCssVar() {\n var _a;\n const key = toValue(prop);\n const el = toValue(elRef);\n if (el && window && key) {\n const value = (_a = window.getComputedStyle(el).getPropertyValue(key)) == null ? void 0 : _a.trim();\n variable.value = value || initialValue;\n }\n }\n if (observe) {\n useMutationObserver(elRef, updateCssVar, {\n attributeFilter: [\"style\", \"class\"],\n window\n });\n }\n watch(\n [elRef, () => toValue(prop)],\n (_, old) => {\n if (old[0] && old[1] && window)\n window.getComputedStyle(old[0]).removeProperty(old[1]);\n updateCssVar();\n },\n { immediate: true }\n );\n watch(\n variable,\n (val) => {\n var _a;\n const raw_prop = toValue(prop);\n if (((_a = elRef.value) == null ? void 0 : _a.style) && raw_prop) {\n if (val == null)\n elRef.value.style.removeProperty(raw_prop);\n else\n elRef.value.style.setProperty(raw_prop, val);\n }\n }\n );\n return variable;\n}\n\nfunction useCurrentElement(rootComponent) {\n const vm = getCurrentInstance();\n const currentElement = computedWithControl(\n () => null,\n () => rootComponent ? unrefElement(rootComponent) : vm.proxy.$el\n );\n onUpdated(currentElement.trigger);\n onMounted(currentElement.trigger);\n return currentElement;\n}\n\nfunction useCycleList(list, options) {\n const state = shallowRef(getInitialValue());\n const listRef = toRef(list);\n const index = computed({\n get() {\n var _a;\n const targetList = listRef.value;\n let index2 = (options == null ? void 0 : options.getIndexOf) ? options.getIndexOf(state.value, targetList) : targetList.indexOf(state.value);\n if (index2 < 0)\n index2 = (_a = options == null ? void 0 : options.fallbackIndex) != null ? _a : 0;\n return index2;\n },\n set(v) {\n set(v);\n }\n });\n function set(i) {\n const targetList = listRef.value;\n const length = targetList.length;\n const index2 = (i % length + length) % length;\n const value = targetList[index2];\n state.value = value;\n return value;\n }\n function shift(delta = 1) {\n return set(index.value + delta);\n }\n function next(n = 1) {\n return shift(n);\n }\n function prev(n = 1) {\n return shift(-n);\n }\n function getInitialValue() {\n var _a, _b;\n return (_b = toValue((_a = options == null ? void 0 : options.initialValue) != null ? _a : toValue(list)[0])) != null ? _b : void 0;\n }\n watch(listRef, () => set(index.value));\n return {\n state,\n index,\n next,\n prev,\n go: set\n };\n}\n\nfunction useDark(options = {}) {\n const {\n valueDark = \"dark\",\n valueLight = \"\",\n window = defaultWindow\n } = options;\n const mode = useColorMode({\n ...options,\n onChanged: (mode2, defaultHandler) => {\n var _a;\n if (options.onChanged)\n (_a = options.onChanged) == null ? void 0 : _a.call(options, mode2 === \"dark\", defaultHandler, mode2);\n else\n defaultHandler(mode2);\n },\n modes: {\n dark: valueDark,\n light: valueLight\n }\n });\n const system = computed(() => {\n if (mode.system) {\n return mode.system.value;\n } else {\n const preferredDark = usePreferredDark({ window });\n return preferredDark.value ? \"dark\" : \"light\";\n }\n });\n const isDark = computed({\n get() {\n return mode.value === \"dark\";\n },\n set(v) {\n const modeVal = v ? \"dark\" : \"light\";\n if (system.value === modeVal)\n mode.value = \"auto\";\n else\n mode.value = modeVal;\n }\n });\n return isDark;\n}\n\nfunction fnBypass(v) {\n return v;\n}\nfunction fnSetSource(source, value) {\n return source.value = value;\n}\nfunction defaultDump(clone) {\n return clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\nfunction defaultParse(clone) {\n return clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\nfunction useManualRefHistory(source, options = {}) {\n const {\n clone = false,\n dump = defaultDump(clone),\n parse = defaultParse(clone),\n setSource = fnSetSource\n } = options;\n function _createHistoryRecord() {\n return markRaw({\n snapshot: dump(source.value),\n timestamp: timestamp()\n });\n }\n const last = ref(_createHistoryRecord());\n const undoStack = ref([]);\n const redoStack = ref([]);\n const _setSource = (record) => {\n setSource(source, parse(record.snapshot));\n last.value = record;\n };\n const commit = () => {\n undoStack.value.unshift(last.value);\n last.value = _createHistoryRecord();\n if (options.capacity && undoStack.value.length > options.capacity)\n undoStack.value.splice(options.capacity, Number.POSITIVE_INFINITY);\n if (redoStack.value.length)\n redoStack.value.splice(0, redoStack.value.length);\n };\n const clear = () => {\n undoStack.value.splice(0, undoStack.value.length);\n redoStack.value.splice(0, redoStack.value.length);\n };\n const undo = () => {\n const state = undoStack.value.shift();\n if (state) {\n redoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const redo = () => {\n const state = redoStack.value.shift();\n if (state) {\n undoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const reset = () => {\n _setSource(last.value);\n };\n const history = computed(() => [last.value, ...undoStack.value]);\n const canUndo = computed(() => undoStack.value.length > 0);\n const canRedo = computed(() => redoStack.value.length > 0);\n return {\n source,\n undoStack,\n redoStack,\n last,\n history,\n canUndo,\n canRedo,\n clear,\n commit,\n reset,\n undo,\n redo\n };\n}\n\nfunction useRefHistory(source, options = {}) {\n const {\n deep = false,\n flush = \"pre\",\n eventFilter\n } = options;\n const {\n eventFilter: composedFilter,\n pause,\n resume: resumeTracking,\n isActive: isTracking\n } = pausableFilter(eventFilter);\n const {\n ignoreUpdates,\n ignorePrevAsyncUpdates,\n stop\n } = watchIgnorable(\n source,\n commit,\n { deep, flush, eventFilter: composedFilter }\n );\n function setSource(source2, value) {\n ignorePrevAsyncUpdates();\n ignoreUpdates(() => {\n source2.value = value;\n });\n }\n const manualHistory = useManualRefHistory(source, { ...options, clone: options.clone || deep, setSource });\n const { clear, commit: manualCommit } = manualHistory;\n function commit() {\n ignorePrevAsyncUpdates();\n manualCommit();\n }\n function resume(commitNow) {\n resumeTracking();\n if (commitNow)\n commit();\n }\n function batch(fn) {\n let canceled = false;\n const cancel = () => canceled = true;\n ignoreUpdates(() => {\n fn(cancel);\n });\n if (!canceled)\n commit();\n }\n function dispose() {\n stop();\n clear();\n }\n return {\n ...manualHistory,\n isTracking,\n pause,\n resume,\n commit,\n batch,\n dispose\n };\n}\n\nfunction useDebouncedRefHistory(source, options = {}) {\n const filter = options.debounce ? debounceFilter(options.debounce) : void 0;\n const history = useRefHistory(source, { ...options, eventFilter: filter });\n return {\n ...history\n };\n}\n\nfunction useDeviceMotion(options = {}) {\n const {\n window = defaultWindow,\n eventFilter = bypassFilter\n } = options;\n const acceleration = ref({ x: null, y: null, z: null });\n const rotationRate = ref({ alpha: null, beta: null, gamma: null });\n const interval = ref(0);\n const accelerationIncludingGravity = ref({\n x: null,\n y: null,\n z: null\n });\n if (window) {\n const onDeviceMotion = createFilterWrapper(\n eventFilter,\n (event) => {\n acceleration.value = event.acceleration;\n accelerationIncludingGravity.value = event.accelerationIncludingGravity;\n rotationRate.value = event.rotationRate;\n interval.value = event.interval;\n }\n );\n useEventListener(window, \"devicemotion\", onDeviceMotion);\n }\n return {\n acceleration,\n accelerationIncludingGravity,\n rotationRate,\n interval\n };\n}\n\nfunction useDeviceOrientation(options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"DeviceOrientationEvent\" in window);\n const isAbsolute = ref(false);\n const alpha = ref(null);\n const beta = ref(null);\n const gamma = ref(null);\n if (window && isSupported.value) {\n useEventListener(window, \"deviceorientation\", (event) => {\n isAbsolute.value = event.absolute;\n alpha.value = event.alpha;\n beta.value = event.beta;\n gamma.value = event.gamma;\n });\n }\n return {\n isSupported,\n isAbsolute,\n alpha,\n beta,\n gamma\n };\n}\n\nfunction useDevicePixelRatio(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const pixelRatio = ref(1);\n if (window) {\n let observe2 = function() {\n pixelRatio.value = window.devicePixelRatio;\n cleanup2();\n media = window.matchMedia(`(resolution: ${pixelRatio.value}dppx)`);\n media.addEventListener(\"change\", observe2, { once: true });\n }, cleanup2 = function() {\n media == null ? void 0 : media.removeEventListener(\"change\", observe2);\n };\n let media;\n observe2();\n tryOnScopeDispose(cleanup2);\n }\n return { pixelRatio };\n}\n\nfunction useDevicesList(options = {}) {\n const {\n navigator = defaultNavigator,\n requestPermissions = false,\n constraints = { audio: true, video: true },\n onUpdated\n } = options;\n const devices = ref([]);\n const videoInputs = computed(() => devices.value.filter((i) => i.kind === \"videoinput\"));\n const audioInputs = computed(() => devices.value.filter((i) => i.kind === \"audioinput\"));\n const audioOutputs = computed(() => devices.value.filter((i) => i.kind === \"audiooutput\"));\n const isSupported = useSupported(() => navigator && navigator.mediaDevices && navigator.mediaDevices.enumerateDevices);\n const permissionGranted = ref(false);\n let stream;\n async function update() {\n if (!isSupported.value)\n return;\n devices.value = await navigator.mediaDevices.enumerateDevices();\n onUpdated == null ? void 0 : onUpdated(devices.value);\n if (stream) {\n stream.getTracks().forEach((t) => t.stop());\n stream = null;\n }\n }\n async function ensurePermissions() {\n if (!isSupported.value)\n return false;\n if (permissionGranted.value)\n return true;\n const { state, query } = usePermission(\"camera\", { controls: true });\n await query();\n if (state.value !== \"granted\") {\n stream = await navigator.mediaDevices.getUserMedia(constraints);\n update();\n permissionGranted.value = true;\n } else {\n permissionGranted.value = true;\n }\n return permissionGranted.value;\n }\n if (isSupported.value) {\n if (requestPermissions)\n ensurePermissions();\n useEventListener(navigator.mediaDevices, \"devicechange\", update);\n update();\n }\n return {\n devices,\n ensurePermissions,\n permissionGranted,\n videoInputs,\n audioInputs,\n audioOutputs,\n isSupported\n };\n}\n\nfunction useDisplayMedia(options = {}) {\n var _a;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const video = options.video;\n const audio = options.audio;\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getDisplayMedia;\n });\n const constraint = { audio, video };\n const stream = shallowRef();\n async function _start() {\n var _a2;\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getDisplayMedia(constraint);\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.addEventListener(\"ended\", stop));\n return stream.value;\n }\n async function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n watch(\n enabled,\n (v) => {\n if (v)\n _start();\n else\n _stop();\n },\n { immediate: true }\n );\n return {\n isSupported,\n stream,\n start,\n stop,\n enabled\n };\n}\n\nfunction useDocumentVisibility(options = {}) {\n const { document = defaultDocument } = options;\n if (!document)\n return ref(\"visible\");\n const visibility = ref(document.visibilityState);\n useEventListener(document, \"visibilitychange\", () => {\n visibility.value = document.visibilityState;\n });\n return visibility;\n}\n\nfunction useDraggable(target, options = {}) {\n var _a, _b;\n const {\n pointerTypes,\n preventDefault,\n stopPropagation,\n exact,\n onMove,\n onEnd,\n onStart,\n initialValue,\n axis = \"both\",\n draggingElement = defaultWindow,\n containerElement,\n handle: draggingHandle = target,\n buttons = [0]\n } = options;\n const position = ref(\n (_a = toValue(initialValue)) != null ? _a : { x: 0, y: 0 }\n );\n const pressedDelta = ref();\n const filterEvent = (e) => {\n if (pointerTypes)\n return pointerTypes.includes(e.pointerType);\n return true;\n };\n const handleEvent = (e) => {\n if (toValue(preventDefault))\n e.preventDefault();\n if (toValue(stopPropagation))\n e.stopPropagation();\n };\n const start = (e) => {\n var _a2;\n if (!toValue(buttons).includes(e.button))\n return;\n if (toValue(options.disabled) || !filterEvent(e))\n return;\n if (toValue(exact) && e.target !== toValue(target))\n return;\n const container = toValue(containerElement);\n const containerRect = (_a2 = container == null ? void 0 : container.getBoundingClientRect) == null ? void 0 : _a2.call(container);\n const targetRect = toValue(target).getBoundingClientRect();\n const pos = {\n x: e.clientX - (container ? targetRect.left - containerRect.left + container.scrollLeft : targetRect.left),\n y: e.clientY - (container ? targetRect.top - containerRect.top + container.scrollTop : targetRect.top)\n };\n if ((onStart == null ? void 0 : onStart(pos, e)) === false)\n return;\n pressedDelta.value = pos;\n handleEvent(e);\n };\n const move = (e) => {\n if (toValue(options.disabled) || !filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n const container = toValue(containerElement);\n const targetRect = toValue(target).getBoundingClientRect();\n let { x, y } = position.value;\n if (axis === \"x\" || axis === \"both\") {\n x = e.clientX - pressedDelta.value.x;\n if (container)\n x = Math.min(Math.max(0, x), container.scrollWidth - targetRect.width);\n }\n if (axis === \"y\" || axis === \"both\") {\n y = e.clientY - pressedDelta.value.y;\n if (container)\n y = Math.min(Math.max(0, y), container.scrollHeight - targetRect.height);\n }\n position.value = {\n x,\n y\n };\n onMove == null ? void 0 : onMove(position.value, e);\n handleEvent(e);\n };\n const end = (e) => {\n if (toValue(options.disabled) || !filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n pressedDelta.value = void 0;\n onEnd == null ? void 0 : onEnd(position.value, e);\n handleEvent(e);\n };\n if (isClient) {\n const config = { capture: (_b = options.capture) != null ? _b : true };\n useEventListener(draggingHandle, \"pointerdown\", start, config);\n useEventListener(draggingElement, \"pointermove\", move, config);\n useEventListener(draggingElement, \"pointerup\", end, config);\n }\n return {\n ...toRefs(position),\n position,\n isDragging: computed(() => !!pressedDelta.value),\n style: computed(\n () => `left:${position.value.x}px;top:${position.value.y}px;`\n )\n };\n}\n\nfunction useDropZone(target, options = {}) {\n const isOverDropZone = ref(false);\n const files = shallowRef(null);\n let counter = 0;\n let isDataTypeIncluded = true;\n if (isClient) {\n const _options = typeof options === \"function\" ? { onDrop: options } : options;\n const getFiles = (event) => {\n var _a, _b;\n const list = Array.from((_b = (_a = event.dataTransfer) == null ? void 0 : _a.files) != null ? _b : []);\n return files.value = list.length === 0 ? null : list;\n };\n useEventListener(target, \"dragenter\", (event) => {\n var _a, _b;\n const types = Array.from(((_a = event == null ? void 0 : event.dataTransfer) == null ? void 0 : _a.items) || []).map((i) => i.kind === \"file\" ? i.type : null).filter(notNullish);\n if (_options.dataTypes && event.dataTransfer) {\n const dataTypes = unref(_options.dataTypes);\n isDataTypeIncluded = typeof dataTypes === \"function\" ? dataTypes(types) : dataTypes ? dataTypes.some((item) => types.includes(item)) : true;\n if (!isDataTypeIncluded)\n return;\n }\n event.preventDefault();\n counter += 1;\n isOverDropZone.value = true;\n (_b = _options.onEnter) == null ? void 0 : _b.call(_options, getFiles(event), event);\n });\n useEventListener(target, \"dragover\", (event) => {\n var _a;\n if (!isDataTypeIncluded)\n return;\n event.preventDefault();\n (_a = _options.onOver) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n useEventListener(target, \"dragleave\", (event) => {\n var _a;\n if (!isDataTypeIncluded)\n return;\n event.preventDefault();\n counter -= 1;\n if (counter === 0)\n isOverDropZone.value = false;\n (_a = _options.onLeave) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n useEventListener(target, \"drop\", (event) => {\n var _a;\n event.preventDefault();\n counter = 0;\n isOverDropZone.value = false;\n (_a = _options.onDrop) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n }\n return {\n files,\n isOverDropZone\n };\n}\n\nfunction useResizeObserver(target, callback, options = {}) {\n const { window = defaultWindow, ...observerOptions } = options;\n let observer;\n const isSupported = useSupported(() => window && \"ResizeObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const targets = computed(() => {\n const _targets = toValue(target);\n return Array.isArray(_targets) ? _targets.map((el) => unrefElement(el)) : [unrefElement(_targets)];\n });\n const stopWatch = watch(\n targets,\n (els) => {\n cleanup();\n if (isSupported.value && window) {\n observer = new ResizeObserver(callback);\n for (const _el of els) {\n if (_el)\n observer.observe(_el, observerOptions);\n }\n }\n },\n { immediate: true, flush: \"post\" }\n );\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nfunction useElementBounding(target, options = {}) {\n const {\n reset = true,\n windowResize = true,\n windowScroll = true,\n immediate = true,\n updateTiming = \"sync\"\n } = options;\n const height = ref(0);\n const bottom = ref(0);\n const left = ref(0);\n const right = ref(0);\n const top = ref(0);\n const width = ref(0);\n const x = ref(0);\n const y = ref(0);\n function recalculate() {\n const el = unrefElement(target);\n if (!el) {\n if (reset) {\n height.value = 0;\n bottom.value = 0;\n left.value = 0;\n right.value = 0;\n top.value = 0;\n width.value = 0;\n x.value = 0;\n y.value = 0;\n }\n return;\n }\n const rect = el.getBoundingClientRect();\n height.value = rect.height;\n bottom.value = rect.bottom;\n left.value = rect.left;\n right.value = rect.right;\n top.value = rect.top;\n width.value = rect.width;\n x.value = rect.x;\n y.value = rect.y;\n }\n function update() {\n if (updateTiming === \"sync\")\n recalculate();\n else if (updateTiming === \"next-frame\")\n requestAnimationFrame(() => recalculate());\n }\n useResizeObserver(target, update);\n watch(() => unrefElement(target), (ele) => !ele && update());\n useMutationObserver(target, update, {\n attributeFilter: [\"style\", \"class\"]\n });\n if (windowScroll)\n useEventListener(\"scroll\", update, { capture: true, passive: true });\n if (windowResize)\n useEventListener(\"resize\", update, { passive: true });\n tryOnMounted(() => {\n if (immediate)\n update();\n });\n return {\n height,\n bottom,\n left,\n right,\n top,\n width,\n x,\n y,\n update\n };\n}\n\nfunction useElementByPoint(options) {\n const {\n x,\n y,\n document = defaultDocument,\n multiple,\n interval = \"requestAnimationFrame\",\n immediate = true\n } = options;\n const isSupported = useSupported(() => {\n if (toValue(multiple))\n return document && \"elementsFromPoint\" in document;\n return document && \"elementFromPoint\" in document;\n });\n const element = ref(null);\n const cb = () => {\n var _a, _b;\n element.value = toValue(multiple) ? (_a = document == null ? void 0 : document.elementsFromPoint(toValue(x), toValue(y))) != null ? _a : [] : (_b = document == null ? void 0 : document.elementFromPoint(toValue(x), toValue(y))) != null ? _b : null;\n };\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n return {\n isSupported,\n element,\n ...controls\n };\n}\n\nfunction useElementHover(el, options = {}) {\n const {\n delayEnter = 0,\n delayLeave = 0,\n window = defaultWindow\n } = options;\n const isHovered = ref(false);\n let timer;\n const toggle = (entering) => {\n const delay = entering ? delayEnter : delayLeave;\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n }\n if (delay)\n timer = setTimeout(() => isHovered.value = entering, delay);\n else\n isHovered.value = entering;\n };\n if (!window)\n return isHovered;\n useEventListener(el, \"mouseenter\", () => toggle(true), { passive: true });\n useEventListener(el, \"mouseleave\", () => toggle(false), { passive: true });\n return isHovered;\n}\n\nfunction useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) {\n const { window = defaultWindow, box = \"content-box\" } = options;\n const isSVG = computed(() => {\n var _a, _b;\n return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes(\"svg\");\n });\n const width = ref(initialSize.width);\n const height = ref(initialSize.height);\n const { stop: stop1 } = useResizeObserver(\n target,\n ([entry]) => {\n const boxSize = box === \"border-box\" ? entry.borderBoxSize : box === \"content-box\" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;\n if (window && isSVG.value) {\n const $elem = unrefElement(target);\n if ($elem) {\n const rect = $elem.getBoundingClientRect();\n width.value = rect.width;\n height.value = rect.height;\n }\n } else {\n if (boxSize) {\n const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize];\n width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);\n height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);\n } else {\n width.value = entry.contentRect.width;\n height.value = entry.contentRect.height;\n }\n }\n },\n options\n );\n tryOnMounted(() => {\n const ele = unrefElement(target);\n if (ele) {\n width.value = \"offsetWidth\" in ele ? ele.offsetWidth : initialSize.width;\n height.value = \"offsetHeight\" in ele ? ele.offsetHeight : initialSize.height;\n }\n });\n const stop2 = watch(\n () => unrefElement(target),\n (ele) => {\n width.value = ele ? initialSize.width : 0;\n height.value = ele ? initialSize.height : 0;\n }\n );\n function stop() {\n stop1();\n stop2();\n }\n return {\n width,\n height,\n stop\n };\n}\n\nfunction useIntersectionObserver(target, callback, options = {}) {\n const {\n root,\n rootMargin = \"0px\",\n threshold = 0,\n window = defaultWindow,\n immediate = true\n } = options;\n const isSupported = useSupported(() => window && \"IntersectionObserver\" in window);\n const targets = computed(() => {\n const _target = toValue(target);\n return (Array.isArray(_target) ? _target : [_target]).map(unrefElement).filter(notNullish);\n });\n let cleanup = noop;\n const isActive = ref(immediate);\n const stopWatch = isSupported.value ? watch(\n () => [targets.value, unrefElement(root), isActive.value],\n ([targets2, root2]) => {\n cleanup();\n if (!isActive.value)\n return;\n if (!targets2.length)\n return;\n const observer = new IntersectionObserver(\n callback,\n {\n root: unrefElement(root2),\n rootMargin,\n threshold\n }\n );\n targets2.forEach((el) => el && observer.observe(el));\n cleanup = () => {\n observer.disconnect();\n cleanup = noop;\n };\n },\n { immediate, flush: \"post\" }\n ) : noop;\n const stop = () => {\n cleanup();\n stopWatch();\n isActive.value = false;\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n isActive,\n pause() {\n cleanup();\n isActive.value = false;\n },\n resume() {\n isActive.value = true;\n },\n stop\n };\n}\n\nfunction useElementVisibility(element, options = {}) {\n const { window = defaultWindow, scrollTarget, threshold = 0 } = options;\n const elementIsVisible = ref(false);\n useIntersectionObserver(\n element,\n (intersectionObserverEntries) => {\n let isIntersecting = elementIsVisible.value;\n let latestTime = 0;\n for (const entry of intersectionObserverEntries) {\n if (entry.time >= latestTime) {\n latestTime = entry.time;\n isIntersecting = entry.isIntersecting;\n }\n }\n elementIsVisible.value = isIntersecting;\n },\n {\n root: scrollTarget,\n window,\n threshold\n }\n );\n return elementIsVisible;\n}\n\nconst events = /* @__PURE__ */ new Map();\n\nfunction useEventBus(key) {\n const scope = getCurrentScope();\n function on(listener) {\n var _a;\n const listeners = events.get(key) || /* @__PURE__ */ new Set();\n listeners.add(listener);\n events.set(key, listeners);\n const _off = () => off(listener);\n (_a = scope == null ? void 0 : scope.cleanups) == null ? void 0 : _a.push(_off);\n return _off;\n }\n function once(listener) {\n function _listener(...args) {\n off(_listener);\n listener(...args);\n }\n return on(_listener);\n }\n function off(listener) {\n const listeners = events.get(key);\n if (!listeners)\n return;\n listeners.delete(listener);\n if (!listeners.size)\n reset();\n }\n function reset() {\n events.delete(key);\n }\n function emit(event, payload) {\n var _a;\n (_a = events.get(key)) == null ? void 0 : _a.forEach((v) => v(event, payload));\n }\n return { on, once, off, emit, reset };\n}\n\nfunction resolveNestedOptions$1(options) {\n if (options === true)\n return {};\n return options;\n}\nfunction useEventSource(url, events = [], options = {}) {\n const event = ref(null);\n const data = ref(null);\n const status = ref(\"CONNECTING\");\n const eventSource = ref(null);\n const error = shallowRef(null);\n const urlRef = toRef(url);\n const lastEventId = shallowRef(null);\n let explicitlyClosed = false;\n let retried = 0;\n const {\n withCredentials = false,\n immediate = true\n } = options;\n const close = () => {\n if (isClient && eventSource.value) {\n eventSource.value.close();\n eventSource.value = null;\n status.value = \"CLOSED\";\n explicitlyClosed = true;\n }\n };\n const _init = () => {\n if (explicitlyClosed || typeof urlRef.value === \"undefined\")\n return;\n const es = new EventSource(urlRef.value, { withCredentials });\n status.value = \"CONNECTING\";\n eventSource.value = es;\n es.onopen = () => {\n status.value = \"OPEN\";\n error.value = null;\n };\n es.onerror = (e) => {\n status.value = \"CLOSED\";\n error.value = e;\n if (es.readyState === 2 && !explicitlyClosed && options.autoReconnect) {\n es.close();\n const {\n retries = -1,\n delay = 1e3,\n onFailed\n } = resolveNestedOptions$1(options.autoReconnect);\n retried += 1;\n if (typeof retries === \"number\" && (retries < 0 || retried < retries))\n setTimeout(_init, delay);\n else if (typeof retries === \"function\" && retries())\n setTimeout(_init, delay);\n else\n onFailed == null ? void 0 : onFailed();\n }\n };\n es.onmessage = (e) => {\n event.value = null;\n data.value = e.data;\n lastEventId.value = e.lastEventId;\n };\n for (const event_name of events) {\n useEventListener(es, event_name, (e) => {\n event.value = event_name;\n data.value = e.data || null;\n });\n }\n };\n const open = () => {\n if (!isClient)\n return;\n close();\n explicitlyClosed = false;\n retried = 0;\n _init();\n };\n if (immediate)\n watch(urlRef, open, { immediate: true });\n tryOnScopeDispose(close);\n return {\n eventSource,\n event,\n data,\n status,\n error,\n open,\n close,\n lastEventId\n };\n}\n\nfunction useEyeDropper(options = {}) {\n const { initialValue = \"\" } = options;\n const isSupported = useSupported(() => typeof window !== \"undefined\" && \"EyeDropper\" in window);\n const sRGBHex = ref(initialValue);\n async function open(openOptions) {\n if (!isSupported.value)\n return;\n const eyeDropper = new window.EyeDropper();\n const result = await eyeDropper.open(openOptions);\n sRGBHex.value = result.sRGBHex;\n return result;\n }\n return { isSupported, sRGBHex, open };\n}\n\nfunction useFavicon(newIcon = null, options = {}) {\n const {\n baseUrl = \"\",\n rel = \"icon\",\n document = defaultDocument\n } = options;\n const favicon = toRef(newIcon);\n const applyIcon = (icon) => {\n const elements = document == null ? void 0 : document.head.querySelectorAll(`link[rel*=\"${rel}\"]`);\n if (!elements || elements.length === 0) {\n const link = document == null ? void 0 : document.createElement(\"link\");\n if (link) {\n link.rel = rel;\n link.href = `${baseUrl}${icon}`;\n link.type = `image/${icon.split(\".\").pop()}`;\n document == null ? void 0 : document.head.append(link);\n }\n return;\n }\n elements == null ? void 0 : elements.forEach((el) => el.href = `${baseUrl}${icon}`);\n };\n watch(\n favicon,\n (i, o) => {\n if (typeof i === \"string\" && i !== o)\n applyIcon(i);\n },\n { immediate: true }\n );\n return favicon;\n}\n\nconst payloadMapping = {\n json: \"application/json\",\n text: \"text/plain\"\n};\nfunction isFetchOptions(obj) {\n return obj && containsProp(obj, \"immediate\", \"refetch\", \"initialData\", \"timeout\", \"beforeFetch\", \"afterFetch\", \"onFetchError\", \"fetch\", \"updateDataOnError\");\n}\nconst reAbsolute = /^(?:[a-z][a-z\\d+\\-.]*:)?\\/\\//i;\nfunction isAbsoluteURL(url) {\n return reAbsolute.test(url);\n}\nfunction headersToObject(headers) {\n if (typeof Headers !== \"undefined\" && headers instanceof Headers)\n return Object.fromEntries(headers.entries());\n return headers;\n}\nfunction combineCallbacks(combination, ...callbacks) {\n if (combination === \"overwrite\") {\n return async (ctx) => {\n const callback = callbacks[callbacks.length - 1];\n if (callback)\n return { ...ctx, ...await callback(ctx) };\n return ctx;\n };\n } else {\n return async (ctx) => {\n for (const callback of callbacks) {\n if (callback)\n ctx = { ...ctx, ...await callback(ctx) };\n }\n return ctx;\n };\n }\n}\nfunction createFetch(config = {}) {\n const _combination = config.combination || \"chain\";\n const _options = config.options || {};\n const _fetchOptions = config.fetchOptions || {};\n function useFactoryFetch(url, ...args) {\n const computedUrl = computed(() => {\n const baseUrl = toValue(config.baseUrl);\n const targetUrl = toValue(url);\n return baseUrl && !isAbsoluteURL(targetUrl) ? joinPaths(baseUrl, targetUrl) : targetUrl;\n });\n let options = _options;\n let fetchOptions = _fetchOptions;\n if (args.length > 0) {\n if (isFetchOptions(args[0])) {\n options = {\n ...options,\n ...args[0],\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[0].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[0].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[0].onFetchError)\n };\n } else {\n fetchOptions = {\n ...fetchOptions,\n ...args[0],\n headers: {\n ...headersToObject(fetchOptions.headers) || {},\n ...headersToObject(args[0].headers) || {}\n }\n };\n }\n }\n if (args.length > 1 && isFetchOptions(args[1])) {\n options = {\n ...options,\n ...args[1],\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[1].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[1].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[1].onFetchError)\n };\n }\n return useFetch(computedUrl, fetchOptions, options);\n }\n return useFactoryFetch;\n}\nfunction useFetch(url, ...args) {\n var _a;\n const supportsAbort = typeof AbortController === \"function\";\n let fetchOptions = {};\n let options = {\n immediate: true,\n refetch: false,\n timeout: 0,\n updateDataOnError: false\n };\n const config = {\n method: \"GET\",\n type: \"text\",\n payload: void 0\n };\n if (args.length > 0) {\n if (isFetchOptions(args[0]))\n options = { ...options, ...args[0] };\n else\n fetchOptions = args[0];\n }\n if (args.length > 1) {\n if (isFetchOptions(args[1]))\n options = { ...options, ...args[1] };\n }\n const {\n fetch = (_a = defaultWindow) == null ? void 0 : _a.fetch,\n initialData,\n timeout\n } = options;\n const responseEvent = createEventHook();\n const errorEvent = createEventHook();\n const finallyEvent = createEventHook();\n const isFinished = ref(false);\n const isFetching = ref(false);\n const aborted = ref(false);\n const statusCode = ref(null);\n const response = shallowRef(null);\n const error = shallowRef(null);\n const data = shallowRef(initialData || null);\n const canAbort = computed(() => supportsAbort && isFetching.value);\n let controller;\n let timer;\n const abort = () => {\n if (supportsAbort) {\n controller == null ? void 0 : controller.abort();\n controller = new AbortController();\n controller.signal.onabort = () => aborted.value = true;\n fetchOptions = {\n ...fetchOptions,\n signal: controller.signal\n };\n }\n };\n const loading = (isLoading) => {\n isFetching.value = isLoading;\n isFinished.value = !isLoading;\n };\n if (timeout)\n timer = useTimeoutFn(abort, timeout, { immediate: false });\n let executeCounter = 0;\n const execute = async (throwOnFailed = false) => {\n var _a2, _b;\n abort();\n loading(true);\n error.value = null;\n statusCode.value = null;\n aborted.value = false;\n executeCounter += 1;\n const currentExecuteCounter = executeCounter;\n const defaultFetchOptions = {\n method: config.method,\n headers: {}\n };\n if (config.payload) {\n const headers = headersToObject(defaultFetchOptions.headers);\n const payload = toValue(config.payload);\n if (!config.payloadType && payload && Object.getPrototypeOf(payload) === Object.prototype && !(payload instanceof FormData))\n config.payloadType = \"json\";\n if (config.payloadType)\n headers[\"Content-Type\"] = (_a2 = payloadMapping[config.payloadType]) != null ? _a2 : config.payloadType;\n defaultFetchOptions.body = config.payloadType === \"json\" ? JSON.stringify(payload) : payload;\n }\n let isCanceled = false;\n const context = {\n url: toValue(url),\n options: {\n ...defaultFetchOptions,\n ...fetchOptions\n },\n cancel: () => {\n isCanceled = true;\n }\n };\n if (options.beforeFetch)\n Object.assign(context, await options.beforeFetch(context));\n if (isCanceled || !fetch) {\n loading(false);\n return Promise.resolve(null);\n }\n let responseData = null;\n if (timer)\n timer.start();\n return fetch(\n context.url,\n {\n ...defaultFetchOptions,\n ...context.options,\n headers: {\n ...headersToObject(defaultFetchOptions.headers),\n ...headersToObject((_b = context.options) == null ? void 0 : _b.headers)\n }\n }\n ).then(async (fetchResponse) => {\n response.value = fetchResponse;\n statusCode.value = fetchResponse.status;\n responseData = await fetchResponse.clone()[config.type]();\n if (!fetchResponse.ok) {\n data.value = initialData || null;\n throw new Error(fetchResponse.statusText);\n }\n if (options.afterFetch) {\n ({ data: responseData } = await options.afterFetch({\n data: responseData,\n response: fetchResponse\n }));\n }\n data.value = responseData;\n responseEvent.trigger(fetchResponse);\n return fetchResponse;\n }).catch(async (fetchError) => {\n let errorData = fetchError.message || fetchError.name;\n if (options.onFetchError) {\n ({ error: errorData, data: responseData } = await options.onFetchError({\n data: responseData,\n error: fetchError,\n response: response.value\n }));\n }\n error.value = errorData;\n if (options.updateDataOnError)\n data.value = responseData;\n errorEvent.trigger(fetchError);\n if (throwOnFailed)\n throw fetchError;\n return null;\n }).finally(() => {\n if (currentExecuteCounter === executeCounter)\n loading(false);\n if (timer)\n timer.stop();\n finallyEvent.trigger(null);\n });\n };\n const refetch = toRef(options.refetch);\n watch(\n [\n refetch,\n toRef(url)\n ],\n ([refetch2]) => refetch2 && execute(),\n { deep: true }\n );\n const shell = {\n isFinished: readonly(isFinished),\n isFetching: readonly(isFetching),\n statusCode,\n response,\n error,\n data,\n canAbort,\n aborted,\n abort,\n execute,\n onFetchResponse: responseEvent.on,\n onFetchError: errorEvent.on,\n onFetchFinally: finallyEvent.on,\n // method\n get: setMethod(\"GET\"),\n put: setMethod(\"PUT\"),\n post: setMethod(\"POST\"),\n delete: setMethod(\"DELETE\"),\n patch: setMethod(\"PATCH\"),\n head: setMethod(\"HEAD\"),\n options: setMethod(\"OPTIONS\"),\n // type\n json: setType(\"json\"),\n text: setType(\"text\"),\n blob: setType(\"blob\"),\n arrayBuffer: setType(\"arrayBuffer\"),\n formData: setType(\"formData\")\n };\n function setMethod(method) {\n return (payload, payloadType) => {\n if (!isFetching.value) {\n config.method = method;\n config.payload = payload;\n config.payloadType = payloadType;\n if (isRef(config.payload)) {\n watch(\n [\n refetch,\n toRef(config.payload)\n ],\n ([refetch2]) => refetch2 && execute(),\n { deep: true }\n );\n }\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n };\n }\n return void 0;\n };\n }\n function waitUntilFinished() {\n return new Promise((resolve, reject) => {\n until(isFinished).toBe(true).then(() => resolve(shell)).catch((error2) => reject(error2));\n });\n }\n function setType(type) {\n return () => {\n if (!isFetching.value) {\n config.type = type;\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n };\n }\n return void 0;\n };\n }\n if (options.immediate)\n Promise.resolve().then(() => execute());\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n };\n}\nfunction joinPaths(start, end) {\n if (!start.endsWith(\"/\") && !end.startsWith(\"/\"))\n return `${start}/${end}`;\n return `${start}${end}`;\n}\n\nconst DEFAULT_OPTIONS = {\n multiple: true,\n accept: \"*\",\n reset: false,\n directory: false\n};\nfunction useFileDialog(options = {}) {\n const {\n document = defaultDocument\n } = options;\n const files = ref(null);\n const { on: onChange, trigger } = createEventHook();\n let input;\n if (document) {\n input = document.createElement(\"input\");\n input.type = \"file\";\n input.onchange = (event) => {\n const result = event.target;\n files.value = result.files;\n trigger(files.value);\n };\n }\n const reset = () => {\n files.value = null;\n if (input && input.value) {\n input.value = \"\";\n trigger(null);\n }\n };\n const open = (localOptions) => {\n if (!input)\n return;\n const _options = {\n ...DEFAULT_OPTIONS,\n ...options,\n ...localOptions\n };\n input.multiple = _options.multiple;\n input.accept = _options.accept;\n input.webkitdirectory = _options.directory;\n if (hasOwn(_options, \"capture\"))\n input.capture = _options.capture;\n if (_options.reset)\n reset();\n input.click();\n };\n return {\n files: readonly(files),\n open,\n reset,\n onChange\n };\n}\n\nfunction useFileSystemAccess(options = {}) {\n const {\n window: _window = defaultWindow,\n dataType = \"Text\"\n } = options;\n const window = _window;\n const isSupported = useSupported(() => window && \"showSaveFilePicker\" in window && \"showOpenFilePicker\" in window);\n const fileHandle = ref();\n const data = ref();\n const file = ref();\n const fileName = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.name) != null ? _b : \"\";\n });\n const fileMIME = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.type) != null ? _b : \"\";\n });\n const fileSize = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.size) != null ? _b : 0;\n });\n const fileLastModified = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.lastModified) != null ? _b : 0;\n });\n async function open(_options = {}) {\n if (!isSupported.value)\n return;\n const [handle] = await window.showOpenFilePicker({ ...toValue(options), ..._options });\n fileHandle.value = handle;\n await updateData();\n }\n async function create(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker({ ...options, ..._options });\n data.value = void 0;\n await updateData();\n }\n async function save(_options = {}) {\n if (!isSupported.value)\n return;\n if (!fileHandle.value)\n return saveAs(_options);\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function saveAs(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker({ ...options, ..._options });\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function updateFile() {\n var _a;\n file.value = await ((_a = fileHandle.value) == null ? void 0 : _a.getFile());\n }\n async function updateData() {\n var _a, _b;\n await updateFile();\n const type = toValue(dataType);\n if (type === \"Text\")\n data.value = await ((_a = file.value) == null ? void 0 : _a.text());\n else if (type === \"ArrayBuffer\")\n data.value = await ((_b = file.value) == null ? void 0 : _b.arrayBuffer());\n else if (type === \"Blob\")\n data.value = file.value;\n }\n watch(() => toValue(dataType), updateData);\n return {\n isSupported,\n data,\n file,\n fileName,\n fileMIME,\n fileSize,\n fileLastModified,\n open,\n create,\n save,\n saveAs,\n updateData\n };\n}\n\nfunction useFocus(target, options = {}) {\n const { initialValue = false, focusVisible = false, preventScroll = false } = options;\n const innerFocused = ref(false);\n const targetElement = computed(() => unrefElement(target));\n useEventListener(targetElement, \"focus\", (event) => {\n var _a, _b;\n if (!focusVisible || ((_b = (_a = event.target).matches) == null ? void 0 : _b.call(_a, \":focus-visible\")))\n innerFocused.value = true;\n });\n useEventListener(targetElement, \"blur\", () => innerFocused.value = false);\n const focused = computed({\n get: () => innerFocused.value,\n set(value) {\n var _a, _b;\n if (!value && innerFocused.value)\n (_a = targetElement.value) == null ? void 0 : _a.blur();\n else if (value && !innerFocused.value)\n (_b = targetElement.value) == null ? void 0 : _b.focus({ preventScroll });\n }\n });\n watch(\n targetElement,\n () => {\n focused.value = initialValue;\n },\n { immediate: true, flush: \"post\" }\n );\n return { focused };\n}\n\nfunction useFocusWithin(target, options = {}) {\n const activeElement = useActiveElement(options);\n const targetElement = computed(() => unrefElement(target));\n const focused = computed(() => targetElement.value && activeElement.value ? targetElement.value.contains(activeElement.value) : false);\n return { focused };\n}\n\nfunction useFps(options) {\n var _a;\n const fps = ref(0);\n if (typeof performance === \"undefined\")\n return fps;\n const every = (_a = options == null ? void 0 : options.every) != null ? _a : 10;\n let last = performance.now();\n let ticks = 0;\n useRafFn(() => {\n ticks += 1;\n if (ticks >= every) {\n const now = performance.now();\n const diff = now - last;\n fps.value = Math.round(1e3 / (diff / ticks));\n last = now;\n ticks = 0;\n }\n });\n return fps;\n}\n\nconst eventHandlers = [\n \"fullscreenchange\",\n \"webkitfullscreenchange\",\n \"webkitendfullscreen\",\n \"mozfullscreenchange\",\n \"MSFullscreenChange\"\n];\nfunction useFullscreen(target, options = {}) {\n const {\n document = defaultDocument,\n autoExit = false\n } = options;\n const targetRef = computed(() => {\n var _a;\n return (_a = unrefElement(target)) != null ? _a : document == null ? void 0 : document.querySelector(\"html\");\n });\n const isFullscreen = ref(false);\n const requestMethod = computed(() => {\n return [\n \"requestFullscreen\",\n \"webkitRequestFullscreen\",\n \"webkitEnterFullscreen\",\n \"webkitEnterFullScreen\",\n \"webkitRequestFullScreen\",\n \"mozRequestFullScreen\",\n \"msRequestFullscreen\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const exitMethod = computed(() => {\n return [\n \"exitFullscreen\",\n \"webkitExitFullscreen\",\n \"webkitExitFullScreen\",\n \"webkitCancelFullScreen\",\n \"mozCancelFullScreen\",\n \"msExitFullscreen\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const fullscreenEnabled = computed(() => {\n return [\n \"fullScreen\",\n \"webkitIsFullScreen\",\n \"webkitDisplayingFullscreen\",\n \"mozFullScreen\",\n \"msFullscreenElement\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const fullscreenElementMethod = [\n \"fullscreenElement\",\n \"webkitFullscreenElement\",\n \"mozFullScreenElement\",\n \"msFullscreenElement\"\n ].find((m) => document && m in document);\n const isSupported = useSupported(() => targetRef.value && document && requestMethod.value !== void 0 && exitMethod.value !== void 0 && fullscreenEnabled.value !== void 0);\n const isCurrentElementFullScreen = () => {\n if (fullscreenElementMethod)\n return (document == null ? void 0 : document[fullscreenElementMethod]) === targetRef.value;\n return false;\n };\n const isElementFullScreen = () => {\n if (fullscreenEnabled.value) {\n if (document && document[fullscreenEnabled.value] != null) {\n return document[fullscreenEnabled.value];\n } else {\n const target2 = targetRef.value;\n if ((target2 == null ? void 0 : target2[fullscreenEnabled.value]) != null) {\n return Boolean(target2[fullscreenEnabled.value]);\n }\n }\n }\n return false;\n };\n async function exit() {\n if (!isSupported.value || !isFullscreen.value)\n return;\n if (exitMethod.value) {\n if ((document == null ? void 0 : document[exitMethod.value]) != null) {\n await document[exitMethod.value]();\n } else {\n const target2 = targetRef.value;\n if ((target2 == null ? void 0 : target2[exitMethod.value]) != null)\n await target2[exitMethod.value]();\n }\n }\n isFullscreen.value = false;\n }\n async function enter() {\n if (!isSupported.value || isFullscreen.value)\n return;\n if (isElementFullScreen())\n await exit();\n const target2 = targetRef.value;\n if (requestMethod.value && (target2 == null ? void 0 : target2[requestMethod.value]) != null) {\n await target2[requestMethod.value]();\n isFullscreen.value = true;\n }\n }\n async function toggle() {\n await (isFullscreen.value ? exit() : enter());\n }\n const handlerCallback = () => {\n const isElementFullScreenValue = isElementFullScreen();\n if (!isElementFullScreenValue || isElementFullScreenValue && isCurrentElementFullScreen())\n isFullscreen.value = isElementFullScreenValue;\n };\n useEventListener(document, eventHandlers, handlerCallback, false);\n useEventListener(() => unrefElement(targetRef), eventHandlers, handlerCallback, false);\n if (autoExit)\n tryOnScopeDispose(exit);\n return {\n isSupported,\n isFullscreen,\n enter,\n exit,\n toggle\n };\n}\n\nfunction mapGamepadToXbox360Controller(gamepad) {\n return computed(() => {\n if (gamepad.value) {\n return {\n buttons: {\n a: gamepad.value.buttons[0],\n b: gamepad.value.buttons[1],\n x: gamepad.value.buttons[2],\n y: gamepad.value.buttons[3]\n },\n bumper: {\n left: gamepad.value.buttons[4],\n right: gamepad.value.buttons[5]\n },\n triggers: {\n left: gamepad.value.buttons[6],\n right: gamepad.value.buttons[7]\n },\n stick: {\n left: {\n horizontal: gamepad.value.axes[0],\n vertical: gamepad.value.axes[1],\n button: gamepad.value.buttons[10]\n },\n right: {\n horizontal: gamepad.value.axes[2],\n vertical: gamepad.value.axes[3],\n button: gamepad.value.buttons[11]\n }\n },\n dpad: {\n up: gamepad.value.buttons[12],\n down: gamepad.value.buttons[13],\n left: gamepad.value.buttons[14],\n right: gamepad.value.buttons[15]\n },\n back: gamepad.value.buttons[8],\n start: gamepad.value.buttons[9]\n };\n }\n return null;\n });\n}\nfunction useGamepad(options = {}) {\n const {\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"getGamepads\" in navigator);\n const gamepads = ref([]);\n const onConnectedHook = createEventHook();\n const onDisconnectedHook = createEventHook();\n const stateFromGamepad = (gamepad) => {\n const hapticActuators = [];\n const vibrationActuator = \"vibrationActuator\" in gamepad ? gamepad.vibrationActuator : null;\n if (vibrationActuator)\n hapticActuators.push(vibrationActuator);\n if (gamepad.hapticActuators)\n hapticActuators.push(...gamepad.hapticActuators);\n return {\n id: gamepad.id,\n index: gamepad.index,\n connected: gamepad.connected,\n mapping: gamepad.mapping,\n timestamp: gamepad.timestamp,\n vibrationActuator: gamepad.vibrationActuator,\n hapticActuators,\n axes: gamepad.axes.map((axes) => axes),\n buttons: gamepad.buttons.map((button) => ({ pressed: button.pressed, touched: button.touched, value: button.value }))\n };\n };\n const updateGamepadState = () => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n for (const gamepad of _gamepads) {\n if (gamepad && gamepads.value[gamepad.index])\n gamepads.value[gamepad.index] = stateFromGamepad(gamepad);\n }\n };\n const { isActive, pause, resume } = useRafFn(updateGamepadState);\n const onGamepadConnected = (gamepad) => {\n if (!gamepads.value.some(({ index }) => index === gamepad.index)) {\n gamepads.value.push(stateFromGamepad(gamepad));\n onConnectedHook.trigger(gamepad.index);\n }\n resume();\n };\n const onGamepadDisconnected = (gamepad) => {\n gamepads.value = gamepads.value.filter((x) => x.index !== gamepad.index);\n onDisconnectedHook.trigger(gamepad.index);\n };\n useEventListener(\"gamepadconnected\", (e) => onGamepadConnected(e.gamepad));\n useEventListener(\"gamepaddisconnected\", (e) => onGamepadDisconnected(e.gamepad));\n tryOnMounted(() => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n for (const gamepad of _gamepads) {\n if (gamepad && gamepads.value[gamepad.index])\n onGamepadConnected(gamepad);\n }\n });\n pause();\n return {\n isSupported,\n onConnected: onConnectedHook.on,\n onDisconnected: onDisconnectedHook.on,\n gamepads,\n pause,\n resume,\n isActive\n };\n}\n\nfunction useGeolocation(options = {}) {\n const {\n enableHighAccuracy = true,\n maximumAge = 3e4,\n timeout = 27e3,\n navigator = defaultNavigator,\n immediate = true\n } = options;\n const isSupported = useSupported(() => navigator && \"geolocation\" in navigator);\n const locatedAt = ref(null);\n const error = shallowRef(null);\n const coords = ref({\n accuracy: 0,\n latitude: Number.POSITIVE_INFINITY,\n longitude: Number.POSITIVE_INFINITY,\n altitude: null,\n altitudeAccuracy: null,\n heading: null,\n speed: null\n });\n function updatePosition(position) {\n locatedAt.value = position.timestamp;\n coords.value = position.coords;\n error.value = null;\n }\n let watcher;\n function resume() {\n if (isSupported.value) {\n watcher = navigator.geolocation.watchPosition(\n updatePosition,\n (err) => error.value = err,\n {\n enableHighAccuracy,\n maximumAge,\n timeout\n }\n );\n }\n }\n if (immediate)\n resume();\n function pause() {\n if (watcher && navigator)\n navigator.geolocation.clearWatch(watcher);\n }\n tryOnScopeDispose(() => {\n pause();\n });\n return {\n isSupported,\n coords,\n locatedAt,\n error,\n resume,\n pause\n };\n}\n\nconst defaultEvents$1 = [\"mousemove\", \"mousedown\", \"resize\", \"keydown\", \"touchstart\", \"wheel\"];\nconst oneMinute = 6e4;\nfunction useIdle(timeout = oneMinute, options = {}) {\n const {\n initialState = false,\n listenForVisibilityChange = true,\n events = defaultEvents$1,\n window = defaultWindow,\n eventFilter = throttleFilter(50)\n } = options;\n const idle = ref(initialState);\n const lastActive = ref(timestamp());\n let timer;\n const reset = () => {\n idle.value = false;\n clearTimeout(timer);\n timer = setTimeout(() => idle.value = true, timeout);\n };\n const onEvent = createFilterWrapper(\n eventFilter,\n () => {\n lastActive.value = timestamp();\n reset();\n }\n );\n if (window) {\n const document = window.document;\n for (const event of events)\n useEventListener(window, event, onEvent, { passive: true });\n if (listenForVisibilityChange) {\n useEventListener(document, \"visibilitychange\", () => {\n if (!document.hidden)\n onEvent();\n });\n }\n reset();\n }\n return {\n idle,\n lastActive,\n reset\n };\n}\n\nasync function loadImage(options) {\n return new Promise((resolve, reject) => {\n const img = new Image();\n const { src, srcset, sizes, class: clazz, loading, crossorigin, referrerPolicy } = options;\n img.src = src;\n if (srcset)\n img.srcset = srcset;\n if (sizes)\n img.sizes = sizes;\n if (clazz)\n img.className = clazz;\n if (loading)\n img.loading = loading;\n if (crossorigin)\n img.crossOrigin = crossorigin;\n if (referrerPolicy)\n img.referrerPolicy = referrerPolicy;\n img.onload = () => resolve(img);\n img.onerror = reject;\n });\n}\nfunction useImage(options, asyncStateOptions = {}) {\n const state = useAsyncState(\n () => loadImage(toValue(options)),\n void 0,\n {\n resetOnExecute: true,\n ...asyncStateOptions\n }\n );\n watch(\n () => toValue(options),\n () => state.execute(asyncStateOptions.delay),\n { deep: true }\n );\n return state;\n}\n\nconst ARRIVED_STATE_THRESHOLD_PIXELS = 1;\nfunction useScroll(element, options = {}) {\n const {\n throttle = 0,\n idle = 200,\n onStop = noop,\n onScroll = noop,\n offset = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n },\n eventListenerOptions = {\n capture: false,\n passive: true\n },\n behavior = \"auto\",\n window = defaultWindow,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const internalX = ref(0);\n const internalY = ref(0);\n const x = computed({\n get() {\n return internalX.value;\n },\n set(x2) {\n scrollTo(x2, void 0);\n }\n });\n const y = computed({\n get() {\n return internalY.value;\n },\n set(y2) {\n scrollTo(void 0, y2);\n }\n });\n function scrollTo(_x, _y) {\n var _a, _b, _c, _d;\n if (!window)\n return;\n const _element = toValue(element);\n if (!_element)\n return;\n (_c = _element instanceof Document ? window.document.body : _element) == null ? void 0 : _c.scrollTo({\n top: (_a = toValue(_y)) != null ? _a : y.value,\n left: (_b = toValue(_x)) != null ? _b : x.value,\n behavior: toValue(behavior)\n });\n const scrollContainer = ((_d = _element == null ? void 0 : _element.document) == null ? void 0 : _d.documentElement) || (_element == null ? void 0 : _element.documentElement) || _element;\n if (x != null)\n internalX.value = scrollContainer.scrollLeft;\n if (y != null)\n internalY.value = scrollContainer.scrollTop;\n }\n const isScrolling = ref(false);\n const arrivedState = reactive({\n left: true,\n right: false,\n top: true,\n bottom: false\n });\n const directions = reactive({\n left: false,\n right: false,\n top: false,\n bottom: false\n });\n const onScrollEnd = (e) => {\n if (!isScrolling.value)\n return;\n isScrolling.value = false;\n directions.left = false;\n directions.right = false;\n directions.top = false;\n directions.bottom = false;\n onStop(e);\n };\n const onScrollEndDebounced = useDebounceFn(onScrollEnd, throttle + idle);\n const setArrivedState = (target) => {\n var _a;\n if (!window)\n return;\n const el = ((_a = target == null ? void 0 : target.document) == null ? void 0 : _a.documentElement) || (target == null ? void 0 : target.documentElement) || unrefElement(target);\n const { display, flexDirection } = getComputedStyle(el);\n const scrollLeft = el.scrollLeft;\n directions.left = scrollLeft < internalX.value;\n directions.right = scrollLeft > internalX.value;\n const left = Math.abs(scrollLeft) <= (offset.left || 0);\n const right = Math.abs(scrollLeft) + el.clientWidth >= el.scrollWidth - (offset.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n if (display === \"flex\" && flexDirection === \"row-reverse\") {\n arrivedState.left = right;\n arrivedState.right = left;\n } else {\n arrivedState.left = left;\n arrivedState.right = right;\n }\n internalX.value = scrollLeft;\n let scrollTop = el.scrollTop;\n if (target === window.document && !scrollTop)\n scrollTop = window.document.body.scrollTop;\n directions.top = scrollTop < internalY.value;\n directions.bottom = scrollTop > internalY.value;\n const top = Math.abs(scrollTop) <= (offset.top || 0);\n const bottom = Math.abs(scrollTop) + el.clientHeight >= el.scrollHeight - (offset.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n if (display === \"flex\" && flexDirection === \"column-reverse\") {\n arrivedState.top = bottom;\n arrivedState.bottom = top;\n } else {\n arrivedState.top = top;\n arrivedState.bottom = bottom;\n }\n internalY.value = scrollTop;\n };\n const onScrollHandler = (e) => {\n var _a;\n if (!window)\n return;\n const eventTarget = (_a = e.target.documentElement) != null ? _a : e.target;\n setArrivedState(eventTarget);\n isScrolling.value = true;\n onScrollEndDebounced(e);\n onScroll(e);\n };\n useEventListener(\n element,\n \"scroll\",\n throttle ? useThrottleFn(onScrollHandler, throttle, true, false) : onScrollHandler,\n eventListenerOptions\n );\n tryOnMounted(() => {\n try {\n const _element = toValue(element);\n if (!_element)\n return;\n setArrivedState(_element);\n } catch (e) {\n onError(e);\n }\n });\n useEventListener(\n element,\n \"scrollend\",\n onScrollEnd,\n eventListenerOptions\n );\n return {\n x,\n y,\n isScrolling,\n arrivedState,\n directions,\n measure() {\n const _element = toValue(element);\n if (window && _element)\n setArrivedState(_element);\n }\n };\n}\n\nfunction resolveElement(el) {\n if (typeof Window !== \"undefined\" && el instanceof Window)\n return el.document.documentElement;\n if (typeof Document !== \"undefined\" && el instanceof Document)\n return el.documentElement;\n return el;\n}\n\nfunction useInfiniteScroll(element, onLoadMore, options = {}) {\n var _a;\n const {\n direction = \"bottom\",\n interval = 100,\n canLoadMore = () => true\n } = options;\n const state = reactive(useScroll(\n element,\n {\n ...options,\n offset: {\n [direction]: (_a = options.distance) != null ? _a : 0,\n ...options.offset\n }\n }\n ));\n const promise = ref();\n const isLoading = computed(() => !!promise.value);\n const observedElement = computed(() => {\n return resolveElement(toValue(element));\n });\n const isElementVisible = useElementVisibility(observedElement);\n function checkAndLoad() {\n state.measure();\n if (!observedElement.value || !isElementVisible.value || !canLoadMore(observedElement.value))\n return;\n const { scrollHeight, clientHeight, scrollWidth, clientWidth } = observedElement.value;\n const isNarrower = direction === \"bottom\" || direction === \"top\" ? scrollHeight <= clientHeight : scrollWidth <= clientWidth;\n if (state.arrivedState[direction] || isNarrower) {\n if (!promise.value) {\n promise.value = Promise.all([\n onLoadMore(state),\n new Promise((resolve) => setTimeout(resolve, interval))\n ]).finally(() => {\n promise.value = null;\n nextTick(() => checkAndLoad());\n });\n }\n }\n }\n watch(\n () => [state.arrivedState[direction], isElementVisible.value],\n checkAndLoad,\n { immediate: true }\n );\n return {\n isLoading,\n reset() {\n nextTick(() => checkAndLoad());\n }\n };\n}\n\nconst defaultEvents = [\"mousedown\", \"mouseup\", \"keydown\", \"keyup\"];\nfunction useKeyModifier(modifier, options = {}) {\n const {\n events = defaultEvents,\n document = defaultDocument,\n initial = null\n } = options;\n const state = ref(initial);\n if (document) {\n events.forEach((listenerEvent) => {\n useEventListener(document, listenerEvent, (evt) => {\n if (typeof evt.getModifierState === \"function\")\n state.value = evt.getModifierState(modifier);\n });\n });\n }\n return state;\n}\n\nfunction useLocalStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.localStorage, options);\n}\n\nconst DefaultMagicKeysAliasMap = {\n ctrl: \"control\",\n command: \"meta\",\n cmd: \"meta\",\n option: \"alt\",\n up: \"arrowup\",\n down: \"arrowdown\",\n left: \"arrowleft\",\n right: \"arrowright\"\n};\n\nfunction useMagicKeys(options = {}) {\n const {\n reactive: useReactive = false,\n target = defaultWindow,\n aliasMap = DefaultMagicKeysAliasMap,\n passive = true,\n onEventFired = noop\n } = options;\n const current = reactive(/* @__PURE__ */ new Set());\n const obj = {\n toJSON() {\n return {};\n },\n current\n };\n const refs = useReactive ? reactive(obj) : obj;\n const metaDeps = /* @__PURE__ */ new Set();\n const usedKeys = /* @__PURE__ */ new Set();\n function setRefs(key, value) {\n if (key in refs) {\n if (useReactive)\n refs[key] = value;\n else\n refs[key].value = value;\n }\n }\n function reset() {\n current.clear();\n for (const key of usedKeys)\n setRefs(key, false);\n }\n function updateRefs(e, value) {\n var _a, _b;\n const key = (_a = e.key) == null ? void 0 : _a.toLowerCase();\n const code = (_b = e.code) == null ? void 0 : _b.toLowerCase();\n const values = [code, key].filter(Boolean);\n if (key) {\n if (value)\n current.add(key);\n else\n current.delete(key);\n }\n for (const key2 of values) {\n usedKeys.add(key2);\n setRefs(key2, value);\n }\n if (key === \"meta\" && !value) {\n metaDeps.forEach((key2) => {\n current.delete(key2);\n setRefs(key2, false);\n });\n metaDeps.clear();\n } else if (typeof e.getModifierState === \"function\" && e.getModifierState(\"Meta\") && value) {\n [...current, ...values].forEach((key2) => metaDeps.add(key2));\n }\n }\n useEventListener(target, \"keydown\", (e) => {\n updateRefs(e, true);\n return onEventFired(e);\n }, { passive });\n useEventListener(target, \"keyup\", (e) => {\n updateRefs(e, false);\n return onEventFired(e);\n }, { passive });\n useEventListener(\"blur\", reset, { passive: true });\n useEventListener(\"focus\", reset, { passive: true });\n const proxy = new Proxy(\n refs,\n {\n get(target2, prop, rec) {\n if (typeof prop !== \"string\")\n return Reflect.get(target2, prop, rec);\n prop = prop.toLowerCase();\n if (prop in aliasMap)\n prop = aliasMap[prop];\n if (!(prop in refs)) {\n if (/[+_-]/.test(prop)) {\n const keys = prop.split(/[+_-]/g).map((i) => i.trim());\n refs[prop] = computed(() => keys.every((key) => toValue(proxy[key])));\n } else {\n refs[prop] = ref(false);\n }\n }\n const r = Reflect.get(target2, prop, rec);\n return useReactive ? toValue(r) : r;\n }\n }\n );\n return proxy;\n}\n\nfunction usingElRef(source, cb) {\n if (toValue(source))\n cb(toValue(source));\n}\nfunction timeRangeToArray(timeRanges) {\n let ranges = [];\n for (let i = 0; i < timeRanges.length; ++i)\n ranges = [...ranges, [timeRanges.start(i), timeRanges.end(i)]];\n return ranges;\n}\nfunction tracksToArray(tracks) {\n return Array.from(tracks).map(({ label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }, id) => ({ id, label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }));\n}\nconst defaultOptions = {\n src: \"\",\n tracks: []\n};\nfunction useMediaControls(target, options = {}) {\n target = toRef(target);\n options = {\n ...defaultOptions,\n ...options\n };\n const {\n document = defaultDocument\n } = options;\n const currentTime = ref(0);\n const duration = ref(0);\n const seeking = ref(false);\n const volume = ref(1);\n const waiting = ref(false);\n const ended = ref(false);\n const playing = ref(false);\n const rate = ref(1);\n const stalled = ref(false);\n const buffered = ref([]);\n const tracks = ref([]);\n const selectedTrack = ref(-1);\n const isPictureInPicture = ref(false);\n const muted = ref(false);\n const supportsPictureInPicture = document && \"pictureInPictureEnabled\" in document;\n const sourceErrorEvent = createEventHook();\n const disableTrack = (track) => {\n usingElRef(target, (el) => {\n if (track) {\n const id = typeof track === \"number\" ? track : track.id;\n el.textTracks[id].mode = \"disabled\";\n } else {\n for (let i = 0; i < el.textTracks.length; ++i)\n el.textTracks[i].mode = \"disabled\";\n }\n selectedTrack.value = -1;\n });\n };\n const enableTrack = (track, disableTracks = true) => {\n usingElRef(target, (el) => {\n const id = typeof track === \"number\" ? track : track.id;\n if (disableTracks)\n disableTrack();\n el.textTracks[id].mode = \"showing\";\n selectedTrack.value = id;\n });\n };\n const togglePictureInPicture = () => {\n return new Promise((resolve, reject) => {\n usingElRef(target, async (el) => {\n if (supportsPictureInPicture) {\n if (!isPictureInPicture.value) {\n el.requestPictureInPicture().then(resolve).catch(reject);\n } else {\n document.exitPictureInPicture().then(resolve).catch(reject);\n }\n }\n });\n });\n };\n watchEffect(() => {\n if (!document)\n return;\n const el = toValue(target);\n if (!el)\n return;\n const src = toValue(options.src);\n let sources = [];\n if (!src)\n return;\n if (typeof src === \"string\")\n sources = [{ src }];\n else if (Array.isArray(src))\n sources = src;\n else if (isObject(src))\n sources = [src];\n el.querySelectorAll(\"source\").forEach((e) => {\n e.removeEventListener(\"error\", sourceErrorEvent.trigger);\n e.remove();\n });\n sources.forEach(({ src: src2, type }) => {\n const source = document.createElement(\"source\");\n source.setAttribute(\"src\", src2);\n source.setAttribute(\"type\", type || \"\");\n source.addEventListener(\"error\", sourceErrorEvent.trigger);\n el.appendChild(source);\n });\n el.load();\n });\n tryOnScopeDispose(() => {\n const el = toValue(target);\n if (!el)\n return;\n el.querySelectorAll(\"source\").forEach((e) => e.removeEventListener(\"error\", sourceErrorEvent.trigger));\n });\n watch([target, volume], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.volume = volume.value;\n });\n watch([target, muted], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.muted = muted.value;\n });\n watch([target, rate], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.playbackRate = rate.value;\n });\n watchEffect(() => {\n if (!document)\n return;\n const textTracks = toValue(options.tracks);\n const el = toValue(target);\n if (!textTracks || !textTracks.length || !el)\n return;\n el.querySelectorAll(\"track\").forEach((e) => e.remove());\n textTracks.forEach(({ default: isDefault, kind, label, src, srcLang }, i) => {\n const track = document.createElement(\"track\");\n track.default = isDefault || false;\n track.kind = kind;\n track.label = label;\n track.src = src;\n track.srclang = srcLang;\n if (track.default)\n selectedTrack.value = i;\n el.appendChild(track);\n });\n });\n const { ignoreUpdates: ignoreCurrentTimeUpdates } = watchIgnorable(currentTime, (time) => {\n const el = toValue(target);\n if (!el)\n return;\n el.currentTime = time;\n });\n const { ignoreUpdates: ignorePlayingUpdates } = watchIgnorable(playing, (isPlaying) => {\n const el = toValue(target);\n if (!el)\n return;\n if (isPlaying)\n el.play();\n else\n el.pause();\n });\n useEventListener(target, \"timeupdate\", () => ignoreCurrentTimeUpdates(() => currentTime.value = toValue(target).currentTime));\n useEventListener(target, \"durationchange\", () => duration.value = toValue(target).duration);\n useEventListener(target, \"progress\", () => buffered.value = timeRangeToArray(toValue(target).buffered));\n useEventListener(target, \"seeking\", () => seeking.value = true);\n useEventListener(target, \"seeked\", () => seeking.value = false);\n useEventListener(target, [\"waiting\", \"loadstart\"], () => {\n waiting.value = true;\n ignorePlayingUpdates(() => playing.value = false);\n });\n useEventListener(target, \"loadeddata\", () => waiting.value = false);\n useEventListener(target, \"playing\", () => {\n waiting.value = false;\n ended.value = false;\n ignorePlayingUpdates(() => playing.value = true);\n });\n useEventListener(target, \"ratechange\", () => rate.value = toValue(target).playbackRate);\n useEventListener(target, \"stalled\", () => stalled.value = true);\n useEventListener(target, \"ended\", () => ended.value = true);\n useEventListener(target, \"pause\", () => ignorePlayingUpdates(() => playing.value = false));\n useEventListener(target, \"play\", () => ignorePlayingUpdates(() => playing.value = true));\n useEventListener(target, \"enterpictureinpicture\", () => isPictureInPicture.value = true);\n useEventListener(target, \"leavepictureinpicture\", () => isPictureInPicture.value = false);\n useEventListener(target, \"volumechange\", () => {\n const el = toValue(target);\n if (!el)\n return;\n volume.value = el.volume;\n muted.value = el.muted;\n });\n const listeners = [];\n const stop = watch([target], () => {\n const el = toValue(target);\n if (!el)\n return;\n stop();\n listeners[0] = useEventListener(el.textTracks, \"addtrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[1] = useEventListener(el.textTracks, \"removetrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[2] = useEventListener(el.textTracks, \"change\", () => tracks.value = tracksToArray(el.textTracks));\n });\n tryOnScopeDispose(() => listeners.forEach((listener) => listener()));\n return {\n currentTime,\n duration,\n waiting,\n seeking,\n ended,\n stalled,\n buffered,\n playing,\n rate,\n // Volume\n volume,\n muted,\n // Tracks\n tracks,\n selectedTrack,\n enableTrack,\n disableTrack,\n // Picture in Picture\n supportsPictureInPicture,\n togglePictureInPicture,\n isPictureInPicture,\n // Events\n onSourceError: sourceErrorEvent.on\n };\n}\n\nfunction getMapVue2Compat() {\n const data = shallowReactive({});\n return {\n get: (key) => data[key],\n set: (key, value) => set(data, key, value),\n has: (key) => hasOwn(data, key),\n delete: (key) => del(data, key),\n clear: () => {\n Object.keys(data).forEach((key) => {\n del(data, key);\n });\n }\n };\n}\nfunction useMemoize(resolver, options) {\n const initCache = () => {\n if (options == null ? void 0 : options.cache)\n return shallowReactive(options.cache);\n if (isVue2)\n return getMapVue2Compat();\n return shallowReactive(/* @__PURE__ */ new Map());\n };\n const cache = initCache();\n const generateKey = (...args) => (options == null ? void 0 : options.getKey) ? options.getKey(...args) : JSON.stringify(args);\n const _loadData = (key, ...args) => {\n cache.set(key, resolver(...args));\n return cache.get(key);\n };\n const loadData = (...args) => _loadData(generateKey(...args), ...args);\n const deleteData = (...args) => {\n cache.delete(generateKey(...args));\n };\n const clearData = () => {\n cache.clear();\n };\n const memoized = (...args) => {\n const key = generateKey(...args);\n if (cache.has(key))\n return cache.get(key);\n return _loadData(key, ...args);\n };\n memoized.load = loadData;\n memoized.delete = deleteData;\n memoized.clear = clearData;\n memoized.generateKey = generateKey;\n memoized.cache = cache;\n return memoized;\n}\n\nfunction useMemory(options = {}) {\n const memory = ref();\n const isSupported = useSupported(() => typeof performance !== \"undefined\" && \"memory\" in performance);\n if (isSupported.value) {\n const { interval = 1e3 } = options;\n useIntervalFn(() => {\n memory.value = performance.memory;\n }, interval, { immediate: options.immediate, immediateCallback: options.immediateCallback });\n }\n return { isSupported, memory };\n}\n\nconst UseMouseBuiltinExtractors = {\n page: (event) => [event.pageX, event.pageY],\n client: (event) => [event.clientX, event.clientY],\n screen: (event) => [event.screenX, event.screenY],\n movement: (event) => event instanceof Touch ? null : [event.movementX, event.movementY]\n};\nfunction useMouse(options = {}) {\n const {\n type = \"page\",\n touch = true,\n resetOnTouchEnds = false,\n initialValue = { x: 0, y: 0 },\n window = defaultWindow,\n target = window,\n scroll = true,\n eventFilter\n } = options;\n let _prevMouseEvent = null;\n const x = ref(initialValue.x);\n const y = ref(initialValue.y);\n const sourceType = ref(null);\n const extractor = typeof type === \"function\" ? type : UseMouseBuiltinExtractors[type];\n const mouseHandler = (event) => {\n const result = extractor(event);\n _prevMouseEvent = event;\n if (result) {\n [x.value, y.value] = result;\n sourceType.value = \"mouse\";\n }\n };\n const touchHandler = (event) => {\n if (event.touches.length > 0) {\n const result = extractor(event.touches[0]);\n if (result) {\n [x.value, y.value] = result;\n sourceType.value = \"touch\";\n }\n }\n };\n const scrollHandler = () => {\n if (!_prevMouseEvent || !window)\n return;\n const pos = extractor(_prevMouseEvent);\n if (_prevMouseEvent instanceof MouseEvent && pos) {\n x.value = pos[0] + window.scrollX;\n y.value = pos[1] + window.scrollY;\n }\n };\n const reset = () => {\n x.value = initialValue.x;\n y.value = initialValue.y;\n };\n const mouseHandlerWrapper = eventFilter ? (event) => eventFilter(() => mouseHandler(event), {}) : (event) => mouseHandler(event);\n const touchHandlerWrapper = eventFilter ? (event) => eventFilter(() => touchHandler(event), {}) : (event) => touchHandler(event);\n const scrollHandlerWrapper = eventFilter ? () => eventFilter(() => scrollHandler(), {}) : () => scrollHandler();\n if (target) {\n const listenerOptions = { passive: true };\n useEventListener(target, [\"mousemove\", \"dragover\"], mouseHandlerWrapper, listenerOptions);\n if (touch && type !== \"movement\") {\n useEventListener(target, [\"touchstart\", \"touchmove\"], touchHandlerWrapper, listenerOptions);\n if (resetOnTouchEnds)\n useEventListener(target, \"touchend\", reset, listenerOptions);\n }\n if (scroll && type === \"page\")\n useEventListener(window, \"scroll\", scrollHandlerWrapper, { passive: true });\n }\n return {\n x,\n y,\n sourceType\n };\n}\n\nfunction useMouseInElement(target, options = {}) {\n const {\n handleOutside = true,\n window = defaultWindow\n } = options;\n const type = options.type || \"page\";\n const { x, y, sourceType } = useMouse(options);\n const targetRef = ref(target != null ? target : window == null ? void 0 : window.document.body);\n const elementX = ref(0);\n const elementY = ref(0);\n const elementPositionX = ref(0);\n const elementPositionY = ref(0);\n const elementHeight = ref(0);\n const elementWidth = ref(0);\n const isOutside = ref(true);\n let stop = () => {\n };\n if (window) {\n stop = watch(\n [targetRef, x, y],\n () => {\n const el = unrefElement(targetRef);\n if (!el || !(el instanceof HTMLElement))\n return;\n const {\n left,\n top,\n width,\n height\n } = el.getBoundingClientRect();\n elementPositionX.value = left + (type === \"page\" ? window.pageXOffset : 0);\n elementPositionY.value = top + (type === \"page\" ? window.pageYOffset : 0);\n elementHeight.value = height;\n elementWidth.value = width;\n const elX = x.value - elementPositionX.value;\n const elY = y.value - elementPositionY.value;\n isOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height;\n if (handleOutside || !isOutside.value) {\n elementX.value = elX;\n elementY.value = elY;\n }\n },\n { immediate: true }\n );\n useEventListener(document, \"mouseleave\", () => {\n isOutside.value = true;\n });\n }\n return {\n x,\n y,\n sourceType,\n elementX,\n elementY,\n elementPositionX,\n elementPositionY,\n elementHeight,\n elementWidth,\n isOutside,\n stop\n };\n}\n\nfunction useMousePressed(options = {}) {\n const {\n touch = true,\n drag = true,\n capture = false,\n initialValue = false,\n window = defaultWindow\n } = options;\n const pressed = ref(initialValue);\n const sourceType = ref(null);\n if (!window) {\n return {\n pressed,\n sourceType\n };\n }\n const onPressed = (srcType) => () => {\n pressed.value = true;\n sourceType.value = srcType;\n };\n const onReleased = () => {\n pressed.value = false;\n sourceType.value = null;\n };\n const target = computed(() => unrefElement(options.target) || window);\n useEventListener(target, \"mousedown\", onPressed(\"mouse\"), { passive: true, capture });\n useEventListener(window, \"mouseleave\", onReleased, { passive: true, capture });\n useEventListener(window, \"mouseup\", onReleased, { passive: true, capture });\n if (drag) {\n useEventListener(target, \"dragstart\", onPressed(\"mouse\"), { passive: true, capture });\n useEventListener(window, \"drop\", onReleased, { passive: true, capture });\n useEventListener(window, \"dragend\", onReleased, { passive: true, capture });\n }\n if (touch) {\n useEventListener(target, \"touchstart\", onPressed(\"touch\"), { passive: true, capture });\n useEventListener(window, \"touchend\", onReleased, { passive: true, capture });\n useEventListener(window, \"touchcancel\", onReleased, { passive: true, capture });\n }\n return {\n pressed,\n sourceType\n };\n}\n\nfunction useNavigatorLanguage(options = {}) {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"language\" in navigator);\n const language = ref(navigator == null ? void 0 : navigator.language);\n useEventListener(window, \"languagechange\", () => {\n if (navigator)\n language.value = navigator.language;\n });\n return {\n isSupported,\n language\n };\n}\n\nfunction useNetwork(options = {}) {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"connection\" in navigator);\n const isOnline = ref(true);\n const saveData = ref(false);\n const offlineAt = ref(void 0);\n const onlineAt = ref(void 0);\n const downlink = ref(void 0);\n const downlinkMax = ref(void 0);\n const rtt = ref(void 0);\n const effectiveType = ref(void 0);\n const type = ref(\"unknown\");\n const connection = isSupported.value && navigator.connection;\n function updateNetworkInformation() {\n if (!navigator)\n return;\n isOnline.value = navigator.onLine;\n offlineAt.value = isOnline.value ? void 0 : Date.now();\n onlineAt.value = isOnline.value ? Date.now() : void 0;\n if (connection) {\n downlink.value = connection.downlink;\n downlinkMax.value = connection.downlinkMax;\n effectiveType.value = connection.effectiveType;\n rtt.value = connection.rtt;\n saveData.value = connection.saveData;\n type.value = connection.type;\n }\n }\n if (window) {\n useEventListener(window, \"offline\", () => {\n isOnline.value = false;\n offlineAt.value = Date.now();\n });\n useEventListener(window, \"online\", () => {\n isOnline.value = true;\n onlineAt.value = Date.now();\n });\n }\n if (connection)\n useEventListener(connection, \"change\", updateNetworkInformation, false);\n updateNetworkInformation();\n return {\n isSupported,\n isOnline,\n saveData,\n offlineAt,\n onlineAt,\n downlink,\n downlinkMax,\n effectiveType,\n rtt,\n type\n };\n}\n\nfunction useNow(options = {}) {\n const {\n controls: exposeControls = false,\n interval = \"requestAnimationFrame\"\n } = options;\n const now = ref(/* @__PURE__ */ new Date());\n const update = () => now.value = /* @__PURE__ */ new Date();\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(update, { immediate: true }) : useIntervalFn(update, interval, { immediate: true });\n if (exposeControls) {\n return {\n now,\n ...controls\n };\n } else {\n return now;\n }\n}\n\nfunction useObjectUrl(object) {\n const url = ref();\n const release = () => {\n if (url.value)\n URL.revokeObjectURL(url.value);\n url.value = void 0;\n };\n watch(\n () => toValue(object),\n (newObject) => {\n release();\n if (newObject)\n url.value = URL.createObjectURL(newObject);\n },\n { immediate: true }\n );\n tryOnScopeDispose(release);\n return readonly(url);\n}\n\nfunction useClamp(value, min, max) {\n if (typeof value === \"function\" || isReadonly(value))\n return computed(() => clamp(toValue(value), toValue(min), toValue(max)));\n const _value = ref(value);\n return computed({\n get() {\n return _value.value = clamp(_value.value, toValue(min), toValue(max));\n },\n set(value2) {\n _value.value = clamp(value2, toValue(min), toValue(max));\n }\n });\n}\n\nfunction useOffsetPagination(options) {\n const {\n total = Number.POSITIVE_INFINITY,\n pageSize = 10,\n page = 1,\n onPageChange = noop,\n onPageSizeChange = noop,\n onPageCountChange = noop\n } = options;\n const currentPageSize = useClamp(pageSize, 1, Number.POSITIVE_INFINITY);\n const pageCount = computed(() => Math.max(\n 1,\n Math.ceil(toValue(total) / toValue(currentPageSize))\n ));\n const currentPage = useClamp(page, 1, pageCount);\n const isFirstPage = computed(() => currentPage.value === 1);\n const isLastPage = computed(() => currentPage.value === pageCount.value);\n if (isRef(page)) {\n syncRef(page, currentPage, {\n direction: isReadonly(page) ? \"ltr\" : \"both\"\n });\n }\n if (isRef(pageSize)) {\n syncRef(pageSize, currentPageSize, {\n direction: isReadonly(pageSize) ? \"ltr\" : \"both\"\n });\n }\n function prev() {\n currentPage.value--;\n }\n function next() {\n currentPage.value++;\n }\n const returnValue = {\n currentPage,\n currentPageSize,\n pageCount,\n isFirstPage,\n isLastPage,\n prev,\n next\n };\n watch(currentPage, () => {\n onPageChange(reactive(returnValue));\n });\n watch(currentPageSize, () => {\n onPageSizeChange(reactive(returnValue));\n });\n watch(pageCount, () => {\n onPageCountChange(reactive(returnValue));\n });\n return returnValue;\n}\n\nfunction useOnline(options = {}) {\n const { isOnline } = useNetwork(options);\n return isOnline;\n}\n\nfunction usePageLeave(options = {}) {\n const { window = defaultWindow } = options;\n const isLeft = ref(false);\n const handler = (event) => {\n if (!window)\n return;\n event = event || window.event;\n const from = event.relatedTarget || event.toElement;\n isLeft.value = !from;\n };\n if (window) {\n useEventListener(window, \"mouseout\", handler, { passive: true });\n useEventListener(window.document, \"mouseleave\", handler, { passive: true });\n useEventListener(window.document, \"mouseenter\", handler, { passive: true });\n }\n return isLeft;\n}\n\nfunction useScreenOrientation(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"screen\" in window && \"orientation\" in window.screen);\n const screenOrientation = isSupported.value ? window.screen.orientation : {};\n const orientation = ref(screenOrientation.type);\n const angle = ref(screenOrientation.angle || 0);\n if (isSupported.value) {\n useEventListener(window, \"orientationchange\", () => {\n orientation.value = screenOrientation.type;\n angle.value = screenOrientation.angle;\n });\n }\n const lockOrientation = (type) => {\n if (isSupported.value && typeof screenOrientation.lock === \"function\")\n return screenOrientation.lock(type);\n return Promise.reject(new Error(\"Not supported\"));\n };\n const unlockOrientation = () => {\n if (isSupported.value && typeof screenOrientation.unlock === \"function\")\n screenOrientation.unlock();\n };\n return {\n isSupported,\n orientation,\n angle,\n lockOrientation,\n unlockOrientation\n };\n}\n\nfunction useParallax(target, options = {}) {\n const {\n deviceOrientationTiltAdjust = (i) => i,\n deviceOrientationRollAdjust = (i) => i,\n mouseTiltAdjust = (i) => i,\n mouseRollAdjust = (i) => i,\n window = defaultWindow\n } = options;\n const orientation = reactive(useDeviceOrientation({ window }));\n const screenOrientation = reactive(useScreenOrientation({ window }));\n const {\n elementX: x,\n elementY: y,\n elementWidth: width,\n elementHeight: height\n } = useMouseInElement(target, { handleOutside: false, window });\n const source = computed(() => {\n if (orientation.isSupported && (orientation.alpha != null && orientation.alpha !== 0 || orientation.gamma != null && orientation.gamma !== 0)) {\n return \"deviceOrientation\";\n }\n return \"mouse\";\n });\n const roll = computed(() => {\n if (source.value === \"deviceOrientation\") {\n let value;\n switch (screenOrientation.orientation) {\n case \"landscape-primary\":\n value = orientation.gamma / 90;\n break;\n case \"landscape-secondary\":\n value = -orientation.gamma / 90;\n break;\n case \"portrait-primary\":\n value = -orientation.beta / 90;\n break;\n case \"portrait-secondary\":\n value = orientation.beta / 90;\n break;\n default:\n value = -orientation.beta / 90;\n }\n return deviceOrientationRollAdjust(value);\n } else {\n const value = -(y.value - height.value / 2) / height.value;\n return mouseRollAdjust(value);\n }\n });\n const tilt = computed(() => {\n if (source.value === \"deviceOrientation\") {\n let value;\n switch (screenOrientation.orientation) {\n case \"landscape-primary\":\n value = orientation.beta / 90;\n break;\n case \"landscape-secondary\":\n value = -orientation.beta / 90;\n break;\n case \"portrait-primary\":\n value = orientation.gamma / 90;\n break;\n case \"portrait-secondary\":\n value = -orientation.gamma / 90;\n break;\n default:\n value = orientation.gamma / 90;\n }\n return deviceOrientationTiltAdjust(value);\n } else {\n const value = (x.value - width.value / 2) / width.value;\n return mouseTiltAdjust(value);\n }\n });\n return { roll, tilt, source };\n}\n\nfunction useParentElement(element = useCurrentElement()) {\n const parentElement = shallowRef();\n const update = () => {\n const el = unrefElement(element);\n if (el)\n parentElement.value = el.parentElement;\n };\n tryOnMounted(update);\n watch(() => toValue(element), update);\n return parentElement;\n}\n\nfunction usePerformanceObserver(options, callback) {\n const {\n window = defaultWindow,\n immediate = true,\n ...performanceOptions\n } = options;\n const isSupported = useSupported(() => window && \"PerformanceObserver\" in window);\n let observer;\n const stop = () => {\n observer == null ? void 0 : observer.disconnect();\n };\n const start = () => {\n if (isSupported.value) {\n stop();\n observer = new PerformanceObserver(callback);\n observer.observe(performanceOptions);\n }\n };\n tryOnScopeDispose(stop);\n if (immediate)\n start();\n return {\n isSupported,\n start,\n stop\n };\n}\n\nconst defaultState = {\n x: 0,\n y: 0,\n pointerId: 0,\n pressure: 0,\n tiltX: 0,\n tiltY: 0,\n width: 0,\n height: 0,\n twist: 0,\n pointerType: null\n};\nconst keys = /* @__PURE__ */ Object.keys(defaultState);\nfunction usePointer(options = {}) {\n const {\n target = defaultWindow\n } = options;\n const isInside = ref(false);\n const state = ref(options.initialValue || {});\n Object.assign(state.value, defaultState, state.value);\n const handler = (event) => {\n isInside.value = true;\n if (options.pointerTypes && !options.pointerTypes.includes(event.pointerType))\n return;\n state.value = objectPick(event, keys, false);\n };\n if (target) {\n const listenerOptions = { passive: true };\n useEventListener(target, [\"pointerdown\", \"pointermove\", \"pointerup\"], handler, listenerOptions);\n useEventListener(target, \"pointerleave\", () => isInside.value = false, listenerOptions);\n }\n return {\n ...toRefs(state),\n isInside\n };\n}\n\nfunction usePointerLock(target, options = {}) {\n const { document = defaultDocument } = options;\n const isSupported = useSupported(() => document && \"pointerLockElement\" in document);\n const element = ref();\n const triggerElement = ref();\n let targetElement;\n if (isSupported.value) {\n useEventListener(document, \"pointerlockchange\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n element.value = document.pointerLockElement;\n if (!element.value)\n targetElement = triggerElement.value = null;\n }\n });\n useEventListener(document, \"pointerlockerror\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n const action = document.pointerLockElement ? \"release\" : \"acquire\";\n throw new Error(`Failed to ${action} pointer lock.`);\n }\n });\n }\n async function lock(e) {\n var _a;\n if (!isSupported.value)\n throw new Error(\"Pointer Lock API is not supported by your browser.\");\n triggerElement.value = e instanceof Event ? e.currentTarget : null;\n targetElement = e instanceof Event ? (_a = unrefElement(target)) != null ? _a : triggerElement.value : unrefElement(e);\n if (!targetElement)\n throw new Error(\"Target element undefined.\");\n targetElement.requestPointerLock();\n return await until(element).toBe(targetElement);\n }\n async function unlock() {\n if (!element.value)\n return false;\n document.exitPointerLock();\n await until(element).toBeNull();\n return true;\n }\n return {\n isSupported,\n element,\n triggerElement,\n lock,\n unlock\n };\n}\n\nfunction usePointerSwipe(target, options = {}) {\n const targetRef = toRef(target);\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart,\n disableTextSelect = false\n } = options;\n const posStart = reactive({ x: 0, y: 0 });\n const updatePosStart = (x, y) => {\n posStart.x = x;\n posStart.y = y;\n };\n const posEnd = reactive({ x: 0, y: 0 });\n const updatePosEnd = (x, y) => {\n posEnd.x = x;\n posEnd.y = y;\n };\n const distanceX = computed(() => posStart.x - posEnd.x);\n const distanceY = computed(() => posStart.y - posEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(distanceX.value), abs(distanceY.value)) >= threshold);\n const isSwiping = ref(false);\n const isPointerDown = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return \"none\";\n if (abs(distanceX.value) > abs(distanceY.value)) {\n return distanceX.value > 0 ? \"left\" : \"right\";\n } else {\n return distanceY.value > 0 ? \"up\" : \"down\";\n }\n });\n const eventIsAllowed = (e) => {\n var _a, _b, _c;\n const isReleasingButton = e.buttons === 0;\n const isPrimaryButton = e.buttons === 1;\n return (_c = (_b = (_a = options.pointerTypes) == null ? void 0 : _a.includes(e.pointerType)) != null ? _b : isReleasingButton || isPrimaryButton) != null ? _c : true;\n };\n const stops = [\n useEventListener(target, \"pointerdown\", (e) => {\n if (!eventIsAllowed(e))\n return;\n isPointerDown.value = true;\n const eventTarget = e.target;\n eventTarget == null ? void 0 : eventTarget.setPointerCapture(e.pointerId);\n const { clientX: x, clientY: y } = e;\n updatePosStart(x, y);\n updatePosEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }),\n useEventListener(target, \"pointermove\", (e) => {\n if (!eventIsAllowed(e))\n return;\n if (!isPointerDown.value)\n return;\n const { clientX: x, clientY: y } = e;\n updatePosEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }),\n useEventListener(target, \"pointerup\", (e) => {\n if (!eventIsAllowed(e))\n return;\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isPointerDown.value = false;\n isSwiping.value = false;\n })\n ];\n tryOnMounted(() => {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"none\");\n if (disableTextSelect) {\n (_d = (_c = targetRef.value) == null ? void 0 : _c.style) == null ? void 0 : _d.setProperty(\"-webkit-user-select\", \"none\");\n (_f = (_e = targetRef.value) == null ? void 0 : _e.style) == null ? void 0 : _f.setProperty(\"-ms-user-select\", \"none\");\n (_h = (_g = targetRef.value) == null ? void 0 : _g.style) == null ? void 0 : _h.setProperty(\"user-select\", \"none\");\n }\n });\n const stop = () => stops.forEach((s) => s());\n return {\n isSwiping: readonly(isSwiping),\n direction: readonly(direction),\n posStart: readonly(posStart),\n posEnd: readonly(posEnd),\n distanceX,\n distanceY,\n stop\n };\n}\n\nfunction usePreferredColorScheme(options) {\n const isLight = useMediaQuery(\"(prefers-color-scheme: light)\", options);\n const isDark = useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n return computed(() => {\n if (isDark.value)\n return \"dark\";\n if (isLight.value)\n return \"light\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredContrast(options) {\n const isMore = useMediaQuery(\"(prefers-contrast: more)\", options);\n const isLess = useMediaQuery(\"(prefers-contrast: less)\", options);\n const isCustom = useMediaQuery(\"(prefers-contrast: custom)\", options);\n return computed(() => {\n if (isMore.value)\n return \"more\";\n if (isLess.value)\n return \"less\";\n if (isCustom.value)\n return \"custom\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredLanguages(options = {}) {\n const { window = defaultWindow } = options;\n if (!window)\n return ref([\"en\"]);\n const navigator = window.navigator;\n const value = ref(navigator.languages);\n useEventListener(window, \"languagechange\", () => {\n value.value = navigator.languages;\n });\n return value;\n}\n\nfunction usePreferredReducedMotion(options) {\n const isReduced = useMediaQuery(\"(prefers-reduced-motion: reduce)\", options);\n return computed(() => {\n if (isReduced.value)\n return \"reduce\";\n return \"no-preference\";\n });\n}\n\nfunction usePrevious(value, initialValue) {\n const previous = shallowRef(initialValue);\n watch(\n toRef(value),\n (_, oldValue) => {\n previous.value = oldValue;\n },\n { flush: \"sync\" }\n );\n return readonly(previous);\n}\n\nconst topVarName = \"--vueuse-safe-area-top\";\nconst rightVarName = \"--vueuse-safe-area-right\";\nconst bottomVarName = \"--vueuse-safe-area-bottom\";\nconst leftVarName = \"--vueuse-safe-area-left\";\nfunction useScreenSafeArea() {\n const top = ref(\"\");\n const right = ref(\"\");\n const bottom = ref(\"\");\n const left = ref(\"\");\n if (isClient) {\n const topCssVar = useCssVar(topVarName);\n const rightCssVar = useCssVar(rightVarName);\n const bottomCssVar = useCssVar(bottomVarName);\n const leftCssVar = useCssVar(leftVarName);\n topCssVar.value = \"env(safe-area-inset-top, 0px)\";\n rightCssVar.value = \"env(safe-area-inset-right, 0px)\";\n bottomCssVar.value = \"env(safe-area-inset-bottom, 0px)\";\n leftCssVar.value = \"env(safe-area-inset-left, 0px)\";\n update();\n useEventListener(\"resize\", useDebounceFn(update));\n }\n function update() {\n top.value = getValue(topVarName);\n right.value = getValue(rightVarName);\n bottom.value = getValue(bottomVarName);\n left.value = getValue(leftVarName);\n }\n return {\n top,\n right,\n bottom,\n left,\n update\n };\n}\nfunction getValue(position) {\n return getComputedStyle(document.documentElement).getPropertyValue(position);\n}\n\nfunction useScriptTag(src, onLoaded = noop, options = {}) {\n const {\n immediate = true,\n manual = false,\n type = \"text/javascript\",\n async = true,\n crossOrigin,\n referrerPolicy,\n noModule,\n defer,\n document = defaultDocument,\n attrs = {}\n } = options;\n const scriptTag = ref(null);\n let _promise = null;\n const loadScript = (waitForScriptLoad) => new Promise((resolve, reject) => {\n const resolveWithElement = (el2) => {\n scriptTag.value = el2;\n resolve(el2);\n return el2;\n };\n if (!document) {\n resolve(false);\n return;\n }\n let shouldAppend = false;\n let el = document.querySelector(`script[src=\"${toValue(src)}\"]`);\n if (!el) {\n el = document.createElement(\"script\");\n el.type = type;\n el.async = async;\n el.src = toValue(src);\n if (defer)\n el.defer = defer;\n if (crossOrigin)\n el.crossOrigin = crossOrigin;\n if (noModule)\n el.noModule = noModule;\n if (referrerPolicy)\n el.referrerPolicy = referrerPolicy;\n Object.entries(attrs).forEach(([name, value]) => el == null ? void 0 : el.setAttribute(name, value));\n shouldAppend = true;\n } else if (el.hasAttribute(\"data-loaded\")) {\n resolveWithElement(el);\n }\n el.addEventListener(\"error\", (event) => reject(event));\n el.addEventListener(\"abort\", (event) => reject(event));\n el.addEventListener(\"load\", () => {\n el.setAttribute(\"data-loaded\", \"true\");\n onLoaded(el);\n resolveWithElement(el);\n });\n if (shouldAppend)\n el = document.head.appendChild(el);\n if (!waitForScriptLoad)\n resolveWithElement(el);\n });\n const load = (waitForScriptLoad = true) => {\n if (!_promise)\n _promise = loadScript(waitForScriptLoad);\n return _promise;\n };\n const unload = () => {\n if (!document)\n return;\n _promise = null;\n if (scriptTag.value)\n scriptTag.value = null;\n const el = document.querySelector(`script[src=\"${toValue(src)}\"]`);\n if (el)\n document.head.removeChild(el);\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnUnmounted(unload);\n return { scriptTag, load, unload };\n}\n\nfunction checkOverflowScroll(ele) {\n const style = window.getComputedStyle(ele);\n if (style.overflowX === \"scroll\" || style.overflowY === \"scroll\" || style.overflowX === \"auto\" && ele.clientWidth < ele.scrollWidth || style.overflowY === \"auto\" && ele.clientHeight < ele.scrollHeight) {\n return true;\n } else {\n const parent = ele.parentNode;\n if (!parent || parent.tagName === \"BODY\")\n return false;\n return checkOverflowScroll(parent);\n }\n}\nfunction preventDefault(rawEvent) {\n const e = rawEvent || window.event;\n const _target = e.target;\n if (checkOverflowScroll(_target))\n return false;\n if (e.touches.length > 1)\n return true;\n if (e.preventDefault)\n e.preventDefault();\n return false;\n}\nconst elInitialOverflow = /* @__PURE__ */ new WeakMap();\nfunction useScrollLock(element, initialState = false) {\n const isLocked = ref(initialState);\n let stopTouchMoveListener = null;\n let initialOverflow = \"\";\n watch(toRef(element), (el) => {\n const target = resolveElement(toValue(el));\n if (target) {\n const ele = target;\n if (!elInitialOverflow.get(ele))\n elInitialOverflow.set(ele, ele.style.overflow);\n if (ele.style.overflow !== \"hidden\")\n initialOverflow = ele.style.overflow;\n if (ele.style.overflow === \"hidden\")\n return isLocked.value = true;\n if (isLocked.value)\n return ele.style.overflow = \"hidden\";\n }\n }, {\n immediate: true\n });\n const lock = () => {\n const el = resolveElement(toValue(element));\n if (!el || isLocked.value)\n return;\n if (isIOS) {\n stopTouchMoveListener = useEventListener(\n el,\n \"touchmove\",\n (e) => {\n preventDefault(e);\n },\n { passive: false }\n );\n }\n el.style.overflow = \"hidden\";\n isLocked.value = true;\n };\n const unlock = () => {\n const el = resolveElement(toValue(element));\n if (!el || !isLocked.value)\n return;\n if (isIOS)\n stopTouchMoveListener == null ? void 0 : stopTouchMoveListener();\n el.style.overflow = initialOverflow;\n elInitialOverflow.delete(el);\n isLocked.value = false;\n };\n tryOnScopeDispose(unlock);\n return computed({\n get() {\n return isLocked.value;\n },\n set(v) {\n if (v)\n lock();\n else unlock();\n }\n });\n}\n\nfunction useSessionStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.sessionStorage, options);\n}\n\nfunction useShare(shareOptions = {}, options = {}) {\n const { navigator = defaultNavigator } = options;\n const _navigator = navigator;\n const isSupported = useSupported(() => _navigator && \"canShare\" in _navigator);\n const share = async (overrideOptions = {}) => {\n if (isSupported.value) {\n const data = {\n ...toValue(shareOptions),\n ...toValue(overrideOptions)\n };\n let granted = true;\n if (data.files && _navigator.canShare)\n granted = _navigator.canShare({ files: data.files });\n if (granted)\n return _navigator.share(data);\n }\n };\n return {\n isSupported,\n share\n };\n}\n\nconst defaultSortFn = (source, compareFn) => source.sort(compareFn);\nconst defaultCompare = (a, b) => a - b;\nfunction useSorted(...args) {\n var _a, _b, _c, _d;\n const [source] = args;\n let compareFn = defaultCompare;\n let options = {};\n if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n options = args[1];\n compareFn = (_a = options.compareFn) != null ? _a : defaultCompare;\n } else {\n compareFn = (_b = args[1]) != null ? _b : defaultCompare;\n }\n } else if (args.length > 2) {\n compareFn = (_c = args[1]) != null ? _c : defaultCompare;\n options = (_d = args[2]) != null ? _d : {};\n }\n const {\n dirty = false,\n sortFn = defaultSortFn\n } = options;\n if (!dirty)\n return computed(() => sortFn([...toValue(source)], compareFn));\n watchEffect(() => {\n const result = sortFn(toValue(source), compareFn);\n if (isRef(source))\n source.value = result;\n else\n source.splice(0, source.length, ...result);\n });\n return source;\n}\n\nfunction useSpeechRecognition(options = {}) {\n const {\n interimResults = true,\n continuous = true,\n maxAlternatives = 1,\n window = defaultWindow\n } = options;\n const lang = toRef(options.lang || \"en-US\");\n const isListening = ref(false);\n const isFinal = ref(false);\n const result = ref(\"\");\n const error = shallowRef(void 0);\n const toggle = (value = !isListening.value) => {\n isListening.value = value;\n };\n const start = () => {\n isListening.value = true;\n };\n const stop = () => {\n isListening.value = false;\n };\n const SpeechRecognition = window && (window.SpeechRecognition || window.webkitSpeechRecognition);\n const isSupported = useSupported(() => SpeechRecognition);\n let recognition;\n if (isSupported.value) {\n recognition = new SpeechRecognition();\n recognition.continuous = continuous;\n recognition.interimResults = interimResults;\n recognition.lang = toValue(lang);\n recognition.maxAlternatives = maxAlternatives;\n recognition.onstart = () => {\n isFinal.value = false;\n };\n watch(lang, (lang2) => {\n if (recognition && !isListening.value)\n recognition.lang = lang2;\n });\n recognition.onresult = (event) => {\n const currentResult = event.results[event.resultIndex];\n const { transcript } = currentResult[0];\n isFinal.value = currentResult.isFinal;\n result.value = transcript;\n error.value = void 0;\n };\n recognition.onerror = (event) => {\n error.value = event;\n };\n recognition.onend = () => {\n isListening.value = false;\n recognition.lang = toValue(lang);\n };\n watch(isListening, () => {\n if (isListening.value)\n recognition.start();\n else\n recognition.stop();\n });\n }\n tryOnScopeDispose(() => {\n isListening.value = false;\n });\n return {\n isSupported,\n isListening,\n isFinal,\n recognition,\n result,\n error,\n toggle,\n start,\n stop\n };\n}\n\nfunction useSpeechSynthesis(text, options = {}) {\n const {\n pitch = 1,\n rate = 1,\n volume = 1,\n window = defaultWindow\n } = options;\n const synth = window && window.speechSynthesis;\n const isSupported = useSupported(() => synth);\n const isPlaying = ref(false);\n const status = ref(\"init\");\n const spokenText = toRef(text || \"\");\n const lang = toRef(options.lang || \"en-US\");\n const error = shallowRef(void 0);\n const toggle = (value = !isPlaying.value) => {\n isPlaying.value = value;\n };\n const bindEventsForUtterance = (utterance2) => {\n utterance2.lang = toValue(lang);\n utterance2.voice = toValue(options.voice) || null;\n utterance2.pitch = toValue(pitch);\n utterance2.rate = toValue(rate);\n utterance2.volume = volume;\n utterance2.onstart = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onpause = () => {\n isPlaying.value = false;\n status.value = \"pause\";\n };\n utterance2.onresume = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onend = () => {\n isPlaying.value = false;\n status.value = \"end\";\n };\n utterance2.onerror = (event) => {\n error.value = event;\n };\n };\n const utterance = computed(() => {\n isPlaying.value = false;\n status.value = \"init\";\n const newUtterance = new SpeechSynthesisUtterance(spokenText.value);\n bindEventsForUtterance(newUtterance);\n return newUtterance;\n });\n const speak = () => {\n synth.cancel();\n if (utterance)\n synth.speak(utterance.value);\n };\n const stop = () => {\n synth.cancel();\n isPlaying.value = false;\n };\n if (isSupported.value) {\n bindEventsForUtterance(utterance.value);\n watch(lang, (lang2) => {\n if (utterance.value && !isPlaying.value)\n utterance.value.lang = lang2;\n });\n if (options.voice) {\n watch(options.voice, () => {\n synth.cancel();\n });\n }\n watch(isPlaying, () => {\n if (isPlaying.value)\n synth.resume();\n else\n synth.pause();\n });\n }\n tryOnScopeDispose(() => {\n isPlaying.value = false;\n });\n return {\n isSupported,\n isPlaying,\n status,\n utterance,\n error,\n stop,\n toggle,\n speak\n };\n}\n\nfunction useStepper(steps, initialStep) {\n const stepsRef = ref(steps);\n const stepNames = computed(() => Array.isArray(stepsRef.value) ? stepsRef.value : Object.keys(stepsRef.value));\n const index = ref(stepNames.value.indexOf(initialStep != null ? initialStep : stepNames.value[0]));\n const current = computed(() => at(index.value));\n const isFirst = computed(() => index.value === 0);\n const isLast = computed(() => index.value === stepNames.value.length - 1);\n const next = computed(() => stepNames.value[index.value + 1]);\n const previous = computed(() => stepNames.value[index.value - 1]);\n function at(index2) {\n if (Array.isArray(stepsRef.value))\n return stepsRef.value[index2];\n return stepsRef.value[stepNames.value[index2]];\n }\n function get(step) {\n if (!stepNames.value.includes(step))\n return;\n return at(stepNames.value.indexOf(step));\n }\n function goTo(step) {\n if (stepNames.value.includes(step))\n index.value = stepNames.value.indexOf(step);\n }\n function goToNext() {\n if (isLast.value)\n return;\n index.value++;\n }\n function goToPrevious() {\n if (isFirst.value)\n return;\n index.value--;\n }\n function goBackTo(step) {\n if (isAfter(step))\n goTo(step);\n }\n function isNext(step) {\n return stepNames.value.indexOf(step) === index.value + 1;\n }\n function isPrevious(step) {\n return stepNames.value.indexOf(step) === index.value - 1;\n }\n function isCurrent(step) {\n return stepNames.value.indexOf(step) === index.value;\n }\n function isBefore(step) {\n return index.value < stepNames.value.indexOf(step);\n }\n function isAfter(step) {\n return index.value > stepNames.value.indexOf(step);\n }\n return {\n steps: stepsRef,\n stepNames,\n index,\n current,\n next,\n previous,\n isFirst,\n isLast,\n at,\n get,\n goTo,\n goToNext,\n goToPrevious,\n goBackTo,\n isNext,\n isPrevious,\n isCurrent,\n isBefore,\n isAfter\n };\n}\n\nfunction useStorageAsync(key, initialValue, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const rawInit = toValue(initialValue);\n const type = guessSerializerType(rawInit);\n const data = (shallow ? shallowRef : ref)(initialValue);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorageAsync\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n async function read(event) {\n if (!storage || event && event.key !== key)\n return;\n try {\n const rawValue = event ? event.newValue : await storage.getItem(key);\n if (rawValue == null) {\n data.value = rawInit;\n if (writeDefaults && rawInit !== null)\n await storage.setItem(key, await serializer.write(rawInit));\n } else if (mergeDefaults) {\n const value = await serializer.read(rawValue);\n if (typeof mergeDefaults === \"function\")\n data.value = mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n data.value = { ...rawInit, ...value };\n else data.value = value;\n } else {\n data.value = await serializer.read(rawValue);\n }\n } catch (e) {\n onError(e);\n }\n }\n read();\n if (window && listenToStorageChanges)\n useEventListener(window, \"storage\", (e) => Promise.resolve().then(() => read(e)));\n if (storage) {\n watchWithFilter(\n data,\n async () => {\n try {\n if (data.value == null)\n await storage.removeItem(key);\n else\n await storage.setItem(key, await serializer.write(data.value));\n } catch (e) {\n onError(e);\n }\n },\n {\n flush,\n deep,\n eventFilter\n }\n );\n }\n return data;\n}\n\nlet _id = 0;\nfunction useStyleTag(css, options = {}) {\n const isLoaded = ref(false);\n const {\n document = defaultDocument,\n immediate = true,\n manual = false,\n id = `vueuse_styletag_${++_id}`\n } = options;\n const cssRef = ref(css);\n let stop = () => {\n };\n const load = () => {\n if (!document)\n return;\n const el = document.getElementById(id) || document.createElement(\"style\");\n if (!el.isConnected) {\n el.id = id;\n if (options.media)\n el.media = options.media;\n document.head.appendChild(el);\n }\n if (isLoaded.value)\n return;\n stop = watch(\n cssRef,\n (value) => {\n el.textContent = value;\n },\n { immediate: true }\n );\n isLoaded.value = true;\n };\n const unload = () => {\n if (!document || !isLoaded.value)\n return;\n stop();\n document.head.removeChild(document.getElementById(id));\n isLoaded.value = false;\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnScopeDispose(unload);\n return {\n id,\n css: cssRef,\n unload,\n load,\n isLoaded: readonly(isLoaded)\n };\n}\n\nfunction useSwipe(target, options = {}) {\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart,\n passive = true,\n window = defaultWindow\n } = options;\n const coordsStart = reactive({ x: 0, y: 0 });\n const coordsEnd = reactive({ x: 0, y: 0 });\n const diffX = computed(() => coordsStart.x - coordsEnd.x);\n const diffY = computed(() => coordsStart.y - coordsEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(diffX.value), abs(diffY.value)) >= threshold);\n const isSwiping = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return \"none\";\n if (abs(diffX.value) > abs(diffY.value)) {\n return diffX.value > 0 ? \"left\" : \"right\";\n } else {\n return diffY.value > 0 ? \"up\" : \"down\";\n }\n });\n const getTouchEventCoords = (e) => [e.touches[0].clientX, e.touches[0].clientY];\n const updateCoordsStart = (x, y) => {\n coordsStart.x = x;\n coordsStart.y = y;\n };\n const updateCoordsEnd = (x, y) => {\n coordsEnd.x = x;\n coordsEnd.y = y;\n };\n let listenerOptions;\n const isPassiveEventSupported = checkPassiveEventSupport(window == null ? void 0 : window.document);\n if (!passive)\n listenerOptions = isPassiveEventSupported ? { passive: false, capture: true } : { capture: true };\n else\n listenerOptions = isPassiveEventSupported ? { passive: true } : { capture: false };\n const onTouchEnd = (e) => {\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isSwiping.value = false;\n };\n const stops = [\n useEventListener(target, \"touchstart\", (e) => {\n if (e.touches.length !== 1)\n return;\n if (listenerOptions.capture && !listenerOptions.passive)\n e.preventDefault();\n const [x, y] = getTouchEventCoords(e);\n updateCoordsStart(x, y);\n updateCoordsEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }, listenerOptions),\n useEventListener(target, \"touchmove\", (e) => {\n if (e.touches.length !== 1)\n return;\n const [x, y] = getTouchEventCoords(e);\n updateCoordsEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }, listenerOptions),\n useEventListener(target, [\"touchend\", \"touchcancel\"], onTouchEnd, listenerOptions)\n ];\n const stop = () => stops.forEach((s) => s());\n return {\n isPassiveEventSupported,\n isSwiping,\n direction,\n coordsStart,\n coordsEnd,\n lengthX: diffX,\n lengthY: diffY,\n stop\n };\n}\nfunction checkPassiveEventSupport(document) {\n if (!document)\n return false;\n let supportsPassive = false;\n const optionsBlock = {\n get passive() {\n supportsPassive = true;\n return false;\n }\n };\n document.addEventListener(\"x\", noop, optionsBlock);\n document.removeEventListener(\"x\", noop);\n return supportsPassive;\n}\n\nfunction useTemplateRefsList() {\n const refs = ref([]);\n refs.value.set = (el) => {\n if (el)\n refs.value.push(el);\n };\n onBeforeUpdate(() => {\n refs.value.length = 0;\n });\n return refs;\n}\n\nfunction useTextDirection(options = {}) {\n const {\n document = defaultDocument,\n selector = \"html\",\n observe = false,\n initialValue = \"ltr\"\n } = options;\n function getValue() {\n var _a, _b;\n return (_b = (_a = document == null ? void 0 : document.querySelector(selector)) == null ? void 0 : _a.getAttribute(\"dir\")) != null ? _b : initialValue;\n }\n const dir = ref(getValue());\n tryOnMounted(() => dir.value = getValue());\n if (observe && document) {\n useMutationObserver(\n document.querySelector(selector),\n () => dir.value = getValue(),\n { attributes: true }\n );\n }\n return computed({\n get() {\n return dir.value;\n },\n set(v) {\n var _a, _b;\n dir.value = v;\n if (!document)\n return;\n if (dir.value)\n (_a = document.querySelector(selector)) == null ? void 0 : _a.setAttribute(\"dir\", dir.value);\n else\n (_b = document.querySelector(selector)) == null ? void 0 : _b.removeAttribute(\"dir\");\n }\n });\n}\n\nfunction getRangesFromSelection(selection) {\n var _a;\n const rangeCount = (_a = selection.rangeCount) != null ? _a : 0;\n return Array.from({ length: rangeCount }, (_, i) => selection.getRangeAt(i));\n}\nfunction useTextSelection(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const selection = ref(null);\n const text = computed(() => {\n var _a, _b;\n return (_b = (_a = selection.value) == null ? void 0 : _a.toString()) != null ? _b : \"\";\n });\n const ranges = computed(() => selection.value ? getRangesFromSelection(selection.value) : []);\n const rects = computed(() => ranges.value.map((range) => range.getBoundingClientRect()));\n function onSelectionChange() {\n selection.value = null;\n if (window)\n selection.value = window.getSelection();\n }\n if (window)\n useEventListener(window.document, \"selectionchange\", onSelectionChange);\n return {\n text,\n rects,\n ranges,\n selection\n };\n}\n\nfunction useTextareaAutosize(options) {\n var _a;\n const textarea = ref(options == null ? void 0 : options.element);\n const input = ref(options == null ? void 0 : options.input);\n const styleProp = (_a = options == null ? void 0 : options.styleProp) != null ? _a : \"height\";\n const textareaScrollHeight = ref(1);\n const textareaOldWidth = ref(0);\n function triggerResize() {\n var _a2;\n if (!textarea.value)\n return;\n let height = \"\";\n textarea.value.style[styleProp] = \"1px\";\n textareaScrollHeight.value = (_a2 = textarea.value) == null ? void 0 : _a2.scrollHeight;\n const _styleTarget = toValue(options == null ? void 0 : options.styleTarget);\n if (_styleTarget)\n _styleTarget.style[styleProp] = `${textareaScrollHeight.value}px`;\n else\n height = `${textareaScrollHeight.value}px`;\n textarea.value.style[styleProp] = height;\n }\n watch([input, textarea], () => nextTick(triggerResize), { immediate: true });\n watch(textareaScrollHeight, () => {\n var _a2;\n return (_a2 = options == null ? void 0 : options.onResize) == null ? void 0 : _a2.call(options);\n });\n useResizeObserver(textarea, ([{ contentRect }]) => {\n if (textareaOldWidth.value === contentRect.width)\n return;\n textareaOldWidth.value = contentRect.width;\n triggerResize();\n });\n if (options == null ? void 0 : options.watch)\n watch(options.watch, triggerResize, { immediate: true, deep: true });\n return {\n textarea,\n input,\n triggerResize\n };\n}\n\nfunction useThrottledRefHistory(source, options = {}) {\n const { throttle = 200, trailing = true } = options;\n const filter = throttleFilter(throttle, trailing);\n const history = useRefHistory(source, { ...options, eventFilter: filter });\n return {\n ...history\n };\n}\n\nconst DEFAULT_UNITS = [\n { max: 6e4, value: 1e3, name: \"second\" },\n { max: 276e4, value: 6e4, name: \"minute\" },\n { max: 72e6, value: 36e5, name: \"hour\" },\n { max: 5184e5, value: 864e5, name: \"day\" },\n { max: 24192e5, value: 6048e5, name: \"week\" },\n { max: 28512e6, value: 2592e6, name: \"month\" },\n { max: Number.POSITIVE_INFINITY, value: 31536e6, name: \"year\" }\n];\nconst DEFAULT_MESSAGES = {\n justNow: \"just now\",\n past: (n) => n.match(/\\d/) ? `${n} ago` : n,\n future: (n) => n.match(/\\d/) ? `in ${n}` : n,\n month: (n, past) => n === 1 ? past ? \"last month\" : \"next month\" : `${n} month${n > 1 ? \"s\" : \"\"}`,\n year: (n, past) => n === 1 ? past ? \"last year\" : \"next year\" : `${n} year${n > 1 ? \"s\" : \"\"}`,\n day: (n, past) => n === 1 ? past ? \"yesterday\" : \"tomorrow\" : `${n} day${n > 1 ? \"s\" : \"\"}`,\n week: (n, past) => n === 1 ? past ? \"last week\" : \"next week\" : `${n} week${n > 1 ? \"s\" : \"\"}`,\n hour: (n) => `${n} hour${n > 1 ? \"s\" : \"\"}`,\n minute: (n) => `${n} minute${n > 1 ? \"s\" : \"\"}`,\n second: (n) => `${n} second${n > 1 ? \"s\" : \"\"}`,\n invalid: \"\"\n};\nfunction DEFAULT_FORMATTER(date) {\n return date.toISOString().slice(0, 10);\n}\nfunction useTimeAgo(time, options = {}) {\n const {\n controls: exposeControls = false,\n updateInterval = 3e4\n } = options;\n const { now, ...controls } = useNow({ interval: updateInterval, controls: true });\n const timeAgo = computed(() => formatTimeAgo(new Date(toValue(time)), options, toValue(now)));\n if (exposeControls) {\n return {\n timeAgo,\n ...controls\n };\n } else {\n return timeAgo;\n }\n}\nfunction formatTimeAgo(from, options = {}, now = Date.now()) {\n var _a;\n const {\n max,\n messages = DEFAULT_MESSAGES,\n fullDateFormatter = DEFAULT_FORMATTER,\n units = DEFAULT_UNITS,\n showSecond = false,\n rounding = \"round\"\n } = options;\n const roundFn = typeof rounding === \"number\" ? (n) => +n.toFixed(rounding) : Math[rounding];\n const diff = +now - +from;\n const absDiff = Math.abs(diff);\n function getValue(diff2, unit) {\n return roundFn(Math.abs(diff2) / unit.value);\n }\n function format(diff2, unit) {\n const val = getValue(diff2, unit);\n const past = diff2 > 0;\n const str = applyFormat(unit.name, val, past);\n return applyFormat(past ? \"past\" : \"future\", str, past);\n }\n function applyFormat(name, val, isPast) {\n const formatter = messages[name];\n if (typeof formatter === \"function\")\n return formatter(val, isPast);\n return formatter.replace(\"{0}\", val.toString());\n }\n if (absDiff < 6e4 && !showSecond)\n return messages.justNow;\n if (typeof max === \"number\" && absDiff > max)\n return fullDateFormatter(new Date(from));\n if (typeof max === \"string\") {\n const unitMax = (_a = units.find((i) => i.name === max)) == null ? void 0 : _a.max;\n if (unitMax && absDiff > unitMax)\n return fullDateFormatter(new Date(from));\n }\n for (const [idx, unit] of units.entries()) {\n const val = getValue(diff, unit);\n if (val <= 0 && units[idx - 1])\n return format(diff, units[idx - 1]);\n if (absDiff < unit.max)\n return format(diff, unit);\n }\n return messages.invalid;\n}\n\nfunction useTimeoutPoll(fn, interval, timeoutPollOptions) {\n const { start } = useTimeoutFn(loop, interval, { immediate: false });\n const isActive = ref(false);\n async function loop() {\n if (!isActive.value)\n return;\n await fn();\n start();\n }\n function resume() {\n if (!isActive.value) {\n isActive.value = true;\n loop();\n }\n }\n function pause() {\n isActive.value = false;\n }\n if (timeoutPollOptions == null ? void 0 : timeoutPollOptions.immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nfunction useTimestamp(options = {}) {\n const {\n controls: exposeControls = false,\n offset = 0,\n immediate = true,\n interval = \"requestAnimationFrame\",\n callback\n } = options;\n const ts = ref(timestamp() + offset);\n const update = () => ts.value = timestamp() + offset;\n const cb = callback ? () => {\n update();\n callback(ts.value);\n } : update;\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n if (exposeControls) {\n return {\n timestamp: ts,\n ...controls\n };\n } else {\n return ts;\n }\n}\n\nfunction useTitle(newTitle = null, options = {}) {\n var _a, _b, _c;\n const {\n document = defaultDocument,\n restoreOnUnmount = (t) => t\n } = options;\n const originalTitle = (_a = document == null ? void 0 : document.title) != null ? _a : \"\";\n const title = toRef((_b = newTitle != null ? newTitle : document == null ? void 0 : document.title) != null ? _b : null);\n const isReadonly = newTitle && typeof newTitle === \"function\";\n function format(t) {\n if (!(\"titleTemplate\" in options))\n return t;\n const template = options.titleTemplate || \"%s\";\n return typeof template === \"function\" ? template(t) : toValue(template).replace(/%s/g, t);\n }\n watch(\n title,\n (t, o) => {\n if (t !== o && document)\n document.title = format(typeof t === \"string\" ? t : \"\");\n },\n { immediate: true }\n );\n if (options.observe && !options.titleTemplate && document && !isReadonly) {\n useMutationObserver(\n (_c = document.head) == null ? void 0 : _c.querySelector(\"title\"),\n () => {\n if (document && document.title !== title.value)\n title.value = format(document.title);\n },\n { childList: true }\n );\n }\n tryOnBeforeUnmount(() => {\n if (restoreOnUnmount) {\n const restoredTitle = restoreOnUnmount(originalTitle, title.value || \"\");\n if (restoredTitle != null && document)\n document.title = restoredTitle;\n }\n });\n return title;\n}\n\nconst _TransitionPresets = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nconst TransitionPresets = /* @__PURE__ */ Object.assign({}, { linear: identity }, _TransitionPresets);\nfunction createEasingFunction([p0, p1, p2, p3]) {\n const a = (a1, a2) => 1 - 3 * a2 + 3 * a1;\n const b = (a1, a2) => 3 * a2 - 6 * a1;\n const c = (a1) => 3 * a1;\n const calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;\n const getSlope = (t, a1, a2) => 3 * a(a1, a2) * t * t + 2 * b(a1, a2) * t + c(a1);\n const getTforX = (x) => {\n let aGuessT = x;\n for (let i = 0; i < 4; ++i) {\n const currentSlope = getSlope(aGuessT, p0, p2);\n if (currentSlope === 0)\n return aGuessT;\n const currentX = calcBezier(aGuessT, p0, p2) - x;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n };\n return (x) => p0 === p1 && p2 === p3 ? x : calcBezier(getTforX(x), p1, p3);\n}\nfunction lerp(a, b, alpha) {\n return a + alpha * (b - a);\n}\nfunction toVec(t) {\n return (typeof t === \"number\" ? [t] : t) || [];\n}\nfunction executeTransition(source, from, to, options = {}) {\n var _a, _b;\n const fromVal = toValue(from);\n const toVal = toValue(to);\n const v1 = toVec(fromVal);\n const v2 = toVec(toVal);\n const duration = (_a = toValue(options.duration)) != null ? _a : 1e3;\n const startedAt = Date.now();\n const endAt = Date.now() + duration;\n const trans = typeof options.transition === \"function\" ? options.transition : (_b = toValue(options.transition)) != null ? _b : identity;\n const ease = typeof trans === \"function\" ? trans : createEasingFunction(trans);\n return new Promise((resolve) => {\n source.value = fromVal;\n const tick = () => {\n var _a2;\n if ((_a2 = options.abort) == null ? void 0 : _a2.call(options)) {\n resolve();\n return;\n }\n const now = Date.now();\n const alpha = ease((now - startedAt) / duration);\n const arr = toVec(source.value).map((n, i) => lerp(v1[i], v2[i], alpha));\n if (Array.isArray(source.value))\n source.value = arr.map((n, i) => {\n var _a3, _b2;\n return lerp((_a3 = v1[i]) != null ? _a3 : 0, (_b2 = v2[i]) != null ? _b2 : 0, alpha);\n });\n else if (typeof source.value === \"number\")\n source.value = arr[0];\n if (now < endAt) {\n requestAnimationFrame(tick);\n } else {\n source.value = toVal;\n resolve();\n }\n };\n tick();\n });\n}\nfunction useTransition(source, options = {}) {\n let currentId = 0;\n const sourceVal = () => {\n const v = toValue(source);\n return typeof v === \"number\" ? v : v.map(toValue);\n };\n const outputRef = ref(sourceVal());\n watch(sourceVal, async (to) => {\n var _a, _b;\n if (toValue(options.disabled))\n return;\n const id = ++currentId;\n if (options.delay)\n await promiseTimeout(toValue(options.delay));\n if (id !== currentId)\n return;\n const toVal = Array.isArray(to) ? to.map(toValue) : toValue(to);\n (_a = options.onStarted) == null ? void 0 : _a.call(options);\n await executeTransition(outputRef, outputRef.value, toVal, {\n ...options,\n abort: () => {\n var _a2;\n return id !== currentId || ((_a2 = options.abort) == null ? void 0 : _a2.call(options));\n }\n });\n (_b = options.onFinished) == null ? void 0 : _b.call(options);\n }, { deep: true });\n watch(() => toValue(options.disabled), (disabled) => {\n if (disabled) {\n currentId++;\n outputRef.value = sourceVal();\n }\n });\n tryOnScopeDispose(() => {\n currentId++;\n });\n return computed(() => toValue(options.disabled) ? sourceVal() : outputRef.value);\n}\n\nfunction useUrlSearchParams(mode = \"history\", options = {}) {\n const {\n initialValue = {},\n removeNullishValues = true,\n removeFalsyValues = false,\n write: enableWrite = true,\n window = defaultWindow\n } = options;\n if (!window)\n return reactive(initialValue);\n const state = reactive({});\n function getRawParams() {\n if (mode === \"history\") {\n return window.location.search || \"\";\n } else if (mode === \"hash\") {\n const hash = window.location.hash || \"\";\n const index = hash.indexOf(\"?\");\n return index > 0 ? hash.slice(index) : \"\";\n } else {\n return (window.location.hash || \"\").replace(/^#/, \"\");\n }\n }\n function constructQuery(params) {\n const stringified = params.toString();\n if (mode === \"history\")\n return `${stringified ? `?${stringified}` : \"\"}${window.location.hash || \"\"}`;\n if (mode === \"hash-params\")\n return `${window.location.search || \"\"}${stringified ? `#${stringified}` : \"\"}`;\n const hash = window.location.hash || \"#\";\n const index = hash.indexOf(\"?\");\n if (index > 0)\n return `${hash.slice(0, index)}${stringified ? `?${stringified}` : \"\"}`;\n return `${hash}${stringified ? `?${stringified}` : \"\"}`;\n }\n function read() {\n return new URLSearchParams(getRawParams());\n }\n function updateState(params) {\n const unusedKeys = new Set(Object.keys(state));\n for (const key of params.keys()) {\n const paramsForKey = params.getAll(key);\n state[key] = paramsForKey.length > 1 ? paramsForKey : params.get(key) || \"\";\n unusedKeys.delete(key);\n }\n Array.from(unusedKeys).forEach((key) => delete state[key]);\n }\n const { pause, resume } = pausableWatch(\n state,\n () => {\n const params = new URLSearchParams(\"\");\n Object.keys(state).forEach((key) => {\n const mapEntry = state[key];\n if (Array.isArray(mapEntry))\n mapEntry.forEach((value) => params.append(key, value));\n else if (removeNullishValues && mapEntry == null)\n params.delete(key);\n else if (removeFalsyValues && !mapEntry)\n params.delete(key);\n else\n params.set(key, mapEntry);\n });\n write(params);\n },\n { deep: true }\n );\n function write(params, shouldUpdate) {\n pause();\n if (shouldUpdate)\n updateState(params);\n window.history.replaceState(\n window.history.state,\n window.document.title,\n window.location.pathname + constructQuery(params)\n );\n resume();\n }\n function onChanged() {\n if (!enableWrite)\n return;\n write(read(), true);\n }\n useEventListener(window, \"popstate\", onChanged, false);\n if (mode !== \"history\")\n useEventListener(window, \"hashchange\", onChanged, false);\n const initial = read();\n if (initial.keys().next().value)\n updateState(initial);\n else\n Object.assign(state, initialValue);\n return state;\n}\n\nfunction useUserMedia(options = {}) {\n var _a, _b;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const autoSwitch = ref((_b = options.autoSwitch) != null ? _b : true);\n const constraints = ref(options.constraints);\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getUserMedia;\n });\n const stream = shallowRef();\n function getDeviceOptions(type) {\n switch (type) {\n case \"video\": {\n if (constraints.value)\n return constraints.value.video || false;\n break;\n }\n case \"audio\": {\n if (constraints.value)\n return constraints.value.audio || false;\n break;\n }\n }\n }\n async function _start() {\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getUserMedia({\n video: getDeviceOptions(\"video\"),\n audio: getDeviceOptions(\"audio\")\n });\n return stream.value;\n }\n function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n async function restart() {\n _stop();\n return await start();\n }\n watch(\n enabled,\n (v) => {\n if (v)\n _start();\n else _stop();\n },\n { immediate: true }\n );\n watch(\n constraints,\n () => {\n if (autoSwitch.value && stream.value)\n restart();\n },\n { immediate: true }\n );\n tryOnScopeDispose(() => {\n stop();\n });\n return {\n isSupported,\n stream,\n start,\n stop,\n restart,\n constraints,\n enabled,\n autoSwitch\n };\n}\n\nfunction useVModel(props, key, emit, options = {}) {\n var _a, _b, _c, _d, _e;\n const {\n clone = false,\n passive = false,\n eventName,\n deep = false,\n defaultValue,\n shouldEmit\n } = options;\n const vm = getCurrentInstance();\n const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));\n let event = eventName;\n if (!key) {\n if (isVue2) {\n const modelOptions = (_e = (_d = vm == null ? void 0 : vm.proxy) == null ? void 0 : _d.$options) == null ? void 0 : _e.model;\n key = (modelOptions == null ? void 0 : modelOptions.value) || \"value\";\n if (!eventName)\n event = (modelOptions == null ? void 0 : modelOptions.event) || \"input\";\n } else {\n key = \"modelValue\";\n }\n }\n event = event || `update:${key.toString()}`;\n const cloneFn = (val) => !clone ? val : typeof clone === \"function\" ? clone(val) : cloneFnJSON(val);\n const getValue = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;\n const triggerEmit = (value) => {\n if (shouldEmit) {\n if (shouldEmit(value))\n _emit(event, value);\n } else {\n _emit(event, value);\n }\n };\n if (passive) {\n const initialValue = getValue();\n const proxy = ref(initialValue);\n let isUpdating = false;\n watch(\n () => props[key],\n (v) => {\n if (!isUpdating) {\n isUpdating = true;\n proxy.value = cloneFn(v);\n nextTick(() => isUpdating = false);\n }\n }\n );\n watch(\n proxy,\n (v) => {\n if (!isUpdating && (v !== props[key] || deep))\n triggerEmit(v);\n },\n { deep }\n );\n return proxy;\n } else {\n return computed({\n get() {\n return getValue();\n },\n set(value) {\n triggerEmit(value);\n }\n });\n }\n}\n\nfunction useVModels(props, emit, options = {}) {\n const ret = {};\n for (const key in props) {\n ret[key] = useVModel(\n props,\n key,\n emit,\n options\n );\n }\n return ret;\n}\n\nfunction useVibrate(options) {\n const {\n pattern = [],\n interval = 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => typeof navigator !== \"undefined\" && \"vibrate\" in navigator);\n const patternRef = toRef(pattern);\n let intervalControls;\n const vibrate = (pattern2 = patternRef.value) => {\n if (isSupported.value)\n navigator.vibrate(pattern2);\n };\n const stop = () => {\n if (isSupported.value)\n navigator.vibrate(0);\n intervalControls == null ? void 0 : intervalControls.pause();\n };\n if (interval > 0) {\n intervalControls = useIntervalFn(\n vibrate,\n interval,\n {\n immediate: false,\n immediateCallback: false\n }\n );\n }\n return {\n isSupported,\n pattern,\n intervalControls,\n vibrate,\n stop\n };\n}\n\nfunction useVirtualList(list, options) {\n const { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef } = \"itemHeight\" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list);\n return {\n list: currentList,\n scrollTo,\n containerProps: {\n ref: containerRef,\n onScroll: () => {\n calculateRange();\n },\n style: containerStyle\n },\n wrapperProps\n };\n}\nfunction useVirtualListResources(list) {\n const containerRef = ref(null);\n const size = useElementSize(containerRef);\n const currentList = ref([]);\n const source = shallowRef(list);\n const state = ref({ start: 0, end: 10 });\n return { state, source, currentList, size, containerRef };\n}\nfunction createGetViewCapacity(state, source, itemSize) {\n return (containerSize) => {\n if (typeof itemSize === \"number\")\n return Math.ceil(containerSize / itemSize);\n const { start = 0 } = state.value;\n let sum = 0;\n let capacity = 0;\n for (let i = start; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n capacity = i;\n if (sum > containerSize)\n break;\n }\n return capacity - start;\n };\n}\nfunction createGetOffset(source, itemSize) {\n return (scrollDirection) => {\n if (typeof itemSize === \"number\")\n return Math.floor(scrollDirection / itemSize) + 1;\n let sum = 0;\n let offset = 0;\n for (let i = 0; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n if (sum >= scrollDirection) {\n offset = i;\n break;\n }\n }\n return offset + 1;\n };\n}\nfunction createCalculateRange(type, overscan, getOffset, getViewCapacity, { containerRef, state, currentList, source }) {\n return () => {\n const element = containerRef.value;\n if (element) {\n const offset = getOffset(type === \"vertical\" ? element.scrollTop : element.scrollLeft);\n const viewCapacity = getViewCapacity(type === \"vertical\" ? element.clientHeight : element.clientWidth);\n const from = offset - overscan;\n const to = offset + viewCapacity + overscan;\n state.value = {\n start: from < 0 ? 0 : from,\n end: to > source.value.length ? source.value.length : to\n };\n currentList.value = source.value.slice(state.value.start, state.value.end).map((ele, index) => ({\n data: ele,\n index: index + state.value.start\n }));\n }\n };\n}\nfunction createGetDistance(itemSize, source) {\n return (index) => {\n if (typeof itemSize === \"number\") {\n const size2 = index * itemSize;\n return size2;\n }\n const size = source.value.slice(0, index).reduce((sum, _, i) => sum + itemSize(i), 0);\n return size;\n };\n}\nfunction useWatchForSizes(size, list, containerRef, calculateRange) {\n watch([size.width, size.height, list, containerRef], () => {\n calculateRange();\n });\n}\nfunction createComputedTotalSize(itemSize, source) {\n return computed(() => {\n if (typeof itemSize === \"number\")\n return source.value.length * itemSize;\n return source.value.reduce((sum, _, index) => sum + itemSize(index), 0);\n });\n}\nconst scrollToDictionaryForElementScrollKey = {\n horizontal: \"scrollLeft\",\n vertical: \"scrollTop\"\n};\nfunction createScrollTo(type, calculateRange, getDistance, containerRef) {\n return (index) => {\n if (containerRef.value) {\n containerRef.value[scrollToDictionaryForElementScrollKey[type]] = getDistance(index);\n calculateRange();\n }\n };\n}\nfunction useHorizontalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowX: \"auto\" };\n const { itemWidth, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemWidth);\n const getOffset = createGetOffset(source, itemWidth);\n const calculateRange = createCalculateRange(\"horizontal\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceLeft = createGetDistance(itemWidth, source);\n const offsetLeft = computed(() => getDistanceLeft(state.value.start));\n const totalWidth = createComputedTotalSize(itemWidth, source);\n useWatchForSizes(size, list, containerRef, calculateRange);\n const scrollTo = createScrollTo(\"horizontal\", calculateRange, getDistanceLeft, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n height: \"100%\",\n width: `${totalWidth.value - offsetLeft.value}px`,\n marginLeft: `${offsetLeft.value}px`,\n display: \"flex\"\n }\n };\n });\n return {\n scrollTo,\n calculateRange,\n wrapperProps,\n containerStyle,\n currentList,\n containerRef\n };\n}\nfunction useVerticalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowY: \"auto\" };\n const { itemHeight, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemHeight);\n const getOffset = createGetOffset(source, itemHeight);\n const calculateRange = createCalculateRange(\"vertical\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceTop = createGetDistance(itemHeight, source);\n const offsetTop = computed(() => getDistanceTop(state.value.start));\n const totalHeight = createComputedTotalSize(itemHeight, source);\n useWatchForSizes(size, list, containerRef, calculateRange);\n const scrollTo = createScrollTo(\"vertical\", calculateRange, getDistanceTop, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n width: \"100%\",\n height: `${totalHeight.value - offsetTop.value}px`,\n marginTop: `${offsetTop.value}px`\n }\n };\n });\n return {\n calculateRange,\n scrollTo,\n containerStyle,\n wrapperProps,\n currentList,\n containerRef\n };\n}\n\nfunction useWakeLock(options = {}) {\n const {\n navigator = defaultNavigator,\n document = defaultDocument\n } = options;\n const requestedType = ref(false);\n const sentinel = shallowRef(null);\n const documentVisibility = useDocumentVisibility({ document });\n const isSupported = useSupported(() => navigator && \"wakeLock\" in navigator);\n const isActive = computed(() => !!sentinel.value && documentVisibility.value === \"visible\");\n if (isSupported.value) {\n useEventListener(sentinel, \"release\", () => {\n var _a, _b;\n requestedType.value = (_b = (_a = sentinel.value) == null ? void 0 : _a.type) != null ? _b : false;\n });\n whenever(\n () => documentVisibility.value === \"visible\" && (document == null ? void 0 : document.visibilityState) === \"visible\" && requestedType.value,\n (type) => {\n requestedType.value = false;\n forceRequest(type);\n }\n );\n }\n async function forceRequest(type) {\n var _a;\n await ((_a = sentinel.value) == null ? void 0 : _a.release());\n sentinel.value = isSupported.value ? await navigator.wakeLock.request(type) : null;\n }\n async function request(type) {\n if (documentVisibility.value === \"visible\")\n await forceRequest(type);\n else\n requestedType.value = type;\n }\n async function release() {\n requestedType.value = false;\n const s = sentinel.value;\n sentinel.value = null;\n await (s == null ? void 0 : s.release());\n }\n return {\n sentinel,\n isSupported,\n isActive,\n request,\n forceRequest,\n release\n };\n}\n\nfunction useWebNotification(options = {}) {\n const {\n window = defaultWindow,\n requestPermissions: _requestForPermissions = true\n } = options;\n const defaultWebNotificationOptions = options;\n const isSupported = useSupported(() => {\n if (!window || !(\"Notification\" in window))\n return false;\n try {\n new Notification(\"\");\n } catch (e) {\n return false;\n }\n return true;\n });\n const permissionGranted = ref(isSupported.value && \"permission\" in Notification && Notification.permission === \"granted\");\n const notification = ref(null);\n const ensurePermissions = async () => {\n if (!isSupported.value)\n return;\n if (!permissionGranted.value && Notification.permission !== \"denied\") {\n const result = await Notification.requestPermission();\n if (result === \"granted\")\n permissionGranted.value = true;\n }\n return permissionGranted.value;\n };\n const { on: onClick, trigger: clickTrigger } = createEventHook();\n const { on: onShow, trigger: showTrigger } = createEventHook();\n const { on: onError, trigger: errorTrigger } = createEventHook();\n const { on: onClose, trigger: closeTrigger } = createEventHook();\n const show = async (overrides) => {\n if (!isSupported.value || !permissionGranted.value)\n return;\n const options2 = Object.assign({}, defaultWebNotificationOptions, overrides);\n notification.value = new Notification(options2.title || \"\", options2);\n notification.value.onclick = clickTrigger;\n notification.value.onshow = showTrigger;\n notification.value.onerror = errorTrigger;\n notification.value.onclose = closeTrigger;\n return notification.value;\n };\n const close = () => {\n if (notification.value)\n notification.value.close();\n notification.value = null;\n };\n if (_requestForPermissions)\n tryOnMounted(ensurePermissions);\n tryOnScopeDispose(close);\n if (isSupported.value && window) {\n const document = window.document;\n useEventListener(document, \"visibilitychange\", (e) => {\n e.preventDefault();\n if (document.visibilityState === \"visible\") {\n close();\n }\n });\n }\n return {\n isSupported,\n notification,\n ensurePermissions,\n permissionGranted,\n show,\n close,\n onClick,\n onShow,\n onError,\n onClose\n };\n}\n\nconst DEFAULT_PING_MESSAGE = \"ping\";\nfunction resolveNestedOptions(options) {\n if (options === true)\n return {};\n return options;\n}\nfunction useWebSocket(url, options = {}) {\n const {\n onConnected,\n onDisconnected,\n onError,\n onMessage,\n immediate = true,\n autoClose = true,\n protocols = []\n } = options;\n const data = ref(null);\n const status = ref(\"CLOSED\");\n const wsRef = ref();\n const urlRef = toRef(url);\n let heartbeatPause;\n let heartbeatResume;\n let explicitlyClosed = false;\n let retried = 0;\n let bufferedData = [];\n let pongTimeoutWait;\n const _sendBuffer = () => {\n if (bufferedData.length && wsRef.value && status.value === \"OPEN\") {\n for (const buffer of bufferedData)\n wsRef.value.send(buffer);\n bufferedData = [];\n }\n };\n const resetHeartbeat = () => {\n clearTimeout(pongTimeoutWait);\n pongTimeoutWait = void 0;\n };\n const close = (code = 1e3, reason) => {\n if (!isClient || !wsRef.value)\n return;\n explicitlyClosed = true;\n resetHeartbeat();\n heartbeatPause == null ? void 0 : heartbeatPause();\n wsRef.value.close(code, reason);\n wsRef.value = void 0;\n };\n const send = (data2, useBuffer = true) => {\n if (!wsRef.value || status.value !== \"OPEN\") {\n if (useBuffer)\n bufferedData.push(data2);\n return false;\n }\n _sendBuffer();\n wsRef.value.send(data2);\n return true;\n };\n const _init = () => {\n if (explicitlyClosed || typeof urlRef.value === \"undefined\")\n return;\n const ws = new WebSocket(urlRef.value, protocols);\n wsRef.value = ws;\n status.value = \"CONNECTING\";\n ws.onopen = () => {\n status.value = \"OPEN\";\n onConnected == null ? void 0 : onConnected(ws);\n heartbeatResume == null ? void 0 : heartbeatResume();\n _sendBuffer();\n };\n ws.onclose = (ev) => {\n status.value = \"CLOSED\";\n onDisconnected == null ? void 0 : onDisconnected(ws, ev);\n if (!explicitlyClosed && options.autoReconnect) {\n const {\n retries = -1,\n delay = 1e3,\n onFailed\n } = resolveNestedOptions(options.autoReconnect);\n retried += 1;\n if (typeof retries === \"number\" && (retries < 0 || retried < retries))\n setTimeout(_init, delay);\n else if (typeof retries === \"function\" && retries())\n setTimeout(_init, delay);\n else\n onFailed == null ? void 0 : onFailed();\n }\n };\n ws.onerror = (e) => {\n onError == null ? void 0 : onError(ws, e);\n };\n ws.onmessage = (e) => {\n if (options.heartbeat) {\n resetHeartbeat();\n const {\n message = DEFAULT_PING_MESSAGE,\n responseMessage = message\n } = resolveNestedOptions(options.heartbeat);\n if (e.data === responseMessage)\n return;\n }\n data.value = e.data;\n onMessage == null ? void 0 : onMessage(ws, e);\n };\n };\n if (options.heartbeat) {\n const {\n message = DEFAULT_PING_MESSAGE,\n interval = 1e3,\n pongTimeout = 1e3\n } = resolveNestedOptions(options.heartbeat);\n const { pause, resume } = useIntervalFn(\n () => {\n send(message, false);\n if (pongTimeoutWait != null)\n return;\n pongTimeoutWait = setTimeout(() => {\n close();\n explicitlyClosed = false;\n }, pongTimeout);\n },\n interval,\n { immediate: false }\n );\n heartbeatPause = pause;\n heartbeatResume = resume;\n }\n if (autoClose) {\n if (isClient)\n useEventListener(\"beforeunload\", () => close());\n tryOnScopeDispose(close);\n }\n const open = () => {\n if (!isClient && !isWorker)\n return;\n close();\n explicitlyClosed = false;\n retried = 0;\n _init();\n };\n if (immediate)\n open();\n watch(urlRef, open);\n return {\n data,\n status,\n close,\n send,\n open,\n ws: wsRef\n };\n}\n\nfunction useWebWorker(arg0, workerOptions, options) {\n const {\n window = defaultWindow\n } = options != null ? options : {};\n const data = ref(null);\n const worker = shallowRef();\n const post = (...args) => {\n if (!worker.value)\n return;\n worker.value.postMessage(...args);\n };\n const terminate = function terminate2() {\n if (!worker.value)\n return;\n worker.value.terminate();\n };\n if (window) {\n if (typeof arg0 === \"string\")\n worker.value = new Worker(arg0, workerOptions);\n else if (typeof arg0 === \"function\")\n worker.value = arg0();\n else\n worker.value = arg0;\n worker.value.onmessage = (e) => {\n data.value = e.data;\n };\n tryOnScopeDispose(() => {\n if (worker.value)\n worker.value.terminate();\n });\n }\n return {\n data,\n post,\n terminate,\n worker\n };\n}\n\nfunction jobRunner(userFunc) {\n return (e) => {\n const userFuncArgs = e.data[0];\n return Promise.resolve(userFunc.apply(void 0, userFuncArgs)).then((result) => {\n postMessage([\"SUCCESS\", result]);\n }).catch((error) => {\n postMessage([\"ERROR\", error]);\n });\n };\n}\n\nfunction depsParser(deps, localDeps) {\n if (deps.length === 0 && localDeps.length === 0)\n return \"\";\n const depsString = deps.map((dep) => `'${dep}'`).toString();\n const depsFunctionString = localDeps.filter((dep) => typeof dep === \"function\").map((fn) => {\n const str = fn.toString();\n if (str.trim().startsWith(\"function\")) {\n return str;\n } else {\n const name = fn.name;\n return `const ${name} = ${str}`;\n }\n }).join(\";\");\n const importString = `importScripts(${depsString});`;\n return `${depsString.trim() === \"\" ? \"\" : importString} ${depsFunctionString}`;\n}\n\nfunction createWorkerBlobUrl(fn, deps, localDeps) {\n const blobCode = `${depsParser(deps, localDeps)}; onmessage=(${jobRunner})(${fn})`;\n const blob = new Blob([blobCode], { type: \"text/javascript\" });\n const url = URL.createObjectURL(blob);\n return url;\n}\n\nfunction useWebWorkerFn(fn, options = {}) {\n const {\n dependencies = [],\n localDependencies = [],\n timeout,\n window = defaultWindow\n } = options;\n const worker = ref();\n const workerStatus = ref(\"PENDING\");\n const promise = ref({});\n const timeoutId = ref();\n const workerTerminate = (status = \"PENDING\") => {\n if (worker.value && worker.value._url && window) {\n worker.value.terminate();\n URL.revokeObjectURL(worker.value._url);\n promise.value = {};\n worker.value = void 0;\n window.clearTimeout(timeoutId.value);\n workerStatus.value = status;\n }\n };\n workerTerminate();\n tryOnScopeDispose(workerTerminate);\n const generateWorker = () => {\n const blobUrl = createWorkerBlobUrl(fn, dependencies, localDependencies);\n const newWorker = new Worker(blobUrl);\n newWorker._url = blobUrl;\n newWorker.onmessage = (e) => {\n const { resolve = () => {\n }, reject = () => {\n } } = promise.value;\n const [status, result] = e.data;\n switch (status) {\n case \"SUCCESS\":\n resolve(result);\n workerTerminate(status);\n break;\n default:\n reject(result);\n workerTerminate(\"ERROR\");\n break;\n }\n };\n newWorker.onerror = (e) => {\n const { reject = () => {\n } } = promise.value;\n e.preventDefault();\n reject(e);\n workerTerminate(\"ERROR\");\n };\n if (timeout) {\n timeoutId.value = setTimeout(\n () => workerTerminate(\"TIMEOUT_EXPIRED\"),\n timeout\n );\n }\n return newWorker;\n };\n const callWorker = (...fnArgs) => new Promise((resolve, reject) => {\n var _a;\n promise.value = {\n resolve,\n reject\n };\n (_a = worker.value) == null ? void 0 : _a.postMessage([[...fnArgs]]);\n workerStatus.value = \"RUNNING\";\n });\n const workerFn = (...fnArgs) => {\n if (workerStatus.value === \"RUNNING\") {\n console.error(\n \"[useWebWorkerFn] You can only run one instance of the worker at a time.\"\n );\n return Promise.reject();\n }\n worker.value = generateWorker();\n return callWorker(...fnArgs);\n };\n return {\n workerFn,\n workerStatus,\n workerTerminate\n };\n}\n\nfunction useWindowFocus(options = {}) {\n const { window = defaultWindow } = options;\n if (!window)\n return ref(false);\n const focused = ref(window.document.hasFocus());\n useEventListener(window, \"blur\", () => {\n focused.value = false;\n });\n useEventListener(window, \"focus\", () => {\n focused.value = true;\n });\n return focused;\n}\n\nfunction useWindowScroll(options = {}) {\n const { window = defaultWindow, behavior = \"auto\" } = options;\n if (!window) {\n return {\n x: ref(0),\n y: ref(0)\n };\n }\n const internalX = ref(window.scrollX);\n const internalY = ref(window.scrollY);\n const x = computed({\n get() {\n return internalX.value;\n },\n set(x2) {\n scrollTo({ left: x2, behavior });\n }\n });\n const y = computed({\n get() {\n return internalY.value;\n },\n set(y2) {\n scrollTo({ top: y2, behavior });\n }\n });\n useEventListener(\n window,\n \"scroll\",\n () => {\n internalX.value = window.scrollX;\n internalY.value = window.scrollY;\n },\n {\n capture: false,\n passive: true\n }\n );\n return { x, y };\n}\n\nfunction useWindowSize(options = {}) {\n const {\n window = defaultWindow,\n initialWidth = Number.POSITIVE_INFINITY,\n initialHeight = Number.POSITIVE_INFINITY,\n listenOrientation = true,\n includeScrollbar = true,\n type = \"inner\"\n } = options;\n const width = ref(initialWidth);\n const height = ref(initialHeight);\n const update = () => {\n if (window) {\n if (type === \"outer\") {\n width.value = window.outerWidth;\n height.value = window.outerHeight;\n } else if (includeScrollbar) {\n width.value = window.innerWidth;\n height.value = window.innerHeight;\n } else {\n width.value = window.document.documentElement.clientWidth;\n height.value = window.document.documentElement.clientHeight;\n }\n }\n };\n update();\n tryOnMounted(update);\n useEventListener(\"resize\", update, { passive: true });\n if (listenOrientation) {\n const matches = useMediaQuery(\"(orientation: portrait)\");\n watch(matches, () => update());\n }\n return { width, height };\n}\n\nexport { DefaultMagicKeysAliasMap, StorageSerializers, TransitionPresets, computedAsync as asyncComputed, breakpointsAntDesign, breakpointsBootstrapV5, breakpointsMasterCss, breakpointsPrimeFlex, breakpointsQuasar, breakpointsSematic, breakpointsTailwind, breakpointsVuetify, breakpointsVuetifyV2, breakpointsVuetifyV3, cloneFnJSON, computedAsync, computedInject, createFetch, createReusableTemplate, createTemplatePromise, createUnrefFn, customStorageEventName, defaultDocument, defaultLocation, defaultNavigator, defaultWindow, executeTransition, formatTimeAgo, getSSRHandler, mapGamepadToXbox360Controller, onClickOutside, onKeyDown, onKeyPressed, onKeyStroke, onKeyUp, onLongPress, onStartTyping, setSSRHandler, templateRef, unrefElement, useActiveElement, useAnimate, useAsyncQueue, useAsyncState, useBase64, useBattery, useBluetooth, useBreakpoints, useBroadcastChannel, useBrowserLocation, useCached, useClipboard, useClipboardItems, useCloned, useColorMode, useConfirmDialog, useCssVar, useCurrentElement, useCycleList, useDark, useDebouncedRefHistory, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDisplayMedia, useDocumentVisibility, useDraggable, useDropZone, useElementBounding, useElementByPoint, useElementHover, useElementSize, useElementVisibility, useEventBus, useEventListener, useEventSource, useEyeDropper, useFavicon, useFetch, useFileDialog, useFileSystemAccess, useFocus, useFocusWithin, useFps, useFullscreen, useGamepad, useGeolocation, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useKeyModifier, useLocalStorage, useMagicKeys, useManualRefHistory, useMediaControls, useMediaQuery, useMemoize, useMemory, useMounted, useMouse, useMouseInElement, useMousePressed, useMutationObserver, useNavigatorLanguage, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, useParallax, useParentElement, usePerformanceObserver, usePermission, usePointer, usePointerLock, usePointerSwipe, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, usePrevious, useRafFn, useRefHistory, useResizeObserver, useScreenOrientation, useScreenSafeArea, useScriptTag, useScroll, useScrollLock, useSessionStorage, useShare, useSorted, useSpeechRecognition, useSpeechSynthesis, useStepper, useStorage, useStorageAsync, useStyleTag, useSupported, useSwipe, useTemplateRefsList, useTextDirection, useTextSelection, useTextareaAutosize, useThrottledRefHistory, useTimeAgo, useTimeoutPoll, useTimestamp, useTitle, useTransition, useUrlSearchParams, useUserMedia, useVModel, useVModels, useVibrate, useVirtualList, useWakeLock, useWebNotification, useWebSocket, useWebWorker, useWebWorkerFn, useWindowFocus, useWindowScroll, useWindowSize };\n","\n\n\n\n\n","import { useI18n } from 'vue-i18n'\nimport { markRaw } from 'vue'\nimport IntegratedTerminal from '@/components/bottomPanel/tabs/IntegratedTerminal.vue'\nimport { BottomPanelExtension } from '@/types/extensionTypes'\n\nexport const useIntegratedTerminalTab = (): BottomPanelExtension => {\n const { t } = useI18n()\n return {\n id: 'integrated-terminal',\n title: t('terminal'),\n component: markRaw(IntegratedTerminal),\n type: 'vue'\n }\n}\n","import type { BottomPanelExtension } from '@/types/extensionTypes'\nimport { defineStore } from 'pinia'\nimport { computed, ref } from 'vue'\nimport { useCommandStore } from '@/stores/commandStore'\nimport { useIntegratedTerminalTab } from '@/hooks/bottomPanelTabs/integratedTerminalTab'\nimport { ComfyExtension } from '@/types/comfy'\n\nexport const useBottomPanelStore = defineStore('bottomPanel', () => {\n const bottomPanelVisible = ref(false)\n const toggleBottomPanel = () => {\n // If there are no tabs, don't show the bottom panel\n if (bottomPanelTabs.value.length === 0) {\n return\n }\n bottomPanelVisible.value = !bottomPanelVisible.value\n }\n\n const bottomPanelTabs = ref([])\n const activeBottomPanelTabId = ref(null)\n const activeBottomPanelTab = computed(() => {\n return (\n bottomPanelTabs.value.find(\n (tab) => tab.id === activeBottomPanelTabId.value\n ) ?? null\n )\n })\n const setActiveTab = (tabId: string) => {\n activeBottomPanelTabId.value = tabId\n }\n const toggleBottomPanelTab = (tabId: string) => {\n if (activeBottomPanelTabId.value === tabId && bottomPanelVisible.value) {\n bottomPanelVisible.value = false\n } else {\n activeBottomPanelTabId.value = tabId\n bottomPanelVisible.value = true\n }\n }\n const registerBottomPanelTab = (tab: BottomPanelExtension) => {\n bottomPanelTabs.value = [...bottomPanelTabs.value, tab]\n if (bottomPanelTabs.value.length === 1) {\n activeBottomPanelTabId.value = tab.id\n }\n useCommandStore().registerCommand({\n id: `Workspace.ToggleBottomPanelTab.${tab.id}`,\n icon: 'pi pi-list',\n label: tab.title,\n function: () => toggleBottomPanelTab(tab.id)\n })\n }\n\n const registerCoreBottomPanelTabs = () => {\n registerBottomPanelTab(useIntegratedTerminalTab())\n }\n\n const registerExtensionBottomPanelTabs = (extension: ComfyExtension) => {\n if (extension.bottomPanelTabs) {\n extension.bottomPanelTabs.forEach(registerBottomPanelTab)\n }\n }\n\n return {\n bottomPanelVisible,\n toggleBottomPanel,\n bottomPanelTabs,\n activeBottomPanelTab,\n activeBottomPanelTabId,\n setActiveTab,\n toggleBottomPanelTab,\n registerBottomPanelTab,\n registerCoreBottomPanelTabs,\n registerExtensionBottomPanelTabs\n }\n})\n","// @ts-strict-ignore\nimport { useSettingStore } from '@/stores/settingStore'\nimport { app, ANIM_PREVIEW_WIDGET } from './app'\nimport { LGraphCanvas, LGraphNode, LiteGraph } from '@comfyorg/litegraph'\nimport type { Vector4 } from '@comfyorg/litegraph'\nimport {\n ICustomWidget,\n IWidgetOptions\n} from '@comfyorg/litegraph/dist/types/widgets'\n\nconst SIZE = Symbol()\n\ninterface Rect {\n height: number\n width: number\n x: number\n y: number\n}\n\nexport interface DOMWidget\n extends ICustomWidget {\n // All unrecognized types will be treated the same way as 'custom' in litegraph internally.\n type: 'custom'\n name: string\n computedHeight?: number\n element?: T\n options: DOMWidgetOptions\n value: V\n y?: number\n callback?: (value: V) => void\n /**\n * Draw the widget on the canvas.\n */\n draw?: (\n ctx: CanvasRenderingContext2D,\n node: LGraphNode,\n widgetWidth: number,\n y: number,\n widgetHeight: number\n ) => void\n /**\n * TODO(huchenlei): Investigate when is this callback fired. `onRemove` is\n * on litegraph's IBaseWidget definition, but not called in litegraph.\n * Currently only called in widgetInputs.ts.\n */\n onRemove?: () => void\n}\n\nexport interface DOMWidgetOptions<\n T extends HTMLElement,\n V extends object | string\n> extends IWidgetOptions {\n hideOnZoom?: boolean\n selectOn?: string[]\n onHide?: (widget: DOMWidget) => void\n getValue?: () => V\n setValue?: (value: V) => void\n getMinHeight?: () => number\n getMaxHeight?: () => number\n getHeight?: () => string | number\n onDraw?: (widget: DOMWidget) => void\n beforeResize?: (this: DOMWidget, node: LGraphNode) => void\n afterResize?: (this: DOMWidget, node: LGraphNode) => void\n}\n\nfunction intersect(a: Rect, b: Rect): Vector4 | null {\n const x = Math.max(a.x, b.x)\n const num1 = Math.min(a.x + a.width, b.x + b.width)\n const y = Math.max(a.y, b.y)\n const num2 = Math.min(a.y + a.height, b.y + b.height)\n if (num1 >= x && num2 >= y) return [x, y, num1 - x, num2 - y]\n else return null\n}\n\nfunction getClipPath(\n node: LGraphNode,\n element: HTMLElement,\n canvasRect: DOMRect\n): string {\n const selectedNode: LGraphNode = Object.values(\n app.canvas.selected_nodes\n )[0] as LGraphNode\n if (selectedNode && selectedNode !== node) {\n const elRect = element.getBoundingClientRect()\n const MARGIN = 4\n const { offset, scale } = app.canvas.ds\n const { renderArea } = selectedNode\n\n // Get intersection in browser space\n const intersection = intersect(\n {\n x: elRect.left - canvasRect.left,\n y: elRect.top - canvasRect.top,\n width: elRect.width,\n height: elRect.height\n },\n {\n x: (renderArea[0] + offset[0] - MARGIN) * scale,\n y: (renderArea[1] + offset[1] - MARGIN) * scale,\n width: (renderArea[2] + 2 * MARGIN) * scale,\n height: (renderArea[3] + 2 * MARGIN) * scale\n }\n )\n\n if (!intersection) {\n return ''\n }\n\n // Convert intersection to canvas scale (element has scale transform)\n const clipX =\n (intersection[0] - elRect.left + canvasRect.left) / scale + 'px'\n const clipY = (intersection[1] - elRect.top + canvasRect.top) / scale + 'px'\n const clipWidth = intersection[2] / scale + 'px'\n const clipHeight = intersection[3] / scale + 'px'\n const path = `polygon(0% 0%, 0% 100%, ${clipX} 100%, ${clipX} ${clipY}, calc(${clipX} + ${clipWidth}) ${clipY}, calc(${clipX} + ${clipWidth}) calc(${clipY} + ${clipHeight}), ${clipX} calc(${clipY} + ${clipHeight}), ${clipX} 100%, 100% 100%, 100% 0%)`\n return path\n }\n return ''\n}\n\nfunction computeSize(size: [number, number]): void {\n if (this.widgets?.[0]?.last_y == null) return\n\n let y = this.widgets[0].last_y\n let freeSpace = size[1] - y\n\n let widgetHeight = 0\n let dom = []\n for (const w of this.widgets) {\n if (w.type === 'converted-widget') {\n // Ignore\n delete w.computedHeight\n } else if (w.computeSize) {\n widgetHeight += w.computeSize()[1] + 4\n } else if (w.element) {\n // Extract DOM widget size info\n const styles = getComputedStyle(w.element)\n let minHeight =\n w.options.getMinHeight?.() ??\n parseInt(styles.getPropertyValue('--comfy-widget-min-height'))\n let maxHeight =\n w.options.getMaxHeight?.() ??\n parseInt(styles.getPropertyValue('--comfy-widget-max-height'))\n\n let prefHeight =\n w.options.getHeight?.() ??\n styles.getPropertyValue('--comfy-widget-height')\n if (prefHeight.endsWith?.('%')) {\n prefHeight =\n size[1] *\n (parseFloat(prefHeight.substring(0, prefHeight.length - 1)) / 100)\n } else {\n prefHeight = parseInt(prefHeight)\n if (isNaN(minHeight)) {\n minHeight = prefHeight\n }\n }\n if (isNaN(minHeight)) {\n minHeight = 50\n }\n if (!isNaN(maxHeight)) {\n if (!isNaN(prefHeight)) {\n prefHeight = Math.min(prefHeight, maxHeight)\n } else {\n prefHeight = maxHeight\n }\n }\n dom.push({\n minHeight,\n prefHeight,\n w\n })\n } else {\n widgetHeight += LiteGraph.NODE_WIDGET_HEIGHT + 4\n }\n }\n\n freeSpace -= widgetHeight\n\n // Calculate sizes with all widgets at their min height\n const prefGrow = [] // Nodes that want to grow to their prefd size\n const canGrow = [] // Nodes that can grow to auto size\n let growBy = 0\n for (const d of dom) {\n freeSpace -= d.minHeight\n if (isNaN(d.prefHeight)) {\n canGrow.push(d)\n d.w.computedHeight = d.minHeight\n } else {\n const diff = d.prefHeight - d.minHeight\n if (diff > 0) {\n prefGrow.push(d)\n growBy += diff\n d.diff = diff\n } else {\n d.w.computedHeight = d.minHeight\n }\n }\n }\n\n if (this.imgs && !this.widgets.find((w) => w.name === ANIM_PREVIEW_WIDGET)) {\n // Allocate space for image\n freeSpace -= 220\n }\n\n this.freeWidgetSpace = freeSpace\n\n if (freeSpace < 0) {\n // Not enough space for all widgets so we need to grow\n size[1] -= freeSpace\n this.graph.setDirtyCanvas(true)\n } else {\n // Share the space between each\n const growDiff = freeSpace - growBy\n if (growDiff > 0) {\n // All pref sizes can be fulfilled\n freeSpace = growDiff\n for (const d of prefGrow) {\n d.w.computedHeight = d.prefHeight\n }\n } else {\n // We need to grow evenly\n const shared = -growDiff / prefGrow.length\n for (const d of prefGrow) {\n d.w.computedHeight = d.prefHeight - shared\n }\n freeSpace = 0\n }\n\n if (freeSpace > 0 && canGrow.length) {\n // Grow any that are auto height\n const shared = freeSpace / canGrow.length\n for (const d of canGrow) {\n d.w.computedHeight += shared\n }\n }\n }\n\n // Position each of the widgets\n for (const w of this.widgets) {\n w.y = y\n if (w.computedHeight) {\n y += w.computedHeight\n } else if (w.computeSize) {\n y += w.computeSize()[1] + 4\n } else {\n y += LiteGraph.NODE_WIDGET_HEIGHT + 4\n }\n }\n}\n\n// Override the compute visible nodes function to allow us to hide/show DOM elements when the node goes offscreen\nconst elementWidgets = new Set()\n//@ts-ignore\nconst computeVisibleNodes = LGraphCanvas.prototype.computeVisibleNodes\n//@ts-ignore\nLGraphCanvas.prototype.computeVisibleNodes = function (): LGraphNode[] {\n const visibleNodes = computeVisibleNodes.apply(this, arguments)\n\n for (const node of app.graph.nodes) {\n if (elementWidgets.has(node)) {\n const hidden = visibleNodes.indexOf(node) === -1\n for (const w of node.widgets) {\n if (w.element) {\n w.element.dataset.isInVisibleNodes = hidden ? 'false' : 'true'\n const shouldOtherwiseHide = w.element.dataset.shouldHide === 'true'\n const isCollapsed = w.element.dataset.collapsed === 'true'\n const wasHidden = w.element.hidden\n const actualHidden = hidden || shouldOtherwiseHide || isCollapsed\n w.element.hidden = actualHidden\n w.element.style.display = actualHidden ? 'none' : null\n if (actualHidden && !wasHidden) {\n w.options.onHide?.(w)\n }\n }\n }\n }\n }\n\n return visibleNodes\n}\n\nLGraphNode.prototype.addDOMWidget = function <\n T extends HTMLElement,\n V extends object | string\n>(\n name: string,\n type: string,\n element: T,\n options: DOMWidgetOptions = {}\n): DOMWidget {\n options = { hideOnZoom: true, selectOn: ['focus', 'click'], ...options }\n\n if (!element.parentElement) {\n app.canvasContainer.append(element)\n }\n element.hidden = true\n element.style.display = 'none'\n\n let mouseDownHandler\n if (element.blur) {\n mouseDownHandler = (event) => {\n if (!element.contains(event.target)) {\n element.blur()\n }\n }\n document.addEventListener('mousedown', mouseDownHandler)\n }\n\n const { nodeData } = this.constructor\n const tooltip = (nodeData?.input.required?.[name] ??\n nodeData?.input.optional?.[name])?.[1]?.tooltip\n if (tooltip && !element.title) {\n element.title = tooltip\n }\n\n const widget: DOMWidget = {\n // @ts-expect-error All unrecognized types will be treated the same way as 'custom'\n // in litegraph internally.\n type,\n name,\n get value(): V {\n return options.getValue?.() ?? undefined\n },\n set value(v: V) {\n options.setValue?.(v)\n widget.callback?.(widget.value)\n },\n draw: function (\n ctx: CanvasRenderingContext2D,\n node: LGraphNode,\n widgetWidth: number,\n y: number,\n widgetHeight: number\n ) {\n if (widget.computedHeight == null) {\n computeSize.call(node, node.size)\n }\n\n const { offset, scale } = app.canvas.ds\n\n const hidden =\n (!!options.hideOnZoom && scale < 0.5) ||\n widget.computedHeight <= 0 ||\n // @ts-expect-error Used by widgetInputs.ts\n widget.type === 'converted-widget' ||\n // @ts-expect-error Used by groupNode.ts\n widget.type === 'hidden'\n\n element.dataset.shouldHide = hidden ? 'true' : 'false'\n const isInVisibleNodes = element.dataset.isInVisibleNodes === 'true'\n const isCollapsed = element.dataset.collapsed === 'true'\n const actualHidden = hidden || !isInVisibleNodes || isCollapsed\n const wasHidden = element.hidden\n element.hidden = actualHidden\n element.style.display = actualHidden ? 'none' : null\n if (actualHidden && !wasHidden) {\n widget.options.onHide?.(widget)\n }\n if (actualHidden) {\n return\n }\n\n const elRect = ctx.canvas.getBoundingClientRect()\n const margin = 10\n const top = node.pos[0] + offset[0] + margin\n const left = node.pos[1] + offset[1] + margin + y\n\n Object.assign(element.style, {\n transformOrigin: '0 0',\n transform: `scale(${scale})`,\n left: `${top * scale}px`,\n top: `${left * scale}px`,\n width: `${widgetWidth - margin * 2}px`,\n height: `${(widget.computedHeight ?? 50) - margin * 2}px`,\n position: 'absolute',\n zIndex: app.graph.nodes.indexOf(node),\n pointerEvents: app.canvas.read_only ? 'none' : 'auto'\n })\n\n if (useSettingStore().get('Comfy.DOMClippingEnabled')) {\n element.style.clipPath = getClipPath(node, element, elRect)\n element.style.willChange = 'clip-path'\n }\n\n this.options.onDraw?.(widget)\n },\n element,\n options,\n onRemove() {\n if (mouseDownHandler) {\n document.removeEventListener('mousedown', mouseDownHandler)\n }\n element.remove()\n }\n }\n\n for (const evt of options.selectOn) {\n element.addEventListener(evt, () => {\n app.canvas.selectNode(this)\n app.canvas.bringToFront(this)\n })\n }\n\n this.addCustomWidget(widget)\n elementWidgets.add(this)\n\n const collapse = this.collapse\n this.collapse = function () {\n collapse.apply(this, arguments)\n if (this.flags?.collapsed) {\n element.hidden = true\n element.style.display = 'none'\n }\n element.dataset.collapsed = this.flags?.collapsed ? 'true' : 'false'\n }\n\n const onRemoved = this.onRemoved\n this.onRemoved = function () {\n element.remove()\n elementWidgets.delete(this)\n onRemoved?.apply(this, arguments)\n }\n\n if (!this[SIZE]) {\n this[SIZE] = true\n const onResize = this.onResize\n this.onResize = function (size) {\n options.beforeResize?.call(widget, this)\n computeSize.call(this, size)\n onResize?.apply(this, arguments)\n options.afterResize?.call(widget, this)\n }\n }\n\n return widget\n}\n","// @ts-strict-ignore\nimport { api } from './api'\nimport './domWidget'\nimport type { ComfyApp } from './app'\nimport type { LGraphNode } from '@comfyorg/litegraph'\nimport { InputSpec } from '@/types/apiTypes'\nimport { useSettingStore } from '@/stores/settingStore'\nimport { useToastStore } from '@/stores/toastStore'\nimport type { IWidget } from '@comfyorg/litegraph'\n\nexport type ComfyWidgetConstructor = (\n node: LGraphNode,\n inputName: string,\n inputData: InputSpec,\n app?: ComfyApp,\n widgetName?: string\n) => { widget: IWidget; minWidth?: number; minHeight?: number }\n\nlet controlValueRunBefore = false\nexport function updateControlWidgetLabel(widget) {\n let replacement = 'after'\n let find = 'before'\n if (controlValueRunBefore) {\n ;[find, replacement] = [replacement, find]\n }\n widget.label = (widget.label ?? widget.name).replace(find, replacement)\n}\n\nconst IS_CONTROL_WIDGET = Symbol()\nconst HAS_EXECUTED = Symbol()\n\nfunction getNumberDefaults(\n inputData: InputSpec,\n defaultStep,\n precision,\n enable_rounding\n) {\n let defaultVal = inputData[1]['default']\n let { min, max, step, round } = inputData[1]\n\n if (defaultVal == undefined) defaultVal = 0\n if (min == undefined) min = 0\n if (max == undefined) max = 2048\n if (step == undefined) step = defaultStep\n // precision is the number of decimal places to show.\n // by default, display the the smallest number of decimal places such that changes of size step are visible.\n if (precision == undefined) {\n precision = Math.max(-Math.floor(Math.log10(step)), 0)\n }\n\n if (enable_rounding && (round == undefined || round === true)) {\n // by default, round the value to those decimal places shown.\n round = Math.round(1000000 * Math.pow(0.1, precision)) / 1000000\n }\n\n return {\n val: defaultVal,\n config: { min, max, step: 10.0 * step, round, precision }\n }\n}\n\nexport function addValueControlWidget(\n node,\n targetWidget,\n defaultValue = 'randomize',\n values,\n widgetName,\n inputData: InputSpec\n) {\n let name = inputData[1]?.control_after_generate\n if (typeof name !== 'string') {\n name = widgetName\n }\n const widgets = addValueControlWidgets(\n node,\n targetWidget,\n defaultValue,\n {\n addFilterList: false,\n controlAfterGenerateName: name\n },\n inputData\n )\n return widgets[0]\n}\n\nexport function addValueControlWidgets(\n node,\n targetWidget,\n defaultValue = 'randomize',\n options,\n inputData: InputSpec\n) {\n if (!defaultValue) defaultValue = 'randomize'\n if (!options) options = {}\n\n const getName = (defaultName, optionName) => {\n let name = defaultName\n if (options[optionName]) {\n name = options[optionName]\n } else if (typeof inputData?.[1]?.[defaultName] === 'string') {\n name = inputData?.[1]?.[defaultName]\n } else if (inputData?.[1]?.control_prefix) {\n name = inputData?.[1]?.control_prefix + ' ' + name\n }\n return name\n }\n\n const widgets = []\n const valueControl = node.addWidget(\n 'combo',\n getName('control_after_generate', 'controlAfterGenerateName'),\n defaultValue,\n function () {},\n {\n values: ['fixed', 'increment', 'decrement', 'randomize'],\n serialize: false // Don't include this in prompt.\n }\n )\n valueControl.tooltip =\n 'Allows the linked widget to be changed automatically, for example randomizing the noise seed.'\n valueControl[IS_CONTROL_WIDGET] = true\n updateControlWidgetLabel(valueControl)\n widgets.push(valueControl)\n\n const isCombo = targetWidget.type === 'combo'\n let comboFilter\n if (isCombo) {\n valueControl.options.values.push('increment-wrap')\n }\n if (isCombo && options.addFilterList !== false) {\n comboFilter = node.addWidget(\n 'string',\n getName('control_filter_list', 'controlFilterListName'),\n '',\n function () {},\n {\n serialize: false // Don't include this in prompt.\n }\n )\n updateControlWidgetLabel(comboFilter)\n comboFilter.tooltip =\n \"Allows for filtering the list of values when changing the value via the control generate mode. Allows for RegEx matches in the format /abc/ to only filter to values containing 'abc'.\"\n\n widgets.push(comboFilter)\n }\n\n const applyWidgetControl = () => {\n var v = valueControl.value\n\n if (isCombo && v !== 'fixed') {\n let values = targetWidget.options.values\n const filter = comboFilter?.value\n if (filter) {\n let check\n if (filter.startsWith('/') && filter.endsWith('/')) {\n try {\n const regex = new RegExp(filter.substring(1, filter.length - 1))\n check = (item) => regex.test(item)\n } catch (error) {\n console.error(\n 'Error constructing RegExp filter for node ' + node.id,\n filter,\n error\n )\n }\n }\n if (!check) {\n const lower = filter.toLocaleLowerCase()\n check = (item) => item.toLocaleLowerCase().includes(lower)\n }\n values = values.filter((item) => check(item))\n if (!values.length && targetWidget.options.values.length) {\n console.warn(\n 'Filter for node ' + node.id + ' has filtered out all items',\n filter\n )\n }\n }\n let current_index = values.indexOf(targetWidget.value)\n let current_length = values.length\n\n switch (v) {\n case 'increment':\n current_index += 1\n break\n case 'increment-wrap':\n current_index += 1\n if (current_index >= current_length) {\n current_index = 0\n }\n break\n case 'decrement':\n current_index -= 1\n break\n case 'randomize':\n current_index = Math.floor(Math.random() * current_length)\n break\n default:\n break\n }\n current_index = Math.max(0, current_index)\n current_index = Math.min(current_length - 1, current_index)\n if (current_index >= 0) {\n let value = values[current_index]\n targetWidget.value = value\n targetWidget.callback(value)\n }\n } else {\n //number\n let min = targetWidget.options.min\n let max = targetWidget.options.max\n // limit to something that javascript can handle\n max = Math.min(1125899906842624, max)\n min = Math.max(-1125899906842624, min)\n let range = (max - min) / (targetWidget.options.step / 10)\n\n //adjust values based on valueControl Behaviour\n switch (v) {\n case 'fixed':\n break\n case 'increment':\n targetWidget.value += targetWidget.options.step / 10\n break\n case 'decrement':\n targetWidget.value -= targetWidget.options.step / 10\n break\n case 'randomize':\n targetWidget.value =\n Math.floor(Math.random() * range) *\n (targetWidget.options.step / 10) +\n min\n break\n default:\n break\n }\n /*check if values are over or under their respective\n * ranges and set them to min or max.*/\n if (targetWidget.value < min) targetWidget.value = min\n\n if (targetWidget.value > max) targetWidget.value = max\n targetWidget.callback(targetWidget.value)\n }\n }\n\n valueControl.beforeQueued = () => {\n if (controlValueRunBefore) {\n // Don't run on first execution\n if (valueControl[HAS_EXECUTED]) {\n applyWidgetControl()\n }\n }\n valueControl[HAS_EXECUTED] = true\n }\n\n valueControl.afterQueued = () => {\n if (!controlValueRunBefore) {\n applyWidgetControl()\n }\n }\n\n return widgets\n}\n\nfunction seedWidget(node, inputName, inputData: InputSpec, app, widgetName) {\n const seed = createIntWidget(node, inputName, inputData, app, true)\n const seedControl = addValueControlWidget(\n node,\n seed.widget,\n 'randomize',\n undefined,\n widgetName,\n inputData\n )\n\n seed.widget.linkedWidgets = [seedControl]\n return seed\n}\n\nfunction createIntWidget(\n node,\n inputName,\n inputData: InputSpec,\n app,\n isSeedInput: boolean = false\n) {\n const control = inputData[1]?.control_after_generate\n if (!isSeedInput && control) {\n return seedWidget(\n node,\n inputName,\n inputData,\n app,\n typeof control === 'string' ? control : undefined\n )\n }\n\n let widgetType = isSlider(inputData[1]['display'], app)\n const { val, config } = getNumberDefaults(inputData, 1, 0, true)\n Object.assign(config, { precision: 0 })\n return {\n widget: node.addWidget(\n widgetType,\n inputName,\n val,\n function (v) {\n const s = this.options.step / 10\n let sh = this.options.min % s\n if (isNaN(sh)) {\n sh = 0\n }\n this.value = Math.round((v - sh) / s) * s + sh\n },\n config\n )\n }\n}\n\nfunction addMultilineWidget(node, name: string, opts, app: ComfyApp) {\n const inputEl = document.createElement('textarea')\n inputEl.className = 'comfy-multiline-input'\n inputEl.value = opts.defaultVal\n inputEl.placeholder = opts.placeholder || name\n if (app.vueAppReady) {\n inputEl.spellcheck = useSettingStore().get(\n 'Comfy.TextareaWidget.Spellcheck'\n )\n }\n\n const widget = node.addDOMWidget(name, 'customtext', inputEl, {\n getValue() {\n return inputEl.value\n },\n setValue(v) {\n inputEl.value = v\n }\n })\n widget.inputEl = inputEl\n\n inputEl.addEventListener('input', () => {\n widget.callback?.(widget.value)\n })\n\n return { minWidth: 400, minHeight: 200, widget }\n}\n\nfunction isSlider(display, app) {\n if (app.ui.settings.getSettingValue('Comfy.DisableSliders')) {\n return 'number'\n }\n\n return display === 'slider' ? 'slider' : 'number'\n}\n\nexport function initWidgets(app) {\n app.ui.settings.addSetting({\n id: 'Comfy.WidgetControlMode',\n category: ['Comfy', 'Node Widget', 'WidgetControlMode'],\n name: 'Widget control mode',\n tooltip:\n 'Controls when widget values are updated (randomize/increment/decrement), either before the prompt is queued or after.',\n type: 'combo',\n defaultValue: 'after',\n options: ['before', 'after'],\n onChange(value) {\n controlValueRunBefore = value === 'before'\n for (const n of app.graph.nodes) {\n if (!n.widgets) continue\n for (const w of n.widgets) {\n if (w[IS_CONTROL_WIDGET]) {\n updateControlWidgetLabel(w)\n if (w.linkedWidgets) {\n for (const l of w.linkedWidgets) {\n updateControlWidgetLabel(l)\n }\n }\n }\n }\n }\n app.graph.setDirtyCanvas(true)\n }\n })\n}\n\nexport const ComfyWidgets: Record = {\n 'INT:seed': seedWidget,\n 'INT:noise_seed': seedWidget,\n FLOAT(node, inputName, inputData: InputSpec, app) {\n let widgetType: 'number' | 'slider' = isSlider(inputData[1]['display'], app)\n let precision = app.ui.settings.getSettingValue(\n 'Comfy.FloatRoundingPrecision'\n )\n let disable_rounding = app.ui.settings.getSettingValue(\n 'Comfy.DisableFloatRounding'\n )\n if (precision == 0) precision = undefined\n const { val, config } = getNumberDefaults(\n inputData,\n 0.5,\n precision,\n !disable_rounding\n )\n return {\n widget: node.addWidget(\n widgetType,\n inputName,\n val,\n function (v) {\n if (config.round) {\n this.value =\n Math.round((v + Number.EPSILON) / config.round) * config.round\n if (this.value > config.max) this.value = config.max\n if (this.value < config.min) this.value = config.min\n } else {\n this.value = v\n }\n },\n config\n )\n }\n },\n INT(node, inputName, inputData: InputSpec, app) {\n return createIntWidget(node, inputName, inputData, app)\n },\n BOOLEAN(node, inputName, inputData) {\n let defaultVal = false\n let options = {}\n if (inputData[1]) {\n if (inputData[1].default) defaultVal = inputData[1].default\n if (inputData[1].label_on) options['on'] = inputData[1].label_on\n if (inputData[1].label_off) options['off'] = inputData[1].label_off\n }\n return {\n widget: node.addWidget('toggle', inputName, defaultVal, () => {}, options)\n }\n },\n STRING(node, inputName, inputData: InputSpec, app) {\n const defaultVal = inputData[1].default || ''\n const multiline = !!inputData[1].multiline\n\n let res\n if (multiline) {\n res = addMultilineWidget(\n node,\n inputName,\n { defaultVal, ...inputData[1] },\n app\n )\n } else {\n res = {\n widget: node.addWidget('text', inputName, defaultVal, () => {}, {})\n }\n }\n\n if (inputData[1].dynamicPrompts != undefined)\n res.widget.dynamicPrompts = inputData[1].dynamicPrompts\n\n return res\n },\n COMBO(node, inputName, inputData: InputSpec) {\n const type = inputData[0]\n let defaultValue = type[0]\n if (inputData[1] && inputData[1].default) {\n defaultValue = inputData[1].default\n }\n const res = {\n widget: node.addWidget('combo', inputName, defaultValue, () => {}, {\n values: type\n })\n }\n if (inputData[1]?.control_after_generate) {\n // TODO make combo handle a widget node type?\n res.widget.linkedWidgets = addValueControlWidgets(\n node,\n res.widget,\n undefined,\n undefined,\n inputData\n )\n }\n return res\n },\n IMAGEUPLOAD(node: LGraphNode, inputName: string, inputData: InputSpec, app) {\n // TODO make image upload handle a custom node type?\n const imageWidget = node.widgets.find(\n (w) => w.name === (inputData[1]?.widget ?? 'image')\n )\n let uploadWidget\n\n function showImage(name) {\n const img = new Image()\n img.onload = () => {\n // @ts-expect-error\n node.imgs = [img]\n app.graph.setDirtyCanvas(true)\n }\n let folder_separator = name.lastIndexOf('/')\n let subfolder = ''\n if (folder_separator > -1) {\n subfolder = name.substring(0, folder_separator)\n name = name.substring(folder_separator + 1)\n }\n img.src = api.apiURL(\n `/view?filename=${encodeURIComponent(name)}&type=input&subfolder=${subfolder}${app.getPreviewFormatParam()}${app.getRandParam()}`\n )\n // @ts-expect-error\n node.setSizeForImage?.()\n }\n\n var default_value = imageWidget.value\n Object.defineProperty(imageWidget, 'value', {\n set: function (value) {\n this._real_value = value\n },\n\n get: function () {\n if (!this._real_value) {\n return default_value\n }\n\n let value = this._real_value\n if (value.filename) {\n let real_value = value\n value = ''\n if (real_value.subfolder) {\n value = real_value.subfolder + '/'\n }\n\n value += real_value.filename\n\n if (real_value.type && real_value.type !== 'input')\n value += ` [${real_value.type}]`\n }\n return value\n }\n })\n\n // Add our own callback to the combo widget to render an image when it changes\n // TODO: Explain this?\n // @ts-expect-error\n const cb = node.callback\n imageWidget.callback = function () {\n showImage(imageWidget.value)\n if (cb) {\n return cb.apply(this, arguments)\n }\n }\n\n // On load if we have a value then render the image\n // The value isnt set immediately so we need to wait a moment\n // No change callbacks seem to be fired on initial setting of the value\n requestAnimationFrame(() => {\n if (imageWidget.value) {\n showImage(imageWidget.value)\n }\n })\n\n async function uploadFile(file, updateNode, pasted = false) {\n try {\n // Wrap file in formdata so it includes filename\n const body = new FormData()\n body.append('image', file)\n if (pasted) body.append('subfolder', 'pasted')\n const resp = await api.fetchApi('/upload/image', {\n method: 'POST',\n body\n })\n\n if (resp.status === 200) {\n const data = await resp.json()\n // Add the file to the dropdown list and update the widget value\n let path = data.name\n if (data.subfolder) path = data.subfolder + '/' + path\n\n if (!imageWidget.options.values.includes(path)) {\n imageWidget.options.values.push(path)\n }\n\n if (updateNode) {\n showImage(path)\n imageWidget.value = path\n }\n } else {\n useToastStore().addAlert(resp.status + ' - ' + resp.statusText)\n }\n } catch (error) {\n useToastStore().addAlert(error)\n }\n }\n\n const fileInput = document.createElement('input')\n Object.assign(fileInput, {\n type: 'file',\n accept: 'image/jpeg,image/png,image/webp',\n style: 'display: none',\n onchange: async () => {\n if (fileInput.files.length) {\n await uploadFile(fileInput.files[0], true)\n }\n }\n })\n document.body.append(fileInput)\n\n // Create the button widget for selecting the files\n uploadWidget = node.addWidget('button', inputName, 'image', () => {\n fileInput.click()\n })\n uploadWidget.label = 'choose file to upload'\n uploadWidget.serialize = false\n\n // Add handler to check if an image is being dragged over our node\n // @ts-expect-error\n node.onDragOver = function (e) {\n if (e.dataTransfer && e.dataTransfer.items) {\n const image = [...e.dataTransfer.items].find((f) => f.kind === 'file')\n return !!image\n }\n\n return false\n }\n\n // On drop upload files\n // @ts-expect-error\n node.onDragDrop = function (e) {\n console.log('onDragDrop called')\n let handled = false\n for (const file of e.dataTransfer.files) {\n if (file.type.startsWith('image/')) {\n uploadFile(file, !handled) // Dont await these, any order is fine, only update on first one\n handled = true\n }\n }\n\n return handled\n }\n\n // @ts-expect-error\n node.pasteFile = function (file) {\n if (file.type.startsWith('image/')) {\n const is_pasted =\n file.name === 'image.png' && file.lastModified - Date.now() < 2000\n uploadFile(file, true, is_pasted)\n return true\n }\n return false\n }\n\n return { widget: uploadWidget }\n }\n}\n","import { ComfyWidgets, ComfyWidgetConstructor } from '@/scripts/widgets'\nimport { defineStore } from 'pinia'\nimport { ref, computed } from 'vue'\nimport type { BaseInputSpec } from './nodeDefStore'\n\nexport const useWidgetStore = defineStore('widget', () => {\n const coreWidgets = ComfyWidgets\n const customWidgets = ref>({})\n const widgets = computed(() => ({\n ...customWidgets.value,\n ...coreWidgets\n }))\n\n function getWidgetType(type: string, inputName: string) {\n if (type === 'COMBO') {\n return 'COMBO'\n } else if (`${type}:${inputName}` in widgets.value) {\n return `${type}:${inputName}`\n } else if (type in widgets.value) {\n return type\n } else {\n return null\n }\n }\n\n function inputIsWidget(spec: BaseInputSpec) {\n return getWidgetType(spec.type, spec.name) !== null\n }\n\n function registerCustomWidgets(\n newWidgets: Record\n ) {\n customWidgets.value = {\n ...customWidgets.value,\n ...newWidgets\n }\n }\n\n return {\n widgets,\n getWidgetType,\n inputIsWidget,\n registerCustomWidgets\n }\n})\n","import { ref, computed, markRaw } from 'vue'\nimport { defineStore } from 'pinia'\nimport type { ComfyExtension } from '@/types/comfy'\nimport { useKeybindingStore } from './keybindingStore'\nimport { useCommandStore } from './commandStore'\nimport { useSettingStore } from './settingStore'\nimport { app } from '@/scripts/app'\nimport { useMenuItemStore } from './menuItemStore'\nimport { useBottomPanelStore } from './workspace/bottomPanelStore'\nimport { useWidgetStore } from './widgetStore'\n\nexport const useExtensionStore = defineStore('extension', () => {\n // For legacy reasons, the name uniquely identifies an extension\n const extensionByName = ref>({})\n const extensions = computed(() => Object.values(extensionByName.value))\n // Not using computed because disable extension requires reloading of the page.\n // Dynamically update this list won't affect extensions that are already loaded.\n const disabledExtensionNames = ref>(new Set())\n\n // Disabled extension names that are currently not in the extension list.\n // If a node pack is disabled in the backend, we shouldn't remove the configuration\n // of the frontend extension disable list, in case the node pack is re-enabled.\n const inactiveDisabledExtensionNames = computed(() => {\n return Array.from(disabledExtensionNames.value).filter(\n (name) => !(name in extensionByName.value)\n )\n })\n\n const isExtensionEnabled = (name: string) =>\n !disabledExtensionNames.value.has(name)\n const enabledExtensions = computed(() => {\n return extensions.value.filter((ext) => isExtensionEnabled(ext.name))\n })\n\n function registerExtension(extension: ComfyExtension) {\n if (!extension.name) {\n throw new Error(\"Extensions must have a 'name' property.\")\n }\n\n if (extensionByName.value[extension.name]) {\n throw new Error(`Extension named '${extension.name}' already registered.`)\n }\n\n if (disabledExtensionNames.value.has(extension.name)) {\n console.log(`Extension ${extension.name} is disabled.`)\n }\n\n extensionByName.value[extension.name] = markRaw(extension)\n useKeybindingStore().loadExtensionKeybindings(extension)\n useCommandStore().loadExtensionCommands(extension)\n useMenuItemStore().loadExtensionMenuCommands(extension)\n useSettingStore().loadExtensionSettings(extension)\n useBottomPanelStore().registerExtensionBottomPanelTabs(extension)\n if (extension.getCustomWidgets) {\n // TODO(huchenlei): We should deprecate the async return value of\n // getCustomWidgets.\n ;(async () => {\n if (extension.getCustomWidgets) {\n const widgets = await extension.getCustomWidgets(app)\n useWidgetStore().registerCustomWidgets(widgets)\n }\n })()\n }\n /*\n * Extensions are currently stored in both extensionStore and app.extensions.\n * Legacy jest tests still depend on app.extensions being populated.\n */\n app.extensions.push(extension)\n }\n\n function loadDisabledExtensionNames() {\n disabledExtensionNames.value = new Set(\n useSettingStore().get('Comfy.Extension.Disabled')\n )\n // pysssss.Locking is replaced by pin/unpin in ComfyUI core.\n // https://github.com/Comfy-Org/litegraph.js/pull/117\n disabledExtensionNames.value.add('pysssss.Locking')\n // pysssss.SnapToGrid is replaced by Comfy.Graph.AlwaysSnapToGrid in ComfyUI core.\n // pysssss.SnapToGrid tries to write global app.shiftDown state, which is no longer\n // allowed since v1.3.12.\n // https://github.com/Comfy-Org/ComfyUI_frontend/issues/1176\n disabledExtensionNames.value.add('pysssss.SnapToGrid')\n }\n\n // Some core extensions are registered before the store is initialized, e.g.\n // colorPalette.\n // Register them manually here so the state of app.extensions and\n // extensionByName are in sync.\n for (const ext of app.extensions) {\n extensionByName.value[ext.name] = markRaw(ext)\n }\n\n return {\n extensions,\n enabledExtensions,\n inactiveDisabledExtensionNames,\n isExtensionEnabled,\n registerExtension,\n loadDisabledExtensionNames\n }\n})\n","import { AboutPageBadge } from '@/types/comfy'\nimport { defineStore } from 'pinia'\nimport { computed } from 'vue'\nimport { useSystemStatsStore } from './systemStatsStore'\nimport { useExtensionStore } from './extensionStore'\n\nexport const useAboutPanelStore = defineStore('aboutPanel', () => {\n const frontendVersion = __COMFYUI_FRONTEND_VERSION__\n const extensionStore = useExtensionStore()\n const systemStatsStore = useSystemStatsStore()\n const coreVersion = computed(\n () => systemStatsStore?.systemStats?.system?.comfyui_version ?? ''\n )\n\n const coreBadges = computed(() => [\n {\n label: `ComfyUI ${coreVersion.value}`,\n url: 'https://github.com/comfyanonymous/ComfyUI',\n icon: 'pi pi-github'\n },\n {\n label: `ComfyUI_frontend v${frontendVersion}`,\n url: 'https://github.com/Comfy-Org/ComfyUI_frontend',\n icon: 'pi pi-github'\n },\n {\n label: 'Discord',\n url: 'https://www.comfy.org/discord',\n icon: 'pi pi-discord'\n },\n { label: 'ComfyOrg', url: 'https://www.comfy.org/', icon: 'pi pi-globe' }\n ])\n\n const allBadges = computed(() => [\n ...coreBadges.value,\n ...extensionStore.extensions.flatMap((e) => e.aboutPageBadges ?? [])\n ])\n\n return {\n badges: allBadges\n }\n})\n","import BaseIcon from '@primevue/icons/baseicon';\nimport { openBlock, createElementBlock, mergeProps, createElementVNode } from 'vue';\n\nvar script = {\n name: 'ChevronLeftIcon',\n \"extends\": BaseIcon\n};\n\nvar _hoisted_1 = /*#__PURE__*/createElementVNode(\"path\", {\n d: \"M9.61296 13C9.50997 13.0005 9.40792 12.9804 9.3128 12.9409C9.21767 12.9014 9.13139 12.8433 9.05902 12.7701L3.83313 7.54416C3.68634 7.39718 3.60388 7.19795 3.60388 6.99022C3.60388 6.78249 3.68634 6.58325 3.83313 6.43628L9.05902 1.21039C9.20762 1.07192 9.40416 0.996539 9.60724 1.00012C9.81032 1.00371 10.0041 1.08597 10.1477 1.22959C10.2913 1.37322 10.3736 1.56698 10.3772 1.77005C10.3808 1.97313 10.3054 2.16968 10.1669 2.31827L5.49496 6.99022L10.1669 11.6622C10.3137 11.8091 10.3962 12.0084 10.3962 12.2161C10.3962 12.4238 10.3137 12.6231 10.1669 12.7701C10.0945 12.8433 10.0083 12.9014 9.91313 12.9409C9.81801 12.9804 9.71596 13.0005 9.61296 13Z\",\n fill: \"currentColor\"\n}, null, -1);\nvar _hoisted_2 = [_hoisted_1];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"svg\", mergeProps({\n width: \"14\",\n height: \"14\",\n viewBox: \"0 0 14 14\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, _ctx.pti()), _hoisted_2, 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseIcon from '@primevue/icons/baseicon';\nimport { openBlock, createElementBlock, mergeProps, createElementVNode } from 'vue';\n\nvar script = {\n name: 'ChevronRightIcon',\n \"extends\": BaseIcon\n};\n\nvar _hoisted_1 = /*#__PURE__*/createElementVNode(\"path\", {\n d: \"M4.38708 13C4.28408 13.0005 4.18203 12.9804 4.08691 12.9409C3.99178 12.9014 3.9055 12.8433 3.83313 12.7701C3.68634 12.6231 3.60388 12.4238 3.60388 12.2161C3.60388 12.0084 3.68634 11.8091 3.83313 11.6622L8.50507 6.99022L3.83313 2.31827C3.69467 2.16968 3.61928 1.97313 3.62287 1.77005C3.62645 1.56698 3.70872 1.37322 3.85234 1.22959C3.99596 1.08597 4.18972 1.00371 4.3928 1.00012C4.59588 0.996539 4.79242 1.07192 4.94102 1.21039L10.1669 6.43628C10.3137 6.58325 10.3962 6.78249 10.3962 6.99022C10.3962 7.19795 10.3137 7.39718 10.1669 7.54416L4.94102 12.7701C4.86865 12.8433 4.78237 12.9014 4.68724 12.9409C4.59212 12.9804 4.49007 13.0005 4.38708 13Z\",\n fill: \"currentColor\"\n}, null, -1);\nvar _hoisted_2 = [_hoisted_1];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"svg\", mergeProps({\n width: \"14\",\n height: \"14\",\n viewBox: \"0 0 14 14\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, _ctx.pti()), _hoisted_2, 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-tabview-tablist-container {\\n position: relative;\\n}\\n\\n.p-tabview-scrollable > .p-tabview-tablist-container {\\n overflow: hidden;\\n}\\n\\n.p-tabview-tablist-scroll-container {\\n overflow-x: auto;\\n overflow-y: hidden;\\n scroll-behavior: smooth;\\n scrollbar-width: none;\\n overscroll-behavior: contain auto;\\n}\\n\\n.p-tabview-tablist-scroll-container::-webkit-scrollbar {\\n display: none;\\n}\\n\\n.p-tabview-tablist {\\n display: flex;\\n margin: 0;\\n padding: 0;\\n list-style-type: none;\\n flex: 1 1 auto;\\n background: \".concat(dt('tabview.tab.list.background'), \";\\n border: 1px solid \").concat(dt('tabview.tab.list.border.color'), \";\\n border-width: 0 0 1px 0;\\n position: relative;\\n}\\n\\n.p-tabview-tab-header {\\n cursor: pointer;\\n user-select: none;\\n display: flex;\\n align-items: center;\\n text-decoration: none;\\n position: relative;\\n overflow: hidden;\\n border-style: solid;\\n border-width: 0 0 1px 0;\\n border-color: transparent transparent \").concat(dt('tabview.tab.border.color'), \" transparent;\\n color: \").concat(dt('tabview.tab.color'), \";\\n padding: 1rem 1.125rem;\\n font-weight: 600;\\n border-top-right-radius: \").concat(dt('border.radius.md'), \";\\n border-top-left-radius: \").concat(dt('border.radius.md'), \";\\n transition: color \").concat(dt('tabview.transition.duration'), \", outline-color \").concat(dt('tabview.transition.duration'), \";\\n margin: 0 0 -1px 0;\\n outline-color: transparent;\\n}\\n\\n.p-tabview-tablist-item:not(.p-disabled) .p-tabview-tab-header:focus-visible {\\n outline: \").concat(dt('focus.ring.width'), \" \").concat(dt('focus.ring.style'), \" \").concat(dt('focus.ring.color'), \";\\n outline-offset: -1px;\\n}\\n\\n.p-tabview-tablist-item:not(.p-highlight):not(.p-disabled):hover > .p-tabview-tab-header {\\n color: \").concat(dt('tabview.tab.hover.color'), \";\\n}\\n\\n.p-tabview-tablist-item.p-highlight > .p-tabview-tab-header {\\n color: \").concat(dt('tabview.tab.active.color'), \";\\n}\\n\\n.p-tabview-tab-title {\\n line-height: 1;\\n white-space: nowrap;\\n}\\n\\n.p-tabview-next-button,\\n.p-tabview-prev-button {\\n position: absolute;\\n top: 0;\\n margin: 0;\\n padding: 0;\\n z-index: 2;\\n height: 100%;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n background: \").concat(dt('tabview.nav.button.background'), \";\\n color: \").concat(dt('tabview.nav.button.color'), \";\\n width: 2.5rem;\\n border-radius: 0;\\n outline-color: transparent;\\n transition: color \").concat(dt('tabview.transition.duration'), \", outline-color \").concat(dt('tabview.transition.duration'), \";\\n box-shadow: \").concat(dt('tabview.nav.button.shadow'), \";\\n border: none;\\n cursor: pointer;\\n user-select: none;\\n}\\n\\n.p-tabview-next-button:focus-visible,\\n.p-tabview-prev-button:focus-visible {\\n outline: \").concat(dt('focus.ring.width'), \" \").concat(dt('focus.ring.style'), \" \").concat(dt('focus.ring.color'), \";\\n outline-offset: \").concat(dt('focus.ring.offset'), \";\\n}\\n\\n.p-tabview-next-button:hover,\\n.p-tabview-prev-button:hover {\\n color: \").concat(dt('tabview.nav.button.hover.color'), \";\\n}\\n\\n.p-tabview-prev-button {\\n left: 0;\\n}\\n\\n.p-tabview-next-button {\\n right: 0;\\n}\\n\\n.p-tabview-panels {\\n background: \").concat(dt('tabview.tab.panel.background'), \";\\n color: \").concat(dt('tabview.tab.panel.color'), \";\\n padding: 0.875rem 1.125rem 1.125rem 1.125rem;\\n}\\n\\n.p-tabview-ink-bar {\\n z-index: 1;\\n display: block;\\n position: absolute;\\n bottom: -1px;\\n height: 1px;\\n background: \").concat(dt('tabview.tab.active.border.color'), \";\\n transition: 250ms cubic-bezier(0.35, 0, 0.25, 1);\\n}\\n\");\n};\nvar classes = {\n root: function root(_ref2) {\n var props = _ref2.props;\n return ['p-tabview p-component', {\n 'p-tabview-scrollable': props.scrollable\n }];\n },\n navContainer: 'p-tabview-tablist-container',\n prevButton: 'p-tabview-prev-button',\n navContent: 'p-tabview-tablist-scroll-container',\n nav: 'p-tabview-tablist',\n tab: {\n header: function header(_ref3) {\n var instance = _ref3.instance,\n tab = _ref3.tab,\n index = _ref3.index;\n return ['p-tabview-tablist-item', instance.getTabProp(tab, 'headerClass'), {\n 'p-tabview-tablist-item-active': instance.d_activeIndex === index,\n 'p-disabled': instance.getTabProp(tab, 'disabled')\n }];\n },\n headerAction: 'p-tabview-tab-header',\n headerTitle: 'p-tabview-tab-title',\n content: function content(_ref4) {\n var instance = _ref4.instance,\n tab = _ref4.tab;\n return ['p-tabview-panel', instance.getTabProp(tab, 'contentClass')];\n }\n },\n inkbar: 'p-tabview-ink-bar',\n nextButton: 'p-tabview-next-button',\n panelContainer: 'p-tabview-panels'\n};\nvar TabViewStyle = BaseStyle.extend({\n name: 'tabview',\n theme: theme,\n classes: classes\n});\n\nexport { TabViewStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import { UniqueComponentId } from '@primevue/core/utils';\nimport { getWidth, getAttribute, findSingle, focus, getOffset } from '@primeuix/utils/dom';\nimport ChevronLeftIcon from '@primevue/icons/chevronleft';\nimport ChevronRightIcon from '@primevue/icons/chevronright';\nimport Ripple from 'primevue/ripple';\nimport { mergeProps, resolveDirective, openBlock, createElementBlock, createElementVNode, withDirectives, renderSlot, createBlock, resolveDynamicComponent, createCommentVNode, Fragment, renderList, toDisplayString, vShow } from 'vue';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport TabViewStyle from 'primevue/tabview/style';\n\nvar script$1 = {\n name: 'BaseTabView',\n \"extends\": BaseComponent,\n props: {\n activeIndex: {\n type: Number,\n \"default\": 0\n },\n lazy: {\n type: Boolean,\n \"default\": false\n },\n scrollable: {\n type: Boolean,\n \"default\": false\n },\n tabindex: {\n type: Number,\n \"default\": 0\n },\n selectOnFocus: {\n type: Boolean,\n \"default\": false\n },\n prevButtonProps: {\n type: null,\n \"default\": null\n },\n nextButtonProps: {\n type: null,\n \"default\": null\n },\n prevIcon: {\n type: String,\n \"default\": undefined\n },\n nextIcon: {\n type: String,\n \"default\": undefined\n }\n },\n style: TabViewStyle,\n provide: function provide() {\n return {\n $pcTabs: undefined,\n // Backwards compatible to prevent component from breaking\n $pcTabView: this,\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'TabView',\n \"extends\": script$1,\n inheritAttrs: false,\n emits: ['update:activeIndex', 'tab-change', 'tab-click'],\n data: function data() {\n return {\n id: this.$attrs.id,\n d_activeIndex: this.activeIndex,\n isPrevButtonDisabled: true,\n isNextButtonDisabled: false\n };\n },\n watch: {\n '$attrs.id': function $attrsId(newValue) {\n this.id = newValue || UniqueComponentId();\n },\n activeIndex: function activeIndex(newValue) {\n this.d_activeIndex = newValue;\n this.scrollInView({\n index: newValue\n });\n }\n },\n mounted: function mounted() {\n console.warn('Deprecated since v4. Use Tabs component instead.');\n this.id = this.id || UniqueComponentId();\n this.updateInkBar();\n this.scrollable && this.updateButtonState();\n },\n updated: function updated() {\n this.updateInkBar();\n this.scrollable && this.updateButtonState();\n },\n methods: {\n isTabPanel: function isTabPanel(child) {\n return child.type.name === 'TabPanel';\n },\n isTabActive: function isTabActive(index) {\n return this.d_activeIndex === index;\n },\n getTabProp: function getTabProp(tab, name) {\n return tab.props ? tab.props[name] : undefined;\n },\n getKey: function getKey(tab, index) {\n return this.getTabProp(tab, 'header') || index;\n },\n getTabHeaderActionId: function getTabHeaderActionId(index) {\n return \"\".concat(this.id, \"_\").concat(index, \"_header_action\");\n },\n getTabContentId: function getTabContentId(index) {\n return \"\".concat(this.id, \"_\").concat(index, \"_content\");\n },\n getTabPT: function getTabPT(tab, key, index) {\n var count = this.tabs.length;\n var tabMetaData = {\n props: tab.props,\n parent: {\n instance: this,\n props: this.$props,\n state: this.$data\n },\n context: {\n index: index,\n count: count,\n first: index === 0,\n last: index === count - 1,\n active: this.isTabActive(index)\n }\n };\n return mergeProps(this.ptm(\"tabpanel.\".concat(key), {\n tabpanel: tabMetaData\n }), this.ptm(\"tabpanel.\".concat(key), tabMetaData), this.ptmo(this.getTabProp(tab, 'pt'), key, tabMetaData));\n },\n onScroll: function onScroll(event) {\n this.scrollable && this.updateButtonState();\n event.preventDefault();\n },\n onPrevButtonClick: function onPrevButtonClick() {\n var content = this.$refs.content;\n var width = getWidth(content);\n var pos = content.scrollLeft - width;\n content.scrollLeft = pos <= 0 ? 0 : pos;\n },\n onNextButtonClick: function onNextButtonClick() {\n var content = this.$refs.content;\n var width = getWidth(content) - this.getVisibleButtonWidths();\n var pos = content.scrollLeft + width;\n var lastPos = content.scrollWidth - width;\n content.scrollLeft = pos >= lastPos ? lastPos : pos;\n },\n onTabClick: function onTabClick(event, tab, index) {\n this.changeActiveIndex(event, tab, index);\n this.$emit('tab-click', {\n originalEvent: event,\n index: index\n });\n },\n onTabKeyDown: function onTabKeyDown(event, tab, index) {\n switch (event.code) {\n case 'ArrowLeft':\n this.onTabArrowLeftKey(event);\n break;\n case 'ArrowRight':\n this.onTabArrowRightKey(event);\n break;\n case 'Home':\n this.onTabHomeKey(event);\n break;\n case 'End':\n this.onTabEndKey(event);\n break;\n case 'PageDown':\n this.onPageDownKey(event);\n break;\n case 'PageUp':\n this.onPageUpKey(event);\n break;\n case 'Enter':\n case 'NumpadEnter':\n case 'Space':\n this.onTabEnterKey(event, tab, index);\n break;\n }\n },\n onTabArrowRightKey: function onTabArrowRightKey(event) {\n var nextHeaderAction = this.findNextHeaderAction(event.target.parentElement);\n nextHeaderAction ? this.changeFocusedTab(event, nextHeaderAction) : this.onTabHomeKey(event);\n event.preventDefault();\n },\n onTabArrowLeftKey: function onTabArrowLeftKey(event) {\n var prevHeaderAction = this.findPrevHeaderAction(event.target.parentElement);\n prevHeaderAction ? this.changeFocusedTab(event, prevHeaderAction) : this.onTabEndKey(event);\n event.preventDefault();\n },\n onTabHomeKey: function onTabHomeKey(event) {\n var firstHeaderAction = this.findFirstHeaderAction();\n this.changeFocusedTab(event, firstHeaderAction);\n event.preventDefault();\n },\n onTabEndKey: function onTabEndKey(event) {\n var lastHeaderAction = this.findLastHeaderAction();\n this.changeFocusedTab(event, lastHeaderAction);\n event.preventDefault();\n },\n onPageDownKey: function onPageDownKey(event) {\n this.scrollInView({\n index: this.$refs.nav.children.length - 2\n });\n event.preventDefault();\n },\n onPageUpKey: function onPageUpKey(event) {\n this.scrollInView({\n index: 0\n });\n event.preventDefault();\n },\n onTabEnterKey: function onTabEnterKey(event, tab, index) {\n this.changeActiveIndex(event, tab, index);\n event.preventDefault();\n },\n findNextHeaderAction: function findNextHeaderAction(tabElement) {\n var selfCheck = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var headerElement = selfCheck ? tabElement : tabElement.nextElementSibling;\n return headerElement ? getAttribute(headerElement, 'data-p-disabled') || getAttribute(headerElement, 'data-pc-section') === 'inkbar' ? this.findNextHeaderAction(headerElement) : findSingle(headerElement, '[data-pc-section=\"headeraction\"]') : null;\n },\n findPrevHeaderAction: function findPrevHeaderAction(tabElement) {\n var selfCheck = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var headerElement = selfCheck ? tabElement : tabElement.previousElementSibling;\n return headerElement ? getAttribute(headerElement, 'data-p-disabled') || getAttribute(headerElement, 'data-pc-section') === 'inkbar' ? this.findPrevHeaderAction(headerElement) : findSingle(headerElement, '[data-pc-section=\"headeraction\"]') : null;\n },\n findFirstHeaderAction: function findFirstHeaderAction() {\n return this.findNextHeaderAction(this.$refs.nav.firstElementChild, true);\n },\n findLastHeaderAction: function findLastHeaderAction() {\n return this.findPrevHeaderAction(this.$refs.nav.lastElementChild, true);\n },\n changeActiveIndex: function changeActiveIndex(event, tab, index) {\n if (!this.getTabProp(tab, 'disabled') && this.d_activeIndex !== index) {\n this.d_activeIndex = index;\n this.$emit('update:activeIndex', index);\n this.$emit('tab-change', {\n originalEvent: event,\n index: index\n });\n this.scrollInView({\n index: index\n });\n }\n },\n changeFocusedTab: function changeFocusedTab(event, element) {\n if (element) {\n focus(element);\n this.scrollInView({\n element: element\n });\n if (this.selectOnFocus) {\n var index = parseInt(element.parentElement.dataset.pcIndex, 10);\n var tab = this.tabs[index];\n this.changeActiveIndex(event, tab, index);\n }\n }\n },\n scrollInView: function scrollInView(_ref) {\n var element = _ref.element,\n _ref$index = _ref.index,\n index = _ref$index === void 0 ? -1 : _ref$index;\n var currentElement = element || this.$refs.nav.children[index];\n if (currentElement) {\n currentElement.scrollIntoView && currentElement.scrollIntoView({\n block: 'nearest'\n });\n }\n },\n updateInkBar: function updateInkBar() {\n var tabHeader = this.$refs.nav.children[this.d_activeIndex];\n this.$refs.inkbar.style.width = getWidth(tabHeader) + 'px';\n this.$refs.inkbar.style.left = getOffset(tabHeader).left - getOffset(this.$refs.nav).left + 'px';\n },\n updateButtonState: function updateButtonState() {\n var content = this.$refs.content;\n var scrollLeft = content.scrollLeft,\n scrollWidth = content.scrollWidth;\n var width = getWidth(content);\n this.isPrevButtonDisabled = scrollLeft === 0;\n this.isNextButtonDisabled = parseInt(scrollLeft) === scrollWidth - width;\n },\n getVisibleButtonWidths: function getVisibleButtonWidths() {\n var _this$$refs = this.$refs,\n prevBtn = _this$$refs.prevBtn,\n nextBtn = _this$$refs.nextBtn;\n return [prevBtn, nextBtn].reduce(function (acc, el) {\n return el ? acc + getWidth(el) : acc;\n }, 0);\n }\n },\n computed: {\n tabs: function tabs() {\n var _this = this;\n return this.$slots[\"default\"]().reduce(function (tabs, child) {\n if (_this.isTabPanel(child)) {\n tabs.push(child);\n } else if (child.children && child.children instanceof Array) {\n child.children.forEach(function (nestedChild) {\n if (_this.isTabPanel(nestedChild)) {\n tabs.push(nestedChild);\n }\n });\n }\n return tabs;\n }, []);\n },\n prevButtonAriaLabel: function prevButtonAriaLabel() {\n return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.previous : undefined;\n },\n nextButtonAriaLabel: function nextButtonAriaLabel() {\n return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.next : undefined;\n }\n },\n directives: {\n ripple: Ripple\n },\n components: {\n ChevronLeftIcon: ChevronLeftIcon,\n ChevronRightIcon: ChevronRightIcon\n }\n};\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nvar _hoisted_1 = [\"tabindex\", \"aria-label\"];\nvar _hoisted_2 = [\"data-p-active\", \"data-p-disabled\", \"data-pc-index\"];\nvar _hoisted_3 = [\"id\", \"tabindex\", \"aria-disabled\", \"aria-selected\", \"aria-controls\", \"onClick\", \"onKeydown\"];\nvar _hoisted_4 = [\"tabindex\", \"aria-label\"];\nvar _hoisted_5 = [\"id\", \"aria-labelledby\", \"data-pc-index\", \"data-p-active\"];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n var _directive_ripple = resolveDirective(\"ripple\");\n return openBlock(), createElementBlock(\"div\", mergeProps({\n \"class\": _ctx.cx('root'),\n role: \"tablist\"\n }, _ctx.ptmi('root')), [createElementVNode(\"div\", mergeProps({\n \"class\": _ctx.cx('navContainer')\n }, _ctx.ptm('navContainer')), [_ctx.scrollable && !$data.isPrevButtonDisabled ? withDirectives((openBlock(), createElementBlock(\"button\", mergeProps({\n key: 0,\n ref: \"prevBtn\",\n type: \"button\",\n \"class\": _ctx.cx('prevButton'),\n tabindex: _ctx.tabindex,\n \"aria-label\": $options.prevButtonAriaLabel,\n onClick: _cache[0] || (_cache[0] = function () {\n return $options.onPrevButtonClick && $options.onPrevButtonClick.apply($options, arguments);\n })\n }, _objectSpread(_objectSpread({}, _ctx.prevButtonProps), _ctx.ptm('prevButton')), {\n \"data-pc-group-section\": \"navbutton\"\n }), [renderSlot(_ctx.$slots, \"previcon\", {}, function () {\n return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.prevIcon ? 'span' : 'ChevronLeftIcon'), mergeProps({\n \"aria-hidden\": \"true\",\n \"class\": _ctx.prevIcon\n }, _ctx.ptm('prevIcon')), null, 16, [\"class\"]))];\n })], 16, _hoisted_1)), [[_directive_ripple]]) : createCommentVNode(\"\", true), createElementVNode(\"div\", mergeProps({\n ref: \"content\",\n \"class\": _ctx.cx('navContent'),\n onScroll: _cache[1] || (_cache[1] = function () {\n return $options.onScroll && $options.onScroll.apply($options, arguments);\n })\n }, _ctx.ptm('navContent')), [createElementVNode(\"ul\", mergeProps({\n ref: \"nav\",\n \"class\": _ctx.cx('nav')\n }, _ctx.ptm('nav')), [(openBlock(true), createElementBlock(Fragment, null, renderList($options.tabs, function (tab, index) {\n return openBlock(), createElementBlock(\"li\", mergeProps({\n key: $options.getKey(tab, index),\n style: $options.getTabProp(tab, 'headerStyle'),\n \"class\": _ctx.cx('tab.header', {\n tab: tab,\n index: index\n }),\n role: \"presentation\",\n ref_for: true\n }, _objectSpread(_objectSpread(_objectSpread({}, $options.getTabProp(tab, 'headerProps')), $options.getTabPT(tab, 'root', index)), $options.getTabPT(tab, 'header', index)), {\n \"data-pc-name\": \"tabpanel\",\n \"data-p-active\": $data.d_activeIndex === index,\n \"data-p-disabled\": $options.getTabProp(tab, 'disabled'),\n \"data-pc-index\": index\n }), [withDirectives((openBlock(), createElementBlock(\"a\", mergeProps({\n id: $options.getTabHeaderActionId(index),\n \"class\": _ctx.cx('tab.headerAction'),\n tabindex: $options.getTabProp(tab, 'disabled') || !$options.isTabActive(index) ? -1 : _ctx.tabindex,\n role: \"tab\",\n \"aria-disabled\": $options.getTabProp(tab, 'disabled'),\n \"aria-selected\": $options.isTabActive(index),\n \"aria-controls\": $options.getTabContentId(index),\n onClick: function onClick($event) {\n return $options.onTabClick($event, tab, index);\n },\n onKeydown: function onKeydown($event) {\n return $options.onTabKeyDown($event, tab, index);\n },\n ref_for: true\n }, _objectSpread(_objectSpread({}, $options.getTabProp(tab, 'headerActionProps')), $options.getTabPT(tab, 'headerAction', index))), [tab.props && tab.props.header ? (openBlock(), createElementBlock(\"span\", mergeProps({\n key: 0,\n \"class\": _ctx.cx('tab.headerTitle'),\n ref_for: true\n }, $options.getTabPT(tab, 'headerTitle', index)), toDisplayString(tab.props.header), 17)) : createCommentVNode(\"\", true), tab.children && tab.children.header ? (openBlock(), createBlock(resolveDynamicComponent(tab.children.header), {\n key: 1\n })) : createCommentVNode(\"\", true)], 16, _hoisted_3)), [[_directive_ripple]])], 16, _hoisted_2);\n }), 128)), createElementVNode(\"li\", mergeProps({\n ref: \"inkbar\",\n \"class\": _ctx.cx('inkbar'),\n role: \"presentation\",\n \"aria-hidden\": \"true\"\n }, _ctx.ptm('inkbar')), null, 16)], 16)], 16), _ctx.scrollable && !$data.isNextButtonDisabled ? withDirectives((openBlock(), createElementBlock(\"button\", mergeProps({\n key: 1,\n ref: \"nextBtn\",\n type: \"button\",\n \"class\": _ctx.cx('nextButton'),\n tabindex: _ctx.tabindex,\n \"aria-label\": $options.nextButtonAriaLabel,\n onClick: _cache[2] || (_cache[2] = function () {\n return $options.onNextButtonClick && $options.onNextButtonClick.apply($options, arguments);\n })\n }, _objectSpread(_objectSpread({}, _ctx.nextButtonProps), _ctx.ptm('nextButton')), {\n \"data-pc-group-section\": \"navbutton\"\n }), [renderSlot(_ctx.$slots, \"nexticon\", {}, function () {\n return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.nextIcon ? 'span' : 'ChevronRightIcon'), mergeProps({\n \"aria-hidden\": \"true\",\n \"class\": _ctx.nextIcon\n }, _ctx.ptm('nextIcon')), null, 16, [\"class\"]))];\n })], 16, _hoisted_4)), [[_directive_ripple]]) : createCommentVNode(\"\", true)], 16), createElementVNode(\"div\", mergeProps({\n \"class\": _ctx.cx('panelContainer')\n }, _ctx.ptm('panelContainer')), [(openBlock(true), createElementBlock(Fragment, null, renderList($options.tabs, function (tab, index) {\n return openBlock(), createElementBlock(Fragment, {\n key: $options.getKey(tab, index)\n }, [(_ctx.lazy ? $options.isTabActive(index) : true) ? withDirectives((openBlock(), createElementBlock(\"div\", mergeProps({\n key: 0,\n id: $options.getTabContentId(index),\n style: $options.getTabProp(tab, 'contentStyle'),\n \"class\": _ctx.cx('tab.content', {\n tab: tab\n }),\n role: \"tabpanel\",\n \"aria-labelledby\": $options.getTabHeaderActionId(index),\n ref_for: true\n }, _objectSpread(_objectSpread(_objectSpread({}, $options.getTabProp(tab, 'contentProps')), $options.getTabPT(tab, 'root', index)), $options.getTabPT(tab, 'content', index)), {\n \"data-pc-name\": \"tabpanel\",\n \"data-pc-index\": index,\n \"data-p-active\": $data.d_activeIndex === index\n }), [(openBlock(), createBlock(resolveDynamicComponent(tab)))], 16, _hoisted_5)), [[vShow, _ctx.lazy ? true : $options.isTabActive(index)]]) : createCommentVNode(\"\", true)], 64);\n }), 128))], 16)], 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","\n\n\n","\n\n\n","\n\n\n","import BaseIcon from '@primevue/icons/baseicon';\nimport { openBlock, createElementBlock, mergeProps, createElementVNode } from 'vue';\n\nvar script = {\n name: 'ExclamationTriangleIcon',\n \"extends\": BaseIcon\n};\n\nvar _hoisted_1 = /*#__PURE__*/createElementVNode(\"path\", {\n d: \"M13.4018 13.1893H0.598161C0.49329 13.189 0.390283 13.1615 0.299143 13.1097C0.208003 13.0578 0.131826 12.9832 0.0780112 12.8932C0.0268539 12.8015 0 12.6982 0 12.5931C0 12.4881 0.0268539 12.3848 0.0780112 12.293L6.47985 1.08982C6.53679 1.00399 6.61408 0.933574 6.70484 0.884867C6.7956 0.836159 6.897 0.810669 7 0.810669C7.103 0.810669 7.2044 0.836159 7.29516 0.884867C7.38592 0.933574 7.46321 1.00399 7.52015 1.08982L13.922 12.293C13.9731 12.3848 14 12.4881 14 12.5931C14 12.6982 13.9731 12.8015 13.922 12.8932C13.8682 12.9832 13.792 13.0578 13.7009 13.1097C13.6097 13.1615 13.5067 13.189 13.4018 13.1893ZM1.63046 11.989H12.3695L7 2.59425L1.63046 11.989Z\",\n fill: \"currentColor\"\n}, null, -1);\nvar _hoisted_2 = /*#__PURE__*/createElementVNode(\"path\", {\n d: \"M6.99996 8.78801C6.84143 8.78594 6.68997 8.72204 6.57787 8.60993C6.46576 8.49782 6.40186 8.34637 6.39979 8.18784V5.38703C6.39979 5.22786 6.46302 5.0752 6.57557 4.96265C6.68813 4.85009 6.84078 4.78686 6.99996 4.78686C7.15914 4.78686 7.31179 4.85009 7.42435 4.96265C7.5369 5.0752 7.60013 5.22786 7.60013 5.38703V8.18784C7.59806 8.34637 7.53416 8.49782 7.42205 8.60993C7.30995 8.72204 7.15849 8.78594 6.99996 8.78801Z\",\n fill: \"currentColor\"\n}, null, -1);\nvar _hoisted_3 = /*#__PURE__*/createElementVNode(\"path\", {\n d: \"M6.99996 11.1887C6.84143 11.1866 6.68997 11.1227 6.57787 11.0106C6.46576 10.8985 6.40186 10.7471 6.39979 10.5885V10.1884C6.39979 10.0292 6.46302 9.87658 6.57557 9.76403C6.68813 9.65147 6.84078 9.58824 6.99996 9.58824C7.15914 9.58824 7.31179 9.65147 7.42435 9.76403C7.5369 9.87658 7.60013 10.0292 7.60013 10.1884V10.5885C7.59806 10.7471 7.53416 10.8985 7.42205 11.0106C7.30995 11.1227 7.15849 11.1866 6.99996 11.1887Z\",\n fill: \"currentColor\"\n}, null, -1);\nvar _hoisted_4 = [_hoisted_1, _hoisted_2, _hoisted_3];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"svg\", mergeProps({\n width: \"14\",\n height: \"14\",\n viewBox: \"0 0 14 14\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, _ctx.pti()), _hoisted_4, 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseIcon from '@primevue/icons/baseicon';\nimport { openBlock, createElementBlock, mergeProps, createElementVNode } from 'vue';\n\nvar script = {\n name: 'InfoCircleIcon',\n \"extends\": BaseIcon\n};\n\nvar _hoisted_1 = /*#__PURE__*/createElementVNode(\"path\", {\n \"fill-rule\": \"evenodd\",\n \"clip-rule\": \"evenodd\",\n d: \"M3.11101 12.8203C4.26215 13.5895 5.61553 14 7 14C8.85652 14 10.637 13.2625 11.9497 11.9497C13.2625 10.637 14 8.85652 14 7C14 5.61553 13.5895 4.26215 12.8203 3.11101C12.0511 1.95987 10.9579 1.06266 9.67879 0.532846C8.3997 0.00303296 6.99224 -0.13559 5.63437 0.134506C4.2765 0.404603 3.02922 1.07129 2.05026 2.05026C1.07129 3.02922 0.404603 4.2765 0.134506 5.63437C-0.13559 6.99224 0.00303296 8.3997 0.532846 9.67879C1.06266 10.9579 1.95987 12.0511 3.11101 12.8203ZM3.75918 2.14976C4.71846 1.50879 5.84628 1.16667 7 1.16667C8.5471 1.16667 10.0308 1.78125 11.1248 2.87521C12.2188 3.96918 12.8333 5.45291 12.8333 7C12.8333 8.15373 12.4912 9.28154 11.8502 10.2408C11.2093 11.2001 10.2982 11.9478 9.23232 12.3893C8.16642 12.8308 6.99353 12.9463 5.86198 12.7212C4.73042 12.4962 3.69102 11.9406 2.87521 11.1248C2.05941 10.309 1.50384 9.26958 1.27876 8.13803C1.05367 7.00647 1.16919 5.83358 1.61071 4.76768C2.05222 3.70178 2.79989 2.79074 3.75918 2.14976ZM7.00002 4.8611C6.84594 4.85908 6.69873 4.79698 6.58977 4.68801C6.48081 4.57905 6.4187 4.43185 6.41669 4.27776V3.88888C6.41669 3.73417 6.47815 3.58579 6.58754 3.4764C6.69694 3.367 6.84531 3.30554 7.00002 3.30554C7.15473 3.30554 7.3031 3.367 7.4125 3.4764C7.52189 3.58579 7.58335 3.73417 7.58335 3.88888V4.27776C7.58134 4.43185 7.51923 4.57905 7.41027 4.68801C7.30131 4.79698 7.1541 4.85908 7.00002 4.8611ZM7.00002 10.6945C6.84594 10.6925 6.69873 10.6304 6.58977 10.5214C6.48081 10.4124 6.4187 10.2652 6.41669 10.1111V6.22225C6.41669 6.06754 6.47815 5.91917 6.58754 5.80977C6.69694 5.70037 6.84531 5.63892 7.00002 5.63892C7.15473 5.63892 7.3031 5.70037 7.4125 5.80977C7.52189 5.91917 7.58335 6.06754 7.58335 6.22225V10.1111C7.58134 10.2652 7.51923 10.4124 7.41027 10.5214C7.30131 10.6304 7.1541 10.6925 7.00002 10.6945Z\",\n fill: \"currentColor\"\n}, null, -1);\nvar _hoisted_2 = [_hoisted_1];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"svg\", mergeProps({\n width: \"14\",\n height: \"14\",\n viewBox: \"0 0 14 14\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, _ctx.pti()), _hoisted_2, 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-message {\\n border-radius: \".concat(dt('message.border.radius'), \";\\n outline-width: \").concat(dt('message.border.width'), \";\\n outline-style: solid;\\n}\\n\\n.p-message-content {\\n display: flex;\\n align-items: center;\\n padding: \").concat(dt('message.content.padding'), \";\\n gap: \").concat(dt('message.content.gap'), \";\\n height: 100%;\\n}\\n\\n.p-message-icon {\\n flex-shrink: 0;\\n}\\n\\n.p-message-close-button {\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n flex-shrink: 0;\\n margin: 0 0 0 auto;\\n overflow: hidden;\\n position: relative;\\n width: \").concat(dt('message.close.button.width'), \";\\n height: \").concat(dt('message.close.button.height'), \";\\n border-radius: \").concat(dt('message.close.button.border.radius'), \";\\n background: transparent;\\n transition: background \").concat(dt('message.transition.duration'), \", color \").concat(dt('message.transition.duration'), \", outline-color \").concat(dt('message.transition.duration'), \", box-shadow \").concat(dt('message.transition.duration'), \", opacity 0.3s;\\n outline-color: transparent;\\n color: inherit;\\n padding: 0;\\n border: none;\\n cursor: pointer;\\n user-select: none;\\n}\\n\\n.p-message-close-icon {\\n font-size: \").concat(dt('message.close.icon.size'), \";\\n width: \").concat(dt('message.close.icon.size'), \";\\n height: \").concat(dt('message.close.icon.size'), \";\\n}\\n\\n.p-message-close-button:focus-visible {\\n outline-width: \").concat(dt('message.close.button.focus.ring.width'), \";\\n outline-style: \").concat(dt('message.close.button.focus.ring.style'), \";\\n outline-offset: \").concat(dt('message.close.button.focus.ring.offset'), \";\\n}\\n\\n.p-message-info {\\n background: \").concat(dt('message.info.background'), \";\\n outline-color: \").concat(dt('message.info.border.color'), \";\\n color: \").concat(dt('message.info.color'), \";\\n box-shadow: \").concat(dt('message.info.shadow'), \";\\n}\\n\\n.p-message-info .p-message-close-button:focus-visible {\\n outline-color: \").concat(dt('message.info.close.button.focus.ring.color'), \";\\n box-shadow: \").concat(dt('message.info.close.button.focus.ring.shadow'), \";\\n}\\n\\n.p-message-info .p-message-close-button:hover {\\n background: \").concat(dt('message.info.close.button.hover.background'), \";\\n}\\n\\n.p-message-success {\\n background: \").concat(dt('message.success.background'), \";\\n outline-color: \").concat(dt('message.success.border.color'), \";\\n color: \").concat(dt('message.success.color'), \";\\n box-shadow: \").concat(dt('message.success.shadow'), \";\\n}\\n\\n.p-message-success .p-message-close-button:focus-visible {\\n outline-color: \").concat(dt('message.success.close.button.focus.ring.color'), \";\\n box-shadow: \").concat(dt('message.success.close.button.focus.ring.shadow'), \";\\n}\\n\\n.p-message-success .p-message-close-button:hover {\\n background: \").concat(dt('message.success.close.button.hover.background'), \";\\n}\\n\\n.p-message-warn {\\n background: \").concat(dt('message.warn.background'), \";\\n outline-color: \").concat(dt('message.warn.border.color'), \";\\n color: \").concat(dt('message.warn.color'), \";\\n box-shadow: \").concat(dt('message.warn.shadow'), \";\\n}\\n\\n.p-message-warn .p-message-close-button:focus-visible {\\n outline-color: \").concat(dt('message.warn.close.button.focus.ring.color'), \";\\n box-shadow: \").concat(dt('message.warn.close.button.focus.ring.shadow'), \";\\n}\\n\\n.p-message-warn .p-message-close-button:hover {\\n background: \").concat(dt('message.warn.close.button.hover.background'), \";\\n}\\n\\n.p-message-error {\\n background: \").concat(dt('message.error.background'), \";\\n outline-color: \").concat(dt('message.error.border.color'), \";\\n color: \").concat(dt('message.error.color'), \";\\n box-shadow: \").concat(dt('message.error.shadow'), \";\\n}\\n\\n.p-message-error .p-message-close-button:focus-visible {\\n outline-color: \").concat(dt('message.error.close.button.focus.ring.color'), \";\\n box-shadow: \").concat(dt('message.error.close.button.focus.ring.shadow'), \";\\n}\\n\\n.p-message-error .p-message-close-button:hover {\\n background: \").concat(dt('message.error.close.button.hover.background'), \";\\n}\\n\\n.p-message-secondary {\\n background: \").concat(dt('message.secondary.background'), \";\\n outline-color: \").concat(dt('message.secondary.border.color'), \";\\n color: \").concat(dt('message.secondary.color'), \";\\n box-shadow: \").concat(dt('message.secondary.shadow'), \";\\n}\\n\\n.p-message-secondary .p-message-close-button:focus-visible {\\n outline-color: \").concat(dt('message.secondary.close.button.focus.ring.color'), \";\\n box-shadow: \").concat(dt('message.secondary.close.button.focus.ring.shadow'), \";\\n}\\n\\n.p-message-secondary .p-message-close-button:hover {\\n background: \").concat(dt('message.secondary.close.button.hover.background'), \";\\n}\\n\\n.p-message-contrast {\\n background: \").concat(dt('message.contrast.background'), \";\\n outline-color: \").concat(dt('message.contrast.border.color'), \";\\n color: \").concat(dt('message.contrast.color'), \";\\n box-shadow: \").concat(dt('message.contrast.shadow'), \";\\n}\\n\\n.p-message-contrast .p-message-close-button:focus-visible {\\n outline-color: \").concat(dt('message.contrast.close.button.focus.ring.color'), \";\\n box-shadow: \").concat(dt('message.contrast.close.button.focus.ring.shadow'), \";\\n}\\n\\n.p-message-contrast .p-message-close-button:hover {\\n background: \").concat(dt('message.contrast.close.button.hover.background'), \";\\n}\\n\\n.p-message-text {\\n font-size: \").concat(dt('message.text.font.size'), \";\\n font-weight: \").concat(dt('message.text.font.weight'), \";\\n}\\n\\n.p-message-icon {\\n font-size: \").concat(dt('message.icon.size'), \";\\n width: \").concat(dt('message.icon.size'), \";\\n height: \").concat(dt('message.icon.size'), \";\\n}\\n\\n.p-message-enter-from {\\n opacity: 0;\\n}\\n\\n.p-message-enter-active {\\n transition: opacity 0.3s;\\n}\\n\\n.p-message.p-message-leave-from {\\n max-height: 1000px;\\n}\\n\\n.p-message.p-message-leave-to {\\n max-height: 0;\\n opacity: 0;\\n margin: 0;\\n}\\n\\n.p-message-leave-active {\\n overflow: hidden;\\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin 0.3s;\\n}\\n\\n.p-message-leave-active .p-message-close-button {\\n opacity: 0;\\n}\\n\");\n};\nvar classes = {\n root: function root(_ref2) {\n var props = _ref2.props;\n return 'p-message p-component p-message-' + props.severity;\n },\n content: 'p-message-content',\n icon: 'p-message-icon',\n text: 'p-message-text',\n closeButton: 'p-message-close-button',\n closeIcon: 'p-message-close-icon'\n};\nvar MessageStyle = BaseStyle.extend({\n name: 'message',\n theme: theme,\n classes: classes\n});\n\nexport { MessageStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import CheckIcon from '@primevue/icons/check';\nimport ExclamationTriangleIcon from '@primevue/icons/exclamationtriangle';\nimport InfoCircleIcon from '@primevue/icons/infocircle';\nimport TimesIcon from '@primevue/icons/times';\nimport TimesCircleIcon from '@primevue/icons/timescircle';\nimport Ripple from 'primevue/ripple';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport MessageStyle from 'primevue/message/style';\nimport { resolveComponent, resolveDirective, openBlock, createBlock, Transition, mergeProps, withCtx, withDirectives, createElementVNode, renderSlot, createElementBlock, resolveDynamicComponent, createCommentVNode, vShow } from 'vue';\n\nvar script$1 = {\n name: 'BaseMessage',\n \"extends\": BaseComponent,\n props: {\n severity: {\n type: String,\n \"default\": 'info'\n },\n closable: {\n type: Boolean,\n \"default\": false\n },\n life: {\n type: Number,\n \"default\": null\n },\n icon: {\n type: String,\n \"default\": undefined\n },\n closeIcon: {\n type: String,\n \"default\": undefined\n },\n closeButtonProps: {\n type: null,\n \"default\": null\n }\n },\n style: MessageStyle,\n provide: function provide() {\n return {\n $pcMessage: this,\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'Message',\n \"extends\": script$1,\n inheritAttrs: false,\n emits: ['close', 'life-end'],\n timeout: null,\n data: function data() {\n return {\n visible: true\n };\n },\n mounted: function mounted() {\n var _this = this;\n if (this.life) {\n setTimeout(function () {\n _this.visible = false;\n _this.$emit('life-end');\n }, this.life);\n }\n },\n methods: {\n close: function close(event) {\n this.visible = false;\n this.$emit('close', event);\n }\n },\n computed: {\n iconComponent: function iconComponent() {\n return {\n info: InfoCircleIcon,\n success: CheckIcon,\n warn: ExclamationTriangleIcon,\n error: TimesCircleIcon\n }[this.severity];\n },\n closeAriaLabel: function closeAriaLabel() {\n return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.close : undefined;\n }\n },\n directives: {\n ripple: Ripple\n },\n components: {\n TimesIcon: TimesIcon,\n InfoCircleIcon: InfoCircleIcon,\n CheckIcon: CheckIcon,\n ExclamationTriangleIcon: ExclamationTriangleIcon,\n TimesCircleIcon: TimesCircleIcon\n }\n};\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nvar _hoisted_1 = [\"aria-label\"];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n var _component_TimesIcon = resolveComponent(\"TimesIcon\");\n var _directive_ripple = resolveDirective(\"ripple\");\n return openBlock(), createBlock(Transition, mergeProps({\n name: \"p-message\",\n appear: \"\"\n }, _ctx.ptmi('transition')), {\n \"default\": withCtx(function () {\n return [withDirectives(createElementVNode(\"div\", mergeProps({\n \"class\": _ctx.cx('root'),\n role: \"alert\",\n \"aria-live\": \"assertive\",\n \"aria-atomic\": \"true\"\n }, _ctx.ptm('root')), [_ctx.$slots.container ? renderSlot(_ctx.$slots, \"container\", {\n key: 0,\n closeCallback: $options.close\n }) : (openBlock(), createElementBlock(\"div\", mergeProps({\n key: 1,\n \"class\": _ctx.cx('content')\n }, _ctx.ptm('content')), [renderSlot(_ctx.$slots, \"icon\", {\n \"class\": \"p-message-icon\"\n }, function () {\n return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon ? 'span' : null), mergeProps({\n \"class\": [_ctx.cx('icon'), _ctx.icon]\n }, _ctx.ptm('icon')), null, 16, [\"class\"]))];\n }), _ctx.$slots[\"default\"] ? (openBlock(), createElementBlock(\"div\", mergeProps({\n key: 0,\n \"class\": [\"p-message-text\", _ctx.cx('text')]\n }, _ctx.ptm('text')), [renderSlot(_ctx.$slots, \"default\")], 16)) : createCommentVNode(\"\", true), _ctx.closable ? withDirectives((openBlock(), createElementBlock(\"button\", mergeProps({\n key: 1,\n \"class\": _ctx.cx('closeButton'),\n \"aria-label\": $options.closeAriaLabel,\n type: \"button\",\n onClick: _cache[0] || (_cache[0] = function ($event) {\n return $options.close($event);\n })\n }, _objectSpread(_objectSpread({}, _ctx.closeButtonProps), _ctx.ptm('closeButton'))), [renderSlot(_ctx.$slots, \"closeicon\", {}, function () {\n return [_ctx.closeIcon ? (openBlock(), createElementBlock(\"i\", mergeProps({\n key: 0,\n \"class\": [_ctx.cx('closeIcon'), _ctx.closeIcon]\n }, _ctx.ptm('closeIcon')), null, 16)) : (openBlock(), createBlock(_component_TimesIcon, mergeProps({\n key: 1,\n \"class\": [_ctx.cx('closeIcon'), _ctx.closeIcon]\n }, _ctx.ptm('closeIcon')), null, 16, [\"class\"]))];\n })], 16, _hoisted_1)), [[_directive_ripple]]) : createCommentVNode(\"\", true)], 16))], 16), [[vShow, $data.visible]])];\n }),\n _: 3\n }, 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","\n\n\n","\n\n\n\n\n\n\n","\n\n\n","import { inject } from 'vue';\n\nvar PrimeVueToastSymbol = Symbol();\nfunction useToast() {\n var PrimeVueToast = inject(PrimeVueToastSymbol);\n if (!PrimeVueToast) {\n throw new Error('No PrimeVue Toast provided!');\n }\n return PrimeVueToast;\n}\n\nexport { PrimeVueToastSymbol, useToast };\n//# sourceMappingURL=index.mjs.map\n","\n\n\n","\n\n\n\n\n","\n\n\n\n\n","import BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-floatlabel {\\n display: block;\\n position: relative;\\n}\\n\\n.p-floatlabel label {\\n position: absolute;\\n pointer-events: none;\\n top: 50%;\\n margin-top: -.5rem;\\n transition-property: all;\\n transition-timing-function: ease;\\n line-height: 1;\\n left: 0.75rem;\\n color: \".concat(dt('floatlabel.color'), \";\\n transition-duration: \").concat(dt('floatlabel.transition.duration'), \";\\n}\\n\\n.p-floatlabel:has(textarea) label {\\n top: 1rem;\\n}\\n\\n.p-floatlabel:has(input:focus) label,\\n.p-floatlabel:has(input.p-filled) label,\\n.p-floatlabel:has(input:-webkit-autofill) label,\\n.p-floatlabel:has(textarea:focus) label,\\n.p-floatlabel:has(textarea.p-filled) label,\\n.p-floatlabel:has(.p-inputwrapper-focus) label,\\n.p-floatlabel:has(.p-inputwrapper-filled) label {\\n top: -.75rem;\\n font-size: 12px;\\n color: \").concat(dt('floatlabel.focus.color'), \";\\n}\\n\\n.p-floatlabel .p-placeholder,\\n.p-floatlabel input::placeholder,\\n.p-floatlabel .p-inputtext::placeholder {\\n opacity: 0;\\n transition-property: all;\\n transition-timing-function: ease;\\n}\\n\\n.p-floatlabel .p-focus .p-placeholder,\\n.p-floatlabel input:focus::placeholder,\\n.p-floatlabel .p-inputtext:focus::placeholder {\\n opacity: 1;\\n transition-property: all;\\n transition-timing-function: ease;\\n}\\n\\n.p-floatlabel > .p-invalid + label {\\n color: \").concat(dt('floatlabel.invalid.color'), \";\\n}\\n\");\n};\nvar classes = {\n root: 'p-floatlabel'\n};\nvar FloatLabelStyle = BaseStyle.extend({\n name: 'floatlabel',\n theme: theme,\n classes: classes\n});\n\nexport { FloatLabelStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseComponent from '@primevue/core/basecomponent';\nimport FloatLabelStyle from 'primevue/floatlabel/style';\nimport { openBlock, createElementBlock, mergeProps, renderSlot } from 'vue';\n\nvar script$1 = {\n name: 'BaseFloatLabel',\n \"extends\": BaseComponent,\n props: {},\n style: FloatLabelStyle,\n provide: function provide() {\n return {\n $pcFloatLabel: this,\n $parentInstance: this\n };\n }\n};\n\nvar script = {\n name: 'FloatLabel',\n \"extends\": script$1,\n inheritAttrs: false\n};\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"span\", mergeProps({\n \"class\": _ctx.cx('root')\n }, _ctx.ptmi('root')), [renderSlot(_ctx.$slots, \"default\")], 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","\n\n\n","import { createI18n } from 'vue-i18n'\n\nconst messages = {\n en: {\n welcome: {\n title: 'Welcome to ComfyUI',\n getStarted: 'Get Started'\n },\n install: {\n installLocation: 'Install Location',\n migration: 'Migration',\n desktopSettings: 'Desktop Settings',\n chooseInstallationLocation: 'Choose Installation Location',\n systemLocations: 'System Locations',\n failedToSelectDirectory: 'Failed to select directory',\n pathValidationFailed: 'Failed to validate path',\n installLocationDescription:\n \"Select the directory for ComfyUI's user data. A python environment will be installed to the selected location. Please make sure the selected disk has enough space (~5GB) left.\",\n installLocationTooltip:\n \"ComfyUI's user data directory. Stores:\\n- Python Environment\\n- Models\\n- Custom nodes\\n\",\n appDataLocationTooltip:\n \"ComfyUI's app data directory. Stores:\\n- Logs\\n- Server configs\",\n appPathLocationTooltip:\n \"ComfyUI's app asset directory. Stores the ComfyUI code and assets\",\n migrateFromExistingInstallation: 'Migrate from Existing Installation',\n migrationSourcePathDescription:\n 'If you have an existing ComfyUI installation, we can copy/link your existing user files and models to the new installation.',\n selectItemsToMigrate: 'Select Items to Migrate',\n migrationOptional:\n \"Migration is optional. If you don't have an existing installation, you can skip this step.\",\n desktopAppSettings: 'Desktop App Settings',\n desktopAppSettingsDescription:\n 'Configure how ComfyUI behaves on your desktop. You can change these settings later.',\n settings: {\n autoUpdate: 'Automatic Updates',\n allowMetrics: 'Usage Analytics',\n autoUpdateDescription:\n \"Automatically download and install updates when they become available. You'll always be notified before updates are installed.\",\n allowMetricsDescription:\n 'Help improve ComfyUI by sending anonymous usage data. No personal information or workflow content will be collected.',\n learnMoreAboutData: 'Learn more about data collection',\n dataCollectionDialog: {\n title: 'About Data Collection',\n whatWeCollect: 'What we collect:',\n whatWeDoNotCollect: \"What we don't collect:\",\n errorReports: 'Error reports',\n systemInfo: 'Operating system and app version',\n personalInformation: 'Personal information',\n workflowContent: 'Workflow content',\n fileSystemInformation: 'File system information'\n }\n }\n },\n firstTimeUIMessage:\n 'This is the first time you use the new UI. Choose \"Menu > Use New Menu > Disabled\" to restore the old UI.',\n download: 'Download',\n loadAllFolders: 'Load All Folders',\n refresh: 'Refresh',\n terminal: 'Terminal',\n videoFailedToLoad: 'Video failed to load',\n extensionName: 'Extension Name',\n reloadToApplyChanges: 'Reload to apply changes',\n insert: 'Insert',\n systemInfo: 'System Info',\n devices: 'Devices',\n about: 'About',\n add: 'Add',\n confirm: 'Confirm',\n reset: 'Reset',\n resetKeybindingsTooltip: 'Reset keybindings to default',\n customizeFolder: 'Customize Folder',\n icon: 'Icon',\n color: 'Color',\n bookmark: 'Bookmark',\n folder: 'Folder',\n star: 'Star',\n heart: 'Heart',\n file: 'File',\n inbox: 'Inbox',\n box: 'Box',\n briefcase: 'Briefcase',\n error: 'Error',\n loading: 'Loading',\n findIssues: 'Find Issues',\n copyToClipboard: 'Copy to Clipboard',\n openNewIssue: 'Open New Issue',\n showReport: 'Show Report',\n imageFailedToLoad: 'Image failed to load',\n reconnecting: 'Reconnecting',\n reconnected: 'Reconnected',\n delete: 'Delete',\n rename: 'Rename',\n customize: 'Customize',\n experimental: 'BETA',\n deprecated: 'DEPR',\n loadWorkflow: 'Load Workflow',\n goToNode: 'Go to Node',\n settings: 'Settings',\n searchWorkflows: 'Search Workflows',\n searchSettings: 'Search Settings',\n searchNodes: 'Search Nodes',\n searchModels: 'Search Models',\n searchKeybindings: 'Search Keybindings',\n noResultsFound: 'No Results Found',\n searchFailedMessage:\n \"We couldn't find any settings matching your search. Try adjusting your search terms.\",\n noTasksFound: 'No Tasks Found',\n noTasksFoundMessage: 'There are no tasks in the queue.',\n newFolder: 'New Folder',\n sideToolbar: {\n themeToggle: 'Toggle Theme',\n queue: 'Queue',\n nodeLibrary: 'Node Library',\n workflows: 'Workflows',\n browseTemplates: 'Browse example templates',\n openWorkflow: 'Open workflow in local file system',\n newBlankWorkflow: 'Create a new blank workflow',\n nodeLibraryTab: {\n sortOrder: 'Sort Order'\n },\n modelLibrary: 'Model Library',\n downloads: 'Downloads',\n queueTab: {\n showFlatList: 'Show Flat List',\n backToAllTasks: 'Back to All Tasks',\n containImagePreview: 'Fill Image Preview',\n coverImagePreview: 'Fit Image Preview',\n clearPendingTasks: 'Clear Pending Tasks'\n }\n },\n menu: {\n hideMenu: 'Hide Menu',\n showMenu: 'Show Menu',\n batchCount: 'Batch Count',\n batchCountTooltip:\n 'The number of times the workflow generation should be queued',\n autoQueue: 'Auto Queue',\n disabled: 'Disabled',\n disabledTooltip: 'The workflow will not be automatically queued',\n instant: 'Instant',\n instantTooltip:\n 'The workflow will be queued instantly after a generation finishes',\n change: 'On Change',\n changeTooltip: 'The workflow will be queued once a change is made',\n queueWorkflow: 'Queue workflow',\n queueWorkflowFront: 'Queue workflow (Insert at Front)',\n queue: 'Queue',\n interrupt: 'Cancel current run',\n refresh: 'Refresh node definitions',\n clipspace: 'Open Clipspace',\n resetView: 'Reset canvas view',\n clear: 'Clear workflow',\n toggleBottomPanel: 'Toggle Bottom Panel'\n },\n templateWorkflows: {\n title: 'Get Started with a Template',\n template: {\n default: 'Image Generation',\n image2image: 'Image to Image',\n upscale: '2 Pass Upscale',\n flux_schnell: 'Flux Schnell'\n }\n },\n graphCanvasMenu: {\n zoomIn: 'Zoom In',\n zoomOut: 'Zoom Out',\n resetView: 'Reset View',\n fitView: 'Fit View',\n selectMode: 'Select Mode',\n panMode: 'Pan Mode',\n toggleLinkVisibility: 'Toggle Link Visibility'\n },\n electronFileDownload: {\n inProgress: 'In Progress',\n pause: 'Pause Download',\n paused: 'Paused',\n resume: 'Resume Download',\n cancel: 'Cancel Download',\n cancelled: 'Cancelled'\n }\n },\n zh: {\n firstTimeUIMessage:\n '这是您第一次使用新界面。选择“Menu > Use New Menu > Disabled”以恢复旧界面。',\n download: '下载',\n loadAllFolders: '加载所有文件夹',\n refresh: '刷新',\n terminal: '终端',\n videoFailedToLoad: '视频加载失败',\n extensionName: '扩展名称',\n reloadToApplyChanges: '重新加载以应用更改',\n insert: '插入',\n systemInfo: '系统信息',\n devices: '设备',\n about: '关于',\n add: '添加',\n confirm: '确认',\n reset: '重置',\n resetKeybindingsTooltip: '重置键位',\n customizeFolder: '定制文件夹',\n icon: '图标',\n color: '颜色',\n bookmark: '书签',\n folder: '文件夹',\n star: '星星',\n heart: '心',\n file: '文件',\n inbox: '收件箱',\n box: '盒子',\n briefcase: '公文包',\n error: '错误',\n loading: '加载中',\n findIssues: '查找 Issue',\n copyToClipboard: '复制到剪贴板',\n openNewIssue: '开启新 Issue',\n showReport: '显示报告',\n imageFailedToLoad: '图像加载失败',\n reconnecting: '重新连接中',\n reconnected: '已重新连接',\n delete: '删除',\n rename: '重命名',\n customize: '定制',\n experimental: 'BETA',\n deprecated: '弃用',\n loadWorkflow: '加载工作流',\n goToNode: '前往节点',\n settings: '设置',\n searchWorkflows: '搜索工作流',\n searchSettings: '搜索设置',\n searchNodes: '搜索节点',\n searchModels: '搜索模型',\n searchKeybindings: '搜索键位',\n noResultsFound: '未找到结果',\n searchFailedMessage:\n '我们找不到与您的搜索匹配的任何设置。请尝试调整搜索条件。',\n noContent: '(无内容)',\n noTasksFound: '未找到任务',\n noTasksFoundMessage: '队列中没有任务。',\n newFolder: '新建文件夹',\n sideToolbar: {\n themeToggle: '主题切换',\n queue: '队列',\n nodeLibrary: '节点库',\n workflows: '工作流',\n browseTemplates: '浏览示例模板',\n openWorkflow: '在本地文件系统中打开工作流',\n newBlankWorkflow: '创建一个新空白工作流',\n nodeLibraryTab: {\n sortOrder: '排序顺序'\n },\n modelLibrary: '模型库',\n queueTab: {\n showFlatList: '平铺结果',\n backToAllTasks: '返回',\n containImagePreview: '填充图像预览',\n coverImagePreview: '适应图像预览',\n clearPendingTasks: '清除待处理任务'\n }\n },\n menu: {\n hideMenu: '隐藏菜单',\n showMenu: '显示菜单',\n batchCount: '批次数量',\n batchCountTooltip: '工作流生成次数',\n autoQueue: '自动执行',\n disabled: '禁用',\n disabledTooltip: '工作流将不会自动执行',\n instant: '实时',\n instantTooltip: '工作流将会在生成完成后立即执行',\n change: '变动',\n changeTooltip: '工作流将会在改变后执行',\n queueWorkflow: '执行工作流',\n queueWorkflowFront: '执行工作流 (队列首)',\n queue: '队列',\n interrupt: '取消当前任务',\n refresh: '刷新节点',\n clipspace: '打开剪贴板',\n resetView: '重置画布视图',\n clear: '清空工作流',\n toggleBottomPanel: '底部面板'\n },\n templateWorkflows: {\n title: '从模板开始',\n template: {\n default: 'Image Generation',\n image2image: 'Image to Image',\n upscale: '2 Pass Upscale',\n flux_schnell: 'Flux Schnell'\n }\n },\n graphCanvasMenu: {\n zoomIn: '放大',\n zoomOut: '缩小',\n resetView: '重置视图',\n fitView: '适应视图',\n selectMode: '选择模式',\n panMode: '平移模式',\n toggleLinkVisibility: '切换链接可见性'\n }\n },\n ru: {\n download: 'Скачать',\n refresh: 'Обновить',\n loadAllFolders: 'Загрузить все папки',\n terminal: 'Терминал',\n videoFailedToLoad: 'Видео не удалось загрузить',\n extensionName: 'Название расширения',\n reloadToApplyChanges: 'Перезагрузите, чтобы применить изменения',\n insert: 'Вставить',\n systemInfo: 'Информация о системе',\n devices: 'Устройства',\n about: 'О',\n add: 'Добавить',\n confirm: 'Подтвердить',\n reset: 'Сбросить',\n resetKeybindingsTooltip: 'Сбросить сочетания клавиш по умолчанию',\n customizeFolder: 'Настроить папку',\n icon: 'Иконка',\n color: 'Цвет',\n bookmark: 'Закладка',\n folder: 'Папка',\n star: 'Звёздочка',\n heart: 'Сердце',\n file: 'Файл',\n inbox: 'Входящие',\n box: 'Ящик',\n briefcase: 'Чемодан',\n error: 'Ошибка',\n loading: 'Загрузка',\n findIssues: 'Найти Issue',\n copyToClipboard: 'Копировать в буфер обмена',\n openNewIssue: 'Открыть новый Issue',\n showReport: 'Показать отчёт',\n imageFailedToLoad: 'Изображение не удалось загрузить',\n reconnecting: 'Переподключение',\n reconnected: 'Переподключено',\n delete: 'Удалить',\n rename: 'Переименовать',\n customize: 'Настроить',\n experimental: 'БЕТА',\n deprecated: 'УСТАР',\n loadWorkflow: 'Загрузить рабочий процесс',\n goToNode: 'Перейти к узлу',\n settings: 'Настройки',\n searchWorkflows: 'Поиск рабочих процессов',\n searchSettings: 'Поиск настроек',\n searchNodes: 'Поиск узлов',\n searchModels: 'Поиск моделей',\n searchKeybindings: 'Поиск сочетаний клавиш',\n noResultsFound: 'Ничего не найдено',\n searchFailedMessage:\n 'Не удалось найти ни одной настройки, соответствующей вашему запросу. Попробуйте скорректировать поисковый запрос.',\n noContent: '(Нет контента)',\n noTasksFound: 'Задачи не найдены',\n noTasksFoundMessage: 'В очереди нет задач.',\n newFolder: 'Новая папка',\n sideToolbar: {\n themeToggle: 'Переключить тему',\n queue: 'Очередь',\n nodeLibrary: 'Библиотека узлов',\n workflows: 'Рабочие процессы',\n browseTemplates: 'Просмотреть примеры шаблонов',\n openWorkflow: 'Открыть рабочий процесс в локальной файловой системе',\n newBlankWorkflow: 'Создайте новый пустой рабочий процесс',\n nodeLibraryTab: {\n sortOrder: 'Порядок сортировки'\n },\n modelLibrary: 'Библиотека моделей',\n queueTab: {\n showFlatList: 'Показать плоский список',\n backToAllTasks: 'Вернуться ко всем задачам',\n containImagePreview: 'Предпросмотр заливающего изображения',\n coverImagePreview: 'Предпросмотр подходящего изображения',\n clearPendingTasks: 'Очистить отложенные задачи'\n }\n },\n menu: {\n hideMenu: 'Скрыть меню',\n showMenu: 'Показать меню',\n batchCount: 'Количество пакетов',\n batchCountTooltip:\n 'Количество раз, когда генерация рабочего процесса должна быть помещена в очередь',\n autoQueue: 'Автоочередь',\n disabled: 'Отключено',\n disabledTooltip:\n 'Рабочий процесс не будет автоматически помещён в очередь',\n instant: 'Мгновенно',\n instantTooltip:\n 'Рабочий процесс будет помещён в очередь сразу же после завершения генерации',\n change: 'При изменении',\n changeTooltip:\n 'Рабочий процесс будет поставлен в очередь после внесения изменений',\n queueWorkflow: 'Очередь рабочего процесса',\n queueWorkflowFront: 'Очередь рабочего процесса (Вставка спереди)',\n queue: 'Очередь',\n interrupt: 'Отменить текущее выполнение',\n refresh: 'Обновить определения узлов',\n clipspace: 'Открыть Clipspace',\n resetView: 'Сбросить вид холста',\n clear: 'Очистить рабочий процесс'\n },\n templateWorkflows: {\n title: 'Начните работу с шаблона',\n template: {\n default: 'Image Generation',\n image2image: 'Image to Image',\n upscale: '2 Pass Upscale',\n flux_schnell: 'Flux Schnell'\n }\n },\n graphCanvasMenu: {\n zoomIn: 'Увеличить',\n zoomOut: 'Уменьшить',\n resetView: 'Сбросить вид',\n fitView: 'Подгонять под выделенные',\n selectMode: 'Выбрать режим',\n panMode: 'Режим панорамирования',\n toggleLinkVisibility: 'Переключить видимость ссылок'\n }\n }\n // TODO: Add more languages\n}\n\nexport const i18n = createI18n({\n // Must set `false`, as Vue I18n Legacy API is for Vue 2\n legacy: false,\n locale: navigator.language.split('-')[0] || 'en',\n fallbackLocale: 'en',\n messages\n})\n","// This module is mocked in tests-ui/\n// Import vue components here to avoid tests-ui/ reporting errors\n// about importing primevue components.\nimport { useDialogStore } from '@/stores/dialogStore'\nimport LoadWorkflowWarning from '@/components/dialog/content/LoadWorkflowWarning.vue'\nimport MissingModelsWarning from '@/components/dialog/content/MissingModelsWarning.vue'\nimport SettingDialogContent from '@/components/dialog/content/SettingDialogContent.vue'\nimport SettingDialogHeader from '@/components/dialog/header/SettingDialogHeader.vue'\nimport type { ExecutionErrorWsMessage } from '@/types/apiTypes'\nimport ExecutionErrorDialogContent from '@/components/dialog/content/ExecutionErrorDialogContent.vue'\nimport TemplateWorkflowsContent from '@/components/templates/TemplateWorkflowsContent.vue'\nimport PromptDialogContent from '@/components/dialog/content/PromptDialogContent.vue'\nimport { i18n } from '@/i18n'\nimport type { MissingNodeType } from '@/types/comfy'\n\nexport function showLoadWorkflowWarning(props: {\n missingNodeTypes: MissingNodeType[]\n [key: string]: any\n}) {\n const dialogStore = useDialogStore()\n dialogStore.showDialog({\n component: LoadWorkflowWarning,\n props\n })\n}\n\nexport function showMissingModelsWarning(props: {\n missingModels: any[]\n paths: Record\n [key: string]: any\n}) {\n const dialogStore = useDialogStore()\n dialogStore.showDialog({\n component: MissingModelsWarning,\n props\n })\n}\n\nexport function showSettingsDialog() {\n useDialogStore().showDialog({\n headerComponent: SettingDialogHeader,\n component: SettingDialogContent\n })\n}\n\nexport function showExecutionErrorDialog(error: ExecutionErrorWsMessage) {\n useDialogStore().showDialog({\n component: ExecutionErrorDialogContent,\n props: {\n error\n }\n })\n}\n\nexport function showTemplateWorkflowsDialog() {\n useDialogStore().showDialog({\n title: i18n.global.t('templateWorkflows.title'),\n component: TemplateWorkflowsContent\n })\n}\n\nexport async function showPromptDialog({\n title,\n message,\n defaultValue = ''\n}: {\n title: string\n message: string\n defaultValue?: string\n}): Promise {\n const dialogStore = useDialogStore()\n\n return new Promise((resolve) => {\n dialogStore.showDialog({\n title,\n component: PromptDialogContent,\n props: {\n message,\n defaultValue,\n onConfirm: (value: string) => {\n resolve(value)\n }\n },\n dialogComponentProps: {\n onClose: () => {\n resolve(null)\n }\n }\n })\n })\n}\n","// @ts-strict-ignore\nimport { api } from './api'\nimport { ComfyDialog as _ComfyDialog } from './ui/dialog'\nimport { toggleSwitch } from './ui/toggleSwitch'\nimport { ComfySettingsDialog } from './ui/settings'\nimport { ComfyApp, app } from './app'\nimport { TaskItem } from '@/types/apiTypes'\nimport { showSettingsDialog } from '@/services/dialogService'\nimport { useSettingStore } from '@/stores/settingStore'\nimport { useCommandStore } from '@/stores/commandStore'\nimport { useWorkspaceStore } from '@/stores/workspaceStore'\n\nexport const ComfyDialog = _ComfyDialog\n\ntype Position2D = {\n x: number\n y: number\n}\n\ntype Props = {\n parent?: HTMLElement\n $?: (el: HTMLElement) => void\n dataset?: DOMStringMap\n style?: Partial\n for?: string\n textContent?: string\n [key: string]: any\n}\n\ntype Children = Element[] | Element | string | string[]\n\ntype ElementType = K extends keyof HTMLElementTagNameMap\n ? HTMLElementTagNameMap[K]\n : HTMLElement\n\nexport function $el(\n tag: TTag,\n propsOrChildren?: Children | Props,\n children?: Children\n): ElementType {\n const split = tag.split('.')\n const element = document.createElement(split.shift() as string)\n if (split.length > 0) {\n element.classList.add(...split)\n }\n\n if (propsOrChildren) {\n if (typeof propsOrChildren === 'string') {\n propsOrChildren = { textContent: propsOrChildren }\n } else if (propsOrChildren instanceof Element) {\n propsOrChildren = [propsOrChildren]\n }\n if (Array.isArray(propsOrChildren)) {\n element.append(...propsOrChildren)\n } else {\n const {\n parent,\n $: cb,\n dataset,\n style,\n ...rest\n } = propsOrChildren as Props\n\n if (rest.for) {\n element.setAttribute('for', rest.for)\n }\n\n if (style) {\n Object.assign(element.style, style)\n }\n\n if (dataset) {\n Object.assign(element.dataset, dataset)\n }\n\n Object.assign(element, rest)\n if (children) {\n element.append(...(Array.isArray(children) ? children : [children]))\n }\n\n if (parent) {\n parent.append(element)\n }\n\n if (cb) {\n cb(element)\n }\n }\n }\n return element as ElementType\n}\n\nfunction dragElement(dragEl, settings): () => void {\n var posDiffX = 0,\n posDiffY = 0,\n posStartX = 0,\n posStartY = 0,\n newPosX = 0,\n newPosY = 0\n if (dragEl.getElementsByClassName('drag-handle')[0]) {\n // if present, the handle is where you move the DIV from:\n dragEl.getElementsByClassName('drag-handle')[0].onmousedown = dragMouseDown\n } else {\n // otherwise, move the DIV from anywhere inside the DIV:\n dragEl.onmousedown = dragMouseDown\n }\n\n // When the element resizes (e.g. view queue) ensure it is still in the windows bounds\n const resizeObserver = new ResizeObserver(() => {\n ensureInBounds()\n }).observe(dragEl)\n\n function ensureInBounds() {\n try {\n newPosX = Math.min(\n document.body.clientWidth - dragEl.clientWidth,\n Math.max(0, dragEl.offsetLeft)\n )\n newPosY = Math.min(\n document.body.clientHeight - dragEl.clientHeight,\n Math.max(0, dragEl.offsetTop)\n )\n\n positionElement()\n } catch (exception) {\n // robust\n }\n }\n\n function positionElement() {\n if (dragEl.style.display === 'none') return\n\n const halfWidth = document.body.clientWidth / 2\n const anchorRight = newPosX + dragEl.clientWidth / 2 > halfWidth\n\n // set the element's new position:\n if (anchorRight) {\n dragEl.style.left = 'unset'\n dragEl.style.right =\n document.body.clientWidth - newPosX - dragEl.clientWidth + 'px'\n } else {\n dragEl.style.left = newPosX + 'px'\n dragEl.style.right = 'unset'\n }\n\n dragEl.style.top = newPosY + 'px'\n dragEl.style.bottom = 'unset'\n\n if (savePos) {\n localStorage.setItem(\n 'Comfy.MenuPosition',\n JSON.stringify({\n x: dragEl.offsetLeft,\n y: dragEl.offsetTop\n })\n )\n }\n }\n\n function restorePos() {\n let posString = localStorage.getItem('Comfy.MenuPosition')\n if (posString) {\n const pos = JSON.parse(posString) as Position2D\n newPosX = pos.x\n newPosY = pos.y\n positionElement()\n ensureInBounds()\n }\n }\n\n let savePos = undefined\n settings.addSetting({\n id: 'Comfy.MenuPosition',\n category: ['Comfy', 'Menu', 'MenuPosition'],\n name: \"Save legacy menu's position\",\n type: 'boolean',\n defaultValue: savePos,\n onChange(value) {\n if (savePos === undefined && value) {\n restorePos()\n }\n savePos = value\n }\n })\n\n function dragMouseDown(e) {\n e = e || window.event\n e.preventDefault()\n // get the mouse cursor position at startup:\n posStartX = e.clientX\n posStartY = e.clientY\n document.onmouseup = closeDragElement\n // call a function whenever the cursor moves:\n document.onmousemove = elementDrag\n }\n\n function elementDrag(e) {\n e = e || window.event\n e.preventDefault()\n\n dragEl.classList.add('comfy-menu-manual-pos')\n\n // calculate the new cursor position:\n posDiffX = e.clientX - posStartX\n posDiffY = e.clientY - posStartY\n posStartX = e.clientX\n posStartY = e.clientY\n\n newPosX = Math.min(\n document.body.clientWidth - dragEl.clientWidth,\n Math.max(0, dragEl.offsetLeft + posDiffX)\n )\n newPosY = Math.min(\n document.body.clientHeight - dragEl.clientHeight,\n Math.max(0, dragEl.offsetTop + posDiffY)\n )\n\n positionElement()\n }\n\n window.addEventListener('resize', () => {\n ensureInBounds()\n })\n\n function closeDragElement() {\n // stop moving when mouse button is released:\n document.onmouseup = null\n document.onmousemove = null\n }\n\n return restorePos\n}\n\nclass ComfyList {\n #type\n #text\n #reverse\n element: HTMLDivElement\n button?: HTMLButtonElement\n\n constructor(text, type?, reverse?) {\n this.#text = text\n this.#type = type || text.toLowerCase()\n this.#reverse = reverse || false\n this.element = $el('div.comfy-list') as HTMLDivElement\n this.element.style.display = 'none'\n }\n\n get visible() {\n return this.element.style.display !== 'none'\n }\n\n async load() {\n const items = await api.getItems(this.#type)\n this.element.replaceChildren(\n ...Object.keys(items).flatMap((section) => [\n $el('h4', {\n textContent: section\n }),\n $el('div.comfy-list-items', [\n ...(this.#reverse ? items[section].reverse() : items[section]).map(\n (item: TaskItem) => {\n // Allow items to specify a custom remove action (e.g. for interrupt current prompt)\n const removeAction =\n 'remove' in item\n ? item.remove\n : {\n name: 'Delete',\n cb: () => api.deleteItem(this.#type, item.prompt[1])\n }\n return $el('div', { textContent: item.prompt[0] + ': ' }, [\n $el('button', {\n textContent: 'Load',\n onclick: async () => {\n await app.loadGraphData(\n item.prompt[3].extra_pnginfo.workflow,\n true,\n false\n )\n if ('outputs' in item) {\n app.nodeOutputs = {}\n for (const [key, value] of Object.entries(item.outputs)) {\n const realKey = item['meta']?.[key]?.display_node ?? key\n app.nodeOutputs[realKey] = value\n }\n }\n }\n }),\n $el('button', {\n textContent: removeAction.name,\n onclick: async () => {\n await removeAction.cb()\n await this.update()\n }\n })\n ])\n }\n )\n ])\n ]),\n $el('div.comfy-list-actions', [\n $el('button', {\n textContent: 'Clear ' + this.#text,\n onclick: async () => {\n await api.clearItems(this.#type)\n await this.load()\n }\n }),\n $el('button', { textContent: 'Refresh', onclick: () => this.load() })\n ])\n )\n }\n\n async update() {\n if (this.visible) {\n await this.load()\n }\n }\n\n async show() {\n this.element.style.display = 'block'\n this.button.textContent = 'Close'\n\n await this.load()\n }\n\n hide() {\n this.element.style.display = 'none'\n this.button.textContent = 'View ' + this.#text\n }\n\n toggle() {\n if (this.visible) {\n this.hide()\n return false\n } else {\n this.show()\n return true\n }\n }\n}\n\nexport class ComfyUI {\n app: ComfyApp\n dialog: _ComfyDialog\n settings: ComfySettingsDialog\n batchCount: number\n lastQueueSize: number\n queue: ComfyList\n history: ComfyList\n autoQueueMode: string\n graphHasChanged: boolean\n autoQueueEnabled: boolean\n menuContainer: HTMLDivElement\n queueSize: Element\n restoreMenuPosition: () => void\n loadFile: () => void\n\n constructor(app) {\n this.app = app\n this.dialog = new ComfyDialog()\n this.settings = new ComfySettingsDialog(app)\n\n this.batchCount = 1\n this.lastQueueSize = 0\n this.queue = new ComfyList('Queue')\n this.history = new ComfyList('History', 'history', true)\n\n api.addEventListener('status', () => {\n this.queue.update()\n this.history.update()\n })\n\n this.setup(document.body)\n }\n\n setup(containerElement: HTMLElement) {\n const fileInput = $el('input', {\n id: 'comfy-file-input',\n type: 'file',\n accept: '.json,image/png,.latent,.safetensors,image/webp,audio/flac',\n style: { display: 'none' },\n parent: document.body,\n onchange: async () => {\n await app.handleFile(fileInput.files[0])\n fileInput.value = ''\n }\n })\n\n this.loadFile = () => fileInput.click()\n\n const autoQueueModeEl = toggleSwitch(\n 'autoQueueMode',\n [\n {\n text: 'instant',\n tooltip: 'A new prompt will be queued as soon as the queue reaches 0'\n },\n {\n text: 'change',\n tooltip:\n 'A new prompt will be queued when the queue is at 0 and the graph is/has changed'\n }\n ],\n {\n onChange: (value) => {\n this.autoQueueMode = value.item.value\n }\n }\n )\n autoQueueModeEl.style.display = 'none'\n\n api.addEventListener('graphChanged', () => {\n if (this.autoQueueMode === 'change' && this.autoQueueEnabled === true) {\n if (this.lastQueueSize === 0) {\n this.graphHasChanged = false\n app.queuePrompt(0, this.batchCount)\n } else {\n this.graphHasChanged = true\n }\n }\n })\n\n this.menuContainer = $el('div.comfy-menu', { parent: containerElement }, [\n $el(\n 'div.drag-handle.comfy-menu-header',\n {\n style: {\n overflow: 'hidden',\n position: 'relative',\n width: '100%',\n cursor: 'default'\n }\n },\n [\n $el('span.drag-handle'),\n $el('span.comfy-menu-queue-size', { $: (q) => (this.queueSize = q) }),\n $el('div.comfy-menu-actions', [\n $el('button.comfy-settings-btn', {\n textContent: '⚙️',\n onclick: showSettingsDialog\n }),\n $el('button.comfy-close-menu-btn', {\n textContent: '\\u00d7',\n onclick: () => {\n useWorkspaceStore().focusMode = true\n }\n })\n ])\n ]\n ),\n $el('button.comfy-queue-btn', {\n id: 'queue-button',\n textContent: 'Queue Prompt',\n onclick: () => app.queuePrompt(0, this.batchCount)\n }),\n $el('div', {}, [\n $el('label', { innerHTML: 'Extra options' }, [\n $el('input', {\n type: 'checkbox',\n onchange: (i) => {\n document.getElementById('extraOptions').style.display = i\n .srcElement.checked\n ? 'block'\n : 'none'\n this.batchCount = i.srcElement.checked\n ? Number.parseInt(\n (\n document.getElementById(\n 'batchCountInputRange'\n ) as HTMLInputElement\n ).value\n )\n : 1\n ;(\n document.getElementById('autoQueueCheckbox') as HTMLInputElement\n ).checked = false\n this.autoQueueEnabled = false\n }\n })\n ])\n ]),\n $el(\n 'div',\n { id: 'extraOptions', style: { width: '100%', display: 'none' } },\n [\n $el('div', [\n $el('label', { innerHTML: 'Batch count' }),\n $el('input', {\n id: 'batchCountInputNumber',\n type: 'number',\n value: this.batchCount,\n min: '1',\n style: { width: '35%', marginLeft: '0.4em' },\n oninput: (i) => {\n this.batchCount = i.target.value\n /* Even though an element with a type of range logically represents a number (since\n it's used for numeric input), the value it holds is still treated as a string in HTML and\n JavaScript. This behavior is consistent across all elements regardless of their type\n (like text, number, or range), where the .value property is always a string. */\n ;(\n document.getElementById(\n 'batchCountInputRange'\n ) as HTMLInputElement\n ).value = this.batchCount.toString()\n }\n }),\n $el('input', {\n id: 'batchCountInputRange',\n type: 'range',\n min: '1',\n max: '100',\n value: this.batchCount,\n oninput: (i) => {\n this.batchCount = i.srcElement.value\n // Note\n ;(\n document.getElementById(\n 'batchCountInputNumber'\n ) as HTMLInputElement\n ).value = i.srcElement.value\n }\n })\n ]),\n $el('div', [\n $el('label', {\n for: 'autoQueueCheckbox',\n innerHTML: 'Auto Queue'\n }),\n $el('input', {\n id: 'autoQueueCheckbox',\n type: 'checkbox',\n checked: false,\n title: 'Automatically queue prompt when the queue size hits 0',\n onchange: (e) => {\n this.autoQueueEnabled = e.target.checked\n autoQueueModeEl.style.display = this.autoQueueEnabled\n ? ''\n : 'none'\n }\n }),\n autoQueueModeEl\n ])\n ]\n ),\n $el('div.comfy-menu-btns', [\n $el('button', {\n id: 'queue-front-button',\n textContent: 'Queue Front',\n onclick: () => app.queuePrompt(-1, this.batchCount)\n }),\n $el('button', {\n $: (b) => (this.queue.button = b as HTMLButtonElement),\n id: 'comfy-view-queue-button',\n textContent: 'View Queue',\n onclick: () => {\n this.history.hide()\n this.queue.toggle()\n }\n }),\n $el('button', {\n $: (b) => (this.history.button = b as HTMLButtonElement),\n id: 'comfy-view-history-button',\n textContent: 'View History',\n onclick: () => {\n this.queue.hide()\n this.history.toggle()\n }\n })\n ]),\n this.queue.element,\n this.history.element,\n $el('button', {\n id: 'comfy-save-button',\n textContent: 'Save',\n onclick: () => {\n useCommandStore().execute('Comfy.ExportWorkflow')\n }\n }),\n $el('button', {\n id: 'comfy-dev-save-api-button',\n textContent: 'Save (API Format)',\n style: { width: '100%', display: 'none' },\n onclick: () => {\n useCommandStore().execute('Comfy.ExportWorkflowAPI')\n }\n }),\n $el('button', {\n id: 'comfy-load-button',\n textContent: 'Load',\n onclick: () => fileInput.click()\n }),\n $el('button', {\n id: 'comfy-refresh-button',\n textContent: 'Refresh',\n onclick: () => app.refreshComboInNodes()\n }),\n $el('button', {\n id: 'comfy-clipspace-button',\n textContent: 'Clipspace',\n onclick: () => app.openClipspace()\n }),\n $el('button', {\n id: 'comfy-clear-button',\n textContent: 'Clear',\n onclick: () => {\n if (\n !useSettingStore().get('Comfy.ConfirmClear') ||\n confirm('Clear workflow?')\n ) {\n app.clean()\n app.graph.clear()\n app.resetView()\n api.dispatchEvent(new CustomEvent('graphCleared'))\n }\n }\n }),\n $el('button', {\n id: 'comfy-load-default-button',\n textContent: 'Load Default',\n onclick: async () => {\n if (\n !useSettingStore().get('Comfy.ConfirmClear') ||\n confirm('Load default workflow?')\n ) {\n app.resetView()\n await app.loadGraphData()\n }\n }\n }),\n $el('button', {\n id: 'comfy-reset-view-button',\n textContent: 'Reset View',\n onclick: async () => {\n app.resetView()\n }\n })\n ]) as HTMLDivElement\n // Hide by default on construction so it does not interfere with other views.\n this.menuContainer.style.display = 'none'\n\n this.restoreMenuPosition = dragElement(this.menuContainer, this.settings)\n\n this.setStatus({ exec_info: { queue_remaining: 'X' } })\n }\n\n setStatus(status) {\n this.queueSize.textContent =\n 'Queue size: ' + (status ? status.exec_info.queue_remaining : 'ERR')\n if (status) {\n if (\n this.lastQueueSize != 0 &&\n status.exec_info.queue_remaining == 0 &&\n this.autoQueueEnabled &&\n (this.autoQueueMode === 'instant' || this.graphHasChanged) &&\n !app.lastExecutionError\n ) {\n app.queuePrompt(0, this.batchCount)\n status.exec_info.queue_remaining += this.batchCount\n this.graphHasChanged = false\n }\n this.lastQueueSize = status.exec_info.queue_remaining\n }\n }\n}\n","// @ts-strict-ignore\nimport { $el, ComfyDialog } from './ui'\nimport { api } from './api'\nimport type { ComfyApp } from './app'\nimport { useToastStore } from '@/stores/toastStore'\n\n$el('style', {\n textContent: `\n .comfy-logging-logs {\n display: grid;\n color: var(--fg-color);\n white-space: pre-wrap;\n }\n .comfy-logging-log {\n display: contents;\n }\n .comfy-logging-title {\n background: var(--tr-even-bg-color);\n font-weight: bold;\n margin-bottom: 5px;\n text-align: center;\n }\n .comfy-logging-log div {\n background: var(--row-bg);\n padding: 5px;\n }\n `,\n parent: document.body\n})\n\n// Stringify function supporting max depth and removal of circular references\n// https://stackoverflow.com/a/57193345\nfunction stringify(val, depth, replacer, space, onGetObjID?) {\n depth = isNaN(+depth) ? 1 : depth\n var recursMap = new WeakMap()\n function _build(val, depth, o?, a?, r?) {\n // (JSON.stringify() has it's own rules, which we respect here by using it for property iteration)\n return !val || typeof val != 'object'\n ? val\n : ((r = recursMap.has(val)),\n recursMap.set(val, true),\n (a = Array.isArray(val)),\n r\n ? (o = (onGetObjID && onGetObjID(val)) || null)\n : JSON.stringify(val, function (k, v) {\n if (a || depth > 0) {\n if (replacer) v = replacer(k, v)\n if (!k) return (a = Array.isArray(v)), (val = v)\n !o && (o = a ? [] : {})\n o[k] = _build(v, a ? depth : depth - 1)\n }\n }),\n o === void 0 ? (a ? [] : {}) : o)\n }\n return JSON.stringify(_build(val, depth), null, space)\n}\n\nconst jsonReplacer = (k, v, ui) => {\n if (v instanceof Array && v.length === 1) {\n v = v[0]\n }\n if (v instanceof Date) {\n v = v.toISOString()\n if (ui) {\n v = v.split('T')[1]\n }\n }\n if (v instanceof Error) {\n let err = ''\n if (v.name) err += v.name + '\\n'\n if (v.message) err += v.message + '\\n'\n if (v.stack) err += v.stack + '\\n'\n if (!err) {\n err = v.toString()\n }\n v = err\n }\n return v\n}\n\nconst fileInput: HTMLInputElement = $el('input', {\n type: 'file',\n accept: '.json',\n style: { display: 'none' },\n parent: document.body\n}) as HTMLInputElement\n\nclass ComfyLoggingDialog extends ComfyDialog {\n logging: any\n\n constructor(logging) {\n super()\n this.logging = logging\n }\n\n clear() {\n this.logging.clear()\n this.show()\n }\n\n export() {\n const blob = new Blob(\n [stringify([...this.logging.entries], 20, jsonReplacer, '\\t')],\n {\n type: 'application/json'\n }\n )\n const url = URL.createObjectURL(blob)\n const a = $el('a', {\n href: url,\n download: `comfyui-logs-${Date.now()}.json`,\n style: { display: 'none' },\n parent: document.body\n })\n a.click()\n setTimeout(function () {\n a.remove()\n window.URL.revokeObjectURL(url)\n }, 0)\n }\n\n import() {\n fileInput.onchange = () => {\n const reader = new FileReader()\n reader.onload = () => {\n fileInput.remove()\n try {\n const obj = JSON.parse(reader.result as string)\n if (obj instanceof Array) {\n this.show(obj)\n } else {\n throw new Error('Invalid file selected.')\n }\n } catch (error) {\n useToastStore().addAlert('Unable to load logs: ' + error.message)\n }\n }\n reader.readAsText(fileInput.files[0])\n }\n fileInput.click()\n }\n\n createButtons() {\n return [\n $el('button', {\n type: 'button',\n textContent: 'Clear',\n onclick: () => this.clear()\n }),\n $el('button', {\n type: 'button',\n textContent: 'Export logs...',\n onclick: () => this.export()\n }),\n $el('button', {\n type: 'button',\n textContent: 'View exported logs...',\n onclick: () => this.import()\n }),\n ...super.createButtons()\n ]\n }\n\n getTypeColor(type) {\n switch (type) {\n case 'error':\n return 'red'\n case 'warn':\n return 'orange'\n case 'debug':\n return 'dodgerblue'\n }\n }\n\n show(entries?: any[]) {\n if (!entries) entries = this.logging.entries\n this.element.style.width = '100%'\n const cols = {\n source: 'Source',\n type: 'Type',\n timestamp: 'Timestamp',\n message: 'Message'\n }\n const keys = Object.keys(cols)\n const headers = Object.values(cols).map((title) =>\n $el('div.comfy-logging-title', {\n textContent: title\n })\n )\n const rows = entries.map((entry, i) => {\n return $el(\n 'div.comfy-logging-log',\n {\n $: (el) =>\n el.style.setProperty(\n '--row-bg',\n `var(--tr-${i % 2 ? 'even' : 'odd'}-bg-color)`\n )\n },\n keys.map((key) => {\n let v = entry[key]\n let color\n if (key === 'type') {\n color = this.getTypeColor(v)\n } else {\n v = jsonReplacer(key, v, true)\n\n if (typeof v === 'object') {\n v = stringify(v, 5, jsonReplacer, ' ')\n }\n }\n\n return $el('div', {\n style: {\n color\n },\n textContent: v\n })\n })\n )\n })\n\n const grid = $el(\n 'div.comfy-logging-logs',\n {\n style: {\n gridTemplateColumns: `repeat(${headers.length}, 1fr)`\n }\n },\n [...headers, ...rows]\n )\n const els = [grid]\n if (!this.logging.enabled) {\n els.unshift(\n $el('h3', {\n style: { textAlign: 'center' },\n textContent: 'Logging is disabled'\n })\n )\n }\n super.show($el('div', els))\n }\n}\n\nexport class ComfyLogging {\n /**\n * @type Array<{ source: string, type: string, timestamp: Date, message: any }>\n */\n entries = []\n\n #enabled\n #console = {}\n\n app: ComfyApp\n dialog: ComfyLoggingDialog\n\n get enabled() {\n return this.#enabled\n }\n\n set enabled(value) {\n if (value === this.#enabled) return\n if (value) {\n this.patchConsole()\n } else {\n this.unpatchConsole()\n }\n this.#enabled = value\n }\n\n constructor(app) {\n this.app = app\n\n this.dialog = new ComfyLoggingDialog(this)\n this.addSetting()\n this.catchUnhandled()\n this.addInitData()\n }\n\n addSetting() {\n const settingId = 'Comfy.Logging.Enabled'\n const htmlSettingId = settingId.replaceAll('.', '-')\n const setting = this.app.ui.settings.addSetting({\n id: settingId,\n name: 'Enable logging',\n defaultValue: true,\n onChange: (value) => {\n this.enabled = value\n },\n type: (name, setter, value) => {\n return $el('tr', [\n $el('td', [\n $el('label', {\n textContent: 'Logging',\n for: htmlSettingId\n })\n ]),\n $el('td', [\n $el('input', {\n id: htmlSettingId,\n type: 'checkbox',\n checked: value,\n onchange: (event) => {\n setter(event.target.checked)\n }\n }),\n $el('button', {\n textContent: 'View Logs',\n onclick: () => {\n this.app.ui.settings.element.close()\n this.dialog.show()\n },\n style: {\n fontSize: '14px',\n display: 'block',\n marginTop: '5px'\n }\n })\n ])\n ])\n }\n })\n this.enabled = setting.value\n }\n\n patchConsole() {\n // Capture common console outputs\n const self = this\n for (const type of ['log', 'warn', 'error', 'debug']) {\n const orig = console[type]\n this.#console[type] = orig\n console[type] = function () {\n orig.apply(console, arguments)\n self.addEntry('console', type, ...arguments)\n }\n }\n }\n\n unpatchConsole() {\n // Restore original console functions\n for (const type of Object.keys(this.#console)) {\n console[type] = this.#console[type]\n }\n this.#console = {}\n }\n\n catchUnhandled() {\n // Capture uncaught errors\n window.addEventListener('error', (e) => {\n this.addEntry('window', 'error', e.error ?? 'Unknown error')\n return false\n })\n\n window.addEventListener('unhandledrejection', (e) => {\n this.addEntry('unhandledrejection', 'error', e.reason ?? 'Unknown error')\n })\n }\n\n clear() {\n this.entries = []\n }\n\n addEntry(source, type, ...args) {\n if (this.enabled) {\n this.entries.push({\n source,\n type,\n timestamp: new Date(),\n message: args\n })\n }\n }\n\n log(source, ...args) {\n this.addEntry(source, 'log', ...args)\n }\n\n async addInitData() {\n if (!this.enabled) return\n const source = 'ComfyUI.Logging'\n this.addEntry(source, 'debug', { UserAgent: navigator.userAgent })\n }\n}\n","import type { ComfyWorkflowJSON } from '@/types/comfyWorkflow'\n\nexport const defaultGraph: ComfyWorkflowJSON = {\n last_node_id: 9,\n last_link_id: 9,\n nodes: [\n {\n id: 7,\n type: 'CLIPTextEncode',\n pos: [413, 389],\n size: [425.27801513671875, 180.6060791015625],\n flags: {},\n order: 3,\n mode: 0,\n inputs: [{ name: 'clip', type: 'CLIP', link: 5 }],\n outputs: [\n {\n name: 'CONDITIONING',\n type: 'CONDITIONING',\n links: [6],\n slot_index: 0\n }\n ],\n properties: {},\n widgets_values: ['text, watermark']\n },\n {\n id: 6,\n type: 'CLIPTextEncode',\n pos: [415, 186],\n size: [422.84503173828125, 164.31304931640625],\n flags: {},\n order: 2,\n mode: 0,\n inputs: [{ name: 'clip', type: 'CLIP', link: 3 }],\n outputs: [\n {\n name: 'CONDITIONING',\n type: 'CONDITIONING',\n links: [4],\n slot_index: 0\n }\n ],\n properties: {},\n widgets_values: [\n 'beautiful scenery nature glass bottle landscape, , purple galaxy bottle,'\n ]\n },\n {\n id: 5,\n type: 'EmptyLatentImage',\n pos: [473, 609],\n size: [315, 106],\n flags: {},\n order: 1,\n mode: 0,\n outputs: [{ name: 'LATENT', type: 'LATENT', links: [2], slot_index: 0 }],\n properties: {},\n widgets_values: [512, 512, 1]\n },\n {\n id: 3,\n type: 'KSampler',\n pos: [863, 186],\n size: [315, 262],\n flags: {},\n order: 4,\n mode: 0,\n inputs: [\n { name: 'model', type: 'MODEL', link: 1 },\n { name: 'positive', type: 'CONDITIONING', link: 4 },\n { name: 'negative', type: 'CONDITIONING', link: 6 },\n { name: 'latent_image', type: 'LATENT', link: 2 }\n ],\n outputs: [{ name: 'LATENT', type: 'LATENT', links: [7], slot_index: 0 }],\n properties: {},\n widgets_values: [156680208700286, true, 20, 8, 'euler', 'normal', 1]\n },\n {\n id: 8,\n type: 'VAEDecode',\n pos: [1209, 188],\n size: [210, 46],\n flags: {},\n order: 5,\n mode: 0,\n inputs: [\n { name: 'samples', type: 'LATENT', link: 7 },\n { name: 'vae', type: 'VAE', link: 8 }\n ],\n outputs: [{ name: 'IMAGE', type: 'IMAGE', links: [9], slot_index: 0 }],\n properties: {}\n },\n {\n id: 9,\n type: 'SaveImage',\n pos: [1451, 189],\n size: [210, 26],\n flags: {},\n order: 6,\n mode: 0,\n inputs: [{ name: 'images', type: 'IMAGE', link: 9 }],\n properties: {}\n },\n {\n id: 4,\n type: 'CheckpointLoaderSimple',\n pos: [26, 474],\n size: [315, 98],\n flags: {},\n order: 0,\n mode: 0,\n outputs: [\n { name: 'MODEL', type: 'MODEL', links: [1], slot_index: 0 },\n { name: 'CLIP', type: 'CLIP', links: [3, 5], slot_index: 1 },\n { name: 'VAE', type: 'VAE', links: [8], slot_index: 2 }\n ],\n properties: {},\n widgets_values: ['v1-5-pruned-emaonly.ckpt']\n }\n ],\n links: [\n [1, 4, 0, 3, 0, 'MODEL'],\n [2, 5, 0, 3, 3, 'LATENT'],\n [3, 4, 1, 6, 0, 'CLIP'],\n [4, 6, 0, 3, 1, 'CONDITIONING'],\n [5, 4, 1, 7, 0, 'CLIP'],\n [6, 7, 0, 3, 2, 'CONDITIONING'],\n [7, 3, 0, 8, 0, 'LATENT'],\n [8, 4, 2, 8, 1, 'VAE'],\n [9, 8, 0, 9, 0, 'IMAGE']\n ],\n groups: [],\n config: {},\n extra: {},\n version: 0.4\n}\n\nexport const defaultGraphJSON = JSON.stringify(defaultGraph)\n\nexport const blankGraph: ComfyWorkflowJSON = {\n last_node_id: 0,\n last_link_id: 0,\n nodes: [],\n links: [],\n groups: [],\n config: {},\n extra: {},\n version: 0.4\n}\n","// @ts-strict-ignore\nexport function getFromPngBuffer(buffer: ArrayBuffer) {\n // Get the PNG data as a Uint8Array\n const pngData = new Uint8Array(buffer)\n const dataView = new DataView(pngData.buffer)\n\n // Check that the PNG signature is present\n if (dataView.getUint32(0) !== 0x89504e47) {\n console.error('Not a valid PNG file')\n return\n }\n\n // Start searching for chunks after the PNG signature\n let offset = 8\n let txt_chunks: Record = {}\n // Loop through the chunks in the PNG file\n while (offset < pngData.length) {\n // Get the length of the chunk\n const length = dataView.getUint32(offset)\n // Get the chunk type\n const type = String.fromCharCode(...pngData.slice(offset + 4, offset + 8))\n if (type === 'tEXt' || type == 'comf' || type === 'iTXt') {\n // Get the keyword\n let keyword_end = offset + 8\n while (pngData[keyword_end] !== 0) {\n keyword_end++\n }\n const keyword = String.fromCharCode(\n ...pngData.slice(offset + 8, keyword_end)\n )\n // Get the text\n const contentArraySegment = pngData.slice(\n keyword_end + 1,\n offset + 8 + length\n )\n const contentJson = new TextDecoder('utf-8').decode(contentArraySegment)\n txt_chunks[keyword] = contentJson\n }\n\n offset += 12 + length\n }\n return txt_chunks\n}\n\nexport function getFromPngFile(file: File) {\n return new Promise>((r) => {\n const reader = new FileReader()\n reader.onload = (event) => {\n r(getFromPngBuffer(event.target.result as ArrayBuffer))\n }\n\n reader.readAsArrayBuffer(file)\n })\n}\n","// @ts-strict-ignore\nexport function getFromFlacBuffer(buffer: ArrayBuffer): Record {\n const dataView = new DataView(buffer)\n\n // Verify the FLAC signature\n const signature = String.fromCharCode(...new Uint8Array(buffer, 0, 4))\n if (signature !== 'fLaC') {\n console.error('Not a valid FLAC file')\n return\n }\n\n // Parse metadata blocks\n let offset = 4\n let vorbisComment = null\n while (offset < dataView.byteLength) {\n const isLastBlock = dataView.getUint8(offset) & 0x80\n const blockType = dataView.getUint8(offset) & 0x7f\n const blockSize = dataView.getUint32(offset, false) & 0xffffff\n offset += 4\n\n if (blockType === 4) {\n // Vorbis Comment block type\n vorbisComment = parseVorbisComment(\n new DataView(buffer, offset, blockSize)\n )\n }\n\n offset += blockSize\n if (isLastBlock) break\n }\n\n return vorbisComment\n}\n\nexport function getFromFlacFile(file: File): Promise> {\n return new Promise((r) => {\n const reader = new FileReader()\n reader.onload = function (event) {\n const arrayBuffer = event.target.result as ArrayBuffer\n r(getFromFlacBuffer(arrayBuffer))\n }\n reader.readAsArrayBuffer(file)\n })\n}\n\n// Function to parse the Vorbis Comment block\nfunction parseVorbisComment(dataView: DataView): Record {\n let offset = 0\n const vendorLength = dataView.getUint32(offset, true)\n offset += 4\n const vendorString = getString(dataView, offset, vendorLength)\n offset += vendorLength\n\n const userCommentListLength = dataView.getUint32(offset, true)\n offset += 4\n const comments = {}\n for (let i = 0; i < userCommentListLength; i++) {\n const commentLength = dataView.getUint32(offset, true)\n offset += 4\n const comment = getString(dataView, offset, commentLength)\n offset += commentLength\n\n const ind = comment.indexOf('=')\n const key = comment.substring(0, ind)\n\n comments[key] = comment.substring(ind + 1)\n }\n\n return comments\n}\n\nfunction getString(dataView: DataView, offset: number, length: number): string {\n let string = ''\n for (let i = 0; i < length; i++) {\n string += String.fromCharCode(dataView.getUint8(offset + i))\n }\n return string\n}\n","// @ts-strict-ignore\nimport { LiteGraph } from '@comfyorg/litegraph'\nimport { api } from './api'\nimport { getFromPngFile } from './metadata/png'\nimport { getFromFlacFile } from './metadata/flac'\nimport { workflowService } from '@/services/workflowService'\n\n// Original functions left in for backwards compatibility\nexport function getPngMetadata(file: File): Promise> {\n return getFromPngFile(file)\n}\n\nexport function getFlacMetadata(file: File): Promise> {\n return getFromFlacFile(file)\n}\n\nfunction parseExifData(exifData) {\n // Check for the correct TIFF header (0x4949 for little-endian or 0x4D4D for big-endian)\n const isLittleEndian = String.fromCharCode(...exifData.slice(0, 2)) === 'II'\n\n // Function to read 16-bit and 32-bit integers from binary data\n function readInt(offset, isLittleEndian, length) {\n let arr = exifData.slice(offset, offset + length)\n if (length === 2) {\n return new DataView(arr.buffer, arr.byteOffset, arr.byteLength).getUint16(\n 0,\n isLittleEndian\n )\n } else if (length === 4) {\n return new DataView(arr.buffer, arr.byteOffset, arr.byteLength).getUint32(\n 0,\n isLittleEndian\n )\n }\n }\n\n // Read the offset to the first IFD (Image File Directory)\n const ifdOffset = readInt(4, isLittleEndian, 4)\n\n function parseIFD(offset) {\n const numEntries = readInt(offset, isLittleEndian, 2)\n const result = {}\n\n for (let i = 0; i < numEntries; i++) {\n const entryOffset = offset + 2 + i * 12\n const tag = readInt(entryOffset, isLittleEndian, 2)\n const type = readInt(entryOffset + 2, isLittleEndian, 2)\n const numValues = readInt(entryOffset + 4, isLittleEndian, 4)\n const valueOffset = readInt(entryOffset + 8, isLittleEndian, 4)\n\n // Read the value(s) based on the data type\n let value\n if (type === 2) {\n // ASCII string\n value = new TextDecoder('utf-8').decode(\n exifData.subarray(valueOffset, valueOffset + numValues - 1)\n )\n }\n\n result[tag] = value\n }\n\n return result\n }\n\n // Parse the first IFD\n const ifdData = parseIFD(ifdOffset)\n return ifdData\n}\n\nfunction splitValues(input) {\n var output = {}\n for (var key in input) {\n var value = input[key]\n var splitValues = value.split(':', 2)\n output[splitValues[0]] = splitValues[1]\n }\n return output\n}\n\nexport function getWebpMetadata(file) {\n return new Promise>((r) => {\n const reader = new FileReader()\n reader.onload = (event) => {\n const webp = new Uint8Array(event.target.result as ArrayBuffer)\n const dataView = new DataView(webp.buffer)\n\n // Check that the WEBP signature is present\n if (\n dataView.getUint32(0) !== 0x52494646 ||\n dataView.getUint32(8) !== 0x57454250\n ) {\n console.error('Not a valid WEBP file')\n r({})\n return\n }\n\n // Start searching for chunks after the WEBP signature\n let offset = 12\n let txt_chunks = {}\n // Loop through the chunks in the WEBP file\n while (offset < webp.length) {\n const chunk_length = dataView.getUint32(offset + 4, true)\n const chunk_type = String.fromCharCode(\n ...webp.slice(offset, offset + 4)\n )\n if (chunk_type === 'EXIF') {\n if (\n String.fromCharCode(...webp.slice(offset + 8, offset + 8 + 6)) ==\n 'Exif\\0\\0'\n ) {\n offset += 6\n }\n let data = parseExifData(\n webp.slice(offset + 8, offset + 8 + chunk_length)\n )\n for (var key in data) {\n const value = data[key] as string\n if (typeof value === 'string') {\n const index = value.indexOf(':')\n txt_chunks[value.slice(0, index)] = value.slice(index + 1)\n }\n }\n break\n }\n\n offset += 8 + chunk_length\n }\n\n r(txt_chunks)\n }\n\n reader.readAsArrayBuffer(file)\n })\n}\n\nexport function getLatentMetadata(file) {\n return new Promise((r) => {\n const reader = new FileReader()\n reader.onload = (event) => {\n const safetensorsData = new Uint8Array(event.target.result as ArrayBuffer)\n const dataView = new DataView(safetensorsData.buffer)\n let header_size = dataView.getUint32(0, true)\n let offset = 8\n let header = JSON.parse(\n new TextDecoder().decode(\n safetensorsData.slice(offset, offset + header_size)\n )\n )\n r(header.__metadata__)\n }\n\n var slice = file.slice(0, 1024 * 1024 * 4)\n reader.readAsArrayBuffer(slice)\n })\n}\n\nexport async function importA1111(graph, parameters) {\n const p = parameters.lastIndexOf('\\nSteps:')\n if (p > -1) {\n const embeddings = await api.getEmbeddings()\n const opts = parameters\n .substr(p)\n .split('\\n')[1]\n .match(\n new RegExp('\\\\s*([^:]+:\\\\s*([^\"\\\\{].*?|\".*?\"|\\\\{.*?\\\\}))\\\\s*(,|$)', 'g')\n )\n .reduce((p, n) => {\n const s = n.split(':')\n if (s[1].endsWith(',')) {\n s[1] = s[1].substr(0, s[1].length - 1)\n }\n p[s[0].trim().toLowerCase()] = s[1].trim()\n return p\n }, {})\n const p2 = parameters.lastIndexOf('\\nNegative prompt:', p)\n if (p2 > -1) {\n let positive = parameters.substr(0, p2).trim()\n let negative = parameters.substring(p2 + 18, p).trim()\n\n const ckptNode = LiteGraph.createNode('CheckpointLoaderSimple')\n const clipSkipNode = LiteGraph.createNode('CLIPSetLastLayer')\n const positiveNode = LiteGraph.createNode('CLIPTextEncode')\n const negativeNode = LiteGraph.createNode('CLIPTextEncode')\n const samplerNode = LiteGraph.createNode('KSampler')\n const imageNode = LiteGraph.createNode('EmptyLatentImage')\n const vaeNode = LiteGraph.createNode('VAEDecode')\n const vaeLoaderNode = LiteGraph.createNode('VAELoader')\n const saveNode = LiteGraph.createNode('SaveImage')\n let hrSamplerNode = null\n let hrSteps = null\n\n const ceil64 = (v) => Math.ceil(v / 64) * 64\n\n const getWidget = (node, name) => {\n return node.widgets.find((w) => w.name === name)\n }\n\n const setWidgetValue = (node, name, value, isOptionPrefix?) => {\n const w = getWidget(node, name)\n if (isOptionPrefix) {\n const o = w.options.values.find((w) => w.startsWith(value))\n if (o) {\n w.value = o\n } else {\n console.warn(`Unknown value '${value}' for widget '${name}'`, node)\n w.value = value\n }\n } else {\n w.value = value\n }\n }\n\n const createLoraNodes = (clipNode, text, prevClip, prevModel) => {\n const loras = []\n text = text.replace(/]+)>/g, function (m, c) {\n const s = c.split(':')\n const weight = parseFloat(s[1])\n if (isNaN(weight)) {\n console.warn('Invalid LORA', m)\n } else {\n loras.push({ name: s[0], weight })\n }\n return ''\n })\n\n for (const l of loras) {\n const loraNode = LiteGraph.createNode('LoraLoader')\n graph.add(loraNode)\n setWidgetValue(loraNode, 'lora_name', l.name, true)\n setWidgetValue(loraNode, 'strength_model', l.weight)\n setWidgetValue(loraNode, 'strength_clip', l.weight)\n prevModel.node.connect(prevModel.index, loraNode, 0)\n prevClip.node.connect(prevClip.index, loraNode, 1)\n prevModel = { node: loraNode, index: 0 }\n prevClip = { node: loraNode, index: 1 }\n }\n\n prevClip.node.connect(1, clipNode, 0)\n prevModel.node.connect(0, samplerNode, 0)\n if (hrSamplerNode) {\n prevModel.node.connect(0, hrSamplerNode, 0)\n }\n\n return { text, prevModel, prevClip }\n }\n\n const replaceEmbeddings = (text) => {\n if (!embeddings.length) return text\n return text.replaceAll(\n new RegExp(\n '\\\\b(' +\n embeddings\n .map((e) => e.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&'))\n .join('\\\\b|\\\\b') +\n ')\\\\b',\n 'ig'\n ),\n 'embedding:$1'\n )\n }\n\n const popOpt = (name) => {\n const v = opts[name]\n delete opts[name]\n return v\n }\n\n graph.clear()\n graph.add(ckptNode)\n graph.add(clipSkipNode)\n graph.add(positiveNode)\n graph.add(negativeNode)\n graph.add(samplerNode)\n graph.add(imageNode)\n graph.add(vaeNode)\n graph.add(vaeLoaderNode)\n graph.add(saveNode)\n\n ckptNode.connect(1, clipSkipNode, 0)\n clipSkipNode.connect(0, positiveNode, 0)\n clipSkipNode.connect(0, negativeNode, 0)\n ckptNode.connect(0, samplerNode, 0)\n positiveNode.connect(0, samplerNode, 1)\n negativeNode.connect(0, samplerNode, 2)\n imageNode.connect(0, samplerNode, 3)\n vaeNode.connect(0, saveNode, 0)\n samplerNode.connect(0, vaeNode, 0)\n vaeLoaderNode.connect(0, vaeNode, 1)\n\n const handlers = {\n model(v) {\n setWidgetValue(ckptNode, 'ckpt_name', v, true)\n },\n vae(v) {\n setWidgetValue(vaeLoaderNode, 'vae_name', v, true)\n },\n 'cfg scale'(v) {\n setWidgetValue(samplerNode, 'cfg', +v)\n },\n 'clip skip'(v) {\n setWidgetValue(clipSkipNode, 'stop_at_clip_layer', -v)\n },\n sampler(v) {\n let name = v.toLowerCase().replace('++', 'pp').replaceAll(' ', '_')\n if (name.includes('karras')) {\n name = name.replace('karras', '').replace(/_+$/, '')\n setWidgetValue(samplerNode, 'scheduler', 'karras')\n } else {\n setWidgetValue(samplerNode, 'scheduler', 'normal')\n }\n const w = getWidget(samplerNode, 'sampler_name')\n const o = w.options.values.find(\n (w) => w === name || w === 'sample_' + name\n )\n if (o) {\n setWidgetValue(samplerNode, 'sampler_name', o)\n }\n },\n size(v) {\n const wxh = v.split('x')\n const w = ceil64(+wxh[0])\n const h = ceil64(+wxh[1])\n const hrUp = popOpt('hires upscale')\n const hrSz = popOpt('hires resize')\n hrSteps = popOpt('hires steps')\n let hrMethod = popOpt('hires upscaler')\n\n setWidgetValue(imageNode, 'width', w)\n setWidgetValue(imageNode, 'height', h)\n\n if (hrUp || hrSz) {\n let uw, uh\n if (hrUp) {\n uw = w * hrUp\n uh = h * hrUp\n } else {\n const s = hrSz.split('x')\n uw = +s[0]\n uh = +s[1]\n }\n\n let upscaleNode\n let latentNode\n\n if (hrMethod.startsWith('Latent')) {\n latentNode = upscaleNode = LiteGraph.createNode('LatentUpscale')\n graph.add(upscaleNode)\n samplerNode.connect(0, upscaleNode, 0)\n\n switch (hrMethod) {\n case 'Latent (nearest-exact)':\n hrMethod = 'nearest-exact'\n break\n }\n setWidgetValue(upscaleNode, 'upscale_method', hrMethod, true)\n } else {\n const decode = LiteGraph.createNode('VAEDecodeTiled')\n graph.add(decode)\n samplerNode.connect(0, decode, 0)\n vaeLoaderNode.connect(0, decode, 1)\n\n const upscaleLoaderNode =\n LiteGraph.createNode('UpscaleModelLoader')\n graph.add(upscaleLoaderNode)\n setWidgetValue(upscaleLoaderNode, 'model_name', hrMethod, true)\n\n const modelUpscaleNode = LiteGraph.createNode(\n 'ImageUpscaleWithModel'\n )\n graph.add(modelUpscaleNode)\n decode.connect(0, modelUpscaleNode, 1)\n upscaleLoaderNode.connect(0, modelUpscaleNode, 0)\n\n upscaleNode = LiteGraph.createNode('ImageScale')\n graph.add(upscaleNode)\n modelUpscaleNode.connect(0, upscaleNode, 0)\n\n const vaeEncodeNode = (latentNode =\n LiteGraph.createNode('VAEEncodeTiled'))\n graph.add(vaeEncodeNode)\n upscaleNode.connect(0, vaeEncodeNode, 0)\n vaeLoaderNode.connect(0, vaeEncodeNode, 1)\n }\n\n setWidgetValue(upscaleNode, 'width', ceil64(uw))\n setWidgetValue(upscaleNode, 'height', ceil64(uh))\n\n hrSamplerNode = LiteGraph.createNode('KSampler')\n graph.add(hrSamplerNode)\n ckptNode.connect(0, hrSamplerNode, 0)\n positiveNode.connect(0, hrSamplerNode, 1)\n negativeNode.connect(0, hrSamplerNode, 2)\n latentNode.connect(0, hrSamplerNode, 3)\n hrSamplerNode.connect(0, vaeNode, 0)\n }\n },\n steps(v) {\n setWidgetValue(samplerNode, 'steps', +v)\n },\n seed(v) {\n setWidgetValue(samplerNode, 'seed', +v)\n }\n }\n\n for (const opt in opts) {\n if (opt in handlers) {\n handlers[opt](popOpt(opt))\n }\n }\n\n if (hrSamplerNode) {\n setWidgetValue(\n hrSamplerNode,\n 'steps',\n hrSteps ? +hrSteps : getWidget(samplerNode, 'steps').value\n )\n setWidgetValue(\n hrSamplerNode,\n 'cfg',\n getWidget(samplerNode, 'cfg').value\n )\n setWidgetValue(\n hrSamplerNode,\n 'scheduler',\n getWidget(samplerNode, 'scheduler').value\n )\n setWidgetValue(\n hrSamplerNode,\n 'sampler_name',\n getWidget(samplerNode, 'sampler_name').value\n )\n setWidgetValue(\n hrSamplerNode,\n 'denoise',\n +(popOpt('denoising strength') || '1')\n )\n }\n\n let n = createLoraNodes(\n positiveNode,\n positive,\n { node: clipSkipNode, index: 0 },\n { node: ckptNode, index: 0 }\n )\n positive = n.text\n n = createLoraNodes(negativeNode, negative, n.prevClip, n.prevModel)\n negative = n.text\n\n setWidgetValue(positiveNode, 'text', replaceEmbeddings(positive))\n setWidgetValue(negativeNode, 'text', replaceEmbeddings(negative))\n\n graph.arrange()\n\n for (const opt of [\n 'model hash',\n 'ensd',\n 'version',\n 'vae hash',\n 'ti hashes',\n 'lora hashes',\n 'hashes'\n ]) {\n delete opts[opt]\n }\n\n console.warn('Unhandled parameters:', opts)\n }\n }\n}\n","// @ts-strict-ignore\nimport { app } from '../app'\nimport { $el } from '../ui'\n\nexport function calculateImageGrid(imgs, dw, dh) {\n let best = 0\n let w = imgs[0].naturalWidth\n let h = imgs[0].naturalHeight\n const numImages = imgs.length\n\n let cellWidth, cellHeight, cols, rows, shiftX\n // compact style\n for (let c = 1; c <= numImages; c++) {\n const r = Math.ceil(numImages / c)\n const cW = dw / c\n const cH = dh / r\n const scaleX = cW / w\n const scaleY = cH / h\n\n const scale = Math.min(scaleX, scaleY, 1)\n const imageW = w * scale\n const imageH = h * scale\n const area = imageW * imageH * numImages\n\n if (area > best) {\n best = area\n cellWidth = imageW\n cellHeight = imageH\n cols = c\n rows = r\n shiftX = c * ((cW - imageW) / 2)\n }\n }\n\n return { cellWidth, cellHeight, cols, rows, shiftX }\n}\n\nexport function createImageHost(node) {\n const el = $el('div.comfy-img-preview')\n let currentImgs\n let first = true\n\n function updateSize() {\n let w = null\n let h = null\n\n if (currentImgs) {\n let elH = el.clientHeight\n if (first) {\n first = false\n // On first run, if we are small then grow a bit\n if (elH < 190) {\n elH = 190\n }\n el.style.setProperty('--comfy-widget-min-height', elH.toString())\n } else {\n el.style.setProperty('--comfy-widget-min-height', null)\n }\n\n const nw = node.size[0]\n ;({ cellWidth: w, cellHeight: h } = calculateImageGrid(\n currentImgs,\n nw - 20,\n elH\n ))\n w += 'px'\n h += 'px'\n\n el.style.setProperty('--comfy-img-preview-width', w)\n el.style.setProperty('--comfy-img-preview-height', h)\n }\n }\n return {\n el,\n updateImages(imgs) {\n if (imgs !== currentImgs) {\n if (currentImgs == null) {\n requestAnimationFrame(() => {\n updateSize()\n })\n }\n el.replaceChildren(...imgs)\n currentImgs = imgs\n node.onResize(node.size)\n node.graph.setDirtyCanvas(true, true)\n }\n },\n getHeight() {\n updateSize()\n },\n onDraw() {\n // Element from point uses a hittest find elements so we need to toggle pointer events\n el.style.pointerEvents = 'all'\n const over = document.elementFromPoint(\n app.canvas.mouse[0],\n app.canvas.mouse[1]\n )\n el.style.pointerEvents = 'none'\n\n if (!over) return\n // Set the overIndex so Open Image etc work\n const idx = currentImgs.indexOf(over)\n node.overIndex = idx\n }\n }\n}\n","// @ts-strict-ignore\n/*\n Original implementation:\n https://github.com/TahaSh/drag-to-reorder\n MIT License\n\n Copyright (c) 2023 Taha Shashtari\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n*/\n\nimport { $el } from '../ui'\n\n$el('style', {\n parent: document.head,\n textContent: `\n .draggable-item {\n position: relative;\n will-change: transform;\n user-select: none;\n }\n .draggable-item.is-idle {\n transition: 0.25s ease transform;\n }\n .draggable-item.is-draggable {\n z-index: 10;\n }\n `\n})\n\nexport class DraggableList extends EventTarget {\n listContainer\n draggableItem\n pointerStartX\n pointerStartY\n scrollYMax\n itemsGap = 0\n items = []\n itemSelector\n handleClass = 'drag-handle'\n off = []\n offDrag = []\n\n constructor(element, itemSelector) {\n super()\n this.listContainer = element\n this.itemSelector = itemSelector\n\n if (!this.listContainer) return\n\n this.off.push(this.on(this.listContainer, 'mousedown', this.dragStart))\n this.off.push(this.on(this.listContainer, 'touchstart', this.dragStart))\n this.off.push(this.on(document, 'mouseup', this.dragEnd))\n this.off.push(this.on(document, 'touchend', this.dragEnd))\n }\n\n getAllItems() {\n if (!this.items?.length) {\n this.items = Array.from(\n this.listContainer.querySelectorAll(this.itemSelector)\n )\n this.items.forEach((element) => {\n element.classList.add('is-idle')\n })\n }\n return this.items\n }\n\n getIdleItems() {\n return this.getAllItems().filter((item) =>\n item.classList.contains('is-idle')\n )\n }\n\n isItemAbove(item) {\n return item.hasAttribute('data-is-above')\n }\n\n isItemToggled(item) {\n return item.hasAttribute('data-is-toggled')\n }\n\n on(source, event, listener, options?) {\n listener = listener.bind(this)\n source.addEventListener(event, listener, options)\n return () => source.removeEventListener(event, listener)\n }\n\n dragStart(e) {\n if (e.target.classList.contains(this.handleClass)) {\n this.draggableItem = e.target.closest(this.itemSelector)\n }\n\n if (!this.draggableItem) return\n\n this.pointerStartX = e.clientX || e.touches[0].clientX\n this.pointerStartY = e.clientY || e.touches[0].clientY\n this.scrollYMax =\n this.listContainer.scrollHeight - this.listContainer.clientHeight\n\n this.setItemsGap()\n this.initDraggableItem()\n this.initItemsState()\n\n this.offDrag.push(this.on(document, 'mousemove', this.drag))\n this.offDrag.push(\n this.on(document, 'touchmove', this.drag, { passive: false })\n )\n\n this.dispatchEvent(\n new CustomEvent('dragstart', {\n detail: {\n element: this.draggableItem,\n position: this.getAllItems().indexOf(this.draggableItem)\n }\n })\n )\n }\n\n setItemsGap() {\n if (this.getIdleItems().length <= 1) {\n this.itemsGap = 0\n return\n }\n\n const item1 = this.getIdleItems()[0]\n const item2 = this.getIdleItems()[1]\n\n const item1Rect = item1.getBoundingClientRect()\n const item2Rect = item2.getBoundingClientRect()\n\n this.itemsGap = Math.abs(item1Rect.bottom - item2Rect.top)\n }\n\n initItemsState() {\n this.getIdleItems().forEach((item, i) => {\n if (this.getAllItems().indexOf(this.draggableItem) > i) {\n item.dataset.isAbove = ''\n }\n })\n }\n\n initDraggableItem() {\n this.draggableItem.classList.remove('is-idle')\n this.draggableItem.classList.add('is-draggable')\n }\n\n drag(e) {\n if (!this.draggableItem) return\n\n e.preventDefault()\n\n const clientX = e.clientX || e.touches[0].clientX\n const clientY = e.clientY || e.touches[0].clientY\n\n const listRect = this.listContainer.getBoundingClientRect()\n\n if (clientY > listRect.bottom) {\n if (this.listContainer.scrollTop < this.scrollYMax) {\n this.listContainer.scrollBy(0, 10)\n this.pointerStartY -= 10\n }\n } else if (clientY < listRect.top && this.listContainer.scrollTop > 0) {\n this.pointerStartY += 10\n this.listContainer.scrollBy(0, -10)\n }\n\n const pointerOffsetX = clientX - this.pointerStartX\n const pointerOffsetY = clientY - this.pointerStartY\n\n this.updateIdleItemsStateAndPosition()\n this.draggableItem.style.transform = `translate(${pointerOffsetX}px, ${pointerOffsetY}px)`\n }\n\n updateIdleItemsStateAndPosition() {\n const draggableItemRect = this.draggableItem.getBoundingClientRect()\n const draggableItemY = draggableItemRect.top + draggableItemRect.height / 2\n\n // Update state\n this.getIdleItems().forEach((item) => {\n const itemRect = item.getBoundingClientRect()\n const itemY = itemRect.top + itemRect.height / 2\n if (this.isItemAbove(item)) {\n if (draggableItemY <= itemY) {\n item.dataset.isToggled = ''\n } else {\n delete item.dataset.isToggled\n }\n } else {\n if (draggableItemY >= itemY) {\n item.dataset.isToggled = ''\n } else {\n delete item.dataset.isToggled\n }\n }\n })\n\n // Update position\n this.getIdleItems().forEach((item) => {\n if (this.isItemToggled(item)) {\n const direction = this.isItemAbove(item) ? 1 : -1\n item.style.transform = `translateY(${direction * (draggableItemRect.height + this.itemsGap)}px)`\n } else {\n item.style.transform = ''\n }\n })\n }\n\n dragEnd() {\n if (!this.draggableItem) return\n\n this.applyNewItemsOrder()\n this.cleanup()\n }\n\n applyNewItemsOrder() {\n const reorderedItems = []\n\n let oldPosition = -1\n this.getAllItems().forEach((item, index) => {\n if (item === this.draggableItem) {\n oldPosition = index\n return\n }\n if (!this.isItemToggled(item)) {\n reorderedItems[index] = item\n return\n }\n const newIndex = this.isItemAbove(item) ? index + 1 : index - 1\n reorderedItems[newIndex] = item\n })\n\n for (let index = 0; index < this.getAllItems().length; index++) {\n const item = reorderedItems[index]\n if (typeof item === 'undefined') {\n reorderedItems[index] = this.draggableItem\n }\n }\n\n reorderedItems.forEach((item) => {\n this.listContainer.appendChild(item)\n })\n\n this.items = reorderedItems\n\n this.dispatchEvent(\n new CustomEvent('dragend', {\n detail: {\n element: this.draggableItem,\n oldPosition,\n newPosition: reorderedItems.indexOf(this.draggableItem)\n }\n })\n )\n }\n\n cleanup() {\n this.itemsGap = 0\n this.items = []\n this.unsetDraggableItem()\n this.unsetItemState()\n\n this.offDrag.forEach((f) => f())\n this.offDrag = []\n }\n\n unsetDraggableItem() {\n this.draggableItem.style = null\n this.draggableItem.classList.remove('is-draggable')\n this.draggableItem.classList.add('is-idle')\n this.draggableItem = null\n }\n\n unsetItemState() {\n this.getIdleItems().forEach((item, i) => {\n delete item.dataset.isAbove\n delete item.dataset.isToggled\n item.style.transform = ''\n })\n }\n\n dispose() {\n this.off.forEach((f) => f())\n }\n}\n","// @ts-strict-ignore\nimport { api } from './api'\nimport type { ComfyApp } from './app'\nimport { $el } from './ui'\n\n// Simple date formatter\nconst parts = {\n d: (d) => d.getDate(),\n M: (d) => d.getMonth() + 1,\n h: (d) => d.getHours(),\n m: (d) => d.getMinutes(),\n s: (d) => d.getSeconds()\n}\nconst format =\n Object.keys(parts)\n .map((k) => k + k + '?')\n .join('|') + '|yyy?y?'\n\nfunction formatDate(text: string, date: Date) {\n return text.replace(new RegExp(format, 'g'), (text: string): string => {\n if (text === 'yy') return (date.getFullYear() + '').substring(2)\n if (text === 'yyyy') return date.getFullYear().toString()\n if (text[0] in parts) {\n const p = parts[text[0]](date)\n return (p + '').padStart(text.length, '0')\n }\n return text\n })\n}\n\nexport function clone(obj: any) {\n try {\n if (typeof structuredClone !== 'undefined') {\n return structuredClone(obj)\n }\n } catch (error) {\n // structuredClone is stricter than using JSON.parse/stringify so fallback to that\n }\n\n return JSON.parse(JSON.stringify(obj))\n}\n\nexport function applyTextReplacements(app: ComfyApp, value: string): string {\n return value.replace(/%([^%]+)%/g, function (match, text) {\n const split = text.split('.')\n if (split.length !== 2) {\n // Special handling for dates\n if (split[0].startsWith('date:')) {\n return formatDate(split[0].substring(5), new Date())\n }\n\n if (text !== 'width' && text !== 'height') {\n // Dont warn on standard replacements\n console.warn('Invalid replacement pattern', text)\n }\n return match\n }\n\n // Find node with matching S&R property name\n let nodes = app.graph.nodes.filter(\n (n) => n.properties?.['Node name for S&R'] === split[0]\n )\n // If we cant, see if there is a node with that title\n if (!nodes.length) {\n nodes = app.graph.nodes.filter((n) => n.title === split[0])\n }\n if (!nodes.length) {\n console.warn('Unable to find node', split[0])\n return match\n }\n\n if (nodes.length > 1) {\n console.warn('Multiple nodes matched', split[0], 'using first match')\n }\n\n const node = nodes[0]\n\n const widget = node.widgets?.find((w) => w.name === split[1])\n if (!widget) {\n console.warn('Unable to find widget', split[1], 'on node', split[0], node)\n return match\n }\n\n return ((widget.value ?? '') + '').replaceAll(/\\/|\\\\/g, '_')\n })\n}\n\nexport async function addStylesheet(\n urlOrFile: string,\n relativeTo?: string\n): Promise {\n return new Promise((res, rej) => {\n let url\n if (urlOrFile.endsWith('.js')) {\n url = urlOrFile.substr(0, urlOrFile.length - 2) + 'css'\n } else {\n url = new URL(\n urlOrFile,\n relativeTo ?? `${window.location.protocol}//${window.location.host}`\n ).toString()\n }\n $el('link', {\n parent: document.head,\n rel: 'stylesheet',\n type: 'text/css',\n href: url,\n onload: res,\n onerror: rej\n })\n })\n}\n\n/**\n * @param { string } filename\n * @param { Blob } blob\n */\nexport function downloadBlob(filename, blob) {\n const url = URL.createObjectURL(blob)\n const a = $el('a', {\n href: url,\n download: filename,\n style: { display: 'none' },\n parent: document.body\n })\n a.click()\n setTimeout(function () {\n a.remove()\n window.URL.revokeObjectURL(url)\n }, 0)\n}\n\nexport function prop(\n target: object,\n name: string,\n defaultValue: T,\n onChanged?: (\n currentValue: T,\n previousValue: T,\n target: object,\n name: string\n ) => void\n): T {\n let currentValue\n Object.defineProperty(target, name, {\n get() {\n return currentValue\n },\n set(newValue) {\n const prevValue = currentValue\n currentValue = newValue\n onChanged?.(currentValue, prevValue, target, name)\n }\n })\n return defaultValue\n}\n\nexport function getStorageValue(id: string) {\n const clientId = api.clientId ?? api.initialClientId\n return (\n (clientId && sessionStorage.getItem(`${id}:${clientId}`)) ??\n localStorage.getItem(id)\n )\n}\n\nexport function setStorageValue(id: string, value: string) {\n const clientId = api.clientId ?? api.initialClientId\n if (clientId) {\n sessionStorage.setItem(`${id}:${clientId}`, value)\n }\n localStorage.setItem(id, value)\n}\n","import { memoize } from 'lodash'\n\ntype RGB = { r: number; g: number; b: number }\ntype HSL = { h: number; s: number; l: number }\ntype HSLA = { h: number; s: number; l: number; a: number }\ntype ColorFormat = 'hex' | 'rgb' | 'rgba' | 'hsl' | 'hsla'\n\nexport interface ColorAdjustOptions {\n lightness?: number\n opacity?: number\n}\n\nfunction rgbToHsl({ r, g, b }: RGB): HSL {\n r /= 255\n g /= 255\n b /= 255\n const max = Math.max(r, g, b),\n min = Math.min(r, g, b)\n let h = 0,\n s = 0\n const l: number = (max + min) / 2\n\n if (max !== min) {\n const d = max - min\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min)\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0)\n break\n case g:\n h = (b - r) / d + 2\n break\n case b:\n h = (r - g) / d + 4\n break\n }\n h /= 6\n }\n\n return { h, s, l }\n}\n\nfunction hexToRgb(hex: string): RGB {\n let r = 0,\n g = 0,\n b = 0\n // 3 digits\n if (hex.length == 4) {\n r = parseInt(hex[1] + hex[1], 16)\n g = parseInt(hex[2] + hex[2], 16)\n b = parseInt(hex[3] + hex[3], 16)\n }\n // 6 digits\n else if (hex.length == 7) {\n r = parseInt(hex.slice(1, 3), 16)\n g = parseInt(hex.slice(3, 5), 16)\n b = parseInt(hex.slice(5, 7), 16)\n }\n return { r, g, b }\n}\n\nconst identifyColorFormat = (color: string): ColorFormat | null => {\n if (!color) return null\n if (color.startsWith('#') && (color.length === 4 || color.length === 7))\n return 'hex'\n if (/rgba?\\(\\s*\\d+\\s*,\\s*\\d+\\s*,\\s*\\d+\\s*/.test(color))\n return color.includes('rgba') ? 'rgba' : 'rgb'\n if (/hsla?\\(\\s*\\d+(\\.\\d+)?\\s*,\\s*\\d+(\\.\\d+)?%\\s*,\\s*\\d+(\\.\\d+)?%/.test(color))\n return color.includes('hsla') ? 'hsla' : 'hsl'\n return null\n}\n\nconst isHSLA = (color: unknown): color is HSLA => {\n if (typeof color !== 'object' || color === null) return false\n\n return ['h', 's', 'l', 'a'].every(\n (key) =>\n typeof (color as Record)[key] === 'number' &&\n !isNaN((color as Record)[key])\n )\n}\n\nfunction parseToHSLA(color: string, format: ColorFormat): HSLA | null {\n let match: RegExpMatchArray | null\n\n switch (format) {\n case 'hex': {\n const hsl = rgbToHsl(hexToRgb(color))\n return {\n h: Math.round(hsl.h * 360),\n s: +(hsl.s * 100).toFixed(1),\n l: +(hsl.l * 100).toFixed(1),\n a: 1\n }\n }\n\n case 'rgb':\n case 'rgba': {\n match = color.match(/\\d+(\\.\\d+)?/g)\n if (!match || match.length < 3) return null\n const [r, g, b] = match.map(Number)\n const hsl = rgbToHsl({ r, g, b })\n\n const a = format === 'rgba' && match[3] ? parseFloat(match[3]) : 1\n\n return {\n h: Math.round(hsl.h * 360),\n s: +(hsl.s * 100).toFixed(1),\n l: +(hsl.l * 100).toFixed(1),\n a\n }\n }\n\n case 'hsl':\n case 'hsla': {\n match = color.match(/\\d+(\\.\\d+)?/g)\n if (!match || match.length < 3) return null\n const [h, s, l] = match.map(Number)\n const a = format === 'hsla' && match[3] ? parseFloat(match[3]) : 1\n return { h, s, l, a }\n }\n default:\n return null\n }\n}\n\nconst applyColorAdjustments = (\n color: string,\n options: ColorAdjustOptions\n): string => {\n if (!Object.keys(options).length) return color\n\n const format = identifyColorFormat(color)\n if (!format) {\n console.warn(`Unsupported color format in color palette: ${color}`)\n return color\n }\n\n const hsla = parseToHSLA(color, format)\n if (!isHSLA(hsla)) {\n console.warn(`Invalid color values in color palette: ${color}`)\n return color\n }\n\n if (options.lightness) {\n hsla.l = Math.max(0, Math.min(100, hsla.l + options.lightness * 100.0))\n }\n\n if (options.opacity) {\n hsla.a = Math.max(0, Math.min(1, options.opacity))\n }\n\n return `hsla(${hsla.h}, ${hsla.s}%, ${hsla.l}%, ${hsla.a})`\n}\n\nexport const adjustColor: (\n color: string,\n options: ColorAdjustOptions\n) => string = memoize(\n applyColorAdjustments,\n (color: string, options: ColorAdjustOptions): string =>\n `${color}-${JSON.stringify(options)}`\n)\n","// @ts-strict-ignore\nimport { $el } from '../../ui'\nimport { ComfyButton } from './button'\nimport { prop } from '../../utils'\n\nexport class ComfyButtonGroup {\n element = $el('div.comfyui-button-group')\n buttons: (HTMLElement | ComfyButton)[]\n\n constructor(...buttons: (HTMLElement | ComfyButton)[]) {\n this.buttons = prop(this, 'buttons', buttons, () => this.update())\n }\n\n insert(button: ComfyButton, index: number) {\n this.buttons.splice(index, 0, button)\n this.update()\n }\n\n append(button: ComfyButton) {\n this.buttons.push(button)\n this.update()\n }\n\n remove(indexOrButton: ComfyButton | number) {\n if (typeof indexOrButton !== 'number') {\n indexOrButton = this.buttons.indexOf(indexOrButton)\n }\n if (indexOrButton > -1) {\n const r = this.buttons.splice(indexOrButton, 1)\n this.update()\n return r\n }\n }\n\n update() {\n this.element.replaceChildren(...this.buttons.map((b) => b['element'] ?? b))\n }\n}\n","// @ts-strict-ignore\nexport type ClassList = string | string[] | Record\n\nexport function applyClasses(\n element: HTMLElement,\n classList: ClassList,\n ...requiredClasses: string[]\n) {\n classList ??= ''\n\n let str: string\n if (typeof classList === 'string') {\n str = classList\n } else if (classList instanceof Array) {\n str = classList.join(' ')\n } else {\n str = Object.entries(classList).reduce((p, c) => {\n if (c[1]) {\n p += (p.length ? ' ' : '') + c[0]\n }\n return p\n }, '')\n }\n element.className = str\n if (requiredClasses) {\n element.classList.add(...requiredClasses)\n }\n}\n\nexport function toggleElement(\n element: HTMLElement,\n {\n onHide,\n onShow\n }: {\n onHide?: (el: HTMLElement) => void\n onShow?: (el: HTMLElement, value) => void\n } = {}\n) {\n let placeholder: HTMLElement | Comment\n let hidden: boolean\n return (value) => {\n if (value) {\n if (hidden) {\n hidden = false\n placeholder.replaceWith(element)\n }\n onShow?.(element, value)\n } else {\n if (!placeholder) {\n placeholder = document.createComment('')\n }\n hidden = true\n element.replaceWith(placeholder)\n onHide?.(element)\n }\n }\n}\n","// @ts-strict-ignore\nimport { $el } from '../../ui'\nimport { applyClasses, ClassList, toggleElement } from '../utils'\nimport { prop } from '../../utils'\nimport type { ComfyPopup } from './popup'\nimport type { ComfyComponent } from '.'\nimport type { ComfyApp } from '@/scripts/app'\nimport { Settings } from '@/types/apiTypes'\n\ntype ComfyButtonProps = {\n icon?: string\n overIcon?: string\n iconSize?: number\n content?: string | HTMLElement\n tooltip?: string\n enabled?: boolean\n action?: (e: Event, btn: ComfyButton) => void\n classList?: ClassList\n visibilitySetting?: { id: keyof Settings; showValue: boolean }\n app?: ComfyApp\n}\n\nexport class ComfyButton implements ComfyComponent {\n #over = 0\n #popupOpen = false\n isOver = false\n iconElement = $el('i.mdi')\n contentElement = $el('span')\n popup: ComfyPopup\n element: HTMLElement\n overIcon: string\n iconSize: number\n content: string | HTMLElement\n icon: string\n tooltip: string\n classList: ClassList\n hidden: boolean\n enabled: boolean\n action: (e: Event, btn: ComfyButton) => void\n\n constructor({\n icon,\n overIcon,\n iconSize,\n content,\n tooltip,\n action,\n classList = 'comfyui-button',\n visibilitySetting,\n app,\n enabled = true\n }: ComfyButtonProps) {\n this.element = $el(\n 'button',\n {\n onmouseenter: () => {\n this.isOver = true\n if (this.overIcon) {\n this.updateIcon()\n }\n },\n onmouseleave: () => {\n this.isOver = false\n if (this.overIcon) {\n this.updateIcon()\n }\n }\n },\n [this.iconElement, this.contentElement]\n )\n\n this.icon = prop(\n this,\n 'icon',\n icon,\n toggleElement(this.iconElement, { onShow: this.updateIcon })\n )\n this.overIcon = prop(this, 'overIcon', overIcon, () => {\n if (this.isOver) {\n this.updateIcon()\n }\n })\n this.iconSize = prop(this, 'iconSize', iconSize, this.updateIcon)\n this.content = prop(\n this,\n 'content',\n content,\n toggleElement(this.contentElement, {\n onShow: (el, v) => {\n if (typeof v === 'string') {\n el.textContent = v\n } else {\n el.replaceChildren(v)\n }\n }\n })\n )\n\n this.tooltip = prop(this, 'tooltip', tooltip, (v) => {\n if (v) {\n this.element.title = v\n } else {\n this.element.removeAttribute('title')\n }\n })\n if (tooltip !== undefined) {\n this.element.setAttribute('aria-label', tooltip)\n }\n this.classList = prop(this, 'classList', classList, this.updateClasses)\n this.hidden = prop(this, 'hidden', false, this.updateClasses)\n this.enabled = prop(this, 'enabled', enabled, () => {\n this.updateClasses()\n ;(this.element as HTMLButtonElement).disabled = !this.enabled\n })\n this.action = prop(this, 'action', action)\n this.element.addEventListener('click', (e) => {\n if (this.popup) {\n // we are either a touch device or triggered by click not hover\n if (!this.#over) {\n this.popup.toggle()\n }\n }\n this.action?.(e, this)\n })\n\n if (visibilitySetting?.id) {\n const settingUpdated = () => {\n this.hidden =\n app.ui.settings.getSettingValue(visibilitySetting.id) !==\n visibilitySetting.showValue\n }\n app.ui.settings.addEventListener(\n visibilitySetting.id + '.change',\n settingUpdated\n )\n settingUpdated()\n }\n }\n\n updateIcon = () =>\n (this.iconElement.className = `mdi mdi-${(this.isOver && this.overIcon) || this.icon}${this.iconSize ? ' mdi-' + this.iconSize + 'px' : ''}`)\n updateClasses = () => {\n const internalClasses = []\n if (this.hidden) {\n internalClasses.push('hidden')\n }\n if (!this.enabled) {\n internalClasses.push('disabled')\n }\n if (this.popup) {\n if (this.#popupOpen) {\n internalClasses.push('popup-open')\n } else {\n internalClasses.push('popup-closed')\n }\n }\n applyClasses(this.element, this.classList, ...internalClasses)\n }\n\n withPopup(popup: ComfyPopup, mode: 'click' | 'hover' = 'click') {\n this.popup = popup\n\n if (mode === 'hover') {\n for (const el of [this.element, this.popup.element]) {\n el.addEventListener('mouseenter', () => {\n this.popup.open = !!++this.#over\n })\n el.addEventListener('mouseleave', () => {\n this.popup.open = !!--this.#over\n })\n }\n }\n\n popup.addEventListener('change', () => {\n this.#popupOpen = popup.open\n this.updateClasses()\n })\n\n return this\n }\n}\n","// @ts-strict-ignore\nimport { prop } from '../../utils'\nimport { $el } from '../../ui'\nimport { applyClasses, ClassList } from '../utils'\n\nexport class ComfyPopup extends EventTarget {\n element = $el('div.comfyui-popup')\n open: boolean\n children: HTMLElement[]\n target: HTMLElement\n ignoreTarget: boolean\n container: HTMLElement\n position: string\n closeOnEscape: boolean\n horizontal: string\n classList: ClassList\n\n constructor(\n {\n target,\n container = document.body,\n classList = '',\n ignoreTarget = true,\n closeOnEscape = true,\n position = 'absolute',\n horizontal = 'left'\n }: {\n target: HTMLElement\n container?: HTMLElement\n classList?: ClassList\n ignoreTarget?: boolean\n closeOnEscape?: boolean\n position?: 'absolute' | 'relative'\n horizontal?: 'left' | 'right'\n },\n ...children: HTMLElement[]\n ) {\n super()\n this.target = target\n this.ignoreTarget = ignoreTarget\n this.container = container\n this.position = position\n this.closeOnEscape = closeOnEscape\n this.horizontal = horizontal\n\n container.append(this.element)\n\n this.children = prop(this, 'children', children, () => {\n this.element.replaceChildren(...this.children)\n this.update()\n })\n this.classList = prop(this, 'classList', classList, () =>\n applyClasses(this.element, this.classList, 'comfyui-popup', horizontal)\n )\n this.open = prop(this, 'open', false, (v, o) => {\n if (v === o) return\n if (v) {\n this.#show()\n } else {\n this.#hide()\n }\n })\n }\n\n toggle() {\n this.open = !this.open\n }\n\n #hide() {\n this.element.classList.remove('open')\n window.removeEventListener('resize', this.update)\n window.removeEventListener('click', this.#clickHandler, { capture: true })\n window.removeEventListener('keydown', this.#escHandler, { capture: true })\n\n this.dispatchEvent(new CustomEvent('close'))\n this.dispatchEvent(new CustomEvent('change'))\n }\n\n #show() {\n this.element.classList.add('open')\n this.update()\n\n window.addEventListener('resize', this.update)\n window.addEventListener('click', this.#clickHandler, { capture: true })\n if (this.closeOnEscape) {\n window.addEventListener('keydown', this.#escHandler, { capture: true })\n }\n\n this.dispatchEvent(new CustomEvent('open'))\n this.dispatchEvent(new CustomEvent('change'))\n }\n\n #escHandler = (e) => {\n if (e.key === 'Escape') {\n this.open = false\n e.preventDefault()\n e.stopImmediatePropagation()\n }\n }\n\n #clickHandler = (e) => {\n /** @type {any} */\n const target = e.target\n if (\n !this.element.contains(target) &&\n this.ignoreTarget &&\n !this.target.contains(target)\n ) {\n this.open = false\n }\n }\n\n update = () => {\n const rect = this.target.getBoundingClientRect()\n this.element.style.setProperty('--bottom', 'unset')\n if (this.position === 'absolute') {\n if (this.horizontal === 'left') {\n this.element.style.setProperty('--left', rect.left + 'px')\n } else {\n this.element.style.setProperty(\n '--left',\n rect.right - this.element.clientWidth + 'px'\n )\n }\n this.element.style.setProperty('--top', rect.bottom + 'px')\n this.element.style.setProperty('--limit', rect.bottom + 'px')\n } else {\n this.element.style.setProperty('--left', 0 + 'px')\n this.element.style.setProperty('--top', rect.height + 'px')\n this.element.style.setProperty('--limit', rect.height + 'px')\n }\n\n const thisRect = this.element.getBoundingClientRect()\n if (thisRect.height < 30) {\n // Move up instead\n this.element.style.setProperty('--top', 'unset')\n this.element.style.setProperty('--bottom', rect.height + 5 + 'px')\n this.element.style.setProperty('--limit', rect.height + 5 + 'px')\n }\n }\n}\n","import { $el } from '../../ui'\nimport { ComfyButton } from './button'\nimport { prop } from '../../utils'\nimport { ComfyPopup } from './popup'\n\nexport class ComfySplitButton {\n arrow: ComfyButton\n element: HTMLElement\n popup: ComfyPopup\n items: Array\n\n constructor(\n {\n primary,\n mode,\n horizontal = 'left',\n position = 'relative'\n }: {\n primary: ComfyButton\n mode?: 'hover' | 'click'\n horizontal?: 'left' | 'right'\n position?: 'relative' | 'absolute'\n },\n ...items: Array\n ) {\n this.arrow = new ComfyButton({\n icon: 'chevron-down'\n })\n this.element = $el(\n 'div.comfyui-split-button' + (mode === 'hover' ? '.hover' : ''),\n [\n $el(\n 'div.comfyui-split-primary',\n {\n ariaLabel: 'Queue current workflow'\n },\n primary.element\n ),\n $el(\n 'div.comfyui-split-arrow',\n {\n ariaLabel: 'Open extra opens',\n ariaHasPopup: 'true'\n },\n this.arrow.element\n )\n ]\n )\n this.popup = new ComfyPopup({\n target: this.element,\n container: position === 'relative' ? this.element : document.body,\n classList:\n 'comfyui-split-button-popup' + (mode === 'hover' ? ' hover' : ''),\n closeOnEscape: mode === 'click',\n position,\n horizontal\n })\n\n this.arrow.withPopup(this.popup, mode)\n\n this.items = prop(this, 'items', items, () => this.update())\n }\n\n update() {\n this.popup.element.replaceChildren(\n ...this.items.map((b) => ('element' in b ? b.element : b))\n )\n }\n}\n","import type { ComfyApp } from '@/scripts/app'\nimport { $el } from '../../ui'\nimport { ComfyButtonGroup } from '../components/buttonGroup'\nimport './menu.css'\n\n// Export to make sure following components are shimmed and exported by vite\nexport { ComfyButton } from '../components/button'\nexport { ComfySplitButton } from '../components/splitButton'\nexport { ComfyPopup } from '../components/popup'\n\nexport class ComfyAppMenu {\n app: ComfyApp\n actionsGroup: ComfyButtonGroup\n settingsGroup: ComfyButtonGroup\n viewGroup: ComfyButtonGroup\n element: HTMLElement\n\n constructor(app: ComfyApp) {\n this.app = app\n\n // Keep the group as there are custom scripts attaching extra\n // elements to it.\n this.actionsGroup = new ComfyButtonGroup()\n this.settingsGroup = new ComfyButtonGroup()\n this.viewGroup = new ComfyButtonGroup()\n\n this.element = $el('div.flex.gap-2.mx-2', [\n this.actionsGroup.element,\n this.settingsGroup.element,\n this.viewGroup.element\n ])\n }\n}\n","/**\n * Fuse.js v7.0.0 - Lightweight fuzzy-search (http://fusejs.io)\n *\n * Copyright (c) 2023 Kiro Risk (http://kiro.me)\n * All Rights Reserved. Apache Software License 2.0\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nfunction isArray(value) {\n return !Array.isArray\n ? getTag(value) === '[object Array]'\n : Array.isArray(value)\n}\n\n// Adapted from: https://github.com/lodash/lodash/blob/master/.internal/baseToString.js\nconst INFINITY = 1 / 0;\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value\n }\n let result = value + '';\n return result == '0' && 1 / value == -INFINITY ? '-0' : result\n}\n\nfunction toString(value) {\n return value == null ? '' : baseToString(value)\n}\n\nfunction isString(value) {\n return typeof value === 'string'\n}\n\nfunction isNumber(value) {\n return typeof value === 'number'\n}\n\n// Adapted from: https://github.com/lodash/lodash/blob/master/isBoolean.js\nfunction isBoolean(value) {\n return (\n value === true ||\n value === false ||\n (isObjectLike(value) && getTag(value) == '[object Boolean]')\n )\n}\n\nfunction isObject(value) {\n return typeof value === 'object'\n}\n\n// Checks if `value` is object-like.\nfunction isObjectLike(value) {\n return isObject(value) && value !== null\n}\n\nfunction isDefined(value) {\n return value !== undefined && value !== null\n}\n\nfunction isBlank(value) {\n return !value.trim().length\n}\n\n// Gets the `toStringTag` of `value`.\n// Adapted from: https://github.com/lodash/lodash/blob/master/.internal/getTag.js\nfunction getTag(value) {\n return value == null\n ? value === undefined\n ? '[object Undefined]'\n : '[object Null]'\n : Object.prototype.toString.call(value)\n}\n\nconst EXTENDED_SEARCH_UNAVAILABLE = 'Extended search is not available';\n\nconst INCORRECT_INDEX_TYPE = \"Incorrect 'index' type\";\n\nconst LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY = (key) =>\n `Invalid value for key ${key}`;\n\nconst PATTERN_LENGTH_TOO_LARGE = (max) =>\n `Pattern length exceeds max of ${max}.`;\n\nconst MISSING_KEY_PROPERTY = (name) => `Missing ${name} property in key`;\n\nconst INVALID_KEY_WEIGHT_VALUE = (key) =>\n `Property 'weight' in key '${key}' must be a positive integer`;\n\nconst hasOwn = Object.prototype.hasOwnProperty;\n\nclass KeyStore {\n constructor(keys) {\n this._keys = [];\n this._keyMap = {};\n\n let totalWeight = 0;\n\n keys.forEach((key) => {\n let obj = createKey(key);\n\n this._keys.push(obj);\n this._keyMap[obj.id] = obj;\n\n totalWeight += obj.weight;\n });\n\n // Normalize weights so that their sum is equal to 1\n this._keys.forEach((key) => {\n key.weight /= totalWeight;\n });\n }\n get(keyId) {\n return this._keyMap[keyId]\n }\n keys() {\n return this._keys\n }\n toJSON() {\n return JSON.stringify(this._keys)\n }\n}\n\nfunction createKey(key) {\n let path = null;\n let id = null;\n let src = null;\n let weight = 1;\n let getFn = null;\n\n if (isString(key) || isArray(key)) {\n src = key;\n path = createKeyPath(key);\n id = createKeyId(key);\n } else {\n if (!hasOwn.call(key, 'name')) {\n throw new Error(MISSING_KEY_PROPERTY('name'))\n }\n\n const name = key.name;\n src = name;\n\n if (hasOwn.call(key, 'weight')) {\n weight = key.weight;\n\n if (weight <= 0) {\n throw new Error(INVALID_KEY_WEIGHT_VALUE(name))\n }\n }\n\n path = createKeyPath(name);\n id = createKeyId(name);\n getFn = key.getFn;\n }\n\n return { path, id, weight, src, getFn }\n}\n\nfunction createKeyPath(key) {\n return isArray(key) ? key : key.split('.')\n}\n\nfunction createKeyId(key) {\n return isArray(key) ? key.join('.') : key\n}\n\nfunction get(obj, path) {\n let list = [];\n let arr = false;\n\n const deepGet = (obj, path, index) => {\n if (!isDefined(obj)) {\n return\n }\n if (!path[index]) {\n // If there's no path left, we've arrived at the object we care about.\n list.push(obj);\n } else {\n let key = path[index];\n\n const value = obj[key];\n\n if (!isDefined(value)) {\n return\n }\n\n // If we're at the last value in the path, and if it's a string/number/bool,\n // add it to the list\n if (\n index === path.length - 1 &&\n (isString(value) || isNumber(value) || isBoolean(value))\n ) {\n list.push(toString(value));\n } else if (isArray(value)) {\n arr = true;\n // Search each item in the array.\n for (let i = 0, len = value.length; i < len; i += 1) {\n deepGet(value[i], path, index + 1);\n }\n } else if (path.length) {\n // An object. Recurse further.\n deepGet(value, path, index + 1);\n }\n }\n };\n\n // Backwards compatibility (since path used to be a string)\n deepGet(obj, isString(path) ? path.split('.') : path, 0);\n\n return arr ? list : list[0]\n}\n\nconst MatchOptions = {\n // Whether the matches should be included in the result set. When `true`, each record in the result\n // set will include the indices of the matched characters.\n // These can consequently be used for highlighting purposes.\n includeMatches: false,\n // When `true`, the matching function will continue to the end of a search pattern even if\n // a perfect match has already been located in the string.\n findAllMatches: false,\n // Minimum number of characters that must be matched before a result is considered a match\n minMatchCharLength: 1\n};\n\nconst BasicOptions = {\n // When `true`, the algorithm continues searching to the end of the input even if a perfect\n // match is found before the end of the same input.\n isCaseSensitive: false,\n // When true, the matching function will continue to the end of a search pattern even if\n includeScore: false,\n // List of properties that will be searched. This also supports nested properties.\n keys: [],\n // Whether to sort the result list, by score\n shouldSort: true,\n // Default sort function: sort by ascending score, ascending index\n sortFn: (a, b) =>\n a.score === b.score ? (a.idx < b.idx ? -1 : 1) : a.score < b.score ? -1 : 1\n};\n\nconst FuzzyOptions = {\n // Approximately where in the text is the pattern expected to be found?\n location: 0,\n // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match\n // (of both letters and location), a threshold of '1.0' would match anything.\n threshold: 0.6,\n // Determines how close the match must be to the fuzzy location (specified above).\n // An exact letter match which is 'distance' characters away from the fuzzy location\n // would score as a complete mismatch. A distance of '0' requires the match be at\n // the exact location specified, a threshold of '1000' would require a perfect match\n // to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.\n distance: 100\n};\n\nconst AdvancedOptions = {\n // When `true`, it enables the use of unix-like search commands\n useExtendedSearch: false,\n // The get function to use when fetching an object's properties.\n // The default will search nested paths *ie foo.bar.baz*\n getFn: get,\n // When `true`, search will ignore `location` and `distance`, so it won't matter\n // where in the string the pattern appears.\n // More info: https://fusejs.io/concepts/scoring-theory.html#fuzziness-score\n ignoreLocation: false,\n // When `true`, the calculation for the relevance score (used for sorting) will\n // ignore the field-length norm.\n // More info: https://fusejs.io/concepts/scoring-theory.html#field-length-norm\n ignoreFieldNorm: false,\n // The weight to determine how much field length norm effects scoring.\n fieldNormWeight: 1\n};\n\nvar Config = {\n ...BasicOptions,\n ...MatchOptions,\n ...FuzzyOptions,\n ...AdvancedOptions\n};\n\nconst SPACE = /[^ ]+/g;\n\n// Field-length norm: the shorter the field, the higher the weight.\n// Set to 3 decimals to reduce index size.\nfunction norm(weight = 1, mantissa = 3) {\n const cache = new Map();\n const m = Math.pow(10, mantissa);\n\n return {\n get(value) {\n const numTokens = value.match(SPACE).length;\n\n if (cache.has(numTokens)) {\n return cache.get(numTokens)\n }\n\n // Default function is 1/sqrt(x), weight makes that variable\n const norm = 1 / Math.pow(numTokens, 0.5 * weight);\n\n // In place of `toFixed(mantissa)`, for faster computation\n const n = parseFloat(Math.round(norm * m) / m);\n\n cache.set(numTokens, n);\n\n return n\n },\n clear() {\n cache.clear();\n }\n }\n}\n\nclass FuseIndex {\n constructor({\n getFn = Config.getFn,\n fieldNormWeight = Config.fieldNormWeight\n } = {}) {\n this.norm = norm(fieldNormWeight, 3);\n this.getFn = getFn;\n this.isCreated = false;\n\n this.setIndexRecords();\n }\n setSources(docs = []) {\n this.docs = docs;\n }\n setIndexRecords(records = []) {\n this.records = records;\n }\n setKeys(keys = []) {\n this.keys = keys;\n this._keysMap = {};\n keys.forEach((key, idx) => {\n this._keysMap[key.id] = idx;\n });\n }\n create() {\n if (this.isCreated || !this.docs.length) {\n return\n }\n\n this.isCreated = true;\n\n // List is Array\n if (isString(this.docs[0])) {\n this.docs.forEach((doc, docIndex) => {\n this._addString(doc, docIndex);\n });\n } else {\n // List is Array\n this.docs.forEach((doc, docIndex) => {\n this._addObject(doc, docIndex);\n });\n }\n\n this.norm.clear();\n }\n // Adds a doc to the end of the index\n add(doc) {\n const idx = this.size();\n\n if (isString(doc)) {\n this._addString(doc, idx);\n } else {\n this._addObject(doc, idx);\n }\n }\n // Removes the doc at the specified index of the index\n removeAt(idx) {\n this.records.splice(idx, 1);\n\n // Change ref index of every subsquent doc\n for (let i = idx, len = this.size(); i < len; i += 1) {\n this.records[i].i -= 1;\n }\n }\n getValueForItemAtKeyId(item, keyId) {\n return item[this._keysMap[keyId]]\n }\n size() {\n return this.records.length\n }\n _addString(doc, docIndex) {\n if (!isDefined(doc) || isBlank(doc)) {\n return\n }\n\n let record = {\n v: doc,\n i: docIndex,\n n: this.norm.get(doc)\n };\n\n this.records.push(record);\n }\n _addObject(doc, docIndex) {\n let record = { i: docIndex, $: {} };\n\n // Iterate over every key (i.e, path), and fetch the value at that key\n this.keys.forEach((key, keyIndex) => {\n let value = key.getFn ? key.getFn(doc) : this.getFn(doc, key.path);\n\n if (!isDefined(value)) {\n return\n }\n\n if (isArray(value)) {\n let subRecords = [];\n const stack = [{ nestedArrIndex: -1, value }];\n\n while (stack.length) {\n const { nestedArrIndex, value } = stack.pop();\n\n if (!isDefined(value)) {\n continue\n }\n\n if (isString(value) && !isBlank(value)) {\n let subRecord = {\n v: value,\n i: nestedArrIndex,\n n: this.norm.get(value)\n };\n\n subRecords.push(subRecord);\n } else if (isArray(value)) {\n value.forEach((item, k) => {\n stack.push({\n nestedArrIndex: k,\n value: item\n });\n });\n } else ;\n }\n record.$[keyIndex] = subRecords;\n } else if (isString(value) && !isBlank(value)) {\n let subRecord = {\n v: value,\n n: this.norm.get(value)\n };\n\n record.$[keyIndex] = subRecord;\n }\n });\n\n this.records.push(record);\n }\n toJSON() {\n return {\n keys: this.keys,\n records: this.records\n }\n }\n}\n\nfunction createIndex(\n keys,\n docs,\n { getFn = Config.getFn, fieldNormWeight = Config.fieldNormWeight } = {}\n) {\n const myIndex = new FuseIndex({ getFn, fieldNormWeight });\n myIndex.setKeys(keys.map(createKey));\n myIndex.setSources(docs);\n myIndex.create();\n return myIndex\n}\n\nfunction parseIndex(\n data,\n { getFn = Config.getFn, fieldNormWeight = Config.fieldNormWeight } = {}\n) {\n const { keys, records } = data;\n const myIndex = new FuseIndex({ getFn, fieldNormWeight });\n myIndex.setKeys(keys);\n myIndex.setIndexRecords(records);\n return myIndex\n}\n\nfunction computeScore$1(\n pattern,\n {\n errors = 0,\n currentLocation = 0,\n expectedLocation = 0,\n distance = Config.distance,\n ignoreLocation = Config.ignoreLocation\n } = {}\n) {\n const accuracy = errors / pattern.length;\n\n if (ignoreLocation) {\n return accuracy\n }\n\n const proximity = Math.abs(expectedLocation - currentLocation);\n\n if (!distance) {\n // Dodge divide by zero error.\n return proximity ? 1.0 : accuracy\n }\n\n return accuracy + proximity / distance\n}\n\nfunction convertMaskToIndices(\n matchmask = [],\n minMatchCharLength = Config.minMatchCharLength\n) {\n let indices = [];\n let start = -1;\n let end = -1;\n let i = 0;\n\n for (let len = matchmask.length; i < len; i += 1) {\n let match = matchmask[i];\n if (match && start === -1) {\n start = i;\n } else if (!match && start !== -1) {\n end = i - 1;\n if (end - start + 1 >= minMatchCharLength) {\n indices.push([start, end]);\n }\n start = -1;\n }\n }\n\n // (i-1 - start) + 1 => i - start\n if (matchmask[i - 1] && i - start >= minMatchCharLength) {\n indices.push([start, i - 1]);\n }\n\n return indices\n}\n\n// Machine word size\nconst MAX_BITS = 32;\n\nfunction search(\n text,\n pattern,\n patternAlphabet,\n {\n location = Config.location,\n distance = Config.distance,\n threshold = Config.threshold,\n findAllMatches = Config.findAllMatches,\n minMatchCharLength = Config.minMatchCharLength,\n includeMatches = Config.includeMatches,\n ignoreLocation = Config.ignoreLocation\n } = {}\n) {\n if (pattern.length > MAX_BITS) {\n throw new Error(PATTERN_LENGTH_TOO_LARGE(MAX_BITS))\n }\n\n const patternLen = pattern.length;\n // Set starting location at beginning text and initialize the alphabet.\n const textLen = text.length;\n // Handle the case when location > text.length\n const expectedLocation = Math.max(0, Math.min(location, textLen));\n // Highest score beyond which we give up.\n let currentThreshold = threshold;\n // Is there a nearby exact match? (speedup)\n let bestLocation = expectedLocation;\n\n // Performance: only computer matches when the minMatchCharLength > 1\n // OR if `includeMatches` is true.\n const computeMatches = minMatchCharLength > 1 || includeMatches;\n // A mask of the matches, used for building the indices\n const matchMask = computeMatches ? Array(textLen) : [];\n\n let index;\n\n // Get all exact matches, here for speed up\n while ((index = text.indexOf(pattern, bestLocation)) > -1) {\n let score = computeScore$1(pattern, {\n currentLocation: index,\n expectedLocation,\n distance,\n ignoreLocation\n });\n\n currentThreshold = Math.min(score, currentThreshold);\n bestLocation = index + patternLen;\n\n if (computeMatches) {\n let i = 0;\n while (i < patternLen) {\n matchMask[index + i] = 1;\n i += 1;\n }\n }\n }\n\n // Reset the best location\n bestLocation = -1;\n\n let lastBitArr = [];\n let finalScore = 1;\n let binMax = patternLen + textLen;\n\n const mask = 1 << (patternLen - 1);\n\n for (let i = 0; i < patternLen; i += 1) {\n // Scan for the best match; each iteration allows for one more error.\n // Run a binary search to determine how far from the match location we can stray\n // at this error level.\n let binMin = 0;\n let binMid = binMax;\n\n while (binMin < binMid) {\n const score = computeScore$1(pattern, {\n errors: i,\n currentLocation: expectedLocation + binMid,\n expectedLocation,\n distance,\n ignoreLocation\n });\n\n if (score <= currentThreshold) {\n binMin = binMid;\n } else {\n binMax = binMid;\n }\n\n binMid = Math.floor((binMax - binMin) / 2 + binMin);\n }\n\n // Use the result from this iteration as the maximum for the next.\n binMax = binMid;\n\n let start = Math.max(1, expectedLocation - binMid + 1);\n let finish = findAllMatches\n ? textLen\n : Math.min(expectedLocation + binMid, textLen) + patternLen;\n\n // Initialize the bit array\n let bitArr = Array(finish + 2);\n\n bitArr[finish + 1] = (1 << i) - 1;\n\n for (let j = finish; j >= start; j -= 1) {\n let currentLocation = j - 1;\n let charMatch = patternAlphabet[text.charAt(currentLocation)];\n\n if (computeMatches) {\n // Speed up: quick bool to int conversion (i.e, `charMatch ? 1 : 0`)\n matchMask[currentLocation] = +!!charMatch;\n }\n\n // First pass: exact match\n bitArr[j] = ((bitArr[j + 1] << 1) | 1) & charMatch;\n\n // Subsequent passes: fuzzy match\n if (i) {\n bitArr[j] |=\n ((lastBitArr[j + 1] | lastBitArr[j]) << 1) | 1 | lastBitArr[j + 1];\n }\n\n if (bitArr[j] & mask) {\n finalScore = computeScore$1(pattern, {\n errors: i,\n currentLocation,\n expectedLocation,\n distance,\n ignoreLocation\n });\n\n // This match will almost certainly be better than any existing match.\n // But check anyway.\n if (finalScore <= currentThreshold) {\n // Indeed it is\n currentThreshold = finalScore;\n bestLocation = currentLocation;\n\n // Already passed `loc`, downhill from here on in.\n if (bestLocation <= expectedLocation) {\n break\n }\n\n // When passing `bestLocation`, don't exceed our current distance from `expectedLocation`.\n start = Math.max(1, 2 * expectedLocation - bestLocation);\n }\n }\n }\n\n // No hope for a (better) match at greater error levels.\n const score = computeScore$1(pattern, {\n errors: i + 1,\n currentLocation: expectedLocation,\n expectedLocation,\n distance,\n ignoreLocation\n });\n\n if (score > currentThreshold) {\n break\n }\n\n lastBitArr = bitArr;\n }\n\n const result = {\n isMatch: bestLocation >= 0,\n // Count exact matches (those with a score of 0) to be \"almost\" exact\n score: Math.max(0.001, finalScore)\n };\n\n if (computeMatches) {\n const indices = convertMaskToIndices(matchMask, minMatchCharLength);\n if (!indices.length) {\n result.isMatch = false;\n } else if (includeMatches) {\n result.indices = indices;\n }\n }\n\n return result\n}\n\nfunction createPatternAlphabet(pattern) {\n let mask = {};\n\n for (let i = 0, len = pattern.length; i < len; i += 1) {\n const char = pattern.charAt(i);\n mask[char] = (mask[char] || 0) | (1 << (len - i - 1));\n }\n\n return mask\n}\n\nclass BitapSearch {\n constructor(\n pattern,\n {\n location = Config.location,\n threshold = Config.threshold,\n distance = Config.distance,\n includeMatches = Config.includeMatches,\n findAllMatches = Config.findAllMatches,\n minMatchCharLength = Config.minMatchCharLength,\n isCaseSensitive = Config.isCaseSensitive,\n ignoreLocation = Config.ignoreLocation\n } = {}\n ) {\n this.options = {\n location,\n threshold,\n distance,\n includeMatches,\n findAllMatches,\n minMatchCharLength,\n isCaseSensitive,\n ignoreLocation\n };\n\n this.pattern = isCaseSensitive ? pattern : pattern.toLowerCase();\n\n this.chunks = [];\n\n if (!this.pattern.length) {\n return\n }\n\n const addChunk = (pattern, startIndex) => {\n this.chunks.push({\n pattern,\n alphabet: createPatternAlphabet(pattern),\n startIndex\n });\n };\n\n const len = this.pattern.length;\n\n if (len > MAX_BITS) {\n let i = 0;\n const remainder = len % MAX_BITS;\n const end = len - remainder;\n\n while (i < end) {\n addChunk(this.pattern.substr(i, MAX_BITS), i);\n i += MAX_BITS;\n }\n\n if (remainder) {\n const startIndex = len - MAX_BITS;\n addChunk(this.pattern.substr(startIndex), startIndex);\n }\n } else {\n addChunk(this.pattern, 0);\n }\n }\n\n searchIn(text) {\n const { isCaseSensitive, includeMatches } = this.options;\n\n if (!isCaseSensitive) {\n text = text.toLowerCase();\n }\n\n // Exact match\n if (this.pattern === text) {\n let result = {\n isMatch: true,\n score: 0\n };\n\n if (includeMatches) {\n result.indices = [[0, text.length - 1]];\n }\n\n return result\n }\n\n // Otherwise, use Bitap algorithm\n const {\n location,\n distance,\n threshold,\n findAllMatches,\n minMatchCharLength,\n ignoreLocation\n } = this.options;\n\n let allIndices = [];\n let totalScore = 0;\n let hasMatches = false;\n\n this.chunks.forEach(({ pattern, alphabet, startIndex }) => {\n const { isMatch, score, indices } = search(text, pattern, alphabet, {\n location: location + startIndex,\n distance,\n threshold,\n findAllMatches,\n minMatchCharLength,\n includeMatches,\n ignoreLocation\n });\n\n if (isMatch) {\n hasMatches = true;\n }\n\n totalScore += score;\n\n if (isMatch && indices) {\n allIndices = [...allIndices, ...indices];\n }\n });\n\n let result = {\n isMatch: hasMatches,\n score: hasMatches ? totalScore / this.chunks.length : 1\n };\n\n if (hasMatches && includeMatches) {\n result.indices = allIndices;\n }\n\n return result\n }\n}\n\nclass BaseMatch {\n constructor(pattern) {\n this.pattern = pattern;\n }\n static isMultiMatch(pattern) {\n return getMatch(pattern, this.multiRegex)\n }\n static isSingleMatch(pattern) {\n return getMatch(pattern, this.singleRegex)\n }\n search(/*text*/) {}\n}\n\nfunction getMatch(pattern, exp) {\n const matches = pattern.match(exp);\n return matches ? matches[1] : null\n}\n\n// Token: 'file\n\nclass ExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'exact'\n }\n static get multiRegex() {\n return /^=\"(.*)\"$/\n }\n static get singleRegex() {\n return /^=(.*)$/\n }\n search(text) {\n const isMatch = text === this.pattern;\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, this.pattern.length - 1]\n }\n }\n}\n\n// Token: !fire\n\nclass InverseExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'inverse-exact'\n }\n static get multiRegex() {\n return /^!\"(.*)\"$/\n }\n static get singleRegex() {\n return /^!(.*)$/\n }\n search(text) {\n const index = text.indexOf(this.pattern);\n const isMatch = index === -1;\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, text.length - 1]\n }\n }\n}\n\n// Token: ^file\n\nclass PrefixExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'prefix-exact'\n }\n static get multiRegex() {\n return /^\\^\"(.*)\"$/\n }\n static get singleRegex() {\n return /^\\^(.*)$/\n }\n search(text) {\n const isMatch = text.startsWith(this.pattern);\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, this.pattern.length - 1]\n }\n }\n}\n\n// Token: !^fire\n\nclass InversePrefixExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'inverse-prefix-exact'\n }\n static get multiRegex() {\n return /^!\\^\"(.*)\"$/\n }\n static get singleRegex() {\n return /^!\\^(.*)$/\n }\n search(text) {\n const isMatch = !text.startsWith(this.pattern);\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, text.length - 1]\n }\n }\n}\n\n// Token: .file$\n\nclass SuffixExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'suffix-exact'\n }\n static get multiRegex() {\n return /^\"(.*)\"\\$$/\n }\n static get singleRegex() {\n return /^(.*)\\$$/\n }\n search(text) {\n const isMatch = text.endsWith(this.pattern);\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [text.length - this.pattern.length, text.length - 1]\n }\n }\n}\n\n// Token: !.file$\n\nclass InverseSuffixExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'inverse-suffix-exact'\n }\n static get multiRegex() {\n return /^!\"(.*)\"\\$$/\n }\n static get singleRegex() {\n return /^!(.*)\\$$/\n }\n search(text) {\n const isMatch = !text.endsWith(this.pattern);\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, text.length - 1]\n }\n }\n}\n\nclass FuzzyMatch extends BaseMatch {\n constructor(\n pattern,\n {\n location = Config.location,\n threshold = Config.threshold,\n distance = Config.distance,\n includeMatches = Config.includeMatches,\n findAllMatches = Config.findAllMatches,\n minMatchCharLength = Config.minMatchCharLength,\n isCaseSensitive = Config.isCaseSensitive,\n ignoreLocation = Config.ignoreLocation\n } = {}\n ) {\n super(pattern);\n this._bitapSearch = new BitapSearch(pattern, {\n location,\n threshold,\n distance,\n includeMatches,\n findAllMatches,\n minMatchCharLength,\n isCaseSensitive,\n ignoreLocation\n });\n }\n static get type() {\n return 'fuzzy'\n }\n static get multiRegex() {\n return /^\"(.*)\"$/\n }\n static get singleRegex() {\n return /^(.*)$/\n }\n search(text) {\n return this._bitapSearch.searchIn(text)\n }\n}\n\n// Token: 'file\n\nclass IncludeMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'include'\n }\n static get multiRegex() {\n return /^'\"(.*)\"$/\n }\n static get singleRegex() {\n return /^'(.*)$/\n }\n search(text) {\n let location = 0;\n let index;\n\n const indices = [];\n const patternLen = this.pattern.length;\n\n // Get all exact matches\n while ((index = text.indexOf(this.pattern, location)) > -1) {\n location = index + patternLen;\n indices.push([index, location - 1]);\n }\n\n const isMatch = !!indices.length;\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices\n }\n }\n}\n\n// ❗Order is important. DO NOT CHANGE.\nconst searchers = [\n ExactMatch,\n IncludeMatch,\n PrefixExactMatch,\n InversePrefixExactMatch,\n InverseSuffixExactMatch,\n SuffixExactMatch,\n InverseExactMatch,\n FuzzyMatch\n];\n\nconst searchersLen = searchers.length;\n\n// Regex to split by spaces, but keep anything in quotes together\nconst SPACE_RE = / +(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)/;\nconst OR_TOKEN = '|';\n\n// Return a 2D array representation of the query, for simpler parsing.\n// Example:\n// \"^core go$ | rb$ | py$ xy$\" => [[\"^core\", \"go$\"], [\"rb$\"], [\"py$\", \"xy$\"]]\nfunction parseQuery(pattern, options = {}) {\n return pattern.split(OR_TOKEN).map((item) => {\n let query = item\n .trim()\n .split(SPACE_RE)\n .filter((item) => item && !!item.trim());\n\n let results = [];\n for (let i = 0, len = query.length; i < len; i += 1) {\n const queryItem = query[i];\n\n // 1. Handle multiple query match (i.e, once that are quoted, like `\"hello world\"`)\n let found = false;\n let idx = -1;\n while (!found && ++idx < searchersLen) {\n const searcher = searchers[idx];\n let token = searcher.isMultiMatch(queryItem);\n if (token) {\n results.push(new searcher(token, options));\n found = true;\n }\n }\n\n if (found) {\n continue\n }\n\n // 2. Handle single query matches (i.e, once that are *not* quoted)\n idx = -1;\n while (++idx < searchersLen) {\n const searcher = searchers[idx];\n let token = searcher.isSingleMatch(queryItem);\n if (token) {\n results.push(new searcher(token, options));\n break\n }\n }\n }\n\n return results\n })\n}\n\n// These extended matchers can return an array of matches, as opposed\n// to a singl match\nconst MultiMatchSet = new Set([FuzzyMatch.type, IncludeMatch.type]);\n\n/**\n * Command-like searching\n * ======================\n *\n * Given multiple search terms delimited by spaces.e.g. `^jscript .python$ ruby !java`,\n * search in a given text.\n *\n * Search syntax:\n *\n * | Token | Match type | Description |\n * | ----------- | -------------------------- | -------------------------------------- |\n * | `jscript` | fuzzy-match | Items that fuzzy match `jscript` |\n * | `=scheme` | exact-match | Items that are `scheme` |\n * | `'python` | include-match | Items that include `python` |\n * | `!ruby` | inverse-exact-match | Items that do not include `ruby` |\n * | `^java` | prefix-exact-match | Items that start with `java` |\n * | `!^earlang` | inverse-prefix-exact-match | Items that do not start with `earlang` |\n * | `.js$` | suffix-exact-match | Items that end with `.js` |\n * | `!.go$` | inverse-suffix-exact-match | Items that do not end with `.go` |\n *\n * A single pipe character acts as an OR operator. For example, the following\n * query matches entries that start with `core` and end with either`go`, `rb`,\n * or`py`.\n *\n * ```\n * ^core go$ | rb$ | py$\n * ```\n */\nclass ExtendedSearch {\n constructor(\n pattern,\n {\n isCaseSensitive = Config.isCaseSensitive,\n includeMatches = Config.includeMatches,\n minMatchCharLength = Config.minMatchCharLength,\n ignoreLocation = Config.ignoreLocation,\n findAllMatches = Config.findAllMatches,\n location = Config.location,\n threshold = Config.threshold,\n distance = Config.distance\n } = {}\n ) {\n this.query = null;\n this.options = {\n isCaseSensitive,\n includeMatches,\n minMatchCharLength,\n findAllMatches,\n ignoreLocation,\n location,\n threshold,\n distance\n };\n\n this.pattern = isCaseSensitive ? pattern : pattern.toLowerCase();\n this.query = parseQuery(this.pattern, this.options);\n }\n\n static condition(_, options) {\n return options.useExtendedSearch\n }\n\n searchIn(text) {\n const query = this.query;\n\n if (!query) {\n return {\n isMatch: false,\n score: 1\n }\n }\n\n const { includeMatches, isCaseSensitive } = this.options;\n\n text = isCaseSensitive ? text : text.toLowerCase();\n\n let numMatches = 0;\n let allIndices = [];\n let totalScore = 0;\n\n // ORs\n for (let i = 0, qLen = query.length; i < qLen; i += 1) {\n const searchers = query[i];\n\n // Reset indices\n allIndices.length = 0;\n numMatches = 0;\n\n // ANDs\n for (let j = 0, pLen = searchers.length; j < pLen; j += 1) {\n const searcher = searchers[j];\n const { isMatch, indices, score } = searcher.search(text);\n\n if (isMatch) {\n numMatches += 1;\n totalScore += score;\n if (includeMatches) {\n const type = searcher.constructor.type;\n if (MultiMatchSet.has(type)) {\n allIndices = [...allIndices, ...indices];\n } else {\n allIndices.push(indices);\n }\n }\n } else {\n totalScore = 0;\n numMatches = 0;\n allIndices.length = 0;\n break\n }\n }\n\n // OR condition, so if TRUE, return\n if (numMatches) {\n let result = {\n isMatch: true,\n score: totalScore / numMatches\n };\n\n if (includeMatches) {\n result.indices = allIndices;\n }\n\n return result\n }\n }\n\n // Nothing was matched\n return {\n isMatch: false,\n score: 1\n }\n }\n}\n\nconst registeredSearchers = [];\n\nfunction register(...args) {\n registeredSearchers.push(...args);\n}\n\nfunction createSearcher(pattern, options) {\n for (let i = 0, len = registeredSearchers.length; i < len; i += 1) {\n let searcherClass = registeredSearchers[i];\n if (searcherClass.condition(pattern, options)) {\n return new searcherClass(pattern, options)\n }\n }\n\n return new BitapSearch(pattern, options)\n}\n\nconst LogicalOperator = {\n AND: '$and',\n OR: '$or'\n};\n\nconst KeyType = {\n PATH: '$path',\n PATTERN: '$val'\n};\n\nconst isExpression = (query) =>\n !!(query[LogicalOperator.AND] || query[LogicalOperator.OR]);\n\nconst isPath = (query) => !!query[KeyType.PATH];\n\nconst isLeaf = (query) =>\n !isArray(query) && isObject(query) && !isExpression(query);\n\nconst convertToExplicit = (query) => ({\n [LogicalOperator.AND]: Object.keys(query).map((key) => ({\n [key]: query[key]\n }))\n});\n\n// When `auto` is `true`, the parse function will infer and initialize and add\n// the appropriate `Searcher` instance\nfunction parse(query, options, { auto = true } = {}) {\n const next = (query) => {\n let keys = Object.keys(query);\n\n const isQueryPath = isPath(query);\n\n if (!isQueryPath && keys.length > 1 && !isExpression(query)) {\n return next(convertToExplicit(query))\n }\n\n if (isLeaf(query)) {\n const key = isQueryPath ? query[KeyType.PATH] : keys[0];\n\n const pattern = isQueryPath ? query[KeyType.PATTERN] : query[key];\n\n if (!isString(pattern)) {\n throw new Error(LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY(key))\n }\n\n const obj = {\n keyId: createKeyId(key),\n pattern\n };\n\n if (auto) {\n obj.searcher = createSearcher(pattern, options);\n }\n\n return obj\n }\n\n let node = {\n children: [],\n operator: keys[0]\n };\n\n keys.forEach((key) => {\n const value = query[key];\n\n if (isArray(value)) {\n value.forEach((item) => {\n node.children.push(next(item));\n });\n }\n });\n\n return node\n };\n\n if (!isExpression(query)) {\n query = convertToExplicit(query);\n }\n\n return next(query)\n}\n\n// Practical scoring function\nfunction computeScore(\n results,\n { ignoreFieldNorm = Config.ignoreFieldNorm }\n) {\n results.forEach((result) => {\n let totalScore = 1;\n\n result.matches.forEach(({ key, norm, score }) => {\n const weight = key ? key.weight : null;\n\n totalScore *= Math.pow(\n score === 0 && weight ? Number.EPSILON : score,\n (weight || 1) * (ignoreFieldNorm ? 1 : norm)\n );\n });\n\n result.score = totalScore;\n });\n}\n\nfunction transformMatches(result, data) {\n const matches = result.matches;\n data.matches = [];\n\n if (!isDefined(matches)) {\n return\n }\n\n matches.forEach((match) => {\n if (!isDefined(match.indices) || !match.indices.length) {\n return\n }\n\n const { indices, value } = match;\n\n let obj = {\n indices,\n value\n };\n\n if (match.key) {\n obj.key = match.key.src;\n }\n\n if (match.idx > -1) {\n obj.refIndex = match.idx;\n }\n\n data.matches.push(obj);\n });\n}\n\nfunction transformScore(result, data) {\n data.score = result.score;\n}\n\nfunction format(\n results,\n docs,\n {\n includeMatches = Config.includeMatches,\n includeScore = Config.includeScore\n } = {}\n) {\n const transformers = [];\n\n if (includeMatches) transformers.push(transformMatches);\n if (includeScore) transformers.push(transformScore);\n\n return results.map((result) => {\n const { idx } = result;\n\n const data = {\n item: docs[idx],\n refIndex: idx\n };\n\n if (transformers.length) {\n transformers.forEach((transformer) => {\n transformer(result, data);\n });\n }\n\n return data\n })\n}\n\nclass Fuse {\n constructor(docs, options = {}, index) {\n this.options = { ...Config, ...options };\n\n if (\n this.options.useExtendedSearch &&\n !true\n ) {\n throw new Error(EXTENDED_SEARCH_UNAVAILABLE)\n }\n\n this._keyStore = new KeyStore(this.options.keys);\n\n this.setCollection(docs, index);\n }\n\n setCollection(docs, index) {\n this._docs = docs;\n\n if (index && !(index instanceof FuseIndex)) {\n throw new Error(INCORRECT_INDEX_TYPE)\n }\n\n this._myIndex =\n index ||\n createIndex(this.options.keys, this._docs, {\n getFn: this.options.getFn,\n fieldNormWeight: this.options.fieldNormWeight\n });\n }\n\n add(doc) {\n if (!isDefined(doc)) {\n return\n }\n\n this._docs.push(doc);\n this._myIndex.add(doc);\n }\n\n remove(predicate = (/* doc, idx */) => false) {\n const results = [];\n\n for (let i = 0, len = this._docs.length; i < len; i += 1) {\n const doc = this._docs[i];\n if (predicate(doc, i)) {\n this.removeAt(i);\n i -= 1;\n len -= 1;\n\n results.push(doc);\n }\n }\n\n return results\n }\n\n removeAt(idx) {\n this._docs.splice(idx, 1);\n this._myIndex.removeAt(idx);\n }\n\n getIndex() {\n return this._myIndex\n }\n\n search(query, { limit = -1 } = {}) {\n const {\n includeMatches,\n includeScore,\n shouldSort,\n sortFn,\n ignoreFieldNorm\n } = this.options;\n\n let results = isString(query)\n ? isString(this._docs[0])\n ? this._searchStringList(query)\n : this._searchObjectList(query)\n : this._searchLogical(query);\n\n computeScore(results, { ignoreFieldNorm });\n\n if (shouldSort) {\n results.sort(sortFn);\n }\n\n if (isNumber(limit) && limit > -1) {\n results = results.slice(0, limit);\n }\n\n return format(results, this._docs, {\n includeMatches,\n includeScore\n })\n }\n\n _searchStringList(query) {\n const searcher = createSearcher(query, this.options);\n const { records } = this._myIndex;\n const results = [];\n\n // Iterate over every string in the index\n records.forEach(({ v: text, i: idx, n: norm }) => {\n if (!isDefined(text)) {\n return\n }\n\n const { isMatch, score, indices } = searcher.searchIn(text);\n\n if (isMatch) {\n results.push({\n item: text,\n idx,\n matches: [{ score, value: text, norm, indices }]\n });\n }\n });\n\n return results\n }\n\n _searchLogical(query) {\n\n const expression = parse(query, this.options);\n\n const evaluate = (node, item, idx) => {\n if (!node.children) {\n const { keyId, searcher } = node;\n\n const matches = this._findMatches({\n key: this._keyStore.get(keyId),\n value: this._myIndex.getValueForItemAtKeyId(item, keyId),\n searcher\n });\n\n if (matches && matches.length) {\n return [\n {\n idx,\n item,\n matches\n }\n ]\n }\n\n return []\n }\n\n const res = [];\n for (let i = 0, len = node.children.length; i < len; i += 1) {\n const child = node.children[i];\n const result = evaluate(child, item, idx);\n if (result.length) {\n res.push(...result);\n } else if (node.operator === LogicalOperator.AND) {\n return []\n }\n }\n return res\n };\n\n const records = this._myIndex.records;\n const resultMap = {};\n const results = [];\n\n records.forEach(({ $: item, i: idx }) => {\n if (isDefined(item)) {\n let expResults = evaluate(expression, item, idx);\n\n if (expResults.length) {\n // Dedupe when adding\n if (!resultMap[idx]) {\n resultMap[idx] = { idx, item, matches: [] };\n results.push(resultMap[idx]);\n }\n expResults.forEach(({ matches }) => {\n resultMap[idx].matches.push(...matches);\n });\n }\n }\n });\n\n return results\n }\n\n _searchObjectList(query) {\n const searcher = createSearcher(query, this.options);\n const { keys, records } = this._myIndex;\n const results = [];\n\n // List is Array\n records.forEach(({ $: item, i: idx }) => {\n if (!isDefined(item)) {\n return\n }\n\n let matches = [];\n\n // Iterate over every key (i.e, path), and fetch the value at that key\n keys.forEach((key, keyIndex) => {\n matches.push(\n ...this._findMatches({\n key,\n value: item[keyIndex],\n searcher\n })\n );\n });\n\n if (matches.length) {\n results.push({\n idx,\n item,\n matches\n });\n }\n });\n\n return results\n }\n _findMatches({ key, value, searcher }) {\n if (!isDefined(value)) {\n return []\n }\n\n let matches = [];\n\n if (isArray(value)) {\n value.forEach(({ v: text, i: idx, n: norm }) => {\n if (!isDefined(text)) {\n return\n }\n\n const { isMatch, score, indices } = searcher.searchIn(text);\n\n if (isMatch) {\n matches.push({\n score,\n key,\n value: text,\n idx,\n norm,\n indices\n });\n }\n });\n } else {\n const { v: text, n: norm } = value;\n\n const { isMatch, score, indices } = searcher.searchIn(text);\n\n if (isMatch) {\n matches.push({ score, key, value: text, norm, indices });\n }\n }\n\n return matches\n }\n}\n\nFuse.version = '7.0.0';\nFuse.createIndex = createIndex;\nFuse.parseIndex = parseIndex;\nFuse.config = Config;\n\n{\n Fuse.parseQuery = parse;\n}\n\n{\n register(ExtendedSearch);\n}\n\nexport { Fuse as default };\n","// @ts-strict-ignore\nimport { ComfyNodeDefImpl } from '@/stores/nodeDefStore'\nimport Fuse, { IFuseOptions, FuseSearchOptions } from 'fuse.js'\nimport _ from 'lodash'\n\nexport type SearchAuxScore = number[]\n\ninterface ExtraSearchOptions {\n matchWildcards?: boolean\n}\n\nexport class FuseSearch {\n private fuse: Fuse\n private readonly keys: string[]\n public readonly data: T[]\n public readonly advancedScoring: boolean\n\n constructor(\n data: T[],\n options?: IFuseOptions,\n createIndex: boolean = true,\n advancedScoring: boolean = false\n ) {\n this.data = data\n this.keys = (options.keys ?? []) as string[]\n this.advancedScoring = advancedScoring\n const index =\n createIndex && options?.keys\n ? Fuse.createIndex(options.keys, data)\n : undefined\n this.fuse = new Fuse(data, options, index)\n }\n\n public search(query: string, options?: FuseSearchOptions): T[] {\n const fuseResult = !query\n ? this.data.map((x) => ({ item: x, score: 0 }))\n : this.fuse.search(query, options)\n\n if (!this.advancedScoring) {\n return fuseResult.map((x) => x.item)\n }\n\n const aux = fuseResult\n .map((x) => ({\n item: x.item,\n scores: this.calcAuxScores(query.toLocaleLowerCase(), x.item, x.score)\n }))\n .sort((a, b) => this.compareAux(a.scores, b.scores))\n\n return aux.map((x) => x.item)\n }\n\n public calcAuxScores(query: string, entry: T, score: number): SearchAuxScore {\n let values: string[] = []\n if (!this.keys.length) values = [entry as string]\n else values = this.keys.map((x) => entry[x])\n const scores = values.map((x) => this.calcAuxSingle(query, x, score))\n let result = scores.sort(this.compareAux)[0]\n\n const deprecated = values.some((x) =>\n x.toLocaleLowerCase().includes('deprecated')\n )\n result[0] += deprecated && result[0] != 0 ? 5 : 0\n if (entry['postProcessSearchScores']) {\n result = entry['postProcessSearchScores'](result) as SearchAuxScore\n }\n return result\n }\n\n public calcAuxSingle(\n query: string,\n item: string,\n score: number\n ): SearchAuxScore {\n const itemWords = item\n .split(/ |\\b|(?<=[a-z])(?=[A-Z])|(?=[A-Z][a-z])/)\n .map((x) => x.toLocaleLowerCase())\n const queryParts = query.split(' ')\n item = item.toLocaleLowerCase()\n\n let main = 9\n let aux1 = 0\n let aux2 = 0\n\n if (item == query) {\n main = 0\n } else if (item.startsWith(query)) {\n main = 1\n aux2 = item.length\n } else if (itemWords.includes(query)) {\n main = 2\n aux1 = item.indexOf(query) + item.length * 0.5\n aux2 = item.length\n } else if (item.includes(query)) {\n main = 3\n aux1 = item.indexOf(query) + item.length * 0.5\n aux2 = item.length\n } else if (queryParts.every((x) => itemWords.includes(x))) {\n const indexes = queryParts.map((x) => itemWords.indexOf(x))\n const min = Math.min(...indexes)\n const max = Math.max(...indexes)\n main = 4\n aux1 = max - min + max * 0.5 + item.length * 0.5\n aux2 = item.length\n } else if (queryParts.every((x) => item.includes(x))) {\n const min = Math.min(...queryParts.map((x) => item.indexOf(x)))\n const max = Math.max(...queryParts.map((x) => item.indexOf(x) + x.length))\n main = 5\n aux1 = max - min + max * 0.5 + item.length * 0.5\n aux2 = item.length\n }\n\n const lengthPenalty =\n 0.2 *\n (1 -\n Math.min(item.length, query.length) /\n Math.max(item.length, query.length))\n return [main, aux1, aux2, score + lengthPenalty]\n }\n\n public compareAux(a: SearchAuxScore, b: SearchAuxScore) {\n for (let i = 0; i < Math.min(a.length, b.length); i++) {\n if (a[i] !== b[i]) {\n return a[i] - b[i]\n }\n }\n return a.length - b.length\n }\n}\n\nexport type FilterAndValue = [NodeFilter, T]\n\nexport abstract class NodeFilter {\n public abstract readonly id: string\n public abstract readonly name: string\n public abstract readonly invokeSequence: string\n public abstract readonly longInvokeSequence: string\n public readonly fuseSearch: FuseSearch\n\n constructor(\n nodeDefs: ComfyNodeDefImpl[],\n options?: IFuseOptions\n ) {\n this.fuseSearch = new FuseSearch(this.getAllNodeOptions(nodeDefs), options)\n }\n\n private getAllNodeOptions(nodeDefs: ComfyNodeDefImpl[]): FilterOptionT[] {\n return [\n ...new Set(\n nodeDefs.reduce((acc, nodeDef) => {\n return [...acc, ...this.getNodeOptions(nodeDef)]\n }, [])\n )\n ]\n }\n\n public abstract getNodeOptions(node: ComfyNodeDefImpl): FilterOptionT[]\n\n public matches(\n node: ComfyNodeDefImpl,\n value: FilterOptionT,\n extraOptions?: ExtraSearchOptions\n ): boolean {\n const matchWildcards = extraOptions?.matchWildcards !== false\n if (matchWildcards && value === '*') {\n return true\n }\n const options = this.getNodeOptions(node)\n return (\n options.includes(value) ||\n (matchWildcards && _.some(options, (option) => option === '*'))\n )\n }\n}\n\nexport class InputTypeFilter extends NodeFilter {\n public readonly id: string = 'input'\n public readonly name = 'Input Type'\n public readonly invokeSequence = 'i'\n public readonly longInvokeSequence = 'input'\n\n public override getNodeOptions(node: ComfyNodeDefImpl): string[] {\n return node.input.all.map((input) => input.type)\n }\n}\n\nexport class OutputTypeFilter extends NodeFilter {\n public readonly id: string = 'output'\n public readonly name = 'Output Type'\n public readonly invokeSequence = 'o'\n public readonly longInvokeSequence = 'output'\n\n public override getNodeOptions(node: ComfyNodeDefImpl): string[] {\n return node.output.all.map((output) => output.type)\n }\n}\n\nexport class NodeSourceFilter extends NodeFilter {\n public readonly id: string = 'source'\n public readonly name = 'Source'\n public readonly invokeSequence = 's'\n public readonly longInvokeSequence = 'source'\n\n public override getNodeOptions(node: ComfyNodeDefImpl): string[] {\n return [node.nodeSource.displayText]\n }\n}\n\nexport class NodeCategoryFilter extends NodeFilter {\n public readonly id: string = 'category'\n public readonly name = 'Category'\n public readonly invokeSequence = 'c'\n public readonly longInvokeSequence = 'category'\n\n public override getNodeOptions(node: ComfyNodeDefImpl): string[] {\n return [node.category]\n }\n}\n\nexport class NodeSearchService {\n public readonly nodeFuseSearch: FuseSearch\n public readonly nodeFilters: NodeFilter[]\n\n constructor(data: ComfyNodeDefImpl[]) {\n this.nodeFuseSearch = new FuseSearch(\n data,\n {\n keys: ['name', 'display_name'],\n includeScore: true,\n threshold: 0.3,\n shouldSort: false,\n useExtendedSearch: true\n },\n true,\n true\n )\n\n const filterSearchOptions = {\n includeScore: true,\n threshold: 0.3,\n shouldSort: true\n }\n\n this.nodeFilters = [\n new InputTypeFilter(data, filterSearchOptions),\n new OutputTypeFilter(data, filterSearchOptions),\n new NodeCategoryFilter(data, filterSearchOptions)\n ]\n\n if (data[0].python_module !== undefined) {\n this.nodeFilters.push(new NodeSourceFilter(data, filterSearchOptions))\n }\n }\n\n public endsWithFilterStartSequence(query: string): boolean {\n return query.endsWith(':')\n }\n\n public searchNode(\n query: string,\n filters: FilterAndValue[] = [],\n options?: FuseSearchOptions,\n extraOptions?: ExtraSearchOptions\n ): ComfyNodeDefImpl[] {\n const matchedNodes = this.nodeFuseSearch.search(query)\n\n const results = matchedNodes.filter((node) => {\n return _.every(filters, (filterAndValue) => {\n const [filter, value] = filterAndValue\n return filter.matches(node, value, extraOptions)\n })\n })\n\n return options?.limit ? results.slice(0, options.limit) : results\n }\n\n public getFilterById(id: string): NodeFilter | undefined {\n return this.nodeFilters.find((filter) => filter.id === id)\n }\n}\n","import {\n NodeSearchService,\n type SearchAuxScore\n} from '@/services/nodeSearchService'\nimport {\n type ComfyNodeDef,\n type ComfyInputsSpec as ComfyInputsSpecSchema,\n type InputSpec\n} from '@/types/apiTypes'\nimport { defineStore } from 'pinia'\nimport { ComfyWidgetConstructor } from '@/scripts/widgets'\nimport { TreeNode } from 'primevue/treenode'\nimport { buildTree } from '@/utils/treeUtil'\nimport { computed, ref } from 'vue'\nimport axios from 'axios'\nimport {\n type NodeSource,\n NodeSourceType,\n getNodeSource\n} from '@/types/nodeSource'\nimport type { LGraphNode } from '@comfyorg/litegraph'\n\nexport interface BaseInputSpec {\n name: string\n type: string\n tooltip?: string\n default?: T\n\n forceInput?: boolean\n}\n\nexport interface NumericInputSpec extends BaseInputSpec {\n min?: number\n max?: number\n step?: number\n}\n\nexport interface IntInputSpec extends NumericInputSpec {\n type: 'INT'\n}\n\nexport interface FloatInputSpec extends NumericInputSpec {\n type: 'FLOAT'\n round?: number\n}\n\nexport interface BooleanInputSpec extends BaseInputSpec {\n type: 'BOOLEAN'\n labelOn?: string\n labelOff?: string\n}\n\nexport interface StringInputSpec extends BaseInputSpec {\n type: 'STRING'\n multiline?: boolean\n dynamicPrompts?: boolean\n}\n\nexport interface ComboInputSpec extends BaseInputSpec {\n type: 'COMBO'\n comboOptions: any[]\n controlAfterGenerate?: boolean\n imageUpload?: boolean\n}\n\nexport class ComfyInputsSpec {\n required: Record\n optional: Record\n hidden?: Record\n\n constructor(obj: ComfyInputsSpecSchema) {\n this.required = ComfyInputsSpec.transformInputSpecRecord(obj.required ?? {})\n this.optional = ComfyInputsSpec.transformInputSpecRecord(obj.optional ?? {})\n this.hidden = obj.hidden\n }\n\n private static transformInputSpecRecord(\n record: Record\n ): Record {\n const result: Record = {}\n for (const [key, value] of Object.entries(record)) {\n result[key] = ComfyInputsSpec.transformSingleInputSpec(key, value)\n }\n return result\n }\n\n private static isInputSpec(obj: any): boolean {\n return (\n Array.isArray(obj) &&\n obj.length >= 1 &&\n (typeof obj[0] === 'string' || Array.isArray(obj[0]))\n )\n }\n\n private static transformSingleInputSpec(\n name: string,\n value: any\n ): BaseInputSpec {\n if (!ComfyInputsSpec.isInputSpec(value)) return value\n\n const [typeRaw, _spec] = value\n const spec = _spec ?? {}\n const type = Array.isArray(typeRaw) ? 'COMBO' : value[0]\n\n switch (type) {\n case 'COMBO':\n return {\n name,\n type,\n ...spec,\n comboOptions: typeRaw,\n default: spec.default ?? typeRaw[0]\n } as ComboInputSpec\n case 'INT':\n case 'FLOAT':\n case 'BOOLEAN':\n case 'STRING':\n default:\n return { name, type, ...spec } as BaseInputSpec\n }\n }\n\n get all() {\n return [...Object.values(this.required), ...Object.values(this.optional)]\n }\n\n getInput(name: string): BaseInputSpec | undefined {\n return this.required[name] ?? this.optional[name]\n }\n}\n\nexport class ComfyOutputSpec {\n constructor(\n public index: number,\n // Name is not unique for output params\n public name: string,\n public type: string,\n public is_list: boolean,\n public comboOptions?: any[],\n public tooltip?: string\n ) {}\n}\n\nexport class ComfyOutputsSpec {\n constructor(public outputs: ComfyOutputSpec[]) {}\n\n get all() {\n return this.outputs\n }\n}\n\n/**\n * Note: This class does not implement the ComfyNodeDef interface, as we are\n * using a custom output spec for output definitions.\n */\nexport class ComfyNodeDefImpl {\n name: string\n display_name: string\n category: string\n python_module: string\n description: string\n deprecated: boolean\n experimental: boolean\n input: ComfyInputsSpec\n output: ComfyOutputsSpec\n nodeSource: NodeSource\n\n constructor(obj: ComfyNodeDef) {\n this.name = obj.name\n this.display_name = obj.display_name\n this.category = obj.category\n this.python_module = obj.python_module\n this.description = obj.description\n this.deprecated = obj.deprecated ?? obj.category === ''\n this.experimental =\n obj.experimental ?? obj.category.startsWith('_for_testing')\n this.input = new ComfyInputsSpec(obj.input ?? {})\n this.output = ComfyNodeDefImpl.transformOutputSpec(obj)\n this.nodeSource = getNodeSource(obj.python_module)\n }\n\n private static transformOutputSpec(obj: any): ComfyOutputsSpec {\n const { output, output_is_list, output_name, output_tooltips } = obj\n const result = (output ?? []).map((type: string | any[], index: number) => {\n const typeString = Array.isArray(type) ? 'COMBO' : type\n\n return new ComfyOutputSpec(\n index,\n output_name?.[index],\n typeString,\n output_is_list?.[index],\n Array.isArray(type) ? type : undefined,\n output_tooltips?.[index]\n )\n })\n return new ComfyOutputsSpec(result)\n }\n\n get nodePath(): string {\n return (this.category ? this.category + '/' : '') + this.name\n }\n\n get isDummyFolder(): boolean {\n return this.name === ''\n }\n\n postProcessSearchScores(scores: SearchAuxScore): SearchAuxScore {\n const nodeFrequencyStore = useNodeFrequencyStore()\n const nodeFrequency = nodeFrequencyStore.getNodeFrequencyByName(this.name)\n return [scores[0], -nodeFrequency, ...scores.slice(1)]\n }\n\n get isCoreNode(): boolean {\n return this.nodeSource.type === NodeSourceType.Core\n }\n\n get nodeLifeCycleBadgeText(): string {\n if (this.deprecated) return '[DEPR]'\n if (this.experimental) return '[BETA]'\n return ''\n }\n}\n\nexport const SYSTEM_NODE_DEFS: Record = {\n PrimitiveNode: {\n name: 'PrimitiveNode',\n display_name: 'Primitive',\n category: 'utils',\n input: { required: {}, optional: {} },\n output: ['*'],\n output_name: ['connect to widget input'],\n output_is_list: [false],\n output_node: false,\n python_module: 'nodes',\n description: 'Primitive values like numbers, strings, and booleans.'\n },\n Reroute: {\n name: 'Reroute',\n display_name: 'Reroute',\n category: 'utils',\n input: { required: { '': ['*'] }, optional: {} },\n output: ['*'],\n output_name: [''],\n output_is_list: [false],\n output_node: false,\n python_module: 'nodes',\n description: 'Reroute the connection to another node.'\n },\n Note: {\n name: 'Note',\n display_name: 'Note',\n category: 'utils',\n input: { required: {}, optional: {} },\n output: [],\n output_name: [],\n output_is_list: [],\n output_node: false,\n python_module: 'nodes',\n description: 'Node that add notes to your project'\n }\n}\n\nexport function buildNodeDefTree(nodeDefs: ComfyNodeDefImpl[]): TreeNode {\n return buildTree(nodeDefs, (nodeDef: ComfyNodeDefImpl) =>\n nodeDef.nodePath.split('/')\n )\n}\n\nexport function createDummyFolderNodeDef(folderPath: string): ComfyNodeDefImpl {\n return new ComfyNodeDefImpl({\n name: '',\n display_name: '',\n category: folderPath.endsWith('/') ? folderPath.slice(0, -1) : folderPath,\n python_module: 'nodes',\n description: 'Dummy Folder Node (User should never see this string)',\n input: {},\n output: [],\n output_name: [],\n output_is_list: [],\n output_node: false\n } as ComfyNodeDef)\n}\n\nexport const useNodeDefStore = defineStore('nodeDef', () => {\n const nodeDefsByName = ref>({})\n const nodeDefsByDisplayName = ref>({})\n const widgets = ref>({})\n const showDeprecated = ref(false)\n const showExperimental = ref(false)\n\n const nodeDefs = computed(() => Object.values(nodeDefsByName.value))\n const visibleNodeDefs = computed(() =>\n nodeDefs.value.filter(\n (nodeDef: ComfyNodeDefImpl) =>\n (showDeprecated.value || !nodeDef.deprecated) &&\n (showExperimental.value || !nodeDef.experimental)\n )\n )\n const nodeSearchService = computed(\n () => new NodeSearchService(visibleNodeDefs.value)\n )\n const nodeTree = computed(() => buildNodeDefTree(visibleNodeDefs.value))\n\n function updateNodeDefs(nodeDefs: ComfyNodeDef[]) {\n const newNodeDefsByName: Record = {}\n const newNodeDefsByDisplayName: Record = {}\n for (const nodeDef of nodeDefs) {\n try {\n const nodeDefImpl = new ComfyNodeDefImpl(nodeDef)\n newNodeDefsByName[nodeDef.name] = nodeDefImpl\n newNodeDefsByDisplayName[nodeDef.display_name] = nodeDefImpl\n } catch (e) {\n // Avoid breaking the app for invalid nodeDefs\n // NodeDef validation is now optional for performance reasons\n console.error('Error adding nodeDef:', e)\n }\n }\n nodeDefsByName.value = newNodeDefsByName\n nodeDefsByDisplayName.value = newNodeDefsByDisplayName\n }\n function addNodeDef(nodeDef: ComfyNodeDef) {\n const nodeDefImpl = new ComfyNodeDefImpl(nodeDef)\n nodeDefsByName.value[nodeDef.name] = nodeDefImpl\n nodeDefsByDisplayName.value[nodeDef.display_name] = nodeDefImpl\n }\n function fromLGraphNode(node: LGraphNode): ComfyNodeDefImpl | null {\n // Frontend-only nodes don't have nodeDef\n return nodeDefsByName.value[node.constructor?.nodeData?.name] ?? null\n }\n\n return {\n nodeDefsByName,\n nodeDefsByDisplayName,\n showDeprecated,\n showExperimental,\n\n nodeDefs,\n visibleNodeDefs,\n nodeSearchService,\n nodeTree,\n\n updateNodeDefs,\n addNodeDef,\n fromLGraphNode\n }\n})\n\nexport const useNodeFrequencyStore = defineStore('nodeFrequency', () => {\n const topNodeDefLimit = ref(64)\n const nodeFrequencyLookup = ref>({})\n const nodeNamesByFrequency = computed(() =>\n Object.keys(nodeFrequencyLookup.value)\n )\n const isLoaded = ref(false)\n\n const loadNodeFrequencies = async () => {\n if (!isLoaded.value) {\n try {\n const response = await axios.get('assets/sorted-custom-node-map.json')\n nodeFrequencyLookup.value = response.data\n isLoaded.value = true\n } catch (error) {\n console.error('Error loading node frequencies:', error)\n }\n }\n }\n\n const getNodeFrequency = (nodeDef: ComfyNodeDefImpl) => {\n return getNodeFrequencyByName(nodeDef.name)\n }\n\n const getNodeFrequencyByName = (nodeName: string) => {\n return nodeFrequencyLookup.value[nodeName] ?? 0\n }\n\n const nodeDefStore = useNodeDefStore()\n const topNodeDefs = computed(() => {\n return nodeNamesByFrequency.value\n .map((nodeName: string) => nodeDefStore.nodeDefsByName[nodeName])\n .filter((nodeDef: ComfyNodeDefImpl) => nodeDef !== undefined)\n .slice(0, topNodeDefLimit.value)\n })\n\n return {\n nodeNamesByFrequency,\n topNodeDefs,\n isLoaded,\n loadNodeFrequencies,\n getNodeFrequency,\n getNodeFrequencyByName\n }\n})\n","import { computed, ref } from 'vue'\nimport { defineStore } from 'pinia'\nimport { api } from '@/scripts/api'\n\n/** (Internal helper) finds a value in a metadata object from any of a list of keys. */\nfunction _findInMetadata(metadata: any, ...keys: string[]): string | null {\n for (const key of keys) {\n if (key in metadata) {\n return metadata[key]\n }\n for (const k in metadata) {\n if (k.endsWith(key)) {\n return metadata[k]\n }\n }\n }\n return null\n}\n\n/** Defines and holds metadata for a model */\nexport class ComfyModelDef {\n /** Proper filename of the model */\n readonly file_name: string\n /** Normalized filename of the model, with all backslashes replaced with forward slashes */\n readonly normalized_file_name: string\n /** Directory containing the model, eg 'checkpoints' */\n readonly directory: string\n /** Simplified copy of name, used as a default title. Excludes the directory and the '.safetensors' file extension */\n readonly simplified_file_name: string\n /** Key for the model, used to uniquely identify the model. */\n readonly key: string\n /** Title / display name of the model, sometimes same as the name but not always */\n title: string\n /** Metadata: architecture ID for the model, such as 'stable-diffusion-xl-v1-base' */\n architecture_id: string = ''\n /** Metadata: author of the model */\n author: string = ''\n /** Metadata: resolution of the model, eg '1024x1024' */\n resolution: string = ''\n /** Metadata: description of the model */\n description: string = ''\n /** Metadata: usage hint for the model */\n usage_hint: string = ''\n /** Metadata: trigger phrase for the model */\n trigger_phrase: string = ''\n /** Metadata: tags list for the model */\n tags: string[] = []\n /** Metadata: image for the model */\n image: string = ''\n /** Whether the model metadata has been loaded from the server, used for `load()` */\n has_loaded_metadata: boolean = false\n /** If true, a metadata load request has been triggered, but may or may not yet have finished loading */\n is_load_requested: boolean = false\n /** A string full of auto-computed lowercase-only searchable text for this model */\n searchable: string = ''\n\n constructor(name: string, directory: string) {\n this.file_name = name\n this.normalized_file_name = name.replaceAll('\\\\', '/')\n this.simplified_file_name = this.normalized_file_name.split('/').pop() ?? ''\n if (this.simplified_file_name.endsWith('.safetensors')) {\n this.simplified_file_name = this.simplified_file_name.slice(\n 0,\n -'.safetensors'.length\n )\n }\n this.title = this.simplified_file_name\n this.directory = directory\n this.key = `${directory}/${this.normalized_file_name}`\n this.updateSearchable()\n }\n\n updateSearchable() {\n this.searchable = [\n this.file_name,\n this.title,\n this.author,\n this.description,\n this.trigger_phrase,\n this.tags.join(', ')\n ]\n .join('\\n')\n .toLowerCase()\n }\n\n /** Loads the model metadata from the server, filling in this object if data is available */\n async load(): Promise {\n if (this.has_loaded_metadata || this.is_load_requested) {\n return\n }\n this.is_load_requested = true\n try {\n const metadata = await api.viewMetadata(this.directory, this.file_name)\n if (!metadata) {\n return\n }\n this.title =\n _findInMetadata(\n metadata,\n 'modelspec.title',\n 'title',\n 'display_name',\n 'name'\n ) || this.title\n this.architecture_id =\n _findInMetadata(metadata, 'modelspec.architecture', 'architecture') ||\n ''\n this.author =\n _findInMetadata(metadata, 'modelspec.author', 'author') || ''\n this.description =\n _findInMetadata(metadata, 'modelspec.description', 'description') || ''\n this.resolution =\n _findInMetadata(metadata, 'modelspec.resolution', 'resolution') || ''\n this.usage_hint =\n _findInMetadata(metadata, 'modelspec.usage_hint', 'usage_hint') || ''\n this.trigger_phrase =\n _findInMetadata(\n metadata,\n 'modelspec.trigger_phrase',\n 'trigger_phrase'\n ) || ''\n this.image =\n _findInMetadata(\n metadata,\n 'modelspec.thumbnail',\n 'thumbnail',\n 'image',\n 'icon'\n ) || ''\n const tagsCommaSeparated =\n _findInMetadata(metadata, 'modelspec.tags', 'tags') || ''\n this.tags = tagsCommaSeparated.split(',').map((tag) => tag.trim())\n this.has_loaded_metadata = true\n this.updateSearchable()\n } catch (error) {\n console.error('Error loading model metadata', this.file_name, this, error)\n }\n }\n}\n\nexport enum ResourceState {\n Uninitialized,\n Loading,\n Loaded\n}\n\nexport class ModelFolder {\n /** Models in this folder */\n models: Record = {}\n state: ResourceState = ResourceState.Uninitialized\n\n constructor(public directory: string) {}\n\n get key(): string {\n return this.directory + '/'\n }\n\n /**\n * Loads the models in this folder from the server\n */\n async load() {\n if (this.state !== ResourceState.Uninitialized) {\n return this\n }\n this.state = ResourceState.Loading\n const models = await api.getModels(this.directory)\n for (const model of models) {\n this.models[model] = new ComfyModelDef(model, this.directory)\n }\n this.state = ResourceState.Loaded\n return this\n }\n}\n\n/** Model store handler, wraps individual per-folder model stores */\nexport const useModelStore = defineStore('models', () => {\n const modelFolderNames = ref([])\n const modelFolderByName = ref>({})\n const modelFolders = computed(() =>\n modelFolderNames.value.map(\n (folderName) => modelFolderByName.value[folderName]\n )\n )\n const models = computed(() =>\n modelFolders.value.flatMap((folder) => Object.values(folder.models))\n )\n\n /**\n * Loads the model folders from the server\n */\n async function loadModelFolders() {\n modelFolderNames.value = await api.getModelFolders()\n modelFolderByName.value = {}\n for (const folderName of modelFolderNames.value) {\n modelFolderByName.value[folderName] = new ModelFolder(folderName)\n }\n }\n\n async function getLoadedModelFolder(\n folderName: string\n ): Promise {\n const folder = modelFolderByName.value[folderName]\n return folder ? await folder.load() : null\n }\n\n /**\n * Loads all model folders' contents from the server\n */\n async function loadModels() {\n return Promise.all(modelFolders.value.map((folder) => folder.load()))\n }\n\n return {\n models,\n modelFolders,\n loadModelFolders,\n loadModels,\n getLoadedModelFolder\n }\n})\n","// @ts-strict-ignore\nimport { ComfyDialog } from '../dialog'\nimport { $el } from '../../ui'\n\nexport class ComfyAsyncDialog extends ComfyDialog {\n #resolve: (value: any) => void\n\n constructor(actions?: Array) {\n super(\n 'dialog.comfy-dialog.comfyui-dialog',\n actions?.map((opt) => {\n if (typeof opt === 'string') {\n opt = { text: opt }\n }\n return $el('button.comfyui-button', {\n type: 'button',\n textContent: opt.text,\n onclick: () => this.close(opt.value ?? opt.text)\n })\n })\n )\n }\n\n show(html: string | HTMLElement | HTMLElement[]) {\n this.element.addEventListener('close', () => {\n this.close()\n })\n\n super.show(html)\n\n return new Promise((resolve) => {\n this.#resolve = resolve\n })\n }\n\n showModal(html: string | HTMLElement | HTMLElement[]) {\n this.element.addEventListener('close', () => {\n this.close()\n })\n\n super.show(html)\n this.element.showModal()\n\n return new Promise((resolve) => {\n this.#resolve = resolve\n })\n }\n\n close(result = null) {\n this.#resolve(result)\n this.element.close()\n super.close()\n }\n\n static async prompt({\n title = null,\n message,\n actions\n }: {\n title: string | null\n message: string\n actions: Array\n }) {\n const dialog = new ComfyAsyncDialog(actions)\n const content = [$el('span', message)]\n if (title) {\n content.unshift($el('h3', title))\n }\n const res = await dialog.showModal(content)\n dialog.element.remove()\n return res\n }\n}\n","import { api } from '@/scripts/api'\n\n/**\n * Sync entities from the API to the entityByPath map.\n * @param dir The directory to sync from\n * @param entityByPath The map to sync to\n * @param createEntity A function to create an entity from a file\n * @param updateEntity A function to update an entity from a file\n * @param exclude A function to exclude an entity\n */\nexport async function syncEntities(\n dir: string,\n entityByPath: Record,\n createEntity: (file: any) => T,\n updateEntity: (entity: T, file: any) => void,\n exclude: (file: T) => boolean = () => false\n) {\n const files = (await api.listUserDataFullInfo(dir)).map((file) => ({\n ...file,\n path: dir ? `${dir}/${file.path}` : file.path\n }))\n\n for (const file of files) {\n const existingEntity = entityByPath[file.path]\n\n if (!existingEntity) {\n // New entity, add it to the map\n entityByPath[file.path] = createEntity(file)\n } else if (exclude(existingEntity)) {\n // Entity has been excluded, skip it\n continue\n } else {\n // Entity has been modified, update its properties\n updateEntity(existingEntity, file)\n }\n }\n\n // Remove entities that no longer exist\n for (const [path, entity] of Object.entries(entityByPath)) {\n if (exclude(entity)) continue\n if (!files.some((file) => file.path === path)) {\n delete entityByPath[path]\n }\n }\n}\n","import { defineStore } from 'pinia'\nimport { api } from '@/scripts/api'\nimport { buildTree } from '@/utils/treeUtil'\nimport { computed, ref } from 'vue'\nimport { TreeExplorerNode } from '@/types/treeExplorerTypes'\nimport { UserDataFullInfo } from '@/types/apiTypes'\nimport { syncEntities } from '@/utils/syncUtil'\nimport { getPathDetails } from '@/utils/formatUtil'\n\n/**\n * Represents a file in the user's data directory.\n */\nexport class UserFile {\n /**\n * Various path components.\n * Example:\n * - path: 'dir/file.txt'\n * - directory: 'dir'\n * - fullFilename: 'file.txt'\n * - filename: 'file'\n * - suffix: 'txt'\n */\n directory: string\n fullFilename: string\n filename: string\n suffix: string | null\n\n isLoading: boolean = false\n content: string | null = null\n originalContent: string | null = null\n\n constructor(\n /**\n * Path relative to ComfyUI/user/ directory.\n */\n public path: string,\n /**\n * Last modified timestamp.\n */\n public lastModified: number,\n /**\n * File size in bytes. -1 for temporary files.\n */\n public size: number\n ) {\n const details = getPathDetails(path)\n this.path = path\n this.directory = details.directory\n this.fullFilename = details.fullFilename\n this.filename = details.filename\n this.suffix = details.suffix\n }\n\n updatePath(newPath: string) {\n const details = getPathDetails(newPath)\n this.path = newPath\n this.directory = details.directory\n this.fullFilename = details.fullFilename\n this.filename = details.filename\n this.suffix = details.suffix\n }\n\n static createTemporary(path: string): UserFile {\n return new UserFile(path, Date.now(), -1)\n }\n\n get isTemporary() {\n return this.size === -1\n }\n\n get isPersisted() {\n return !this.isTemporary\n }\n\n get key(): string {\n return this.path\n }\n\n get isLoaded() {\n return this.content !== null\n }\n\n get isModified() {\n return this.content !== this.originalContent\n }\n\n /**\n * Loads the file content from the remote storage.\n */\n async load({\n force = false\n }: { force?: boolean } = {}): Promise {\n if (this.isTemporary || (!force && this.isLoaded))\n return this as LoadedUserFile\n\n this.isLoading = true\n const resp = await api.getUserData(this.path)\n if (resp.status !== 200) {\n throw new Error(\n `Failed to load file '${this.path}': ${resp.status} ${resp.statusText}`\n )\n }\n this.content = await resp.text()\n this.originalContent = this.content\n this.isLoading = false\n return this as LoadedUserFile\n }\n\n /**\n * Unloads the file content from memory\n */\n unload(): void {\n this.content = null\n this.originalContent = null\n this.isLoading = false\n }\n\n async saveAs(newPath: string): Promise {\n const tempFile = this.isTemporary ? this : UserFile.createTemporary(newPath)\n tempFile.content = this.content\n await tempFile.save()\n return tempFile\n }\n\n /**\n * Saves the file to the remote storage.\n * @param force Whether to force the save even if the file is not modified.\n */\n async save({ force = false }: { force?: boolean } = {}): Promise {\n if (this.isPersisted && !this.isModified && !force) return this\n\n const resp = await api.storeUserData(this.path, this.content, {\n overwrite: this.isPersisted,\n throwOnError: true,\n full_info: true\n })\n\n // Note: Backend supports full_info=true feature after\n // https://github.com/comfyanonymous/ComfyUI/pull/5446\n const updatedFile = (await resp.json()) as string | UserDataFullInfo\n if (typeof updatedFile === 'object') {\n this.lastModified = updatedFile.modified\n this.size = updatedFile.size\n }\n this.originalContent = this.content\n return this\n }\n\n async delete(): Promise {\n if (this.isTemporary) return\n\n const resp = await api.deleteUserData(this.path)\n if (resp.status !== 204) {\n throw new Error(\n `Failed to delete file '${this.path}': ${resp.status} ${resp.statusText}`\n )\n }\n }\n\n async rename(newPath: string): Promise {\n if (this.isTemporary) {\n this.updatePath(newPath)\n return this\n }\n\n const resp = await api.moveUserData(this.path, newPath)\n if (resp.status !== 200) {\n throw new Error(\n `Failed to rename file '${this.path}': ${resp.status} ${resp.statusText}`\n )\n }\n this.updatePath(newPath)\n // Note: Backend supports full_info=true feature after\n // https://github.com/comfyanonymous/ComfyUI/pull/5446\n const updatedFile = (await resp.json()) as string | UserDataFullInfo\n if (typeof updatedFile === 'object') {\n this.lastModified = updatedFile.modified\n this.size = updatedFile.size\n }\n return this\n }\n}\n\nexport interface LoadedUserFile extends UserFile {\n isLoaded: true\n originalContent: string\n content: string\n}\n\nexport const useUserFileStore = defineStore('userFile', () => {\n const userFilesByPath = ref>({})\n\n const userFiles = computed(() => Object.values(userFilesByPath.value))\n const modifiedFiles = computed(() =>\n userFiles.value.filter((file: UserFile) => file.isModified)\n )\n const loadedFiles = computed(() =>\n userFiles.value.filter((file: UserFile) => file.isLoaded)\n )\n\n const fileTree = computed>(\n () =>\n buildTree(userFiles.value, (userFile: UserFile) =>\n userFile.path.split('/')\n ) as TreeExplorerNode\n )\n\n /**\n * Syncs the files in the given directory with the API.\n * @param dir The directory to sync.\n */\n const syncFiles = async (dir: string = '') => {\n await syncEntities(\n dir,\n userFilesByPath.value,\n (file) => new UserFile(file.path, file.modified, file.size),\n (existingFile, file) => {\n existingFile.lastModified = file.modified\n existingFile.size = file.size\n existingFile.unload()\n }\n )\n }\n\n return {\n userFiles,\n modifiedFiles,\n loadedFiles,\n fileTree,\n syncFiles\n }\n})\n","class Processor {\n constructor(options) {\n this.selfOptions = options || {};\n this.pipes = {};\n }\n options(options) {\n if (options) {\n this.selfOptions = options;\n }\n return this.selfOptions;\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n pipe(name, pipeArg) {\n let pipe = pipeArg;\n if (typeof name === 'string') {\n if (typeof pipe === 'undefined') {\n return this.pipes[name];\n }\n else {\n this.pipes[name] = pipe;\n }\n }\n if (name && name.name) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n pipe = name;\n if (pipe.processor === this) {\n return pipe;\n }\n this.pipes[pipe.name] = pipe;\n }\n pipe.processor = this;\n return pipe;\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n process(input, pipe) {\n let context = input;\n context.options = this.options();\n let nextPipe = pipe || input.pipe || 'default';\n let lastPipe;\n while (nextPipe) {\n if (typeof context.nextAfterChildren !== 'undefined') {\n // children processed and coming back to parent\n context.next = context.nextAfterChildren;\n context.nextAfterChildren = null;\n }\n if (typeof nextPipe === 'string') {\n nextPipe = this.pipe(nextPipe);\n }\n nextPipe.process(context);\n lastPipe = nextPipe;\n nextPipe = null;\n if (context) {\n if (context.next) {\n context = context.next;\n nextPipe = context.pipe || lastPipe;\n }\n }\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return context.hasResult ? context.result : undefined;\n }\n}\nexport default Processor;\n","// eslint-disable-next-line @typescript-eslint/no-explicit-any\nclass Pipe {\n constructor(name) {\n this.name = name;\n this.filters = [];\n }\n process(input) {\n if (!this.processor) {\n throw new Error('add this pipe to a processor before using it');\n }\n const debug = this.debug;\n const length = this.filters.length;\n const context = input;\n for (let index = 0; index < length; index++) {\n const filter = this.filters[index];\n if (debug) {\n this.log(`filter: ${filter.filterName}`);\n }\n filter(context);\n if (typeof context === 'object' && context.exiting) {\n context.exiting = false;\n break;\n }\n }\n if (!context.next && this.resultCheck) {\n this.resultCheck(context);\n }\n }\n log(msg) {\n console.log(`[jsondiffpatch] ${this.name} pipe, ${msg}`);\n }\n append(...args) {\n this.filters.push(...args);\n return this;\n }\n prepend(...args) {\n this.filters.unshift(...args);\n return this;\n }\n indexOf(filterName) {\n if (!filterName) {\n throw new Error('a filter name is required');\n }\n for (let index = 0; index < this.filters.length; index++) {\n const filter = this.filters[index];\n if (filter.filterName === filterName) {\n return index;\n }\n }\n throw new Error(`filter not found: ${filterName}`);\n }\n list() {\n return this.filters.map((f) => f.filterName);\n }\n after(filterName, ...params) {\n const index = this.indexOf(filterName);\n this.filters.splice(index + 1, 0, ...params);\n return this;\n }\n before(filterName, ...params) {\n const index = this.indexOf(filterName);\n this.filters.splice(index, 0, ...params);\n return this;\n }\n replace(filterName, ...params) {\n const index = this.indexOf(filterName);\n this.filters.splice(index, 1, ...params);\n return this;\n }\n remove(filterName) {\n const index = this.indexOf(filterName);\n this.filters.splice(index, 1);\n return this;\n }\n clear() {\n this.filters.length = 0;\n return this;\n }\n shouldHaveResult(should) {\n if (should === false) {\n this.resultCheck = null;\n return;\n }\n if (this.resultCheck) {\n return;\n }\n this.resultCheck = (context) => {\n if (!context.hasResult) {\n console.log(context);\n const error = new Error(`${this.name} failed`);\n error.noResult = true;\n throw error;\n }\n };\n return this;\n }\n}\nexport default Pipe;\n","export default class Context {\n setResult(result) {\n this.result = result;\n this.hasResult = true;\n return this;\n }\n exit() {\n this.exiting = true;\n return this;\n }\n push(child, name) {\n child.parent = this;\n if (typeof name !== 'undefined') {\n child.childName = name;\n }\n child.root = this.root || this;\n child.options = child.options || this.options;\n if (!this.children) {\n this.children = [child];\n this.nextAfterChildren = this.next || null;\n this.next = child;\n }\n else {\n this.children[this.children.length - 1].next = child;\n this.children.push(child);\n }\n child.next = this;\n return this;\n }\n}\n","function cloneRegExp(re) {\n const regexMatch = /^\\/(.*)\\/([gimyu]*)$/.exec(re.toString());\n return new RegExp(regexMatch[1], regexMatch[2]);\n}\nexport default function clone(arg) {\n if (typeof arg !== 'object') {\n return arg;\n }\n if (arg === null) {\n return null;\n }\n if (Array.isArray(arg)) {\n return arg.map(clone);\n }\n if (arg instanceof Date) {\n return new Date(arg.getTime());\n }\n if (arg instanceof RegExp) {\n return cloneRegExp(arg);\n }\n const cloned = {};\n for (const name in arg) {\n if (Object.prototype.hasOwnProperty.call(arg, name)) {\n cloned[name] = clone(arg[name]);\n }\n }\n return cloned;\n}\n","import Context from './context.js';\nimport defaultClone from '../clone.js';\nclass DiffContext extends Context {\n constructor(left, right) {\n super();\n this.left = left;\n this.right = right;\n this.pipe = 'diff';\n }\n setResult(result) {\n if (this.options.cloneDiffValues && typeof result === 'object') {\n const clone = typeof this.options.cloneDiffValues === 'function'\n ? this.options.cloneDiffValues\n : defaultClone;\n if (typeof result[0] === 'object') {\n result[0] = clone(result[0]);\n }\n if (typeof result[1] === 'object') {\n result[1] = clone(result[1]);\n }\n }\n return super.setResult(result);\n }\n}\nexport default DiffContext;\n","import Context from './context.js';\nclass PatchContext extends Context {\n constructor(left, delta) {\n super();\n this.left = left;\n this.delta = delta;\n this.pipe = 'patch';\n }\n}\nexport default PatchContext;\n","import Context from './context.js';\nclass ReverseContext extends Context {\n constructor(delta) {\n super();\n this.delta = delta;\n this.pipe = 'reverse';\n }\n}\nexport default ReverseContext;\n","export const diffFilter = function trivialMatchesDiffFilter(context) {\n if (context.left === context.right) {\n context.setResult(undefined).exit();\n return;\n }\n if (typeof context.left === 'undefined') {\n if (typeof context.right === 'function') {\n throw new Error('functions are not supported');\n }\n context.setResult([context.right]).exit();\n return;\n }\n if (typeof context.right === 'undefined') {\n context.setResult([context.left, 0, 0]).exit();\n return;\n }\n if (typeof context.left === 'function' ||\n typeof context.right === 'function') {\n throw new Error('functions are not supported');\n }\n context.leftType = context.left === null ? 'null' : typeof context.left;\n context.rightType = context.right === null ? 'null' : typeof context.right;\n if (context.leftType !== context.rightType) {\n context.setResult([context.left, context.right]).exit();\n return;\n }\n if (context.leftType === 'boolean' || context.leftType === 'number') {\n context.setResult([context.left, context.right]).exit();\n return;\n }\n if (context.leftType === 'object') {\n context.leftIsArray = Array.isArray(context.left);\n }\n if (context.rightType === 'object') {\n context.rightIsArray = Array.isArray(context.right);\n }\n if (context.leftIsArray !== context.rightIsArray) {\n context.setResult([context.left, context.right]).exit();\n return;\n }\n if (context.left instanceof RegExp) {\n if (context.right instanceof RegExp) {\n context\n .setResult([context.left.toString(), context.right.toString()])\n .exit();\n }\n else {\n context.setResult([context.left, context.right]).exit();\n }\n }\n};\ndiffFilter.filterName = 'trivial';\nexport const patchFilter = function trivialMatchesPatchFilter(context) {\n if (typeof context.delta === 'undefined') {\n context.setResult(context.left).exit();\n return;\n }\n context.nested = !Array.isArray(context.delta);\n if (context.nested) {\n return;\n }\n const nonNestedDelta = context.delta;\n if (nonNestedDelta.length === 1) {\n context.setResult(nonNestedDelta[0]).exit();\n return;\n }\n if (nonNestedDelta.length === 2) {\n if (context.left instanceof RegExp) {\n const regexArgs = /^\\/(.*)\\/([gimyu]+)$/.exec(nonNestedDelta[1]);\n if (regexArgs) {\n context.setResult(new RegExp(regexArgs[1], regexArgs[2])).exit();\n return;\n }\n }\n context.setResult(nonNestedDelta[1]).exit();\n return;\n }\n if (nonNestedDelta.length === 3 && nonNestedDelta[2] === 0) {\n context.setResult(undefined).exit();\n }\n};\npatchFilter.filterName = 'trivial';\nexport const reverseFilter = function trivialReferseFilter(context) {\n if (typeof context.delta === 'undefined') {\n context.setResult(context.delta).exit();\n return;\n }\n context.nested = !Array.isArray(context.delta);\n if (context.nested) {\n return;\n }\n const nonNestedDelta = context.delta;\n if (nonNestedDelta.length === 1) {\n context.setResult([nonNestedDelta[0], 0, 0]).exit();\n return;\n }\n if (nonNestedDelta.length === 2) {\n context.setResult([nonNestedDelta[1], nonNestedDelta[0]]).exit();\n return;\n }\n if (nonNestedDelta.length === 3 && nonNestedDelta[2] === 0) {\n context.setResult([nonNestedDelta[0]]).exit();\n }\n};\nreverseFilter.filterName = 'trivial';\n","import DiffContext from '../contexts/diff.js';\nimport PatchContext from '../contexts/patch.js';\nimport ReverseContext from '../contexts/reverse.js';\nexport const collectChildrenDiffFilter = (context) => {\n if (!context || !context.children) {\n return;\n }\n const length = context.children.length;\n let child;\n let result = context.result;\n for (let index = 0; index < length; index++) {\n child = context.children[index];\n if (typeof child.result === 'undefined') {\n continue;\n }\n result = result || {};\n result[child.childName] = child.result;\n }\n if (result && context.leftIsArray) {\n result._t = 'a';\n }\n context.setResult(result).exit();\n};\ncollectChildrenDiffFilter.filterName = 'collectChildren';\nexport const objectsDiffFilter = (context) => {\n if (context.leftIsArray || context.leftType !== 'object') {\n return;\n }\n const left = context.left;\n const right = context.right;\n let name;\n let child;\n const propertyFilter = context.options.propertyFilter;\n for (name in left) {\n if (!Object.prototype.hasOwnProperty.call(left, name)) {\n continue;\n }\n if (propertyFilter && !propertyFilter(name, context)) {\n continue;\n }\n child = new DiffContext(left[name], right[name]);\n context.push(child, name);\n }\n for (name in right) {\n if (!Object.prototype.hasOwnProperty.call(right, name)) {\n continue;\n }\n if (propertyFilter && !propertyFilter(name, context)) {\n continue;\n }\n if (typeof left[name] === 'undefined') {\n child = new DiffContext(undefined, right[name]);\n context.push(child, name);\n }\n }\n if (!context.children || context.children.length === 0) {\n context.setResult(undefined).exit();\n return;\n }\n context.exit();\n};\nobjectsDiffFilter.filterName = 'objects';\nexport const patchFilter = function nestedPatchFilter(context) {\n if (!context.nested) {\n return;\n }\n const nestedDelta = context.delta;\n if (nestedDelta._t) {\n return;\n }\n const objectDelta = nestedDelta;\n let name;\n let child;\n for (name in objectDelta) {\n child = new PatchContext(context.left[name], objectDelta[name]);\n context.push(child, name);\n }\n context.exit();\n};\npatchFilter.filterName = 'objects';\nexport const collectChildrenPatchFilter = function collectChildrenPatchFilter(context) {\n if (!context || !context.children) {\n return;\n }\n const deltaWithChildren = context.delta;\n if (deltaWithChildren._t) {\n return;\n }\n const object = context.left;\n const length = context.children.length;\n let child;\n for (let index = 0; index < length; index++) {\n child = context.children[index];\n const property = child.childName;\n if (Object.prototype.hasOwnProperty.call(context.left, property) &&\n child.result === undefined) {\n delete object[property];\n }\n else if (object[property] !== child.result) {\n object[property] = child.result;\n }\n }\n context.setResult(object).exit();\n};\ncollectChildrenPatchFilter.filterName = 'collectChildren';\nexport const reverseFilter = function nestedReverseFilter(context) {\n if (!context.nested) {\n return;\n }\n const nestedDelta = context.delta;\n if (nestedDelta._t) {\n return;\n }\n const objectDelta = context.delta;\n let name;\n let child;\n for (name in objectDelta) {\n child = new ReverseContext(objectDelta[name]);\n context.push(child, name);\n }\n context.exit();\n};\nreverseFilter.filterName = 'objects';\nexport const collectChildrenReverseFilter = (context) => {\n if (!context || !context.children) {\n return;\n }\n const deltaWithChildren = context.delta;\n if (deltaWithChildren._t) {\n return;\n }\n const length = context.children.length;\n let child;\n const delta = {};\n for (let index = 0; index < length; index++) {\n child = context.children[index];\n const property = child.childName;\n if (delta[property] !== child.result) {\n delta[property] = child.result;\n }\n }\n context.setResult(delta).exit();\n};\ncollectChildrenReverseFilter.filterName = 'collectChildren';\n","/*\n\nLCS implementation that supports arrays or strings\n\nreference: http://en.wikipedia.org/wiki/Longest_common_subsequence_problem\n\n*/\nconst defaultMatch = function (array1, array2, index1, index2) {\n return array1[index1] === array2[index2];\n};\nconst lengthMatrix = function (array1, array2, match, context) {\n const len1 = array1.length;\n const len2 = array2.length;\n let x, y;\n // initialize empty matrix of len1+1 x len2+1\n const matrix = new Array(len1 + 1);\n for (x = 0; x < len1 + 1; x++) {\n matrix[x] = new Array(len2 + 1);\n for (y = 0; y < len2 + 1; y++) {\n matrix[x][y] = 0;\n }\n }\n matrix.match = match;\n // save sequence lengths for each coordinate\n for (x = 1; x < len1 + 1; x++) {\n for (y = 1; y < len2 + 1; y++) {\n if (match(array1, array2, x - 1, y - 1, context)) {\n matrix[x][y] = matrix[x - 1][y - 1] + 1;\n }\n else {\n matrix[x][y] = Math.max(matrix[x - 1][y], matrix[x][y - 1]);\n }\n }\n }\n return matrix;\n};\nconst backtrack = function (matrix, array1, array2, context) {\n let index1 = array1.length;\n let index2 = array2.length;\n const subsequence = {\n sequence: [],\n indices1: [],\n indices2: [],\n };\n while (index1 !== 0 && index2 !== 0) {\n const sameLetter = matrix.match(array1, array2, index1 - 1, index2 - 1, context);\n if (sameLetter) {\n subsequence.sequence.unshift(array1[index1 - 1]);\n subsequence.indices1.unshift(index1 - 1);\n subsequence.indices2.unshift(index2 - 1);\n --index1;\n --index2;\n }\n else {\n const valueAtMatrixAbove = matrix[index1][index2 - 1];\n const valueAtMatrixLeft = matrix[index1 - 1][index2];\n if (valueAtMatrixAbove > valueAtMatrixLeft) {\n --index2;\n }\n else {\n --index1;\n }\n }\n }\n return subsequence;\n};\nconst get = function (array1, array2, match, context) {\n const innerContext = context || {};\n const matrix = lengthMatrix(array1, array2, match || defaultMatch, innerContext);\n return backtrack(matrix, array1, array2, innerContext);\n};\nexport default {\n get,\n};\n","import DiffContext from '../contexts/diff.js';\nimport PatchContext from '../contexts/patch.js';\nimport ReverseContext from '../contexts/reverse.js';\nimport lcs from './lcs.js';\nconst ARRAY_MOVE = 3;\nfunction arraysHaveMatchByRef(array1, array2, len1, len2) {\n for (let index1 = 0; index1 < len1; index1++) {\n const val1 = array1[index1];\n for (let index2 = 0; index2 < len2; index2++) {\n const val2 = array2[index2];\n if (index1 !== index2 && val1 === val2) {\n return true;\n }\n }\n }\n}\nfunction matchItems(array1, array2, index1, index2, context) {\n const value1 = array1[index1];\n const value2 = array2[index2];\n if (value1 === value2) {\n return true;\n }\n if (typeof value1 !== 'object' || typeof value2 !== 'object') {\n return false;\n }\n const objectHash = context.objectHash;\n if (!objectHash) {\n // no way to match objects was provided, try match by position\n return context.matchByPosition && index1 === index2;\n }\n context.hashCache1 = context.hashCache1 || [];\n let hash1 = context.hashCache1[index1];\n if (typeof hash1 === 'undefined') {\n context.hashCache1[index1] = hash1 = objectHash(value1, index1);\n }\n if (typeof hash1 === 'undefined') {\n return false;\n }\n context.hashCache2 = context.hashCache2 || [];\n let hash2 = context.hashCache2[index2];\n if (typeof hash2 === 'undefined') {\n context.hashCache2[index2] = hash2 = objectHash(value2, index2);\n }\n if (typeof hash2 === 'undefined') {\n return false;\n }\n return hash1 === hash2;\n}\nexport const diffFilter = function arraysDiffFilter(context) {\n if (!context.leftIsArray) {\n return;\n }\n const matchContext = {\n objectHash: context.options && context.options.objectHash,\n matchByPosition: context.options && context.options.matchByPosition,\n };\n let commonHead = 0;\n let commonTail = 0;\n let index;\n let index1;\n let index2;\n const array1 = context.left;\n const array2 = context.right;\n const len1 = array1.length;\n const len2 = array2.length;\n let child;\n if (len1 > 0 &&\n len2 > 0 &&\n !matchContext.objectHash &&\n typeof matchContext.matchByPosition !== 'boolean') {\n matchContext.matchByPosition = !arraysHaveMatchByRef(array1, array2, len1, len2);\n }\n // separate common head\n while (commonHead < len1 &&\n commonHead < len2 &&\n matchItems(array1, array2, commonHead, commonHead, matchContext)) {\n index = commonHead;\n child = new DiffContext(array1[index], array2[index]);\n context.push(child, index);\n commonHead++;\n }\n // separate common tail\n while (commonTail + commonHead < len1 &&\n commonTail + commonHead < len2 &&\n matchItems(array1, array2, len1 - 1 - commonTail, len2 - 1 - commonTail, matchContext)) {\n index1 = len1 - 1 - commonTail;\n index2 = len2 - 1 - commonTail;\n child = new DiffContext(array1[index1], array2[index2]);\n context.push(child, index2);\n commonTail++;\n }\n let result;\n if (commonHead + commonTail === len1) {\n if (len1 === len2) {\n // arrays are identical\n context.setResult(undefined).exit();\n return;\n }\n // trivial case, a block (1 or more consecutive items) was added\n result = result || {\n _t: 'a',\n };\n for (index = commonHead; index < len2 - commonTail; index++) {\n result[index] = [array2[index]];\n }\n context.setResult(result).exit();\n return;\n }\n if (commonHead + commonTail === len2) {\n // trivial case, a block (1 or more consecutive items) was removed\n result = result || {\n _t: 'a',\n };\n for (index = commonHead; index < len1 - commonTail; index++) {\n result[`_${index}`] = [array1[index], 0, 0];\n }\n context.setResult(result).exit();\n return;\n }\n // reset hash cache\n delete matchContext.hashCache1;\n delete matchContext.hashCache2;\n // diff is not trivial, find the LCS (Longest Common Subsequence)\n const trimmed1 = array1.slice(commonHead, len1 - commonTail);\n const trimmed2 = array2.slice(commonHead, len2 - commonTail);\n const seq = lcs.get(trimmed1, trimmed2, matchItems, matchContext);\n const removedItems = [];\n result = result || {\n _t: 'a',\n };\n for (index = commonHead; index < len1 - commonTail; index++) {\n if (seq.indices1.indexOf(index - commonHead) < 0) {\n // removed\n result[`_${index}`] = [array1[index], 0, 0];\n removedItems.push(index);\n }\n }\n let detectMove = true;\n if (context.options &&\n context.options.arrays &&\n context.options.arrays.detectMove === false) {\n detectMove = false;\n }\n let includeValueOnMove = false;\n if (context.options &&\n context.options.arrays &&\n context.options.arrays.includeValueOnMove) {\n includeValueOnMove = true;\n }\n const removedItemsLength = removedItems.length;\n for (index = commonHead; index < len2 - commonTail; index++) {\n const indexOnArray2 = seq.indices2.indexOf(index - commonHead);\n if (indexOnArray2 < 0) {\n // added, try to match with a removed item and register as position move\n let isMove = false;\n if (detectMove && removedItemsLength > 0) {\n for (let removeItemIndex1 = 0; removeItemIndex1 < removedItemsLength; removeItemIndex1++) {\n index1 = removedItems[removeItemIndex1];\n if (matchItems(trimmed1, trimmed2, index1 - commonHead, index - commonHead, matchContext)) {\n // store position move as: [originalValue, newPosition, ARRAY_MOVE]\n result[`_${index1}`].splice(1, 2, index, ARRAY_MOVE);\n if (!includeValueOnMove) {\n // don't include moved value on diff, to save bytes\n result[`_${index1}`][0] = '';\n }\n index2 = index;\n child = new DiffContext(array1[index1], array2[index2]);\n context.push(child, index2);\n removedItems.splice(removeItemIndex1, 1);\n isMove = true;\n break;\n }\n }\n }\n if (!isMove) {\n // added\n result[index] = [array2[index]];\n }\n }\n else {\n // match, do inner diff\n index1 = seq.indices1[indexOnArray2] + commonHead;\n index2 = seq.indices2[indexOnArray2] + commonHead;\n child = new DiffContext(array1[index1], array2[index2]);\n context.push(child, index2);\n }\n }\n context.setResult(result).exit();\n};\ndiffFilter.filterName = 'arrays';\nconst compare = {\n numerically(a, b) {\n return a - b;\n },\n numericallyBy(name) {\n return (a, b) => a[name] - b[name];\n },\n};\nexport const patchFilter = function nestedPatchFilter(context) {\n if (!context.nested) {\n return;\n }\n const nestedDelta = context.delta;\n if (nestedDelta._t !== 'a') {\n return;\n }\n let index;\n let index1;\n const delta = nestedDelta;\n const array = context.left;\n // first, separate removals, insertions and modifications\n let toRemove = [];\n let toInsert = [];\n const toModify = [];\n for (index in delta) {\n if (index !== '_t') {\n if (index[0] === '_') {\n const removedOrMovedIndex = index;\n // removed item from original array\n if (delta[removedOrMovedIndex][2] === 0 ||\n delta[removedOrMovedIndex][2] === ARRAY_MOVE) {\n toRemove.push(parseInt(index.slice(1), 10));\n }\n else {\n throw new Error('only removal or move can be applied at original array indices,' +\n ` invalid diff type: ${delta[removedOrMovedIndex][2]}`);\n }\n }\n else {\n const numberIndex = index;\n if (delta[numberIndex].length === 1) {\n // added item at new array\n toInsert.push({\n index: parseInt(numberIndex, 10),\n value: delta[numberIndex][0],\n });\n }\n else {\n // modified item at new array\n toModify.push({\n index: parseInt(numberIndex, 10),\n delta: delta[numberIndex],\n });\n }\n }\n }\n }\n // remove items, in reverse order to avoid sawing our own floor\n toRemove = toRemove.sort(compare.numerically);\n for (index = toRemove.length - 1; index >= 0; index--) {\n index1 = toRemove[index];\n const indexDiff = delta[`_${index1}`];\n const removedValue = array.splice(index1, 1)[0];\n if (indexDiff[2] === ARRAY_MOVE) {\n // reinsert later\n toInsert.push({\n index: indexDiff[1],\n value: removedValue,\n });\n }\n }\n // insert items, in reverse order to avoid moving our own floor\n toInsert = toInsert.sort(compare.numericallyBy('index'));\n const toInsertLength = toInsert.length;\n for (index = 0; index < toInsertLength; index++) {\n const insertion = toInsert[index];\n array.splice(insertion.index, 0, insertion.value);\n }\n // apply modifications\n const toModifyLength = toModify.length;\n let child;\n if (toModifyLength > 0) {\n for (index = 0; index < toModifyLength; index++) {\n const modification = toModify[index];\n child = new PatchContext(array[modification.index], modification.delta);\n context.push(child, modification.index);\n }\n }\n if (!context.children) {\n context.setResult(array).exit();\n return;\n }\n context.exit();\n};\npatchFilter.filterName = 'arrays';\nexport const collectChildrenPatchFilter = function collectChildrenPatchFilter(context) {\n if (!context || !context.children) {\n return;\n }\n const deltaWithChildren = context.delta;\n if (deltaWithChildren._t !== 'a') {\n return;\n }\n const array = context.left;\n const length = context.children.length;\n let child;\n for (let index = 0; index < length; index++) {\n child = context.children[index];\n const arrayIndex = child.childName;\n array[arrayIndex] = child.result;\n }\n context.setResult(array).exit();\n};\ncollectChildrenPatchFilter.filterName = 'arraysCollectChildren';\nexport const reverseFilter = function arraysReverseFilter(context) {\n if (!context.nested) {\n const nonNestedDelta = context.delta;\n if (nonNestedDelta[2] === ARRAY_MOVE) {\n const arrayMoveDelta = nonNestedDelta;\n context.newName = `_${arrayMoveDelta[1]}`;\n context\n .setResult([\n arrayMoveDelta[0],\n parseInt(context.childName.substring(1), 10),\n ARRAY_MOVE,\n ])\n .exit();\n }\n return;\n }\n const nestedDelta = context.delta;\n if (nestedDelta._t !== 'a') {\n return;\n }\n const arrayDelta = nestedDelta;\n let name;\n let child;\n for (name in arrayDelta) {\n if (name === '_t') {\n continue;\n }\n child = new ReverseContext(arrayDelta[name]);\n context.push(child, name);\n }\n context.exit();\n};\nreverseFilter.filterName = 'arrays';\nconst reverseArrayDeltaIndex = (delta, index, itemDelta) => {\n if (typeof index === 'string' && index[0] === '_') {\n return parseInt(index.substring(1), 10);\n }\n else if (Array.isArray(itemDelta) && itemDelta[2] === 0) {\n return `_${index}`;\n }\n let reverseIndex = +index;\n for (const deltaIndex in delta) {\n const deltaItem = delta[deltaIndex];\n if (Array.isArray(deltaItem)) {\n if (deltaItem[2] === ARRAY_MOVE) {\n const moveFromIndex = parseInt(deltaIndex.substring(1), 10);\n const moveToIndex = deltaItem[1];\n if (moveToIndex === +index) {\n return moveFromIndex;\n }\n if (moveFromIndex <= reverseIndex && moveToIndex > reverseIndex) {\n reverseIndex++;\n }\n else if (moveFromIndex >= reverseIndex &&\n moveToIndex < reverseIndex) {\n reverseIndex--;\n }\n }\n else if (deltaItem[2] === 0) {\n const deleteIndex = parseInt(deltaIndex.substring(1), 10);\n if (deleteIndex <= reverseIndex) {\n reverseIndex++;\n }\n }\n else if (deltaItem.length === 1 &&\n parseInt(deltaIndex, 10) <= reverseIndex) {\n reverseIndex--;\n }\n }\n }\n return reverseIndex;\n};\nexport const collectChildrenReverseFilter = (context) => {\n if (!context || !context.children) {\n return;\n }\n const deltaWithChildren = context.delta;\n if (deltaWithChildren._t !== 'a') {\n return;\n }\n const arrayDelta = deltaWithChildren;\n const length = context.children.length;\n let child;\n const delta = {\n _t: 'a',\n };\n for (let index = 0; index < length; index++) {\n child = context.children[index];\n let name = child.newName;\n if (typeof name === 'undefined') {\n name = reverseArrayDeltaIndex(arrayDelta, child.childName, child.result);\n }\n if (delta[name] !== child.result) {\n // There's no way to type this well.\n delta[name] = child.result;\n }\n }\n context.setResult(delta).exit();\n};\ncollectChildrenReverseFilter.filterName = 'arraysCollectChildren';\n","export const diffFilter = function datesDiffFilter(context) {\n if (context.left instanceof Date) {\n if (context.right instanceof Date) {\n if (context.left.getTime() !== context.right.getTime()) {\n context.setResult([context.left, context.right]);\n }\n else {\n context.setResult(undefined);\n }\n }\n else {\n context.setResult([context.left, context.right]);\n }\n context.exit();\n }\n else if (context.right instanceof Date) {\n context.setResult([context.left, context.right]).exit();\n }\n};\ndiffFilter.filterName = 'dates';\n","const TEXT_DIFF = 2;\nconst DEFAULT_MIN_LENGTH = 60;\nlet cachedDiffPatch = null;\nfunction getDiffMatchPatch(options, required) {\n var _a;\n if (!cachedDiffPatch) {\n let instance;\n if ((_a = options === null || options === void 0 ? void 0 : options.textDiff) === null || _a === void 0 ? void 0 : _a.diffMatchPatch) {\n instance = new options.textDiff.diffMatchPatch();\n }\n else {\n if (!required) {\n return null;\n }\n const error = new Error('The diff-match-patch library was not provided. Pass the library in through the options or use the `jsondiffpatch/with-text-diffs` entry-point.');\n // eslint-disable-next-line camelcase\n error.diff_match_patch_not_found = true;\n throw error;\n }\n cachedDiffPatch = {\n diff: function (txt1, txt2) {\n return instance.patch_toText(instance.patch_make(txt1, txt2));\n },\n patch: function (txt1, patch) {\n const results = instance.patch_apply(instance.patch_fromText(patch), txt1);\n for (let i = 0; i < results[1].length; i++) {\n if (!results[1][i]) {\n const error = new Error('text patch failed');\n error.textPatchFailed = true;\n }\n }\n return results[0];\n },\n };\n }\n return cachedDiffPatch;\n}\nexport const diffFilter = function textsDiffFilter(context) {\n if (context.leftType !== 'string') {\n return;\n }\n const left = context.left;\n const right = context.right;\n const minLength = (context.options &&\n context.options.textDiff &&\n context.options.textDiff.minLength) ||\n DEFAULT_MIN_LENGTH;\n if (left.length < minLength || right.length < minLength) {\n context.setResult([left, right]).exit();\n return;\n }\n // large text, try to use a text-diff algorithm\n const diffMatchPatch = getDiffMatchPatch(context.options);\n if (!diffMatchPatch) {\n // diff-match-patch library not available,\n // fallback to regular string replace\n context.setResult([left, right]).exit();\n return;\n }\n const diff = diffMatchPatch.diff;\n context.setResult([diff(left, right), 0, TEXT_DIFF]).exit();\n};\ndiffFilter.filterName = 'texts';\nexport const patchFilter = function textsPatchFilter(context) {\n if (context.nested) {\n return;\n }\n const nonNestedDelta = context.delta;\n if (nonNestedDelta[2] !== TEXT_DIFF) {\n return;\n }\n const textDiffDelta = nonNestedDelta;\n // text-diff, use a text-patch algorithm\n const patch = getDiffMatchPatch(context.options, true).patch;\n context.setResult(patch(context.left, textDiffDelta[0])).exit();\n};\npatchFilter.filterName = 'texts';\nconst textDeltaReverse = function (delta) {\n let i;\n let l;\n let line;\n let lineTmp;\n let header = null;\n const headerRegex = /^@@ +-(\\d+),(\\d+) +\\+(\\d+),(\\d+) +@@$/;\n let lineHeader;\n const lines = delta.split('\\n');\n for (i = 0, l = lines.length; i < l; i++) {\n line = lines[i];\n const lineStart = line.slice(0, 1);\n if (lineStart === '@') {\n header = headerRegex.exec(line);\n lineHeader = i;\n // fix header\n lines[lineHeader] =\n '@@ -' +\n header[3] +\n ',' +\n header[4] +\n ' +' +\n header[1] +\n ',' +\n header[2] +\n ' @@';\n }\n else if (lineStart === '+') {\n lines[i] = '-' + lines[i].slice(1);\n if (lines[i - 1].slice(0, 1) === '+') {\n // swap lines to keep default order (-+)\n lineTmp = lines[i];\n lines[i] = lines[i - 1];\n lines[i - 1] = lineTmp;\n }\n }\n else if (lineStart === '-') {\n lines[i] = '+' + lines[i].slice(1);\n }\n }\n return lines.join('\\n');\n};\nexport const reverseFilter = function textsReverseFilter(context) {\n if (context.nested) {\n return;\n }\n const nonNestedDelta = context.delta;\n if (nonNestedDelta[2] !== TEXT_DIFF) {\n return;\n }\n const textDiffDelta = nonNestedDelta;\n // text-diff, use a text-diff algorithm\n context\n .setResult([textDeltaReverse(textDiffDelta[0]), 0, TEXT_DIFF])\n .exit();\n};\nreverseFilter.filterName = 'texts';\n","import Processor from './processor.js';\nimport Pipe from './pipe.js';\nimport DiffContext from './contexts/diff.js';\nimport PatchContext from './contexts/patch.js';\nimport ReverseContext from './contexts/reverse.js';\nimport clone from './clone.js';\nimport * as trivial from './filters/trivial.js';\nimport * as nested from './filters/nested.js';\nimport * as arrays from './filters/arrays.js';\nimport * as dates from './filters/dates.js';\nimport * as texts from './filters/texts.js';\nclass DiffPatcher {\n constructor(options) {\n this.processor = new Processor(options);\n this.processor.pipe(new Pipe('diff')\n .append(nested.collectChildrenDiffFilter, trivial.diffFilter, dates.diffFilter, texts.diffFilter, nested.objectsDiffFilter, arrays.diffFilter)\n .shouldHaveResult());\n this.processor.pipe(new Pipe('patch')\n .append(nested.collectChildrenPatchFilter, arrays.collectChildrenPatchFilter, trivial.patchFilter, texts.patchFilter, nested.patchFilter, arrays.patchFilter)\n .shouldHaveResult());\n this.processor.pipe(new Pipe('reverse')\n .append(nested.collectChildrenReverseFilter, arrays.collectChildrenReverseFilter, trivial.reverseFilter, texts.reverseFilter, nested.reverseFilter, arrays.reverseFilter)\n .shouldHaveResult());\n }\n options(options) {\n return this.processor.options(options);\n }\n diff(left, right) {\n return this.processor.process(new DiffContext(left, right));\n }\n patch(left, delta) {\n return this.processor.process(new PatchContext(left, delta));\n }\n reverse(delta) {\n return this.processor.process(new ReverseContext(delta));\n }\n unpatch(right, delta) {\n return this.patch(right, this.reverse(delta));\n }\n clone(value) {\n return clone(value);\n }\n}\nexport default DiffPatcher;\n","// use as 2nd parameter for JSON.parse to revive Date instances\nexport default function dateReviver(key, value) {\n let parts;\n if (typeof value === 'string') {\n parts =\n /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d*))?(Z|([+-])(\\d{2}):(\\d{2}))$/.exec(value);\n if (parts) {\n return new Date(Date.UTC(+parts[1], +parts[2] - 1, +parts[3], +parts[4], +parts[5], +parts[6], +(parts[7] || 0)));\n }\n }\n return value;\n}\n","import DiffPatcher from './diffpatcher.js';\nimport dateReviver from './date-reviver.js';\nexport { DiffPatcher, dateReviver };\nexport function create(options) {\n return new DiffPatcher(options);\n}\nlet defaultInstance;\nexport function diff(left, right) {\n if (!defaultInstance) {\n defaultInstance = new DiffPatcher();\n }\n return defaultInstance.diff(left, right);\n}\nexport function patch(left, delta) {\n if (!defaultInstance) {\n defaultInstance = new DiffPatcher();\n }\n return defaultInstance.patch(left, delta);\n}\nexport function unpatch(right, delta) {\n if (!defaultInstance) {\n defaultInstance = new DiffPatcher();\n }\n return defaultInstance.unpatch(right, delta);\n}\nexport function reverse(delta) {\n if (!defaultInstance) {\n defaultInstance = new DiffPatcher();\n }\n return defaultInstance.reverse(delta);\n}\nexport function clone(value) {\n if (!defaultInstance) {\n defaultInstance = new DiffPatcher();\n }\n return defaultInstance.clone(value);\n}\n","/*\n* loglevel - https://github.com/pimterry/loglevel\n*\n* Copyright (c) 2013 Tim Perry\n* Licensed under the MIT license.\n*/\n(function (root, definition) {\n \"use strict\";\n if (typeof define === 'function' && define.amd) {\n define(definition);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = definition();\n } else {\n root.log = definition();\n }\n}(this, function () {\n \"use strict\";\n\n // Slightly dubious tricks to cut down minimized file size\n var noop = function() {};\n var undefinedType = \"undefined\";\n var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (\n /Trident\\/|MSIE /.test(window.navigator.userAgent)\n );\n\n var logMethods = [\n \"trace\",\n \"debug\",\n \"info\",\n \"warn\",\n \"error\"\n ];\n\n var _loggersByName = {};\n var defaultLogger = null;\n\n // Cross-browser bind equivalent that works at least back to IE6\n function bindMethod(obj, methodName) {\n var method = obj[methodName];\n if (typeof method.bind === 'function') {\n return method.bind(obj);\n } else {\n try {\n return Function.prototype.bind.call(method, obj);\n } catch (e) {\n // Missing bind shim or IE8 + Modernizr, fallback to wrapping\n return function() {\n return Function.prototype.apply.apply(method, [obj, arguments]);\n };\n }\n }\n }\n\n // Trace() doesn't print the message in IE, so for that case we need to wrap it\n function traceForIE() {\n if (console.log) {\n if (console.log.apply) {\n console.log.apply(console, arguments);\n } else {\n // In old IE, native console methods themselves don't have apply().\n Function.prototype.apply.apply(console.log, [console, arguments]);\n }\n }\n if (console.trace) console.trace();\n }\n\n // Build the best logging method possible for this env\n // Wherever possible we want to bind, not wrap, to preserve stack traces\n function realMethod(methodName) {\n if (methodName === 'debug') {\n methodName = 'log';\n }\n\n if (typeof console === undefinedType) {\n return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives\n } else if (methodName === 'trace' && isIE) {\n return traceForIE;\n } else if (console[methodName] !== undefined) {\n return bindMethod(console, methodName);\n } else if (console.log !== undefined) {\n return bindMethod(console, 'log');\n } else {\n return noop;\n }\n }\n\n // These private functions always need `this` to be set properly\n\n function replaceLoggingMethods() {\n /*jshint validthis:true */\n var level = this.getLevel();\n\n // Replace the actual methods.\n for (var i = 0; i < logMethods.length; i++) {\n var methodName = logMethods[i];\n this[methodName] = (i < level) ?\n noop :\n this.methodFactory(methodName, level, this.name);\n }\n\n // Define log.log as an alias for log.debug\n this.log = this.debug;\n\n // Return any important warnings.\n if (typeof console === undefinedType && level < this.levels.SILENT) {\n return \"No console available for logging\";\n }\n }\n\n // In old IE versions, the console isn't present until you first open it.\n // We build realMethod() replacements here that regenerate logging methods\n function enableLoggingWhenConsoleArrives(methodName) {\n return function () {\n if (typeof console !== undefinedType) {\n replaceLoggingMethods.call(this);\n this[methodName].apply(this, arguments);\n }\n };\n }\n\n // By default, we use closely bound real methods wherever possible, and\n // otherwise we wait for a console to appear, and then try again.\n function defaultMethodFactory(methodName, _level, _loggerName) {\n /*jshint validthis:true */\n return realMethod(methodName) ||\n enableLoggingWhenConsoleArrives.apply(this, arguments);\n }\n\n function Logger(name, factory) {\n // Private instance variables.\n var self = this;\n /**\n * The level inherited from a parent logger (or a global default). We\n * cache this here rather than delegating to the parent so that it stays\n * in sync with the actual logging methods that we have installed (the\n * parent could change levels but we might not have rebuilt the loggers\n * in this child yet).\n * @type {number}\n */\n var inheritedLevel;\n /**\n * The default level for this logger, if any. If set, this overrides\n * `inheritedLevel`.\n * @type {number|null}\n */\n var defaultLevel;\n /**\n * A user-specific level for this logger. If set, this overrides\n * `defaultLevel`.\n * @type {number|null}\n */\n var userLevel;\n\n var storageKey = \"loglevel\";\n if (typeof name === \"string\") {\n storageKey += \":\" + name;\n } else if (typeof name === \"symbol\") {\n storageKey = undefined;\n }\n\n function persistLevelIfPossible(levelNum) {\n var levelName = (logMethods[levelNum] || 'silent').toUpperCase();\n\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage[storageKey] = levelName;\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=\" + levelName + \";\";\n } catch (ignore) {}\n }\n\n function getPersistedLevel() {\n var storedLevel;\n\n if (typeof window === undefinedType || !storageKey) return;\n\n try {\n storedLevel = window.localStorage[storageKey];\n } catch (ignore) {}\n\n // Fallback to cookies if local storage gives us nothing\n if (typeof storedLevel === undefinedType) {\n try {\n var cookie = window.document.cookie;\n var cookieName = encodeURIComponent(storageKey);\n var location = cookie.indexOf(cookieName + \"=\");\n if (location !== -1) {\n storedLevel = /^([^;]+)/.exec(\n cookie.slice(location + cookieName.length + 1)\n )[1];\n }\n } catch (ignore) {}\n }\n\n // If the stored level is not valid, treat it as if nothing was stored.\n if (self.levels[storedLevel] === undefined) {\n storedLevel = undefined;\n }\n\n return storedLevel;\n }\n\n function clearPersistedLevel() {\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage.removeItem(storageKey);\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=; expires=Thu, 01 Jan 1970 00:00:00 UTC\";\n } catch (ignore) {}\n }\n\n function normalizeLevel(input) {\n var level = input;\n if (typeof level === \"string\" && self.levels[level.toUpperCase()] !== undefined) {\n level = self.levels[level.toUpperCase()];\n }\n if (typeof level === \"number\" && level >= 0 && level <= self.levels.SILENT) {\n return level;\n } else {\n throw new TypeError(\"log.setLevel() called with invalid level: \" + input);\n }\n }\n\n /*\n *\n * Public logger API - see https://github.com/pimterry/loglevel for details\n *\n */\n\n self.name = name;\n\n self.levels = { \"TRACE\": 0, \"DEBUG\": 1, \"INFO\": 2, \"WARN\": 3,\n \"ERROR\": 4, \"SILENT\": 5};\n\n self.methodFactory = factory || defaultMethodFactory;\n\n self.getLevel = function () {\n if (userLevel != null) {\n return userLevel;\n } else if (defaultLevel != null) {\n return defaultLevel;\n } else {\n return inheritedLevel;\n }\n };\n\n self.setLevel = function (level, persist) {\n userLevel = normalizeLevel(level);\n if (persist !== false) { // defaults to true\n persistLevelIfPossible(userLevel);\n }\n\n // NOTE: in v2, this should call rebuild(), which updates children.\n return replaceLoggingMethods.call(self);\n };\n\n self.setDefaultLevel = function (level) {\n defaultLevel = normalizeLevel(level);\n if (!getPersistedLevel()) {\n self.setLevel(level, false);\n }\n };\n\n self.resetLevel = function () {\n userLevel = null;\n clearPersistedLevel();\n replaceLoggingMethods.call(self);\n };\n\n self.enableAll = function(persist) {\n self.setLevel(self.levels.TRACE, persist);\n };\n\n self.disableAll = function(persist) {\n self.setLevel(self.levels.SILENT, persist);\n };\n\n self.rebuild = function () {\n if (defaultLogger !== self) {\n inheritedLevel = normalizeLevel(defaultLogger.getLevel());\n }\n replaceLoggingMethods.call(self);\n\n if (defaultLogger === self) {\n for (var childName in _loggersByName) {\n _loggersByName[childName].rebuild();\n }\n }\n };\n\n // Initialize all the internal levels.\n inheritedLevel = normalizeLevel(\n defaultLogger ? defaultLogger.getLevel() : \"WARN\"\n );\n var initialLevel = getPersistedLevel();\n if (initialLevel != null) {\n userLevel = normalizeLevel(initialLevel);\n }\n replaceLoggingMethods.call(self);\n }\n\n /*\n *\n * Top-level API\n *\n */\n\n defaultLogger = new Logger();\n\n defaultLogger.getLogger = function getLogger(name) {\n if ((typeof name !== \"symbol\" && typeof name !== \"string\") || name === \"\") {\n throw new TypeError(\"You must supply a name when creating a logger.\");\n }\n\n var logger = _loggersByName[name];\n if (!logger) {\n logger = _loggersByName[name] = new Logger(\n name,\n defaultLogger.methodFactory\n );\n }\n return logger;\n };\n\n // Grab the current global log variable in case of overwrite\n var _log = (typeof window !== undefinedType) ? window.log : undefined;\n defaultLogger.noConflict = function() {\n if (typeof window !== undefinedType &&\n window.log === defaultLogger) {\n window.log = _log;\n }\n\n return defaultLogger;\n };\n\n defaultLogger.getLoggers = function getLoggers() {\n return _loggersByName;\n };\n\n // ES6 default export, for compatibility\n defaultLogger['default'] = defaultLogger;\n\n return defaultLogger;\n}));\n","import type { ComfyApp } from './app'\nimport { api } from './api'\nimport { LGraphCanvas, LiteGraph } from '@comfyorg/litegraph'\nimport { ComfyWorkflow, useWorkflowStore } from '@/stores/workflowStore'\nimport { LGraphNode } from '@comfyorg/litegraph'\nimport type { ComfyWorkflowJSON } from '@/types/comfyWorkflow'\nimport type { ExecutedWsMessage } from '@/types/apiTypes'\nimport { useExecutionStore } from '@/stores/executionStore'\nimport _ from 'lodash'\nimport * as jsondiffpatch from 'jsondiffpatch'\nimport log from 'loglevel'\n\nfunction clone(obj: any) {\n try {\n if (typeof structuredClone !== 'undefined') {\n return structuredClone(obj)\n }\n } catch (error) {\n // structuredClone is stricter than using JSON.parse/stringify so fallback to that\n }\n\n return JSON.parse(JSON.stringify(obj))\n}\n\nconst logger = log.getLogger('ChangeTracker')\n// Change to debug for more verbose logging\nlogger.setLevel('info')\n\nexport class ChangeTracker {\n static MAX_HISTORY = 50\n /**\n * The active state of the workflow.\n */\n activeState: ComfyWorkflowJSON\n undoQueue: ComfyWorkflowJSON[] = []\n redoQueue: ComfyWorkflowJSON[] = []\n changeCount: number = 0\n /**\n * Whether the redo/undo restoring is in progress.\n */\n private restoringState: boolean = false\n\n ds?: { scale: number; offset: [number, number] }\n nodeOutputs?: Record\n\n static app?: ComfyApp\n get app(): ComfyApp {\n return ChangeTracker.app!\n }\n\n constructor(\n /**\n * The workflow that this change tracker is tracking\n */\n public workflow: ComfyWorkflow,\n /**\n * The initial state of the workflow\n */\n public initialState: ComfyWorkflowJSON\n ) {\n this.activeState = initialState\n }\n\n /**\n * Save the current state as the initial state.\n */\n reset(state?: ComfyWorkflowJSON) {\n // Do not reset the state if we are restoring.\n if (this.restoringState) return\n\n logger.debug('Reset State')\n this.activeState = state ?? this.activeState\n this.initialState = clone(this.activeState)\n }\n\n store() {\n this.ds = {\n scale: this.app.canvas.ds.scale,\n offset: [this.app.canvas.ds.offset[0], this.app.canvas.ds.offset[1]]\n }\n }\n\n restore() {\n if (this.ds) {\n this.app.canvas.ds.scale = this.ds.scale\n this.app.canvas.ds.offset = this.ds.offset\n }\n if (this.nodeOutputs) {\n this.app.nodeOutputs = this.nodeOutputs\n }\n }\n\n updateModified() {\n // Get the workflow from the store as ChangeTracker is raw object, i.e.\n // `this.workflow` is not reactive.\n const workflow = useWorkflowStore().getWorkflowByPath(this.workflow.path)\n if (workflow) {\n workflow.isModified = !ChangeTracker.graphEqual(\n this.initialState,\n this.activeState\n )\n if (workflow.isModified) {\n const diff = ChangeTracker.graphDiff(\n this.initialState,\n this.activeState\n )\n logger.debug('Graph diff:', diff)\n }\n }\n }\n\n checkState() {\n if (!this.app.graph || this.changeCount) return\n // @ts-expect-error zod types issue. Will be fixed after we enable ts-strict\n const currentState = this.app.graph.serialize() as ComfyWorkflowJSON\n if (!this.activeState) {\n this.activeState = clone(currentState)\n return\n }\n if (!ChangeTracker.graphEqual(this.activeState, currentState)) {\n this.undoQueue.push(this.activeState)\n if (this.undoQueue.length > ChangeTracker.MAX_HISTORY) {\n this.undoQueue.shift()\n }\n logger.debug('Diff detected. Undo queue length:', this.undoQueue.length)\n\n this.activeState = clone(currentState)\n this.redoQueue.length = 0\n api.dispatchEvent(\n new CustomEvent('graphChanged', { detail: this.activeState })\n )\n this.updateModified()\n }\n }\n\n async updateState(source: ComfyWorkflowJSON[], target: ComfyWorkflowJSON[]) {\n const prevState = source.pop()\n if (prevState) {\n target.push(this.activeState!)\n this.restoringState = true\n try {\n await this.app.loadGraphData(prevState, false, false, this.workflow, {\n showMissingModelsDialog: false,\n showMissingNodesDialog: false\n })\n this.activeState = prevState\n this.updateModified()\n } finally {\n this.restoringState = false\n }\n }\n }\n\n async undo() {\n await this.updateState(this.undoQueue, this.redoQueue)\n logger.debug(\n 'Undo. Undo queue length:',\n this.undoQueue.length,\n 'Redo queue length:',\n this.redoQueue.length\n )\n }\n\n async redo() {\n await this.updateState(this.redoQueue, this.undoQueue)\n logger.debug(\n 'Redo. Undo queue length:',\n this.undoQueue.length,\n 'Redo queue length:',\n this.redoQueue.length\n )\n }\n\n async undoRedo(e: KeyboardEvent) {\n if (e.ctrlKey || e.metaKey) {\n if (e.key === 'y' || e.key == 'Z') {\n await this.redo()\n return true\n } else if (e.key === 'z') {\n await this.undo()\n return true\n }\n }\n }\n\n beforeChange() {\n this.changeCount++\n }\n\n afterChange() {\n if (!--this.changeCount) {\n this.checkState()\n }\n }\n\n static init(app: ComfyApp) {\n const getCurrentChangeTracker = () =>\n useWorkflowStore().activeWorkflow?.changeTracker\n const checkState = () => getCurrentChangeTracker()?.checkState()\n\n ChangeTracker.app = app\n\n let keyIgnored = false\n window.addEventListener(\n 'keydown',\n (e: KeyboardEvent) => {\n // Do not trigger on repeat events (Holding down a key)\n // This can happen when user is holding down \"Space\" to pan the canvas.\n if (e.repeat) return\n\n const activeEl = document.activeElement\n requestAnimationFrame(async () => {\n let bindInputEl: Element | null = null\n // If we are auto queue in change mode then we do want to trigger on inputs\n if (!app.ui.autoQueueEnabled || app.ui.autoQueueMode === 'instant') {\n if (\n activeEl?.tagName === 'INPUT' ||\n (activeEl && 'type' in activeEl && activeEl.type === 'textarea')\n ) {\n // Ignore events on inputs, they have their native history\n return\n }\n bindInputEl = activeEl\n }\n\n keyIgnored =\n e.key === 'Control' ||\n e.key === 'Shift' ||\n e.key === 'Alt' ||\n e.key === 'Meta'\n if (keyIgnored) return\n\n const changeTracker = getCurrentChangeTracker()\n if (!changeTracker) return\n\n // Check if this is a ctrl+z ctrl+y\n if (await changeTracker.undoRedo(e)) return\n\n // If our active element is some type of input then handle changes after they're done\n if (ChangeTracker.bindInput(app, bindInputEl)) return\n logger.debug('checkState on keydown')\n changeTracker.checkState()\n })\n },\n true\n )\n\n window.addEventListener('keyup', (e) => {\n if (keyIgnored) {\n keyIgnored = false\n logger.debug('checkState on keyup')\n checkState()\n }\n })\n\n // Handle clicking DOM elements (e.g. widgets)\n window.addEventListener('mouseup', () => {\n logger.debug('checkState on mouseup')\n checkState()\n })\n\n // Handle prompt queue event for dynamic widget changes\n api.addEventListener('promptQueued', () => {\n logger.debug('checkState on promptQueued')\n checkState()\n })\n\n api.addEventListener('graphCleared', () => {\n logger.debug('checkState on graphCleared')\n checkState()\n })\n\n // Handle litegraph clicks\n const processMouseUp = LGraphCanvas.prototype.processMouseUp\n LGraphCanvas.prototype.processMouseUp = function (e) {\n const v = processMouseUp.apply(this, [e])\n logger.debug('checkState on processMouseUp')\n checkState()\n return v\n }\n const processMouseDown = LGraphCanvas.prototype.processMouseDown\n LGraphCanvas.prototype.processMouseDown = function (e) {\n const v = processMouseDown.apply(this, [e])\n logger.debug('checkState on processMouseDown')\n checkState()\n return v\n }\n\n // Handle litegraph dialog popup for number/string widgets\n const prompt = LGraphCanvas.prototype.prompt\n LGraphCanvas.prototype.prompt = function (\n title: string,\n value: any,\n callback: (v: any) => void,\n event: any\n ) {\n const extendedCallback = (v: any) => {\n callback(v)\n checkState()\n }\n logger.debug('checkState on prompt')\n return prompt.apply(this, [title, value, extendedCallback, event])\n }\n\n // Handle litegraph context menu for COMBO widgets\n const close = LiteGraph.ContextMenu.prototype.close\n LiteGraph.ContextMenu.prototype.close = function (e: MouseEvent) {\n const v = close.apply(this, [e])\n logger.debug('checkState on contextMenuClose')\n checkState()\n return v\n }\n\n // Detects nodes being added via the node search dialog\n const onNodeAdded = LiteGraph.LGraph.prototype.onNodeAdded\n LiteGraph.LGraph.prototype.onNodeAdded = function (node: LGraphNode) {\n const v = onNodeAdded?.apply(this, [node])\n if (!app?.configuringGraph) {\n logger.debug('checkState on onNodeAdded')\n checkState()\n }\n return v\n }\n\n // Handle multiple commands as a single transaction\n document.addEventListener('litegraph:canvas', (e: Event) => {\n const detail = (e as CustomEvent).detail\n if (detail.subType === 'before-change') {\n getCurrentChangeTracker()?.beforeChange()\n } else if (detail.subType === 'after-change') {\n getCurrentChangeTracker()?.afterChange()\n }\n })\n\n // Store node outputs\n api.addEventListener('executed', (e: CustomEvent) => {\n const detail = e.detail\n const workflow =\n useExecutionStore().queuedPrompts[detail.prompt_id]?.workflow\n const changeTracker = workflow?.changeTracker\n if (!changeTracker) return\n changeTracker.nodeOutputs ??= {}\n const nodeOutputs = changeTracker.nodeOutputs\n const output = nodeOutputs[detail.node]\n if (detail.merge && output) {\n for (const k in detail.output ?? {}) {\n const v = output[k]\n if (v instanceof Array) {\n output[k] = v.concat(detail.output[k])\n } else {\n output[k] = detail.output[k]\n }\n }\n } else {\n nodeOutputs[detail.node] = detail.output\n }\n })\n }\n\n static bindInput(app: ComfyApp, activeEl: Element | null): boolean {\n if (\n !activeEl ||\n activeEl.tagName === 'CANVAS' ||\n activeEl.tagName === 'BODY'\n ) {\n return false\n }\n\n for (const evt of ['change', 'input', 'blur']) {\n const htmlElement = activeEl as HTMLElement\n if (`on${evt}` in htmlElement) {\n const listener = () => {\n useWorkflowStore().activeWorkflow?.changeTracker?.checkState?.()\n htmlElement.removeEventListener(evt, listener)\n }\n htmlElement.addEventListener(evt, listener)\n return true\n }\n }\n return false\n }\n\n static graphEqual(a: ComfyWorkflowJSON, b: ComfyWorkflowJSON) {\n if (a === b) return true\n\n if (typeof a == 'object' && a && typeof b == 'object' && b) {\n // Compare nodes ignoring order\n if (\n !_.isEqualWith(a.nodes, b.nodes, (arrA, arrB) => {\n if (Array.isArray(arrA) && Array.isArray(arrB)) {\n return _.isEqual(new Set(arrA), new Set(arrB))\n }\n })\n ) {\n return false\n }\n\n // Reroutes (schema 0.4)\n if (!_.isEqual(a.extra?.reroutes, b.extra?.reroutes)) return false\n\n // Compare other properties normally\n for (const key of ['links', 'reroutes', 'groups']) {\n if (!_.isEqual(a[key], b[key])) {\n return false\n }\n }\n\n return true\n }\n\n return false\n }\n\n static graphDiff(a: ComfyWorkflowJSON, b: ComfyWorkflowJSON) {\n function sortGraphNodes(graph: ComfyWorkflowJSON) {\n return {\n links: graph.links,\n groups: graph.groups,\n nodes: graph.nodes.sort((a, b) => {\n if (typeof a.id === 'number' && typeof b.id === 'number') {\n return a.id - b.id\n }\n return 0\n })\n }\n }\n return jsondiffpatch.diff(sortGraphNodes(a), sortGraphNodes(b))\n }\n}\n","import { defineStore } from 'pinia'\nimport { computed, markRaw, ref } from 'vue'\nimport { api } from '@/scripts/api'\nimport { UserFile } from './userFileStore'\nimport { ChangeTracker } from '@/scripts/changeTracker'\nimport { ComfyWorkflowJSON } from '@/types/comfyWorkflow'\nimport { getPathDetails } from '@/utils/formatUtil'\nimport { defaultGraphJSON } from '@/scripts/defaultGraph'\nimport { syncEntities } from '@/utils/syncUtil'\n\nexport class ComfyWorkflow extends UserFile {\n static readonly basePath = 'workflows/'\n\n /**\n * The change tracker for the workflow. Non-reactive raw object.\n */\n changeTracker: ChangeTracker | null = null\n /**\n * Whether the workflow has been modified comparing to the initial state.\n */\n private _isModified: boolean = false\n\n /**\n * @param options The path, modified, and size of the workflow.\n * Note: path is the full path, including the 'workflows/' prefix.\n */\n constructor(options: { path: string; modified: number; size: number }) {\n super(options.path, options.modified, options.size)\n }\n\n get key() {\n return this.path.substring(ComfyWorkflow.basePath.length)\n }\n\n get activeState(): ComfyWorkflowJSON | null {\n return this.changeTracker?.activeState ?? null\n }\n\n get initialState(): ComfyWorkflowJSON | null {\n return this.changeTracker?.initialState ?? null\n }\n\n get isLoaded(): boolean {\n return this.changeTracker !== null\n }\n\n get isModified(): boolean {\n return this._isModified\n }\n\n set isModified(value: boolean) {\n this._isModified = value\n }\n\n /**\n * Load the workflow content from remote storage. Directly returns the loaded\n * workflow if the content is already loaded.\n *\n * @param force Whether to force loading the content even if it is already loaded.\n * @returns this\n */\n async load({\n force = false\n }: { force?: boolean } = {}): Promise {\n await super.load({ force })\n if (!force && this.isLoaded) return this as LoadedComfyWorkflow\n\n if (!this.originalContent) {\n throw new Error('[ASSERT] Workflow content should be loaded')\n }\n\n // Note: originalContent is populated by super.load()\n console.debug('load and start tracking of workflow', this.path)\n this.changeTracker = markRaw(\n new ChangeTracker(\n this,\n /* initialState= */ JSON.parse(this.originalContent)\n )\n )\n return this as LoadedComfyWorkflow\n }\n\n unload(): void {\n console.debug('unload workflow', this.path)\n this.changeTracker = null\n super.unload()\n }\n\n async save() {\n this.content = JSON.stringify(this.activeState)\n // Force save to ensure the content is updated in remote storage incase\n // the isModified state is screwed by changeTracker.\n const ret = await super.save({ force: true })\n this.changeTracker?.reset()\n this.isModified = false\n return ret\n }\n\n /**\n * Save the workflow as a new file.\n * @param path The path to save the workflow to. Note: with 'workflows/' prefix.\n * @returns this\n */\n async saveAs(path: string) {\n this.content = JSON.stringify(this.activeState)\n return await super.saveAs(path)\n }\n}\n\nexport interface LoadedComfyWorkflow extends ComfyWorkflow {\n isLoaded: true\n originalContent: string\n content: string\n changeTracker: ChangeTracker\n initialState: ComfyWorkflowJSON\n activeState: ComfyWorkflowJSON\n}\n\nexport const useWorkflowStore = defineStore('workflow', () => {\n /**\n * Detach the workflow from the store. lightweight helper function.\n * @param workflow The workflow to detach.\n * @returns The index of the workflow in the openWorkflowPaths array, or -1 if the workflow was not open.\n */\n const detachWorkflow = (workflow: ComfyWorkflow) => {\n delete workflowLookup.value[workflow.path]\n const index = openWorkflowPaths.value.indexOf(workflow.path)\n if (index !== -1) {\n openWorkflowPaths.value = openWorkflowPaths.value.filter(\n (path) => path !== workflow.path\n )\n }\n return index\n }\n\n /**\n * Attach the workflow to the store. lightweight helper function.\n * @param workflow The workflow to attach.\n * @param openIndex The index to open the workflow at.\n */\n const attachWorkflow = (workflow: ComfyWorkflow, openIndex: number = -1) => {\n workflowLookup.value[workflow.path] = workflow\n\n if (openIndex !== -1) {\n openWorkflowPaths.value.splice(openIndex, 0, workflow.path)\n }\n }\n\n /**\n * The active workflow currently being edited.\n */\n const activeWorkflow = ref(null)\n const isActive = (workflow: ComfyWorkflow) =>\n activeWorkflow.value?.path === workflow.path\n /**\n * All workflows.\n */\n const workflowLookup = ref>({})\n const workflows = computed(() =>\n Object.values(workflowLookup.value)\n )\n const getWorkflowByPath = (path: string): ComfyWorkflow | null =>\n workflowLookup.value[path] ?? null\n\n /**\n * The paths of the open workflows. It is setup as a ref to allow user\n * to reorder the workflows opened.\n */\n const openWorkflowPaths = ref([])\n const openWorkflowPathSet = computed(() => new Set(openWorkflowPaths.value))\n const openWorkflows = computed(() =>\n openWorkflowPaths.value.map((path) => workflowLookup.value[path])\n )\n const isOpen = (workflow: ComfyWorkflow) =>\n openWorkflowPathSet.value.has(workflow.path)\n\n /**\n * Set the workflow as the active workflow.\n * @param workflow The workflow to open.\n */\n const openWorkflow = async (\n workflow: ComfyWorkflow\n ): Promise => {\n if (isActive(workflow)) return workflow as LoadedComfyWorkflow\n\n if (!openWorkflowPaths.value.includes(workflow.path)) {\n openWorkflowPaths.value.push(workflow.path)\n }\n const loadedWorkflow = await workflow.load()\n activeWorkflow.value = loadedWorkflow\n console.debug('[workflowStore] open workflow', workflow.path)\n return loadedWorkflow\n }\n\n const getUnconflictedPath = (basePath: string): string => {\n const { directory, filename, suffix } = getPathDetails(basePath)\n let counter = 2\n let newPath = basePath\n while (workflowLookup.value[newPath]) {\n newPath = `${directory}/${filename} (${counter}).${suffix}`\n counter++\n }\n return newPath\n }\n\n const createTemporary = (path?: string, workflowData?: ComfyWorkflowJSON) => {\n const fullPath = getUnconflictedPath(\n ComfyWorkflow.basePath + (path ?? 'Unsaved Workflow.json')\n )\n const workflow = new ComfyWorkflow({\n path: fullPath,\n modified: Date.now(),\n size: -1\n })\n\n workflow.originalContent = workflow.content = workflowData\n ? JSON.stringify(workflowData)\n : defaultGraphJSON\n\n workflowLookup.value[workflow.path] = workflow\n return workflow\n }\n\n const closeWorkflow = async (workflow: ComfyWorkflow) => {\n openWorkflowPaths.value = openWorkflowPaths.value.filter(\n (path) => path !== workflow.path\n )\n if (workflow.isTemporary) {\n delete workflowLookup.value[workflow.path]\n } else {\n workflow.unload()\n }\n console.debug('[workflowStore] close workflow', workflow.path)\n }\n\n /**\n * Get the workflow at the given index shift from the active workflow.\n * @param shift The shift to the next workflow. Positive for next, negative for previous.\n * @returns The next workflow or null if the shift is out of bounds.\n */\n const openedWorkflowIndexShift = (shift: number): ComfyWorkflow | null => {\n const index = openWorkflowPaths.value.indexOf(\n activeWorkflow.value?.path ?? ''\n )\n\n if (index !== -1) {\n const length = openWorkflows.value.length\n const nextIndex = (index + shift + length) % length\n const nextWorkflow = openWorkflows.value[nextIndex]\n return nextWorkflow ?? null\n }\n return null\n }\n\n const persistedWorkflows = computed(() =>\n Array.from(workflows.value).filter((workflow) => workflow.isPersisted)\n )\n const syncWorkflows = async (dir: string = '') => {\n await syncEntities(\n dir ? 'workflows/' + dir : 'workflows',\n workflowLookup.value,\n (file) =>\n new ComfyWorkflow({\n path: file.path,\n modified: file.modified,\n size: file.size\n }),\n (existingWorkflow, file) => {\n existingWorkflow.lastModified = file.modified\n existingWorkflow.size = file.size\n existingWorkflow.unload()\n },\n /* exclude */ (workflow) => workflow.isTemporary\n )\n }\n\n const bookmarkStore = useWorkflowBookmarkStore()\n const bookmarkedWorkflows = computed(() =>\n workflows.value.filter((workflow) =>\n bookmarkStore.isBookmarked(workflow.path)\n )\n )\n const modifiedWorkflows = computed(() =>\n workflows.value.filter((workflow) => workflow.isModified)\n )\n\n /** A filesystem operation is currently in progress (e.g. save, rename, delete) */\n const isBusy = ref(false)\n\n const renameWorkflow = async (workflow: ComfyWorkflow, newPath: string) => {\n isBusy.value = true\n try {\n // Capture all needed values upfront\n const oldPath = workflow.path\n const wasBookmarked = bookmarkStore.isBookmarked(oldPath)\n\n const openIndex = detachWorkflow(workflow)\n // Perform the actual rename operation first\n try {\n await workflow.rename(newPath)\n } finally {\n attachWorkflow(workflow, openIndex)\n }\n\n // Update bookmarks\n if (wasBookmarked) {\n bookmarkStore.setBookmarked(oldPath, false)\n bookmarkStore.setBookmarked(newPath, true)\n }\n } finally {\n isBusy.value = false\n }\n }\n\n const deleteWorkflow = async (workflow: ComfyWorkflow) => {\n isBusy.value = true\n try {\n await workflow.delete()\n if (bookmarkStore.isBookmarked(workflow.path)) {\n bookmarkStore.setBookmarked(workflow.path, false)\n }\n delete workflowLookup.value[workflow.path]\n } finally {\n isBusy.value = false\n }\n }\n\n /**\n * Save a workflow.\n * @param workflow The workflow to save.\n */\n const saveWorkflow = async (workflow: ComfyWorkflow) => {\n isBusy.value = true\n try {\n // Detach the workflow and re-attach to force refresh the tree objects.\n const openIndex = detachWorkflow(workflow)\n try {\n await workflow.save()\n } finally {\n attachWorkflow(workflow, openIndex)\n }\n } finally {\n isBusy.value = false\n }\n }\n\n return {\n activeWorkflow,\n isActive,\n openWorkflows,\n openedWorkflowIndexShift,\n openWorkflow,\n isOpen,\n isBusy,\n closeWorkflow,\n createTemporary,\n renameWorkflow,\n deleteWorkflow,\n saveWorkflow,\n\n workflows,\n bookmarkedWorkflows,\n persistedWorkflows,\n modifiedWorkflows,\n getWorkflowByPath,\n syncWorkflows\n }\n})\n\nexport const useWorkflowBookmarkStore = defineStore('workflowBookmark', () => {\n const bookmarks = ref>(new Set())\n\n const isBookmarked = (path: string) => bookmarks.value.has(path)\n\n const loadBookmarks = async () => {\n const resp = await api.getUserData('workflows/.index.json')\n if (resp.status === 200) {\n const info = await resp.json()\n bookmarks.value = new Set(info?.favorites ?? [])\n }\n }\n\n const saveBookmarks = async () => {\n await api.storeUserData('workflows/.index.json', {\n favorites: Array.from(bookmarks.value)\n })\n }\n\n const setBookmarked = (path: string, value: boolean) => {\n if (bookmarks.value.has(path) === value) return\n if (value) {\n bookmarks.value.add(path)\n } else {\n bookmarks.value.delete(path)\n }\n saveBookmarks()\n }\n\n const toggleBookmarked = (path: string) => {\n setBookmarked(path, !bookmarks.value.has(path))\n }\n\n return {\n isBookmarked,\n loadBookmarks,\n saveBookmarks,\n setBookmarked,\n toggleBookmarked\n }\n})\n","import { downloadBlob } from '@/scripts/utils'\nimport { useSettingStore } from '@/stores/settingStore'\nimport { ComfyAsyncDialog } from '@/scripts/ui/components/asyncDialog'\nimport { useWorkflowStore, ComfyWorkflow } from '@/stores/workflowStore'\nimport { showPromptDialog } from './dialogService'\nimport { app } from '@/scripts/app'\nimport { useWorkspaceStore } from '@/stores/workspaceStore'\nimport { LGraphCanvas } from '@comfyorg/litegraph'\nimport { toRaw } from 'vue'\nimport { ComfyWorkflowJSON } from '@/types/comfyWorkflow'\nimport { blankGraph, defaultGraph } from '@/scripts/defaultGraph'\nimport { appendJsonExt } from '@/utils/formatUtil'\n\nasync function getFilename(defaultName: string): Promise {\n if (useSettingStore().get('Comfy.PromptFilename')) {\n let filename = await showPromptDialog({\n title: 'Export Workflow',\n message: 'Enter the filename:',\n defaultValue: defaultName\n })\n if (!filename) return null\n if (!filename.toLowerCase().endsWith('.json')) {\n filename += '.json'\n }\n return filename\n }\n return defaultName\n}\n\n// TODO(huchenlei): Auto Error Handling for all methods.\nexport const workflowService = {\n /**\n * Export the current workflow as a JSON file\n * @param filename The filename to save the workflow as\n * @param promptProperty The property of the prompt to export\n */\n async exportWorkflow(\n filename: string,\n promptProperty: 'workflow' | 'output'\n ): Promise {\n const workflow = useWorkflowStore().activeWorkflow\n if (workflow?.path) {\n filename = workflow.filename\n }\n const p = await app.graphToPrompt()\n const json = JSON.stringify(p[promptProperty], null, 2)\n const blob = new Blob([json], { type: 'application/json' })\n const file = await getFilename(filename)\n if (!file) return\n downloadBlob(file, blob)\n },\n /**\n * Save a workflow as a new file\n * @param workflow The workflow to save\n */\n async saveWorkflowAs(workflow: ComfyWorkflow) {\n const newFilename = await showPromptDialog({\n title: 'Save workflow',\n message: 'Enter the filename:',\n defaultValue: workflow.filename\n })\n if (!newFilename) return\n\n const newPath = workflow.directory + '/' + appendJsonExt(newFilename)\n const newKey = newPath.substring(ComfyWorkflow.basePath.length)\n\n if (workflow.isTemporary) {\n await this.renameWorkflow(workflow, newPath)\n await useWorkflowStore().saveWorkflow(workflow)\n } else {\n const tempWorkflow = useWorkflowStore().createTemporary(\n newKey,\n workflow.activeState as ComfyWorkflowJSON\n )\n await this.openWorkflow(tempWorkflow)\n await useWorkflowStore().saveWorkflow(tempWorkflow)\n }\n },\n\n /**\n * Save a workflow\n * @param workflow The workflow to save\n */\n async saveWorkflow(workflow: ComfyWorkflow) {\n if (workflow.isTemporary) {\n await this.saveWorkflowAs(workflow)\n } else {\n await useWorkflowStore().saveWorkflow(workflow)\n }\n },\n\n /**\n * Load the default workflow\n */\n async loadDefaultWorkflow() {\n await app.loadGraphData(defaultGraph)\n },\n\n /**\n * Load a blank workflow\n */\n async loadBlankWorkflow() {\n await app.loadGraphData(blankGraph)\n },\n\n async openWorkflow(workflow: ComfyWorkflow) {\n if (useWorkflowStore().isActive(workflow)) return\n\n const loadFromRemote = !workflow.isLoaded\n if (loadFromRemote) {\n await workflow.load()\n }\n\n await app.loadGraphData(\n toRaw(workflow.activeState) as ComfyWorkflowJSON,\n /* clean=*/ true,\n /* restore_view=*/ true,\n workflow,\n {\n showMissingModelsDialog: loadFromRemote,\n showMissingNodesDialog: loadFromRemote\n }\n )\n },\n\n /**\n * Close a workflow with confirmation if there are unsaved changes\n * @param workflow The workflow to close\n * @returns true if the workflow was closed, false if the user cancelled\n */\n async closeWorkflow(\n workflow: ComfyWorkflow,\n options: { warnIfUnsaved: boolean } = { warnIfUnsaved: true }\n ): Promise {\n if (!workflow.isLoaded) {\n return\n }\n\n if (workflow.isModified && options.warnIfUnsaved) {\n const res = (await ComfyAsyncDialog.prompt({\n title: 'Save Changes?',\n message: `Do you want to save changes to \"${workflow.path}\" before closing?`,\n actions: ['Yes', 'No', 'Cancel']\n })) as 'Yes' | 'No' | 'Cancel'\n\n if (res === 'Yes') {\n await this.saveWorkflow(workflow)\n } else if (res === 'Cancel') {\n return\n }\n }\n\n const workflowStore = useWorkflowStore()\n // If this is the last workflow, create a new default temporary workflow\n if (workflowStore.openWorkflows.length === 1) {\n await this.loadDefaultWorkflow()\n }\n // If this is the active workflow, load the next workflow\n if (workflowStore.isActive(workflow)) {\n await this.loadNextOpenedWorkflow()\n }\n\n await workflowStore.closeWorkflow(workflow)\n },\n\n async renameWorkflow(workflow: ComfyWorkflow, newPath: string) {\n await useWorkflowStore().renameWorkflow(workflow, newPath)\n },\n\n async deleteWorkflow(workflow: ComfyWorkflow) {\n const workflowStore = useWorkflowStore()\n if (workflowStore.isOpen(workflow)) {\n await this.closeWorkflow(workflow)\n }\n await workflowStore.deleteWorkflow(workflow)\n },\n\n /**\n * This method is called before loading a new graph.\n * There are 3 major functions that loads a new graph to the graph editor:\n * 1. loadGraphData\n * 2. loadApiJson\n * 3. importA1111\n *\n * This function is used to save the current workflow states before loading\n * a new graph.\n */\n beforeLoadNewGraph() {\n // Use workspaceStore here as it is patched in jest tests.\n const workflowStore = useWorkspaceStore().workflow\n const activeWorkflow = workflowStore.activeWorkflow\n if (activeWorkflow) {\n activeWorkflow.changeTracker.store()\n }\n },\n\n /**\n * Set the active workflow after the new graph is loaded.\n *\n * The call relationship is\n * workflowService.openWorkflow -> app.loadGraphData -> workflowService.afterLoadNewGraph\n * app.loadApiJson -> workflowService.afterLoadNewGraph\n * app.importA1111 -> workflowService.afterLoadNewGraph\n *\n * @param value The value to set as the active workflow.\n * @param workflowData The initial workflow data loaded to the graph editor.\n */\n async afterLoadNewGraph(\n value: string | ComfyWorkflow | null,\n workflowData: ComfyWorkflowJSON\n ) {\n // Use workspaceStore here as it is patched in jest tests.\n const workflowStore = useWorkspaceStore().workflow\n if (typeof value === 'string') {\n const workflow = workflowStore.getWorkflowByPath(\n ComfyWorkflow.basePath + appendJsonExt(value)\n )\n if (workflow?.isPersisted) {\n const loadedWorkflow = await workflowStore.openWorkflow(workflow)\n loadedWorkflow.changeTracker.restore()\n loadedWorkflow.changeTracker.reset(workflowData)\n return\n }\n }\n\n if (value === null || typeof value === 'string') {\n const path = value as string | null\n const tempWorkflow = workflowStore.createTemporary(\n path ? appendJsonExt(path) : undefined,\n workflowData\n )\n await workflowStore.openWorkflow(tempWorkflow)\n return\n }\n\n // value is a ComfyWorkflow.\n const loadedWorkflow = await workflowStore.openWorkflow(value)\n loadedWorkflow.changeTracker.reset(workflowData)\n loadedWorkflow.changeTracker.restore()\n },\n\n /**\n * Insert the given workflow into the current graph editor.\n */\n async insertWorkflow(workflow: ComfyWorkflow) {\n const loadedWorkflow = await workflow.load()\n const data = loadedWorkflow.initialState\n const old = localStorage.getItem('litegrapheditor_clipboard')\n // @ts-expect-error: zod issue. Should be fixed after enable ts-strict globally\n const graph = new LGraph(data)\n const canvasElement = document.createElement('canvas')\n const canvas = new LGraphCanvas(canvasElement, graph, {\n skip_events: true,\n skip_render: true\n })\n canvas.selectNodes()\n canvas.copyToClipboard()\n app.canvas.pasteFromClipboard()\n if (old !== null) {\n localStorage.setItem('litegrapheditor_clipboard', old)\n }\n },\n\n async loadNextOpenedWorkflow() {\n const nextWorkflow = useWorkflowStore().openedWorkflowIndexShift(1)\n if (nextWorkflow) {\n await this.openWorkflow(nextWorkflow)\n }\n },\n\n async loadPreviousOpenedWorkflow() {\n const previousWorkflow = useWorkflowStore().openedWorkflowIndexShift(-1)\n if (previousWorkflow) {\n await this.openWorkflow(previousWorkflow)\n }\n }\n}\n","// @ts-strict-ignore\nimport type { LGraph, LGraphCanvas, LGraphNode } from '@comfyorg/litegraph'\nimport { LiteGraph } from '@comfyorg/litegraph'\n\n/**\n * Serialises an array of nodes using a modified version of the old Litegraph copy (& paste) function\n * @param nodes All nodes to be serialised\n * @param graph The graph we are working in\n * @returns A serialised string of all nodes, and their connections\n * @deprecated Format not in use anywhere else.\n */\nexport function serialise(nodes: LGraphNode[], graph: LGraph): string {\n const serialisable = {\n nodes: [],\n links: []\n }\n let index = 0\n const cloneable: LGraphNode[] = []\n\n for (const node of nodes) {\n if (node.clonable === false) continue\n\n node._relative_id = index++\n cloneable.push(node)\n }\n\n // Clone the node\n for (const node of cloneable) {\n const cloned = node.clone()\n if (!cloned) {\n console.warn('node type not found: ' + node.type)\n continue\n }\n\n serialisable.nodes.push(cloned.serialize())\n if (!node.inputs?.length) continue\n\n // For inputs only, gather link details of every connection\n for (const input of node.inputs) {\n if (!input || input.link == null) continue\n\n const link = graph.links.get(input.link)\n if (!link) continue\n\n const outNode = graph.getNodeById(link.origin_id)\n if (!outNode) continue\n\n // Special format for old Litegraph copy & paste only\n serialisable.links.push([\n outNode._relative_id,\n link.origin_slot,\n node._relative_id,\n link.target_slot,\n outNode.id\n ])\n }\n }\n\n return JSON.stringify(serialisable)\n}\n\n/**\n * Deserialises nodes and links using a modified version of the old Litegraph (copy &) paste function\n * @param data The serialised nodes and links to create\n * @param canvas The canvas to create the serialised items in\n */\nexport function deserialiseAndCreate(data: string, canvas: LGraphCanvas): void {\n if (!data) return\n\n const { graph, graph_mouse } = canvas\n canvas.emitBeforeChange()\n graph.beforeChange()\n\n const deserialised = JSON.parse(data)\n\n // Find the top left point of the boundary of all pasted nodes\n const topLeft = [Infinity, Infinity]\n for (const { pos } of deserialised.nodes) {\n if (topLeft[0] > pos[0]) topLeft[0] = pos[0]\n if (topLeft[1] > pos[1]) topLeft[1] = pos[1]\n }\n\n // Silent default instead of throw\n if (!Number.isFinite(topLeft[0]) || !Number.isFinite(topLeft[1])) {\n topLeft[0] = graph_mouse[0]\n topLeft[1] = graph_mouse[1]\n }\n\n // Create nodes\n const nodes: LGraphNode[] = []\n for (const info of deserialised.nodes) {\n const node = LiteGraph.createNode(info.type)\n if (!node) continue\n\n node.configure(info)\n\n // Paste to the bottom right of pointer\n node.pos[0] += graph_mouse[0] - topLeft[0]\n node.pos[1] += graph_mouse[1] - topLeft[1]\n\n graph.add(node, true)\n nodes.push(node)\n }\n\n // Create links\n for (const info of deserialised.links) {\n const relativeId = info[0]\n const outNode = relativeId != null ? nodes[relativeId] : undefined\n\n const inNode = nodes[info[2]]\n if (outNode && inNode) outNode.connect(info[1], inNode, info[3])\n else console.warn('Warning, nodes missing on pasting')\n }\n\n canvas.selectNodes(nodes)\n\n graph.afterChange()\n canvas.emitAfterChange()\n}\n","// @ts-strict-ignore\nimport { ComfyLogging } from './logging'\nimport {\n type ComfyWidgetConstructor,\n ComfyWidgets,\n initWidgets\n} from './widgets'\nimport { ComfyUI, $el } from './ui'\nimport { api } from './api'\nimport { defaultGraph } from './defaultGraph'\nimport {\n getPngMetadata,\n getWebpMetadata,\n getFlacMetadata,\n importA1111,\n getLatentMetadata\n} from './pnginfo'\nimport { createImageHost, calculateImageGrid } from './ui/imagePreview'\nimport { DraggableList } from './ui/draggableList'\nimport { applyTextReplacements, addStylesheet } from './utils'\nimport type { ComfyExtension, MissingNodeType } from '@/types/comfy'\nimport {\n type ComfyWorkflowJSON,\n type NodeId,\n validateComfyWorkflow\n} from '../types/comfyWorkflow'\nimport { ComfyNodeDef, StatusWsMessageStatus } from '@/types/apiTypes'\nimport { adjustColor, ColorAdjustOptions } from '@/utils/colorUtil'\nimport { ComfyAppMenu } from './ui/menu/index'\nimport { getStorageValue } from './utils'\nimport { ComfyWorkflow } from '@/stores/workflowStore'\nimport {\n LGraphGroup,\n LGraphCanvas,\n LGraph,\n LGraphNode,\n LiteGraph\n} from '@comfyorg/litegraph'\nimport { StorageLocation } from '@/types/settingTypes'\nimport { ExtensionManager } from '@/types/extensionTypes'\nimport {\n ComfyNodeDefImpl,\n SYSTEM_NODE_DEFS,\n useNodeDefStore\n} from '@/stores/nodeDefStore'\nimport { INodeInputSlot, Vector2 } from '@comfyorg/litegraph'\nimport _ from 'lodash'\nimport {\n showExecutionErrorDialog,\n showLoadWorkflowWarning,\n showMissingModelsWarning\n} from '@/services/dialogService'\nimport { useSettingStore } from '@/stores/settingStore'\nimport { useToastStore } from '@/stores/toastStore'\nimport { useModelStore } from '@/stores/modelStore'\nimport type { ToastMessageOptions } from 'primevue/toast'\nimport { useWorkspaceStore } from '@/stores/workspaceStore'\nimport { useExecutionStore } from '@/stores/executionStore'\nimport { IWidget } from '@comfyorg/litegraph'\nimport { useExtensionStore } from '@/stores/extensionStore'\nimport { KeyComboImpl, useKeybindingStore } from '@/stores/keybindingStore'\nimport { useCommandStore } from '@/stores/commandStore'\nimport { shallowReactive } from 'vue'\nimport { type IBaseWidget } from '@comfyorg/litegraph/dist/types/widgets'\nimport { workflowService } from '@/services/workflowService'\nimport { useWidgetStore } from '@/stores/widgetStore'\nimport { deserialiseAndCreate } from '@/extensions/core/vintageClipboard'\n\nexport const ANIM_PREVIEW_WIDGET = '$$comfy_animation_preview'\n\nfunction sanitizeNodeName(string) {\n let entityMap = {\n '&': '',\n '<': '',\n '>': '',\n '\"': '',\n \"'\": '',\n '`': '',\n '=': ''\n }\n return String(string).replace(/[&<>\"'`=]/g, function fromEntityMap(s) {\n return entityMap[s]\n })\n}\n\ntype Clipspace = {\n widgets?: { type?: string; name?: string; value?: any }[] | null\n imgs?: HTMLImageElement[] | null\n original_imgs?: HTMLImageElement[] | null\n images?: any[] | null\n selectedIndex: number\n img_paste_mode: string\n}\n\n/**\n * @typedef {import(\"types/comfy\").ComfyExtension} ComfyExtension\n */\n\nexport class ComfyApp {\n /**\n * List of entries to queue\n * @type {{number: number, batchCount: number}[]}\n */\n #queueItems = []\n /**\n * If the queue is currently being processed\n * @type {boolean}\n */\n #processingQueue = false\n\n /**\n * Content Clipboard\n * @type {serialized node object}\n */\n static clipspace: Clipspace | null = null\n static clipspace_invalidate_handler: (() => void) | null = null\n static open_maskeditor = null\n static clipspace_return_node = null\n\n // Force vite to import utils.ts as part of index.\n // Force import of DraggableList.\n static utils = {\n applyTextReplacements,\n addStylesheet,\n DraggableList\n }\n\n vueAppReady: boolean\n ui: ComfyUI\n logging: ComfyLogging\n extensions: ComfyExtension[]\n extensionManager: ExtensionManager\n _nodeOutputs: Record\n nodePreviewImages: Record\n graph: LGraph\n enableWorkflowViewRestore: any\n canvas: LGraphCanvas\n dragOverNode: LGraphNode | null\n canvasEl: HTMLCanvasElement\n // x, y, scale\n zoom_drag_start: [number, number, number] | null\n lastNodeErrors: any[] | null\n lastExecutionError: { node_id: number } | null\n progress: { value: number; max: number } | null\n configuringGraph: boolean\n isNewUserSession: boolean\n storageLocation: StorageLocation\n multiUserServer: boolean\n ctx: CanvasRenderingContext2D\n bodyTop: HTMLElement\n bodyLeft: HTMLElement\n bodyRight: HTMLElement\n bodyBottom: HTMLElement\n canvasContainer: HTMLElement\n menu: ComfyAppMenu\n bypassBgColor: string\n // Set by Comfy.Clipspace extension\n openClipspace: () => void = () => {}\n\n /**\n * @deprecated Use useExecutionStore().executingNodeId instead\n */\n get runningNodeId(): string | null {\n return useExecutionStore().executingNodeId\n }\n\n /**\n * @deprecated Use useWorkspaceStore().shiftDown instead\n */\n get shiftDown(): boolean {\n return useWorkspaceStore().shiftDown\n }\n\n /**\n * @deprecated Use useWidgetStore().widgets instead\n */\n get widgets(): Record {\n if (this.vueAppReady) {\n return useWidgetStore().widgets\n }\n return ComfyWidgets\n }\n\n constructor() {\n this.vueAppReady = false\n this.ui = new ComfyUI(this)\n this.logging = new ComfyLogging(this)\n this.bodyTop = $el('div.comfyui-body-top', { parent: document.body })\n this.bodyLeft = $el('div.comfyui-body-left', { parent: document.body })\n this.bodyRight = $el('div.comfyui-body-right', { parent: document.body })\n this.bodyBottom = $el('div.comfyui-body-bottom', { parent: document.body })\n this.canvasContainer = $el('div.graph-canvas-container', {\n parent: document.body\n })\n this.menu = new ComfyAppMenu(this)\n this.bypassBgColor = '#FF00FF'\n\n /**\n * List of extensions that are registered with the app\n * @type {ComfyExtension[]}\n */\n this.extensions = []\n\n /**\n * Stores the execution output data for each node\n * @type {Record}\n */\n this.nodeOutputs = {}\n\n /**\n * Stores the preview image data for each node\n * @type {Record}\n */\n this.nodePreviewImages = {}\n }\n\n get nodeOutputs() {\n return this._nodeOutputs\n }\n\n set nodeOutputs(value) {\n this._nodeOutputs = value\n this.#invokeExtensions('onNodeOutputsUpdated', value)\n }\n\n getPreviewFormatParam() {\n let preview_format = this.ui.settings.getSettingValue('Comfy.PreviewFormat')\n if (preview_format) return `&preview=${preview_format}`\n else return ''\n }\n\n getRandParam() {\n return '&rand=' + Math.random()\n }\n\n static isImageNode(node) {\n return (\n node.imgs ||\n (node &&\n node.widgets &&\n node.widgets.findIndex((obj) => obj.name === 'image') >= 0)\n )\n }\n\n static onClipspaceEditorSave() {\n if (ComfyApp.clipspace_return_node) {\n ComfyApp.pasteFromClipspace(ComfyApp.clipspace_return_node)\n }\n }\n\n static onClipspaceEditorClosed() {\n ComfyApp.clipspace_return_node = null\n }\n\n static copyToClipspace(node) {\n var widgets = null\n if (node.widgets) {\n widgets = node.widgets.map(({ type, name, value }) => ({\n type,\n name,\n value\n }))\n }\n\n var imgs = undefined\n var orig_imgs = undefined\n if (node.imgs != undefined) {\n imgs = []\n orig_imgs = []\n\n for (let i = 0; i < node.imgs.length; i++) {\n imgs[i] = new Image()\n imgs[i].src = node.imgs[i].src\n orig_imgs[i] = imgs[i]\n }\n }\n\n var selectedIndex = 0\n if (node.imageIndex) {\n selectedIndex = node.imageIndex\n }\n\n ComfyApp.clipspace = {\n widgets: widgets,\n imgs: imgs,\n original_imgs: orig_imgs,\n images: node.images,\n selectedIndex: selectedIndex,\n img_paste_mode: 'selected' // reset to default im_paste_mode state on copy action\n }\n\n ComfyApp.clipspace_return_node = null\n\n if (ComfyApp.clipspace_invalidate_handler) {\n ComfyApp.clipspace_invalidate_handler()\n }\n }\n\n static pasteFromClipspace(node) {\n if (ComfyApp.clipspace) {\n // image paste\n if (ComfyApp.clipspace.imgs && node.imgs) {\n if (node.images && ComfyApp.clipspace.images) {\n if (ComfyApp.clipspace['img_paste_mode'] == 'selected') {\n node.images = [\n ComfyApp.clipspace.images[ComfyApp.clipspace['selectedIndex']]\n ]\n } else {\n node.images = ComfyApp.clipspace.images\n }\n\n if (app.nodeOutputs[node.id + ''])\n app.nodeOutputs[node.id + ''].images = node.images\n }\n\n if (ComfyApp.clipspace.imgs) {\n // deep-copy to cut link with clipspace\n if (ComfyApp.clipspace['img_paste_mode'] == 'selected') {\n const img = new Image()\n img.src =\n ComfyApp.clipspace.imgs[ComfyApp.clipspace['selectedIndex']].src\n node.imgs = [img]\n node.imageIndex = 0\n } else {\n const imgs = []\n for (let i = 0; i < ComfyApp.clipspace.imgs.length; i++) {\n imgs[i] = new Image()\n imgs[i].src = ComfyApp.clipspace.imgs[i].src\n node.imgs = imgs\n }\n }\n }\n }\n\n if (node.widgets) {\n if (ComfyApp.clipspace.images) {\n const clip_image =\n ComfyApp.clipspace.images[ComfyApp.clipspace['selectedIndex']]\n const index = node.widgets.findIndex((obj) => obj.name === 'image')\n if (index >= 0) {\n if (\n node.widgets[index].type != 'image' &&\n typeof node.widgets[index].value == 'string' &&\n clip_image.filename\n ) {\n node.widgets[index].value =\n (clip_image.subfolder ? clip_image.subfolder + '/' : '') +\n clip_image.filename +\n (clip_image.type ? ` [${clip_image.type}]` : '')\n } else {\n node.widgets[index].value = clip_image\n }\n }\n }\n if (ComfyApp.clipspace.widgets) {\n ComfyApp.clipspace.widgets.forEach(({ type, name, value }) => {\n const prop = Object.values(node.widgets).find(\n // @ts-expect-errorg\n (obj) => obj.type === type && obj.name === name\n )\n // @ts-expect-error\n if (prop && prop.type != 'button') {\n if (\n // @ts-expect-error\n prop.type != 'image' &&\n // @ts-expect-error\n typeof prop.value == 'string' &&\n value.filename\n ) {\n // @ts-expect-error\n prop.value =\n (value.subfolder ? value.subfolder + '/' : '') +\n value.filename +\n (value.type ? ` [${value.type}]` : '')\n } else {\n // @ts-expect-error\n prop.value = value\n // @ts-expect-error\n prop.callback(value)\n }\n }\n })\n }\n }\n\n app.graph.setDirtyCanvas(true)\n }\n }\n\n get enabledExtensions() {\n if (!this.vueAppReady) {\n return this.extensions\n }\n return useExtensionStore().enabledExtensions\n }\n\n /**\n * Invoke an extension callback\n * @param {keyof ComfyExtension} method The extension callback to execute\n * @param {any[]} args Any arguments to pass to the callback\n * @returns\n */\n #invokeExtensions(method, ...args) {\n let results = []\n for (const ext of this.enabledExtensions) {\n if (method in ext) {\n try {\n results.push(ext[method](...args, this))\n } catch (error) {\n console.error(\n `Error calling extension '${ext.name}' method '${method}'`,\n { error },\n { extension: ext },\n { args }\n )\n }\n }\n }\n return results\n }\n\n /**\n * Invoke an async extension callback\n * Each callback will be invoked concurrently\n * @param {string} method The extension callback to execute\n * @param {...any} args Any arguments to pass to the callback\n * @returns\n */\n async #invokeExtensionsAsync(method, ...args) {\n return await Promise.all(\n this.enabledExtensions.map(async (ext) => {\n if (method in ext) {\n try {\n return await ext[method](...args, this)\n } catch (error) {\n console.error(\n `Error calling extension '${ext.name}' method '${method}'`,\n { error },\n { extension: ext },\n { args }\n )\n }\n }\n })\n )\n }\n\n #addRestoreWorkflowView() {\n const serialize = LGraph.prototype.serialize\n const self = this\n LGraph.prototype.serialize = function () {\n const workflow = serialize.apply(this, arguments)\n\n // Store the drag & scale info in the serialized workflow if the setting is enabled\n if (self.enableWorkflowViewRestore.value) {\n if (!workflow.extra) {\n workflow.extra = {}\n }\n workflow.extra.ds = {\n scale: self.canvas.ds.scale,\n offset: self.canvas.ds.offset\n }\n } else if (workflow.extra?.ds) {\n // Clear any old view data\n delete workflow.extra.ds\n }\n\n return workflow\n }\n this.enableWorkflowViewRestore = this.ui.settings.addSetting({\n id: 'Comfy.EnableWorkflowViewRestore',\n category: ['Comfy', 'Workflow', 'EnableWorkflowViewRestore'],\n name: 'Save and restore canvas position and zoom level in workflows',\n type: 'boolean',\n defaultValue: true\n })\n }\n\n /**\n * Adds special context menu handling for nodes\n * e.g. this adds Open Image functionality for nodes that show images\n * @param {*} node The node to add the menu handler\n */\n #addNodeContextMenuHandler(node) {\n function getCopyImageOption(img) {\n if (typeof window.ClipboardItem === 'undefined') return []\n return [\n {\n content: 'Copy Image',\n callback: async () => {\n const url = new URL(img.src)\n url.searchParams.delete('preview')\n\n const writeImage = async (blob) => {\n await navigator.clipboard.write([\n new ClipboardItem({\n [blob.type]: blob\n })\n ])\n }\n\n try {\n const data = await fetch(url)\n const blob = await data.blob()\n try {\n await writeImage(blob)\n } catch (error) {\n // Chrome seems to only support PNG on write, convert and try again\n if (blob.type !== 'image/png') {\n const canvas = $el('canvas', {\n width: img.naturalWidth,\n height: img.naturalHeight\n }) as HTMLCanvasElement\n const ctx = canvas.getContext('2d')\n let image\n if (typeof window.createImageBitmap === 'undefined') {\n image = new Image()\n const p = new Promise((resolve, reject) => {\n image.onload = resolve\n image.onerror = reject\n }).finally(() => {\n URL.revokeObjectURL(image.src)\n })\n image.src = URL.createObjectURL(blob)\n await p\n } else {\n image = await createImageBitmap(blob)\n }\n try {\n ctx.drawImage(image, 0, 0)\n canvas.toBlob(writeImage, 'image/png')\n } finally {\n if (typeof image.close === 'function') {\n image.close()\n }\n }\n\n return\n }\n throw error\n }\n } catch (error) {\n useToastStore().addAlert(\n 'Error copying image: ' + (error.message ?? error)\n )\n }\n }\n }\n ]\n }\n\n node.prototype.getExtraMenuOptions = function (_, options) {\n if (this.imgs) {\n // If this node has images then we add an open in new tab item\n let img\n if (this.imageIndex != null) {\n // An image is selected so select that\n img = this.imgs[this.imageIndex]\n } else if (this.overIndex != null) {\n // No image is selected but one is hovered\n img = this.imgs[this.overIndex]\n }\n if (img) {\n options.unshift(\n {\n content: 'Open Image',\n callback: () => {\n let url = new URL(img.src)\n url.searchParams.delete('preview')\n window.open(url, '_blank')\n }\n },\n ...getCopyImageOption(img),\n {\n content: 'Save Image',\n callback: () => {\n const a = document.createElement('a')\n let url = new URL(img.src)\n url.searchParams.delete('preview')\n a.href = url.toString()\n a.setAttribute(\n 'download',\n new URLSearchParams(url.search).get('filename')\n )\n document.body.append(a)\n a.click()\n requestAnimationFrame(() => a.remove())\n }\n }\n )\n }\n }\n\n options.push({\n content: 'Bypass',\n callback: (obj) => {\n if (this.mode === 4) this.mode = 0\n else this.mode = 4\n this.graph.change()\n }\n })\n\n // prevent conflict of clipspace content\n if (!ComfyApp.clipspace_return_node) {\n options.push({\n content: 'Copy (Clipspace)',\n callback: (obj) => {\n ComfyApp.copyToClipspace(this)\n }\n })\n\n if (ComfyApp.clipspace != null) {\n options.push({\n content: 'Paste (Clipspace)',\n callback: () => {\n ComfyApp.pasteFromClipspace(this)\n }\n })\n }\n\n if (ComfyApp.isImageNode(this)) {\n options.push({\n content: 'Open in MaskEditor',\n callback: (obj) => {\n ComfyApp.copyToClipspace(this)\n ComfyApp.clipspace_return_node = this\n ComfyApp.open_maskeditor()\n }\n })\n }\n }\n }\n }\n\n #addNodeKeyHandler(node) {\n const app = this\n const origNodeOnKeyDown = node.prototype.onKeyDown\n\n node.prototype.onKeyDown = function (e) {\n if (origNodeOnKeyDown && origNodeOnKeyDown.apply(this, e) === false) {\n return false\n }\n\n if (this.flags.collapsed || !this.imgs || this.imageIndex === null) {\n return\n }\n\n let handled = false\n\n if (e.key === 'ArrowLeft' || e.key === 'ArrowRight') {\n if (e.key === 'ArrowLeft') {\n this.imageIndex -= 1\n } else if (e.key === 'ArrowRight') {\n this.imageIndex += 1\n }\n this.imageIndex %= this.imgs.length\n\n if (this.imageIndex < 0) {\n this.imageIndex = this.imgs.length + this.imageIndex\n }\n handled = true\n } else if (e.key === 'Escape') {\n this.imageIndex = null\n handled = true\n }\n\n if (handled === true) {\n e.preventDefault()\n e.stopImmediatePropagation()\n return false\n }\n }\n }\n\n /**\n * Adds Custom drawing logic for nodes\n * e.g. Draws images and handles thumbnail navigation on nodes that output images\n * @param {*} node The node to add the draw handler\n */\n #addDrawBackgroundHandler(node) {\n const app = this\n\n function getImageTop(node) {\n let shiftY\n if (node.imageOffset != null) {\n shiftY = node.imageOffset\n } else {\n if (node.widgets?.length) {\n const w = node.widgets[node.widgets.length - 1]\n shiftY = w.last_y\n if (w.computeSize) {\n shiftY += w.computeSize()[1] + 4\n } else if (w.computedHeight) {\n shiftY += w.computedHeight\n } else {\n shiftY += LiteGraph.NODE_WIDGET_HEIGHT + 4\n }\n } else {\n shiftY = node.computeSize()[1]\n }\n }\n return shiftY\n }\n\n node.prototype.setSizeForImage = function (force) {\n if (!force && this.animatedImages) return\n\n if (this.inputHeight || this.freeWidgetSpace > 210) {\n this.setSize(this.size)\n return\n }\n const minHeight = getImageTop(this) + 220\n if (this.size[1] < minHeight) {\n this.setSize([this.size[0], minHeight])\n }\n }\n\n function unsafeDrawBackground(ctx) {\n if (!this.flags.collapsed) {\n let imgURLs = []\n let imagesChanged = false\n\n const output = app.nodeOutputs[this.id + '']\n if (output?.images) {\n this.animatedImages = output?.animated?.find(Boolean)\n if (this.images !== output.images) {\n this.images = output.images\n imagesChanged = true\n imgURLs = imgURLs.concat(\n output.images.map((params) => {\n return api.apiURL(\n '/view?' +\n new URLSearchParams(params).toString() +\n (this.animatedImages ? '' : app.getPreviewFormatParam()) +\n app.getRandParam()\n )\n })\n )\n }\n }\n\n const preview = app.nodePreviewImages[this.id + '']\n if (this.preview !== preview) {\n this.preview = preview\n imagesChanged = true\n if (preview != null) {\n imgURLs.push(preview)\n }\n }\n\n if (imagesChanged) {\n this.imageIndex = null\n if (imgURLs.length > 0) {\n Promise.all(\n imgURLs.map((src) => {\n return new Promise((r) => {\n const img = new Image()\n img.onload = () => r(img)\n img.onerror = () => r(null)\n img.src = src\n })\n })\n ).then((imgs) => {\n if (\n (!output || this.images === output.images) &&\n (!preview || this.preview === preview)\n ) {\n this.imgs = imgs.filter(Boolean)\n this.setSizeForImage?.()\n app.graph.setDirtyCanvas(true)\n }\n })\n } else {\n this.imgs = null\n }\n }\n\n const is_all_same_aspect_ratio = (imgs) => {\n // assume: imgs.length >= 2\n let ratio = imgs[0].naturalWidth / imgs[0].naturalHeight\n\n for (let i = 1; i < imgs.length; i++) {\n let this_ratio = imgs[i].naturalWidth / imgs[i].naturalHeight\n if (ratio != this_ratio) return false\n }\n\n return true\n }\n\n if (this.imgs?.length) {\n const widgetIdx = this.widgets?.findIndex(\n (w) => w.name === ANIM_PREVIEW_WIDGET\n )\n\n if (this.animatedImages) {\n // Instead of using the canvas we'll use a IMG\n if (widgetIdx > -1) {\n // Replace content\n const widget = this.widgets[widgetIdx]\n widget.options.host.updateImages(this.imgs)\n } else {\n const host = createImageHost(this)\n this.setSizeForImage(true)\n const widget = this.addDOMWidget(\n ANIM_PREVIEW_WIDGET,\n 'img',\n host.el,\n {\n host,\n getHeight: host.getHeight,\n onDraw: host.onDraw,\n hideOnZoom: false\n }\n )\n widget.serializeValue = () => undefined\n widget.options.host.updateImages(this.imgs)\n }\n return\n }\n\n if (widgetIdx > -1) {\n this.widgets[widgetIdx].onRemove?.()\n this.widgets.splice(widgetIdx, 1)\n }\n\n const canvas = app.graph.list_of_graphcanvas[0]\n const mouse = canvas.graph_mouse\n if (!canvas.pointer_is_down && this.pointerDown) {\n if (\n mouse[0] === this.pointerDown.pos[0] &&\n mouse[1] === this.pointerDown.pos[1]\n ) {\n this.imageIndex = this.pointerDown.index\n }\n this.pointerDown = null\n }\n\n let imageIndex = this.imageIndex\n const numImages = this.imgs.length\n if (numImages === 1 && !imageIndex) {\n this.imageIndex = imageIndex = 0\n }\n\n const top = getImageTop(this)\n var shiftY = top\n\n let dw = this.size[0]\n let dh = this.size[1]\n dh -= shiftY\n\n if (imageIndex == null) {\n var cellWidth, cellHeight, shiftX, cell_padding, cols\n\n const compact_mode = is_all_same_aspect_ratio(this.imgs)\n if (!compact_mode) {\n // use rectangle cell style and border line\n cell_padding = 2\n // Prevent infinite canvas2d scale-up\n const largestDimension = this.imgs.reduce(\n (acc, current) =>\n Math.max(acc, current.naturalWidth, current.naturalHeight),\n 0\n )\n const fakeImgs = []\n fakeImgs.length = this.imgs.length\n fakeImgs[0] = {\n naturalWidth: largestDimension,\n naturalHeight: largestDimension\n }\n ;({ cellWidth, cellHeight, cols, shiftX } = calculateImageGrid(\n fakeImgs,\n dw,\n dh\n ))\n } else {\n cell_padding = 0\n ;({ cellWidth, cellHeight, cols, shiftX } = calculateImageGrid(\n this.imgs,\n dw,\n dh\n ))\n }\n\n let anyHovered = false\n this.imageRects = []\n for (let i = 0; i < numImages; i++) {\n const img = this.imgs[i]\n const row = Math.floor(i / cols)\n const col = i % cols\n const x = col * cellWidth + shiftX\n const y = row * cellHeight + shiftY\n if (!anyHovered) {\n anyHovered = LiteGraph.isInsideRectangle(\n mouse[0],\n mouse[1],\n x + this.pos[0],\n y + this.pos[1],\n cellWidth,\n cellHeight\n )\n if (anyHovered) {\n this.overIndex = i\n let value = 110\n if (canvas.pointer_is_down) {\n if (!this.pointerDown || this.pointerDown.index !== i) {\n this.pointerDown = { index: i, pos: [...mouse] }\n }\n value = 125\n }\n ctx.filter = `contrast(${value}%) brightness(${value}%)`\n canvas.canvas.style.cursor = 'pointer'\n }\n }\n this.imageRects.push([x, y, cellWidth, cellHeight])\n\n let wratio = cellWidth / img.width\n let hratio = cellHeight / img.height\n var ratio = Math.min(wratio, hratio)\n\n let imgHeight = ratio * img.height\n let imgY =\n row * cellHeight + shiftY + (cellHeight - imgHeight) / 2\n let imgWidth = ratio * img.width\n let imgX = col * cellWidth + shiftX + (cellWidth - imgWidth) / 2\n\n ctx.drawImage(\n img,\n imgX + cell_padding,\n imgY + cell_padding,\n imgWidth - cell_padding * 2,\n imgHeight - cell_padding * 2\n )\n if (!compact_mode) {\n // rectangle cell and border line style\n ctx.strokeStyle = '#8F8F8F'\n ctx.lineWidth = 1\n ctx.strokeRect(\n x + cell_padding,\n y + cell_padding,\n cellWidth - cell_padding * 2,\n cellHeight - cell_padding * 2\n )\n }\n\n ctx.filter = 'none'\n }\n\n if (!anyHovered) {\n this.pointerDown = null\n this.overIndex = null\n }\n } else {\n // Draw individual\n let w = this.imgs[imageIndex].naturalWidth\n let h = this.imgs[imageIndex].naturalHeight\n\n const scaleX = dw / w\n const scaleY = dh / h\n const scale = Math.min(scaleX, scaleY, 1)\n\n w *= scale\n h *= scale\n\n let x = (dw - w) / 2\n let y = (dh - h) / 2 + shiftY\n ctx.drawImage(this.imgs[imageIndex], x, y, w, h)\n\n const drawButton = (x, y, sz, text) => {\n const hovered = LiteGraph.isInsideRectangle(\n mouse[0],\n mouse[1],\n x + this.pos[0],\n y + this.pos[1],\n sz,\n sz\n )\n let fill = '#333'\n let textFill = '#fff'\n let isClicking = false\n if (hovered) {\n canvas.canvas.style.cursor = 'pointer'\n if (canvas.pointer_is_down) {\n fill = '#1e90ff'\n isClicking = true\n } else {\n fill = '#eee'\n textFill = '#000'\n }\n } else {\n this.pointerWasDown = null\n }\n\n ctx.fillStyle = fill\n ctx.beginPath()\n ctx.roundRect(x, y, sz, sz, [4])\n ctx.fill()\n ctx.fillStyle = textFill\n ctx.font = '12px Arial'\n ctx.textAlign = 'center'\n ctx.fillText(text, x + 15, y + 20)\n\n return isClicking\n }\n\n if (numImages > 1) {\n if (\n drawButton(\n dw - 40,\n dh + top - 40,\n 30,\n `${this.imageIndex + 1}/${numImages}`\n )\n ) {\n let i =\n this.imageIndex + 1 >= numImages ? 0 : this.imageIndex + 1\n if (!this.pointerDown || !this.pointerDown.index === i) {\n this.pointerDown = { index: i, pos: [...mouse] }\n }\n }\n\n if (drawButton(dw - 40, top + 10, 30, `x`)) {\n if (!this.pointerDown || !this.pointerDown.index === null) {\n this.pointerDown = { index: null, pos: [...mouse] }\n }\n }\n }\n }\n }\n }\n }\n\n node.prototype.onDrawBackground = function (ctx) {\n try {\n unsafeDrawBackground.call(this, ctx)\n } catch (error) {\n console.error('Error drawing node background', error)\n }\n }\n }\n\n /**\n * Adds a handler allowing drag+drop of files onto the window to load workflows\n */\n #addDropHandler() {\n // Get prompt from dropped PNG or json\n document.addEventListener('drop', async (event) => {\n event.preventDefault()\n event.stopPropagation()\n\n const n = this.dragOverNode\n this.dragOverNode = null\n // Node handles file drop, we dont use the built in onDropFile handler as its buggy\n // If you drag multiple files it will call it multiple times with the same file\n // @ts-expect-error This is not a standard event. TODO fix it.\n if (n && n.onDragDrop && (await n.onDragDrop(event))) {\n return\n }\n // Dragging from Chrome->Firefox there is a file but its a bmp, so ignore that\n if (\n event.dataTransfer.files.length &&\n event.dataTransfer.files[0].type !== 'image/bmp'\n ) {\n await this.handleFile(event.dataTransfer.files[0])\n } else {\n // Try loading the first URI in the transfer list\n const validTypes = ['text/uri-list', 'text/x-moz-url']\n const match = [...event.dataTransfer.types].find((t) =>\n validTypes.find((v) => t === v)\n )\n if (match) {\n const uri = event.dataTransfer.getData(match)?.split('\\n')?.[0]\n if (uri) {\n await this.handleFile(await (await fetch(uri)).blob())\n }\n }\n }\n })\n\n // Always clear over node on drag leave\n this.canvasEl.addEventListener('dragleave', async () => {\n if (this.dragOverNode) {\n this.dragOverNode = null\n this.graph.setDirtyCanvas(false, true)\n }\n })\n\n // Add handler for dropping onto a specific node\n this.canvasEl.addEventListener(\n 'dragover',\n (e) => {\n this.canvas.adjustMouseEvent(e)\n // @ts-expect-error: canvasX and canvasY are added by adjustMouseEvent in litegraph\n const node = this.graph.getNodeOnPos(e.canvasX, e.canvasY)\n if (node) {\n // @ts-expect-error This is not a standard event. TODO fix it.\n if (node.onDragOver && node.onDragOver(e)) {\n this.dragOverNode = node\n\n // dragover event is fired very frequently, run this on an animation frame\n requestAnimationFrame(() => {\n this.graph.setDirtyCanvas(false, true)\n })\n return\n }\n }\n this.dragOverNode = null\n },\n false\n )\n }\n\n /**\n * Adds a handler on paste that extracts and loads images or workflows from pasted JSON data\n */\n #addPasteHandler() {\n document.addEventListener('paste', async (e: ClipboardEvent) => {\n // ctrl+shift+v is used to paste nodes with connections\n // this is handled by litegraph\n if (this.shiftDown) return\n\n // @ts-expect-error: Property 'clipboardData' does not exist on type 'Window & typeof globalThis'.\n // Did you mean 'Clipboard'?ts(2551)\n // TODO: Not sure what the code wants to do.\n let data = e.clipboardData || window.clipboardData\n const items = data.items\n\n // Look for image paste data\n for (const item of items) {\n if (item.type.startsWith('image/')) {\n var imageNode = null\n\n // If an image node is selected, paste into it\n if (\n this.canvas.current_node &&\n this.canvas.current_node.is_selected &&\n ComfyApp.isImageNode(this.canvas.current_node)\n ) {\n imageNode = this.canvas.current_node\n }\n\n // No image node selected: add a new one\n if (!imageNode) {\n const newNode = LiteGraph.createNode('LoadImage')\n // @ts-expect-error array to Float32Array\n newNode.pos = [...this.canvas.graph_mouse]\n imageNode = this.graph.add(newNode)\n this.graph.change()\n }\n const blob = item.getAsFile()\n imageNode.pasteFile(blob)\n return\n }\n }\n\n // No image found. Look for node data\n data = data.getData('text/plain')\n let workflow: ComfyWorkflowJSON | null = null\n try {\n data = data.slice(data.indexOf('{'))\n workflow = JSON.parse(data)\n } catch (err) {\n try {\n data = data.slice(data.indexOf('workflow\\n'))\n data = data.slice(data.indexOf('{'))\n workflow = JSON.parse(data)\n } catch (error) {\n workflow = null\n }\n }\n\n if (workflow && workflow.version && workflow.nodes && workflow.extra) {\n await this.loadGraphData(workflow)\n } else {\n if (\n (e.target instanceof HTMLTextAreaElement &&\n e.target.type === 'textarea') ||\n (e.target instanceof HTMLInputElement && e.target.type === 'text')\n ) {\n return\n }\n\n // Litegraph default paste\n this.canvas.pasteFromClipboard()\n }\n })\n }\n\n /**\n * Adds a handler on copy that serializes selected nodes to JSON\n */\n #addCopyHandler() {\n document.addEventListener('copy', (e) => {\n if (!(e.target instanceof Element)) {\n return\n }\n if (\n (e.target instanceof HTMLTextAreaElement &&\n e.target.type === 'textarea') ||\n (e.target instanceof HTMLInputElement && e.target.type === 'text')\n ) {\n // Default system copy\n return\n }\n const isTargetInGraph =\n e.target.classList.contains('litegraph') ||\n e.target.classList.contains('graph-canvas-container')\n\n // copy nodes and clear clipboard\n if (isTargetInGraph && this.canvas.selected_nodes) {\n this.canvas.copyToClipboard()\n e.clipboardData.setData('text', ' ') //clearData doesn't remove images from clipboard\n e.preventDefault()\n e.stopImmediatePropagation()\n return false\n }\n })\n }\n\n /**\n * Handle mouse\n *\n * Move group by header\n */\n #addProcessMouseHandler() {\n const self = this\n\n const origProcessMouseDown = LGraphCanvas.prototype.processMouseDown\n LGraphCanvas.prototype.processMouseDown = function (e) {\n // prepare for ctrl+shift drag: zoom start\n if (e.ctrlKey && e.shiftKey && e.buttons) {\n self.zoom_drag_start = [e.x, e.y, this.ds.scale]\n return\n }\n\n const res = origProcessMouseDown.apply(this, arguments)\n return res\n }\n const origProcessMouseMove = LGraphCanvas.prototype.processMouseMove\n LGraphCanvas.prototype.processMouseMove = function (e) {\n // handle ctrl+shift drag\n if (e.ctrlKey && e.shiftKey && self.zoom_drag_start) {\n // stop canvas zoom action\n if (!e.buttons) {\n self.zoom_drag_start = null\n return\n }\n\n // calculate delta\n let deltaY = e.y - self.zoom_drag_start[1]\n let startScale = self.zoom_drag_start[2]\n\n let scale = startScale - deltaY / 100\n\n this.ds.changeScale(scale, [\n self.zoom_drag_start[0],\n self.zoom_drag_start[1]\n ])\n this.graph.change()\n\n return\n }\n\n return origProcessMouseMove.apply(this, arguments)\n }\n }\n\n /**\n * Handle keypress\n */\n #addProcessKeyHandler() {\n const origProcessKey = LGraphCanvas.prototype.processKey\n LGraphCanvas.prototype.processKey = function (e: KeyboardEvent) {\n if (!this.graph) {\n return\n }\n\n var block_default = false\n\n if (e.target instanceof Element && e.target.localName == 'input') {\n return\n }\n\n if (e.type == 'keydown' && !e.repeat) {\n const keyCombo = KeyComboImpl.fromEvent(e)\n const keybindingStore = useKeybindingStore()\n const keybinding = keybindingStore.getKeybinding(keyCombo)\n if (keybinding && keybinding.targetSelector === '#graph-canvas') {\n useCommandStore().execute(keybinding.commandId)\n block_default = true\n }\n\n // Ctrl+C Copy\n if (e.key === 'c' && (e.metaKey || e.ctrlKey)) {\n // Trigger onCopy\n return true\n }\n\n // Ctrl+V Paste\n if (\n (e.key === 'v' || e.key == 'V') &&\n (e.metaKey || e.ctrlKey) &&\n !e.shiftKey\n ) {\n // Trigger onPaste\n return true\n }\n }\n\n this.graph.change()\n\n if (block_default) {\n e.preventDefault()\n e.stopImmediatePropagation()\n return false\n }\n\n // Fall through to Litegraph defaults\n return origProcessKey.apply(this, arguments)\n }\n }\n\n /**\n * Draws group header bar\n */\n #addDrawGroupsHandler() {\n const self = this\n const origDrawGroups = LGraphCanvas.prototype.drawGroups\n LGraphCanvas.prototype.drawGroups = function (canvas, ctx) {\n if (!this.graph) {\n return\n }\n\n var groups = this.graph.groups\n\n ctx.save()\n ctx.globalAlpha = 0.7 * this.editor_alpha\n\n for (var i = 0; i < groups.length; ++i) {\n var group = groups[i]\n\n if (!LiteGraph.overlapBounding(this.visible_area, group._bounding)) {\n continue\n } //out of the visible area\n\n ctx.fillStyle = group.color || '#335'\n ctx.strokeStyle = group.color || '#335'\n var pos = group._pos\n var size = group._size\n ctx.globalAlpha = 0.25 * this.editor_alpha\n ctx.beginPath()\n var font_size = group.font_size || LiteGraph.DEFAULT_GROUP_FONT_SIZE\n ctx.rect(pos[0] + 0.5, pos[1] + 0.5, size[0], font_size * 1.4)\n ctx.fill()\n ctx.globalAlpha = this.editor_alpha\n }\n\n ctx.restore()\n\n const res = origDrawGroups.apply(this, arguments)\n return res\n }\n }\n\n /**\n * Draws node highlights (executing, drag drop) and progress bar\n */\n #addDrawNodeHandler() {\n const origDrawNodeShape = LGraphCanvas.prototype.drawNodeShape\n const self = this\n LGraphCanvas.prototype.drawNodeShape = function (\n node,\n ctx,\n size,\n fgcolor,\n bgcolor,\n selected\n ) {\n const res = origDrawNodeShape.apply(this, arguments)\n\n const nodeErrors = self.lastNodeErrors?.[node.id]\n\n let color = null\n let lineWidth = 1\n if (node.id === +self.runningNodeId) {\n color = '#0f0'\n } else if (self.dragOverNode && node.id === self.dragOverNode.id) {\n color = 'dodgerblue'\n } else if (nodeErrors?.errors) {\n color = 'red'\n lineWidth = 2\n } else if (\n self.lastExecutionError &&\n +self.lastExecutionError.node_id === node.id\n ) {\n color = '#f0f'\n lineWidth = 2\n }\n\n if (color) {\n const shape =\n node._shape || node.constructor.shape || LiteGraph.ROUND_SHAPE\n ctx.lineWidth = lineWidth\n ctx.globalAlpha = 0.8\n ctx.beginPath()\n if (shape == LiteGraph.BOX_SHAPE)\n ctx.rect(\n -6,\n -6 - LiteGraph.NODE_TITLE_HEIGHT,\n 12 + size[0] + 1,\n 12 + size[1] + LiteGraph.NODE_TITLE_HEIGHT\n )\n else if (\n shape == LiteGraph.ROUND_SHAPE ||\n (shape == LiteGraph.CARD_SHAPE && node.flags.collapsed)\n )\n ctx.roundRect(\n -6,\n -6 - LiteGraph.NODE_TITLE_HEIGHT,\n 12 + size[0] + 1,\n 12 + size[1] + LiteGraph.NODE_TITLE_HEIGHT,\n this.round_radius * 2\n )\n else if (shape == LiteGraph.CARD_SHAPE)\n ctx.roundRect(\n -6,\n -6 - LiteGraph.NODE_TITLE_HEIGHT,\n 12 + size[0] + 1,\n 12 + size[1] + LiteGraph.NODE_TITLE_HEIGHT,\n [this.round_radius * 2, this.round_radius * 2, 2, 2]\n )\n else if (shape == LiteGraph.CIRCLE_SHAPE)\n ctx.arc(\n size[0] * 0.5,\n size[1] * 0.5,\n size[0] * 0.5 + 6,\n 0,\n Math.PI * 2\n )\n ctx.strokeStyle = color\n ctx.stroke()\n ctx.strokeStyle = fgcolor\n ctx.globalAlpha = 1\n }\n\n if (self.progress && node.id === +self.runningNodeId) {\n ctx.fillStyle = 'green'\n ctx.fillRect(\n 0,\n 0,\n size[0] * (self.progress.value / self.progress.max),\n 6\n )\n ctx.fillStyle = bgcolor\n }\n\n // Highlight inputs that failed validation\n if (nodeErrors) {\n ctx.lineWidth = 2\n ctx.strokeStyle = 'red'\n for (const error of nodeErrors.errors) {\n if (error.extra_info && error.extra_info.input_name) {\n const inputIndex = node.findInputSlot(error.extra_info.input_name)\n if (inputIndex !== -1) {\n let pos = node.getConnectionPos(true, inputIndex)\n ctx.beginPath()\n ctx.arc(\n pos[0] - node.pos[0],\n pos[1] - node.pos[1],\n 12,\n 0,\n 2 * Math.PI,\n false\n )\n ctx.stroke()\n }\n }\n }\n }\n\n return res\n }\n\n const origDrawNode = LGraphCanvas.prototype.drawNode\n LGraphCanvas.prototype.drawNode = function (node, ctx) {\n const editor_alpha = this.editor_alpha\n const old_color = node.color\n const old_bgcolor = node.bgcolor\n\n if (node.mode === 2) {\n // never\n this.editor_alpha = 0.4\n }\n\n // ComfyUI's custom node mode enum value 4 => bypass/never.\n let bgColor: string\n if (node.mode === 4) {\n // never\n bgColor = app.bypassBgColor\n this.editor_alpha = 0.2\n } else {\n bgColor = old_bgcolor || LiteGraph.NODE_DEFAULT_BGCOLOR\n }\n\n const adjustments: ColorAdjustOptions = {}\n\n const opacity = useSettingStore().get('Comfy.Node.Opacity')\n if (opacity) adjustments.opacity = opacity\n\n if (useSettingStore().get('Comfy.ColorPalette') === 'light') {\n adjustments.lightness = 0.5\n\n // Lighten title bar of colored nodes on light theme\n if (old_color) {\n node.color = adjustColor(old_color, { lightness: 0.5 })\n }\n }\n\n node.bgcolor = adjustColor(bgColor, adjustments)\n\n const res = origDrawNode.apply(this, arguments)\n\n this.editor_alpha = editor_alpha\n node.color = old_color\n node.bgcolor = old_bgcolor\n\n return res\n }\n }\n\n /**\n * Handles updates from the API socket\n */\n #addApiUpdateHandlers() {\n api.addEventListener(\n 'status',\n ({ detail }: CustomEvent) => {\n this.ui.setStatus(detail)\n }\n )\n\n api.addEventListener('progress', ({ detail }) => {\n this.progress = detail\n this.graph.setDirtyCanvas(true, false)\n })\n\n api.addEventListener('executing', ({ detail }) => {\n this.progress = null\n this.graph.setDirtyCanvas(true, false)\n delete this.nodePreviewImages[this.runningNodeId]\n })\n\n api.addEventListener('executed', ({ detail }) => {\n const output = this.nodeOutputs[detail.display_node || detail.node]\n if (detail.merge && output) {\n for (const k in detail.output ?? {}) {\n const v = output[k]\n if (v instanceof Array) {\n output[k] = v.concat(detail.output[k])\n } else {\n output[k] = detail.output[k]\n }\n }\n } else {\n this.nodeOutputs[detail.display_node || detail.node] = detail.output\n }\n const node = this.graph.getNodeById(detail.display_node || detail.node)\n if (node) {\n if (node.onExecuted) node.onExecuted(detail.output)\n }\n })\n\n api.addEventListener('execution_start', ({ detail }) => {\n this.lastExecutionError = null\n this.graph.nodes.forEach((node) => {\n // @ts-expect-error\n if (node.onExecutionStart)\n // @ts-expect-error\n node.onExecutionStart()\n })\n })\n\n api.addEventListener('execution_error', ({ detail }) => {\n this.lastExecutionError = detail\n showExecutionErrorDialog(detail)\n this.canvas.draw(true, true)\n })\n\n api.addEventListener('b_preview', ({ detail }) => {\n const id = this.runningNodeId\n if (id == null) return\n\n const blob = detail\n const blobUrl = URL.createObjectURL(blob)\n // @ts-expect-error\n this.nodePreviewImages[id] = [blobUrl]\n })\n\n api.init()\n }\n\n #addConfigureHandler() {\n const app = this\n const configure = LGraph.prototype.configure\n // Flag that the graph is configuring to prevent nodes from running checks while its still loading\n LGraph.prototype.configure = function () {\n app.configuringGraph = true\n try {\n return configure.apply(this, arguments)\n } finally {\n app.configuringGraph = false\n }\n }\n }\n\n #addWidgetLinkHandling() {\n app.canvas.getWidgetLinkType = function (widget, node) {\n const nodeDefStore = useNodeDefStore()\n const nodeDef = nodeDefStore.nodeDefsByName[node.type]\n const input = nodeDef.input.getInput(widget.name)\n return input?.type\n }\n\n type ConnectingWidgetLink = {\n subType: 'connectingWidgetLink'\n widget: IWidget\n node: LGraphNode\n link: { node: LGraphNode; slot: number }\n }\n\n document.addEventListener(\n 'litegraph:canvas',\n async (e: CustomEvent) => {\n if (e.detail.subType === 'connectingWidgetLink') {\n const { convertToInput } = await import(\n '@/extensions/core/widgetInputs'\n )\n\n const { node, link, widget } = e.detail\n if (!node || !link || !widget) return\n\n const nodeData = node.constructor.nodeData\n if (!nodeData) return\n const all = {\n ...nodeData?.input?.required,\n ...nodeData?.input?.optional\n }\n const inputSpec = all[widget.name]\n if (!inputSpec) return\n\n const input = convertToInput(node, widget, inputSpec)\n if (!input) return\n\n const originNode = link.node\n\n originNode.connect(link.slot, node, node.inputs.lastIndexOf(input))\n }\n }\n )\n }\n\n #addAfterConfigureHandler() {\n const app = this\n const onConfigure = app.graph.onConfigure\n app.graph.onConfigure = function () {\n // Fire callbacks before the onConfigure, this is used by widget inputs to setup the config\n for (const node of app.graph.nodes) {\n node.onGraphConfigured?.()\n }\n\n const r = onConfigure?.apply(this, arguments)\n\n // Fire after onConfigure, used by primitives to generate widget using input nodes config\n for (const node of app.graph.nodes) {\n node.onAfterGraphConfigured?.()\n }\n\n return r\n }\n }\n\n /**\n * Loads all extensions from the API into the window in parallel\n */\n async #loadExtensions() {\n useExtensionStore().loadDisabledExtensionNames()\n\n const extensions = await api.getExtensions()\n this.logging.addEntry('Comfy.App', 'debug', { Extensions: extensions })\n\n // Need to load core extensions first as some custom extensions\n // may depend on them.\n await import('../extensions/core/index')\n await Promise.all(\n extensions\n .filter((extension) => !extension.includes('extensions/core'))\n .map(async (ext) => {\n try {\n await import(/* @vite-ignore */ api.fileURL(ext))\n } catch (error) {\n console.error('Error loading extension', ext, error)\n }\n })\n )\n }\n\n async #migrateSettings() {\n this.isNewUserSession = true\n // Store all current settings\n const settings = Object.keys(this.ui.settings).reduce((p, n) => {\n const v = localStorage[`Comfy.Settings.${n}`]\n if (v) {\n try {\n p[n] = JSON.parse(v)\n } catch (error) {}\n }\n return p\n }, {})\n\n await api.storeSettings(settings)\n }\n\n async #setUser() {\n const userConfig = await api.getUserConfig()\n this.storageLocation = userConfig.storage\n if (typeof userConfig.migrated == 'boolean') {\n // Single user mode migrated true/false for if the default user is created\n if (!userConfig.migrated && this.storageLocation === 'server') {\n // Default user not created yet\n await this.#migrateSettings()\n }\n return\n }\n\n this.multiUserServer = true\n let user = localStorage['Comfy.userId']\n const users = userConfig.users ?? {}\n if (!user || !users[user]) {\n // Lift spinner / BlockUI for user selection.\n if (this.vueAppReady) useWorkspaceStore().spinner = false\n\n // This will rarely be hit so move the loading to on demand\n const { UserSelectionScreen } = await import('./ui/userSelection')\n\n this.ui.menuContainer.style.display = 'none'\n const { userId, username, created } =\n await new UserSelectionScreen().show(users, user)\n this.ui.menuContainer.style.display = ''\n\n user = userId\n localStorage['Comfy.userName'] = username\n localStorage['Comfy.userId'] = user\n\n if (created) {\n api.user = user\n await this.#migrateSettings()\n }\n }\n\n api.user = user\n\n this.ui.settings.addSetting({\n id: 'Comfy.SwitchUser',\n name: 'Switch User',\n type: (name) => {\n let currentUser = localStorage['Comfy.userName']\n if (currentUser) {\n currentUser = ` (${currentUser})`\n }\n return $el('tr', [\n $el('td', [\n $el('label', {\n textContent: name\n })\n ]),\n $el('td', [\n $el('button', {\n textContent: name + (currentUser ?? ''),\n onclick: () => {\n delete localStorage['Comfy.userId']\n delete localStorage['Comfy.userName']\n window.location.reload()\n }\n })\n ])\n ])\n },\n // TODO: Is that the correct default value?\n defaultValue: undefined\n })\n }\n\n /**\n * Set up the app on the page\n */\n async setup(canvasEl: HTMLCanvasElement) {\n this.canvasEl = canvasEl\n // Show menu container for GraphView.\n this.ui.menuContainer.style.display = 'block'\n await this.#setUser()\n\n this.resizeCanvas()\n\n await Promise.all([\n useWorkspaceStore().workflow.syncWorkflows(),\n this.ui.settings.load()\n ])\n await this.#loadExtensions()\n\n this.#addProcessMouseHandler()\n this.#addProcessKeyHandler()\n this.#addConfigureHandler()\n this.#addApiUpdateHandlers()\n this.#addRestoreWorkflowView()\n\n this.graph = new LGraph()\n\n this.#addAfterConfigureHandler()\n\n // Make LGraphCanvas.state shallow reactive so that any change on the root\n // object triggers reactivity.\n this.canvas = new LGraphCanvas(canvasEl, this.graph)\n this.canvas.state = shallowReactive(this.canvas.state)\n\n this.ctx = canvasEl.getContext('2d')\n\n LiteGraph.alt_drag_do_clone_nodes = true\n\n this.graph.start()\n\n // Ensure the canvas fills the window\n this.resizeCanvas()\n window.addEventListener('resize', () => this.resizeCanvas())\n const ro = new ResizeObserver(() => this.resizeCanvas())\n ro.observe(this.bodyTop)\n ro.observe(this.bodyLeft)\n ro.observe(this.bodyRight)\n ro.observe(this.bodyBottom)\n\n await this.#invokeExtensionsAsync('init')\n await this.registerNodes()\n initWidgets(this)\n\n // Load previous workflow\n let restored = false\n try {\n const loadWorkflow = async (json) => {\n if (json) {\n const workflow = JSON.parse(json)\n const workflowName = getStorageValue('Comfy.PreviousWorkflow')\n await this.loadGraphData(workflow, true, true, workflowName)\n return true\n }\n }\n const clientId = api.initialClientId ?? api.clientId\n restored =\n (clientId &&\n (await loadWorkflow(\n sessionStorage.getItem(`workflow:${clientId}`)\n ))) ||\n (await loadWorkflow(localStorage.getItem('workflow')))\n } catch (err) {\n console.error('Error loading previous workflow', err)\n }\n\n // We failed to restore a workflow so load the default\n if (!restored) {\n await this.loadGraphData()\n }\n\n // Save current workflow automatically\n setInterval(() => {\n const workflow = JSON.stringify(this.serializeGraph())\n localStorage.setItem('workflow', workflow)\n if (api.clientId) {\n sessionStorage.setItem(`workflow:${api.clientId}`, workflow)\n }\n }, 1000)\n\n this.#addDrawNodeHandler()\n this.#addDrawGroupsHandler()\n this.#addDropHandler()\n this.#addCopyHandler()\n this.#addPasteHandler()\n this.#addWidgetLinkHandling()\n\n await this.#invokeExtensionsAsync('setup')\n }\n\n resizeCanvas() {\n // Limit minimal scale to 1, see https://github.com/comfyanonymous/ComfyUI/pull/845\n const scale = Math.max(window.devicePixelRatio, 1)\n\n // Clear fixed width and height while calculating rect so it uses 100% instead\n this.canvasEl.height = this.canvasEl.width = NaN\n const { width, height } = this.canvasEl.getBoundingClientRect()\n this.canvasEl.width = Math.round(width * scale)\n this.canvasEl.height = Math.round(height * scale)\n this.canvasEl.getContext('2d').scale(scale, scale)\n this.canvas?.draw(true, true)\n }\n\n private updateVueAppNodeDefs(defs: Record) {\n // Frontend only nodes registered by custom nodes.\n // Example: https://github.com/rgthree/rgthree-comfy/blob/dd534e5384be8cf0c0fa35865afe2126ba75ac55/src_web/comfyui/fast_groups_bypasser.ts#L10\n const rawDefs = Object.fromEntries(\n Object.entries(LiteGraph.registered_node_types).map(([name, node]) => [\n name,\n {\n name,\n display_name: name,\n category: node.category || '__frontend_only__',\n input: { required: {}, optional: {} },\n output: [],\n output_name: [],\n output_is_list: [],\n python_module: 'custom_nodes.frontend_only',\n description: `Frontend only node for ${name}`\n }\n ])\n )\n\n const allNodeDefs = {\n ...rawDefs,\n ...defs,\n ...SYSTEM_NODE_DEFS\n }\n\n const nodeDefStore = useNodeDefStore()\n const nodeDefArray: ComfyNodeDef[] = Object.values(allNodeDefs)\n this.#invokeExtensions('beforeRegisterVueAppNodeDefs', nodeDefArray, this)\n nodeDefStore.updateNodeDefs(nodeDefArray)\n }\n\n /**\n * Registers nodes with the graph\n */\n async registerNodes() {\n // Load node definitions from the backend\n const defs = await api.getNodeDefs({\n validate: useSettingStore().get('Comfy.Validation.NodeDefs')\n })\n await this.registerNodesFromDefs(defs)\n await this.#invokeExtensionsAsync('registerCustomNodes')\n if (this.vueAppReady) {\n this.updateVueAppNodeDefs(defs)\n }\n }\n\n /**\n * Remove the impl after groupNode jest tests are removed.\n * @deprecated Use useWidgetStore().getWidgetType instead\n */\n getWidgetType(inputData, inputName: string) {\n const type = inputData[0]\n\n if (Array.isArray(type)) {\n return 'COMBO'\n } else if (`${type}:${inputName}` in this.widgets) {\n return `${type}:${inputName}`\n } else if (type in this.widgets) {\n return type\n } else {\n return null\n }\n }\n\n async registerNodeDef(nodeId: string, nodeData: ComfyNodeDef) {\n const self = this\n const node = class ComfyNode extends LGraphNode {\n static comfyClass? = nodeData.name\n // TODO: change to \"title?\" once litegraph.d.ts has been updated\n static title = nodeData.display_name || nodeData.name\n static nodeData? = nodeData\n static category?: string\n\n constructor(title?: string) {\n super(title)\n const requiredInputs = nodeData.input.required\n\n var inputs = nodeData['input']['required']\n if (nodeData['input']['optional'] != undefined) {\n inputs = Object.assign(\n {},\n nodeData['input']['required'],\n nodeData['input']['optional']\n )\n }\n const config: {\n minWidth: number\n minHeight: number\n widget?: IBaseWidget\n } = { minWidth: 1, minHeight: 1 }\n for (const inputName in inputs) {\n const _inputData = inputs[inputName]\n const type = _inputData[0]\n const options = _inputData[1] ?? {}\n const inputData = [type, options]\n\n const inputIsRequired = requiredInputs && inputName in requiredInputs\n\n let widgetCreated = true\n const widgetType = self.getWidgetType(inputData, inputName)\n if (widgetType) {\n if (widgetType === 'COMBO') {\n Object.assign(\n config,\n self.widgets.COMBO(this, inputName, inputData, app) || {}\n )\n } else {\n Object.assign(\n config,\n self.widgets[widgetType](this, inputName, inputData, app) || {}\n )\n }\n } else {\n // Node connection inputs\n const inputOptions = inputIsRequired\n ? {}\n : { shape: LiteGraph.SlotShape.HollowCircle }\n this.addInput(inputName, type, inputOptions)\n widgetCreated = false\n }\n\n if (widgetCreated && config?.widget) {\n config.widget.options ??= {}\n if (!inputIsRequired) {\n config.widget.options.inputIsOptional = true\n }\n if (inputData[1]?.forceInput) {\n config.widget.options.forceInput = true\n }\n if (inputData[1]?.defaultInput) {\n config.widget.options.defaultInput = true\n }\n if (inputData[1]?.advanced) {\n config.widget.advanced = true\n }\n if (inputData[1]?.hidden) {\n config.widget.hidden = true\n }\n }\n }\n\n for (const o in nodeData['output']) {\n let output = nodeData['output'][o]\n if (output instanceof Array) output = 'COMBO'\n const outputName = nodeData['output_name'][o] || output\n const outputIsList = nodeData['output_is_list'][o]\n const outputOptions = outputIsList\n ? { shape: LiteGraph.GRID_SHAPE }\n : {}\n this.addOutput(outputName, output, outputOptions)\n }\n\n const s = this.computeSize()\n s[0] = Math.max(config.minWidth, s[0] * 1.5)\n s[1] = Math.max(config.minHeight, s[1])\n this.size = s\n this.serialize_widgets = true\n\n app.#invokeExtensionsAsync('nodeCreated', this)\n }\n\n configure(data: any) {\n // Keep 'name', 'type', and 'shape' information from the original node definition.\n const merge = (\n current: Record,\n incoming: Record\n ) => {\n const result = { ...incoming }\n if (current.widget === undefined && incoming.widget !== undefined) {\n // Field must be input as only inputs can be converted\n this.inputs.push(current as INodeInputSlot)\n return incoming\n }\n for (const key of ['name', 'type', 'shape']) {\n if (current[key] !== undefined) {\n result[key] = current[key]\n }\n }\n return result\n }\n for (const field of ['inputs', 'outputs']) {\n const slots = data[field] ?? []\n data[field] = slots.map((slot, i) =>\n merge(this[field][i] ?? {}, slot)\n )\n }\n super.configure(data)\n }\n }\n node.prototype.comfyClass = nodeData.name\n\n this.#addNodeContextMenuHandler(node)\n this.#addDrawBackgroundHandler(node)\n this.#addNodeKeyHandler(node)\n\n await this.#invokeExtensionsAsync('beforeRegisterNodeDef', node, nodeData)\n LiteGraph.registerNodeType(nodeId, node)\n // Note: Do not move this to the class definition, it will be overwritten\n node.category = nodeData.category\n }\n\n async registerNodesFromDefs(defs: Record) {\n await this.#invokeExtensionsAsync('addCustomNodeDefs', defs)\n\n // Register a node for each definition\n for (const nodeId in defs) {\n this.registerNodeDef(nodeId, defs[nodeId])\n }\n }\n\n loadTemplateData(templateData) {\n if (!templateData?.templates) {\n return\n }\n\n const old = localStorage.getItem('litegrapheditor_clipboard')\n\n var maxY, nodeBottom, node\n\n for (const template of templateData.templates) {\n if (!template?.data) {\n continue\n }\n\n // Check for old clipboard format\n const data = JSON.parse(template.data)\n if (!data.reroutes) {\n deserialiseAndCreate(template.data, app.canvas)\n } else {\n localStorage.setItem('litegrapheditor_clipboard', template.data)\n app.canvas.pasteFromClipboard()\n }\n\n // Move mouse position down to paste the next template below\n\n maxY = false\n\n for (const i in app.canvas.selected_nodes) {\n node = app.canvas.selected_nodes[i]\n\n nodeBottom = node.pos[1] + node.size[1]\n\n if (maxY === false || nodeBottom > maxY) {\n maxY = nodeBottom\n }\n }\n\n app.canvas.graph_mouse[1] = maxY + 50\n }\n\n localStorage.setItem('litegrapheditor_clipboard', old)\n }\n\n #showMissingNodesError(missingNodeTypes: MissingNodeType[]) {\n if (useSettingStore().get('Comfy.Workflow.ShowMissingNodesWarning')) {\n showLoadWorkflowWarning({ missingNodeTypes })\n }\n\n this.logging.addEntry('Comfy.App', 'warn', {\n MissingNodes: missingNodeTypes\n })\n }\n\n #showMissingModelsError(missingModels, paths) {\n if (useSettingStore().get('Comfy.Workflow.ShowMissingModelsWarning')) {\n showMissingModelsWarning({\n missingModels,\n paths\n })\n }\n\n this.logging.addEntry('Comfy.App', 'warn', {\n MissingModels: missingModels\n })\n }\n\n async loadGraphData(\n graphData?: ComfyWorkflowJSON,\n clean: boolean = true,\n restore_view: boolean = true,\n workflow: string | null | ComfyWorkflow = null,\n { showMissingNodesDialog = true, showMissingModelsDialog = true } = {}\n ) {\n if (clean !== false) {\n this.clean()\n }\n\n let reset_invalid_values = false\n if (!graphData) {\n graphData = defaultGraph\n reset_invalid_values = true\n }\n\n if (typeof structuredClone === 'undefined') {\n graphData = JSON.parse(JSON.stringify(graphData))\n } else {\n graphData = structuredClone(graphData)\n }\n\n if (useSettingStore().get('Comfy.Validation.Workflows')) {\n // TODO: Show validation error in a dialog.\n const validatedGraphData = await validateComfyWorkflow(\n graphData,\n /* onError=*/ (err) => {\n useToastStore().addAlert(err)\n }\n )\n // If the validation failed, use the original graph data.\n // Ideally we should not block users from loading the workflow.\n graphData = validatedGraphData ?? graphData\n }\n\n workflowService.beforeLoadNewGraph()\n\n const missingNodeTypes: MissingNodeType[] = []\n const missingModels = []\n await this.#invokeExtensionsAsync(\n 'beforeConfigureGraph',\n graphData,\n missingNodeTypes\n // TODO: missingModels\n )\n for (let n of graphData.nodes) {\n // Patch T2IAdapterLoader to ControlNetLoader since they are the same node now\n if (n.type == 'T2IAdapterLoader') n.type = 'ControlNetLoader'\n if (n.type == 'ConditioningAverage ') n.type = 'ConditioningAverage' //typo fix\n if (n.type == 'SDV_img2vid_Conditioning')\n n.type = 'SVD_img2vid_Conditioning' //typo fix\n\n // Find missing node types\n if (!(n.type in LiteGraph.registered_node_types)) {\n missingNodeTypes.push(n.type)\n n.type = sanitizeNodeName(n.type)\n }\n }\n if (\n graphData.models &&\n useSettingStore().get('Comfy.Workflow.ShowMissingModelsWarning')\n ) {\n for (const m of graphData.models) {\n const models_available = await useModelStore().getLoadedModelFolder(\n m.directory\n )\n if (models_available === null) {\n // @ts-expect-error\n m.directory_invalid = true\n missingModels.push(m)\n } else if (!(m.name in models_available.models)) {\n missingModels.push(m)\n }\n }\n }\n\n try {\n // @ts-expect-error Discrepancies between zod and litegraph - in progress\n this.graph.configure(graphData)\n if (\n restore_view &&\n this.enableWorkflowViewRestore.value &&\n graphData.extra?.ds\n ) {\n // @ts-expect-error\n // Need to set strict: true for zod to match the type [number, number]\n // https://github.com/colinhacks/zod/issues/3056\n this.canvas.ds.offset = graphData.extra.ds.offset\n this.canvas.ds.scale = graphData.extra.ds.scale\n }\n } catch (error) {\n let errorHint = []\n // Try extracting filename to see if it was caused by an extension script\n const filename =\n error.fileName ||\n (error.stack || '').match(/(\\/extensions\\/.*\\.js)/)?.[1]\n const pos = (filename || '').indexOf('/extensions/')\n if (pos > -1) {\n errorHint.push(\n $el('span', {\n textContent: 'This may be due to the following script:'\n }),\n $el('br'),\n $el('span', {\n style: {\n fontWeight: 'bold'\n },\n textContent: filename.substring(pos)\n })\n )\n }\n\n // Show dialog to let the user know something went wrong loading the data\n this.ui.dialog.show(\n $el('div', [\n $el('p', {\n textContent: 'Loading aborted due to error reloading workflow data'\n }),\n $el('pre', {\n style: { padding: '5px', backgroundColor: 'rgba(255,0,0,0.2)' },\n textContent: error.toString()\n }),\n $el('pre', {\n style: {\n padding: '5px',\n color: '#ccc',\n fontSize: '10px',\n maxHeight: '50vh',\n overflow: 'auto',\n backgroundColor: 'rgba(0,0,0,0.2)'\n },\n textContent: error.stack || 'No stacktrace available'\n }),\n ...errorHint\n ]).outerHTML\n )\n\n return\n }\n for (const node of this.graph.nodes) {\n const size = node.computeSize()\n size[0] = Math.max(node.size[0], size[0])\n size[1] = Math.max(node.size[1], size[1])\n node.size = size\n if (node.widgets) {\n // If you break something in the backend and want to patch workflows in the frontend\n // This is the place to do this\n for (let widget of node.widgets) {\n if (node.type == 'KSampler' || node.type == 'KSamplerAdvanced') {\n if (widget.name == 'sampler_name') {\n if (\n typeof widget.value === 'string' &&\n widget.value.startsWith('sample_')\n ) {\n widget.value = widget.value.slice(7)\n }\n }\n }\n if (\n node.type == 'KSampler' ||\n node.type == 'KSamplerAdvanced' ||\n node.type == 'PrimitiveNode'\n ) {\n if (widget.name == 'control_after_generate') {\n if (widget.value === true) {\n // @ts-expect-error change widget type from boolean to string\n widget.value = 'randomize'\n } else if (widget.value === false) {\n // @ts-expect-error change widget type from boolean to string\n widget.value = 'fixed'\n }\n }\n }\n if (reset_invalid_values) {\n if (widget.type == 'combo') {\n if (\n !widget.options.values.includes(widget.value as string) &&\n widget.options.values.length > 0\n ) {\n widget.value = widget.options.values[0]\n }\n }\n }\n }\n }\n\n this.#invokeExtensions('loadedGraphNode', node)\n }\n\n // TODO: Properly handle if both nodes and models are missing (sequential dialogs?)\n if (missingNodeTypes.length && showMissingNodesDialog) {\n this.#showMissingNodesError(missingNodeTypes)\n }\n if (missingModels.length && showMissingModelsDialog) {\n const paths = await api.getFolderPaths()\n this.#showMissingModelsError(missingModels, paths)\n }\n await this.#invokeExtensionsAsync('afterConfigureGraph', missingNodeTypes)\n // @ts-expect-error zod types issue. Will be fixed after we enable ts-strict\n await workflowService.afterLoadNewGraph(workflow, this.graph.serialize())\n requestAnimationFrame(() => {\n this.graph.setDirtyCanvas(true, true)\n })\n }\n\n /**\n * Serializes a graph using preferred user settings.\n * @param graph The litegraph to serialize.\n * @returns A serialized graph (aka workflow) with preferred user settings.\n */\n serializeGraph(graph: LGraph = this.graph) {\n const sortNodes = useSettingStore().get('Comfy.Workflow.SortNodeIdOnSave')\n return graph.serialize({ sortNodes })\n }\n\n /**\n * Converts the current graph workflow for sending to the API.\n * Note: Node widgets are updated before serialization to prepare queueing.\n * @returns The workflow and node links\n */\n async graphToPrompt(graph = this.graph, clean = true) {\n for (const outerNode of this.graph.computeExecutionOrder(false)) {\n if (outerNode.widgets) {\n for (const widget of outerNode.widgets) {\n // Allow widgets to run callbacks before a prompt has been queued\n // e.g. random seed before every gen\n widget.beforeQueued?.()\n }\n }\n\n const innerNodes = outerNode['getInnerNodes']\n ? outerNode['getInnerNodes']()\n : [outerNode]\n for (const node of innerNodes) {\n if (node.isVirtualNode) {\n // Don't serialize frontend only nodes but let them make changes\n if (node.applyToGraph) {\n node.applyToGraph()\n }\n }\n }\n }\n\n const workflow = this.serializeGraph(graph)\n const output = {}\n // Process nodes in order of execution\n for (const outerNode of graph.computeExecutionOrder(false)) {\n const skipNode = outerNode.mode === 2 || outerNode.mode === 4\n const innerNodes =\n !skipNode && outerNode['getInnerNodes']\n ? outerNode['getInnerNodes']()\n : [outerNode]\n for (const node of innerNodes) {\n if (node.isVirtualNode) {\n continue\n }\n\n if (node.mode === 2 || node.mode === 4) {\n // Don't serialize muted nodes\n continue\n }\n\n const inputs = {}\n const widgets = node.widgets\n\n // Store all widget values\n if (widgets) {\n for (const i in widgets) {\n const widget = widgets[i]\n if (!widget.options || widget.options.serialize !== false) {\n inputs[widget.name] = widget.serializeValue\n ? await widget.serializeValue(node, i)\n : widget.value\n }\n }\n }\n\n // Store all node links\n for (let i in node.inputs) {\n let parent = node.getInputNode(i)\n if (parent) {\n let link = node.getInputLink(i)\n while (parent.mode === 4 || parent.isVirtualNode) {\n let found = false\n if (parent.isVirtualNode) {\n link = parent.getInputLink(link.origin_slot)\n if (link) {\n parent = parent.getInputNode(link.target_slot)\n if (parent) {\n found = true\n }\n }\n } else if (link && parent.mode === 4) {\n let all_inputs = [link.origin_slot]\n if (parent.inputs) {\n all_inputs = all_inputs.concat(Object.keys(parent.inputs))\n for (let parent_input in all_inputs) {\n parent_input = all_inputs[parent_input]\n if (\n parent.inputs[parent_input]?.type === node.inputs[i].type\n ) {\n link = parent.getInputLink(parent_input)\n if (link) {\n parent = parent.getInputNode(parent_input)\n }\n found = true\n break\n }\n }\n }\n }\n\n if (!found) {\n break\n }\n }\n\n if (link) {\n if (parent?.updateLink) {\n link = parent.updateLink(link)\n }\n if (link) {\n inputs[node.inputs[i].name] = [\n String(link.origin_id),\n parseInt(link.origin_slot)\n ]\n }\n }\n }\n }\n\n let node_data = {\n inputs,\n class_type: node.comfyClass\n }\n\n if (this.ui.settings.getSettingValue('Comfy.DevMode')) {\n // Ignored by the backend.\n node_data['_meta'] = {\n title: node.title\n }\n }\n\n output[String(node.id)] = node_data\n }\n }\n\n // Remove inputs connected to removed nodes\n if (clean) {\n for (const o in output) {\n for (const i in output[o].inputs) {\n if (\n Array.isArray(output[o].inputs[i]) &&\n output[o].inputs[i].length === 2 &&\n !output[output[o].inputs[i][0]]\n ) {\n delete output[o].inputs[i]\n }\n }\n }\n }\n\n return { workflow, output }\n }\n\n #formatPromptError(error) {\n if (error == null) {\n return '(unknown error)'\n } else if (typeof error === 'string') {\n return error\n } else if (error.stack && error.message) {\n return error.toString()\n } else if (error.response) {\n let message = error.response.error.message\n if (error.response.error.details)\n message += ': ' + error.response.error.details\n for (const [nodeID, nodeError] of Object.entries(\n error.response.node_errors\n )) {\n // @ts-expect-error\n message += '\\n' + nodeError.class_type + ':'\n // @ts-expect-error\n for (const errorReason of nodeError.errors) {\n message +=\n '\\n - ' + errorReason.message + ': ' + errorReason.details\n }\n }\n return message\n }\n return '(unknown error)'\n }\n\n async queuePrompt(number, batchCount = 1) {\n this.#queueItems.push({ number, batchCount })\n\n // Only have one action process the items so each one gets a unique seed correctly\n if (this.#processingQueue) {\n return\n }\n\n this.#processingQueue = true\n this.lastNodeErrors = null\n\n try {\n while (this.#queueItems.length) {\n ;({ number, batchCount } = this.#queueItems.pop())\n\n for (let i = 0; i < batchCount; i++) {\n const p = await this.graphToPrompt()\n\n try {\n // @ts-expect-error Discrepancies between zod and litegraph - in progress\n const res = await api.queuePrompt(number, p)\n this.lastNodeErrors = res.node_errors\n if (this.lastNodeErrors.length > 0) {\n this.canvas.draw(true, true)\n } else {\n try {\n useExecutionStore().storePrompt({\n id: res.prompt_id,\n nodes: Object.keys(p.output),\n workflow: useWorkspaceStore().workflow\n .activeWorkflow as ComfyWorkflow\n })\n } catch (error) {}\n }\n } catch (error) {\n const formattedError = this.#formatPromptError(error)\n this.ui.dialog.show(formattedError)\n if (error.response) {\n this.lastNodeErrors = error.response.node_errors\n this.canvas.draw(true, true)\n }\n break\n }\n\n for (const n of p.workflow.nodes) {\n const node = this.graph.getNodeById(n.id)\n if (node.widgets) {\n for (const widget of node.widgets) {\n // Allow widgets to run callbacks after a prompt has been queued\n // e.g. random seed after every gen\n // @ts-expect-error\n if (widget.afterQueued) {\n // @ts-expect-error\n widget.afterQueued()\n }\n }\n }\n }\n\n this.canvas.draw(true, true)\n await this.ui.queue.update()\n }\n }\n } finally {\n this.#processingQueue = false\n }\n api.dispatchEvent(\n new CustomEvent('promptQueued', { detail: { number, batchCount } })\n )\n return !this.lastNodeErrors\n }\n\n showErrorOnFileLoad(file) {\n this.ui.dialog.show(\n $el('div', [\n $el('p', { textContent: `Unable to find workflow in ${file.name}` })\n ]).outerHTML\n )\n }\n\n /**\n * Loads workflow data from the specified file\n * @param {File} file\n */\n async handleFile(file) {\n const removeExt = (f) => {\n if (!f) return f\n const p = f.lastIndexOf('.')\n if (p === -1) return f\n return f.substring(0, p)\n }\n const fileName = removeExt(file.name)\n if (file.type === 'image/png') {\n const pngInfo = await getPngMetadata(file)\n if (pngInfo?.workflow) {\n await this.loadGraphData(\n JSON.parse(pngInfo.workflow),\n true,\n true,\n fileName\n )\n } else if (pngInfo?.prompt) {\n this.loadApiJson(JSON.parse(pngInfo.prompt), fileName)\n } else if (pngInfo?.parameters) {\n // Note: Not putting this in `importA1111` as it is mostly not used\n // by external callers, and `importA1111` has no access to `app`.\n workflowService.beforeLoadNewGraph()\n importA1111(this.graph, pngInfo.parameters)\n // @ts-expect-error zod type issue on ComfyWorkflowJSON. Should be resolved after enabling ts-strict globally.\n workflowService.afterLoadNewGraph(fileName, this.serializeGraph())\n } else {\n this.showErrorOnFileLoad(file)\n }\n } else if (file.type === 'image/webp') {\n const pngInfo = await getWebpMetadata(file)\n // Support loading workflows from that webp custom node.\n const workflow = pngInfo?.workflow || pngInfo?.Workflow\n const prompt = pngInfo?.prompt || pngInfo?.Prompt\n\n if (workflow) {\n this.loadGraphData(JSON.parse(workflow), true, true, fileName)\n } else if (prompt) {\n this.loadApiJson(JSON.parse(prompt), fileName)\n } else {\n this.showErrorOnFileLoad(file)\n }\n } else if (file.type === 'audio/flac' || file.type === 'audio/x-flac') {\n const pngInfo = await getFlacMetadata(file)\n const workflow = pngInfo?.workflow || pngInfo?.Workflow\n const prompt = pngInfo?.prompt || pngInfo?.Prompt\n\n if (workflow) {\n this.loadGraphData(JSON.parse(workflow), true, true, fileName)\n } else if (prompt) {\n this.loadApiJson(JSON.parse(prompt), fileName)\n } else {\n this.showErrorOnFileLoad(file)\n }\n } else if (\n file.type === 'application/json' ||\n file.name?.endsWith('.json')\n ) {\n const reader = new FileReader()\n reader.onload = async () => {\n const readerResult = reader.result as string\n const jsonContent = JSON.parse(readerResult)\n if (jsonContent?.templates) {\n this.loadTemplateData(jsonContent)\n } else if (this.isApiJson(jsonContent)) {\n this.loadApiJson(jsonContent, fileName)\n } else {\n await this.loadGraphData(\n JSON.parse(readerResult),\n true,\n false,\n fileName\n )\n }\n }\n reader.readAsText(file)\n } else if (\n file.name?.endsWith('.latent') ||\n file.name?.endsWith('.safetensors')\n ) {\n const info = await getLatentMetadata(file)\n // TODO define schema to LatentMetadata\n // @ts-expect-error\n if (info.workflow) {\n await this.loadGraphData(\n // @ts-expect-error\n JSON.parse(info.workflow),\n true,\n true,\n fileName\n )\n // @ts-expect-error\n } else if (info.prompt) {\n // @ts-expect-error\n this.loadApiJson(JSON.parse(info.prompt))\n } else {\n this.showErrorOnFileLoad(file)\n }\n } else {\n this.showErrorOnFileLoad(file)\n }\n }\n\n isApiJson(data) {\n // @ts-expect-error\n return Object.values(data).every((v) => v.class_type)\n }\n\n loadApiJson(apiData, fileName: string) {\n workflowService.beforeLoadNewGraph()\n\n const missingNodeTypes = Object.values(apiData).filter(\n // @ts-expect-error\n (n) => !LiteGraph.registered_node_types[n.class_type]\n )\n if (missingNodeTypes.length) {\n this.#showMissingNodesError(\n // @ts-expect-error\n missingNodeTypes.map((t) => t.class_type)\n )\n return\n }\n\n const ids = Object.keys(apiData)\n app.graph.clear()\n for (const id of ids) {\n const data = apiData[id]\n const node = LiteGraph.createNode(data.class_type)\n node.id = isNaN(+id) ? id : +id\n node.title = data._meta?.title ?? node.title\n app.graph.add(node)\n }\n\n for (const id of ids) {\n const data = apiData[id]\n const node = app.graph.getNodeById(id)\n for (const input in data.inputs ?? {}) {\n const value = data.inputs[input]\n if (value instanceof Array) {\n const [fromId, fromSlot] = value\n const fromNode = app.graph.getNodeById(fromId)\n let toSlot = node.inputs?.findIndex((inp) => inp.name === input)\n if (toSlot == null || toSlot === -1) {\n try {\n // Target has no matching input, most likely a converted widget\n const widget = node.widgets?.find((w) => w.name === input)\n // @ts-expect-error\n if (widget && node.convertWidgetToInput?.(widget)) {\n toSlot = node.inputs?.length - 1\n }\n } catch (error) {}\n }\n if (toSlot != null || toSlot !== -1) {\n fromNode.connect(fromSlot, node, toSlot)\n }\n } else {\n const widget = node.widgets?.find((w) => w.name === input)\n if (widget) {\n widget.value = value\n widget.callback?.(value)\n }\n }\n }\n }\n app.graph.arrange()\n\n for (const id of ids) {\n const data = apiData[id]\n const node = app.graph.getNodeById(id)\n for (const input in data.inputs ?? {}) {\n const value = data.inputs[input]\n if (value instanceof Array) {\n const [fromId, fromSlot] = value\n const fromNode = app.graph.getNodeById(fromId)\n let toSlot = node.inputs?.findIndex((inp) => inp.name === input)\n if (toSlot == null || toSlot === -1) {\n try {\n // Target has no matching input, most likely a converted widget\n const widget = node.widgets?.find((w) => w.name === input)\n // @ts-expect-error\n if (widget && node.convertWidgetToInput?.(widget)) {\n toSlot = node.inputs?.length - 1\n }\n } catch (error) {}\n }\n if (toSlot != null || toSlot !== -1) {\n fromNode.connect(fromSlot, node, toSlot)\n }\n } else {\n const widget = node.widgets?.find((w) => w.name === input)\n if (widget) {\n widget.value = value\n widget.callback?.(value)\n }\n }\n }\n }\n\n app.graph.arrange()\n\n // @ts-expect-error zod type issue on ComfyWorkflowJSON. Should be resolved after enabling ts-strict globally.\n workflowService.afterLoadNewGraph(fileName, this.serializeGraph())\n }\n\n /**\n * Registers a Comfy web extension with the app\n * @param {ComfyExtension} extension\n */\n registerExtension(extension: ComfyExtension) {\n if (this.vueAppReady) {\n useExtensionStore().registerExtension(extension)\n } else {\n // For jest testing.\n this.extensions.push(extension)\n }\n }\n\n /**\n * Refresh combo list on whole nodes\n */\n async refreshComboInNodes() {\n const requestToastMessage: ToastMessageOptions = {\n severity: 'info',\n summary: 'Update',\n detail: 'Update requested'\n }\n if (this.vueAppReady) {\n useToastStore().add(requestToastMessage)\n }\n\n const defs = await api.getNodeDefs({\n validate: useSettingStore().get('Comfy.Validation.NodeDefs')\n })\n\n for (const nodeId in defs) {\n this.registerNodeDef(nodeId, defs[nodeId])\n }\n for (let nodeNum in this.graph.nodes) {\n const node = this.graph.nodes[nodeNum]\n const def = defs[node.type]\n // @ts-expect-error\n // Allow primitive nodes to handle refresh\n node.refreshComboInNode?.(defs)\n\n if (!def) continue\n\n for (const widgetNum in node.widgets) {\n const widget = node.widgets[widgetNum]\n if (\n widget.type == 'combo' &&\n def['input']['required'][widget.name] !== undefined\n ) {\n widget.options.values = def['input']['required'][widget.name][0]\n }\n }\n }\n\n await this.#invokeExtensionsAsync('refreshComboInNodes', defs)\n\n if (this.vueAppReady) {\n this.updateVueAppNodeDefs(defs)\n useToastStore().remove(requestToastMessage)\n useToastStore().add({\n severity: 'success',\n summary: 'Updated',\n detail: 'Node definitions updated',\n life: 1000\n })\n }\n }\n\n resetView() {\n app.canvas.ds.scale = 1\n app.canvas.ds.offset = [0, 0]\n app.graph.setDirtyCanvas(true, true)\n }\n\n /**\n * Clean current state\n */\n clean() {\n this.nodeOutputs = {}\n this.nodePreviewImages = {}\n this.lastNodeErrors = null\n this.lastExecutionError = null\n }\n\n addNodeOnGraph(\n nodeDef: ComfyNodeDef | ComfyNodeDefImpl,\n options: Record = {}\n ): LGraphNode {\n const node = LiteGraph.createNode(\n nodeDef.name,\n nodeDef.display_name,\n options\n )\n this.graph.add(node)\n return node\n }\n\n clientPosToCanvasPos(pos: Vector2): Vector2 {\n const rect = this.canvasContainer.getBoundingClientRect()\n const containerOffsets = [rect.left, rect.top]\n return _.zip(pos, this.canvas.ds.offset, containerOffsets).map(\n ([p, o1, o2]) => (p - o2) / this.canvas.ds.scale - o1\n ) as Vector2\n }\n\n canvasPosToClientPos(pos: Vector2): Vector2 {\n const rect = this.canvasContainer.getBoundingClientRect()\n const containerOffsets = [rect.left, rect.top]\n return _.zip(pos, this.canvas.ds.offset, containerOffsets).map(\n ([p, o1, o2]) => (p + o1) * this.canvas.ds.scale + o2\n ) as Vector2\n }\n\n getCanvasCenter(): Vector2 {\n const dpi = Math.max(window.devicePixelRatio ?? 1, 1)\n const [x, y, w, h] = app.canvas.ds.visible_area\n return [x + w / dpi / 2, y + h / dpi / 2]\n }\n\n public goToNode(nodeId: NodeId) {\n const graphNode = this.graph.getNodeById(nodeId)\n if (!graphNode) return\n this.canvas.animateToBounds(graphNode.boundingRect)\n }\n}\n\nexport const app = new ComfyApp()\n","import { LGraphNode, LGraphGroup, LGraphCanvas } from '@comfyorg/litegraph'\nimport { defineStore } from 'pinia'\nimport { shallowRef } from 'vue'\n\nexport const useTitleEditorStore = defineStore('titleEditor', () => {\n const titleEditorTarget = shallowRef(null)\n\n return {\n titleEditorTarget\n }\n})\n\nexport const useCanvasStore = defineStore('canvas', () => {\n /**\n * The LGraphCanvas instance.\n *\n * The root LGraphCanvas object is shallow reactive.\n */\n const canvas = shallowRef(null)\n\n return {\n canvas\n }\n})\n","import { useToastStore } from '@/stores/toastStore'\nimport { useI18n } from 'vue-i18n'\n\nexport function useErrorHandling() {\n const toast = useToastStore()\n const { t } = useI18n()\n\n const toastErrorHandler = (error: any) => {\n toast.add({\n severity: 'error',\n summary: t('error'),\n detail: error.message,\n life: 3000\n })\n }\n\n const wrapWithErrorHandling =\n (\n action: (...args: any[]) => any,\n errorHandler?: (error: any) => void,\n finallyHandler?: () => void\n ) =>\n (...args: any[]) => {\n try {\n return action(...args)\n } catch (e) {\n ;(errorHandler ?? toastErrorHandler)(e)\n } finally {\n finallyHandler?.()\n }\n }\n\n const wrapWithErrorHandlingAsync =\n (\n action: ((...args: any[]) => Promise) | ((...args: any[]) => any),\n errorHandler?: (error: any) => void,\n finallyHandler?: () => void\n ) =>\n async (...args: any[]) => {\n try {\n return await action(...args)\n } catch (e) {\n ;(errorHandler ?? toastErrorHandler)(e)\n } finally {\n finallyHandler?.()\n }\n }\n\n return { wrapWithErrorHandling, wrapWithErrorHandlingAsync }\n}\n","import { app } from '@/scripts/app'\nimport { api } from '@/scripts/api'\nimport { defineStore } from 'pinia'\nimport { computed, ref } from 'vue'\nimport { useSettingStore } from '@/stores/settingStore'\nimport { useToastStore } from '@/stores/toastStore'\nimport {\n showSettingsDialog,\n showTemplateWorkflowsDialog\n} from '@/services/dialogService'\nimport { useQueueSettingsStore, useQueueStore } from './queueStore'\nimport { LiteGraph } from '@comfyorg/litegraph'\nimport { ComfyExtension } from '@/types/comfy'\nimport { LGraphGroup } from '@comfyorg/litegraph'\nimport { useTitleEditorStore } from './graphStore'\nimport { useErrorHandling } from '@/hooks/errorHooks'\nimport { ComfyWorkflow, useWorkflowStore } from './workflowStore'\nimport { type KeybindingImpl, useKeybindingStore } from './keybindingStore'\nimport { useBottomPanelStore } from './workspace/bottomPanelStore'\nimport { LGraphNode } from '@comfyorg/litegraph'\nimport { useWorkspaceStore } from './workspaceStore'\nimport { workflowService } from '@/services/workflowService'\n\nexport interface ComfyCommand {\n id: string\n function: () => void | Promise\n\n label?: string | (() => string)\n icon?: string | (() => string)\n tooltip?: string | (() => string)\n /** Menubar item label, if different from command label */\n menubarLabel?: string | (() => string)\n versionAdded?: string\n}\n\nexport class ComfyCommandImpl implements ComfyCommand {\n id: string\n function: () => void | Promise\n _label?: string | (() => string)\n _icon?: string | (() => string)\n _tooltip?: string | (() => string)\n _menubarLabel?: string | (() => string)\n versionAdded?: string\n\n constructor(command: ComfyCommand) {\n this.id = command.id\n this.function = command.function\n this._label = command.label\n this._icon = command.icon\n this._tooltip = command.tooltip\n this._menubarLabel = command.menubarLabel ?? command.label\n this.versionAdded = command.versionAdded\n }\n\n get label() {\n return typeof this._label === 'function' ? this._label() : this._label\n }\n\n get icon() {\n return typeof this._icon === 'function' ? this._icon() : this._icon\n }\n\n get tooltip() {\n return typeof this._tooltip === 'function' ? this._tooltip() : this._tooltip\n }\n\n get menubarLabel() {\n return typeof this._menubarLabel === 'function'\n ? this._menubarLabel()\n : this._menubarLabel\n }\n\n get keybinding(): KeybindingImpl | null {\n return useKeybindingStore().getKeybindingByCommandId(this.id)\n }\n}\n\nconst getTracker = () => useWorkflowStore()?.activeWorkflow?.changeTracker\n\nconst getSelectedNodes = (): LGraphNode[] => {\n const selectedNodes = app.canvas.selected_nodes\n const result: LGraphNode[] = []\n if (selectedNodes) {\n for (const i in selectedNodes) {\n const node = selectedNodes[i]\n result.push(node)\n }\n }\n return result\n}\n\nconst toggleSelectedNodesMode = (mode: number) => {\n getSelectedNodes().forEach((node) => {\n if (node.mode === mode) {\n node.mode = 0 // always\n } else {\n node.mode = mode\n }\n })\n}\n\nexport const useCommandStore = defineStore('command', () => {\n const settingStore = useSettingStore()\n\n const commandsById = ref>({})\n const commands = computed(() => Object.values(commandsById.value))\n\n const registerCommand = (command: ComfyCommand) => {\n if (commandsById.value[command.id]) {\n console.warn(`Command ${command.id} already registered`)\n }\n commandsById.value[command.id] = new ComfyCommandImpl(command)\n }\n\n const commandDefinitions: ComfyCommand[] = [\n {\n id: 'Comfy.NewBlankWorkflow',\n icon: 'pi pi-plus',\n label: 'New Blank Workflow',\n menubarLabel: 'New',\n function: () => workflowService.loadBlankWorkflow()\n },\n {\n id: 'Comfy.OpenWorkflow',\n icon: 'pi pi-folder-open',\n label: 'Open Workflow',\n menubarLabel: 'Open',\n function: () => {\n app.ui.loadFile()\n }\n },\n {\n id: 'Comfy.LoadDefaultWorkflow',\n icon: 'pi pi-code',\n label: 'Load Default Workflow',\n function: () => workflowService.loadDefaultWorkflow()\n },\n {\n id: 'Comfy.SaveWorkflow',\n icon: 'pi pi-save',\n label: 'Save Workflow',\n menubarLabel: 'Save',\n function: async () => {\n const workflow = useWorkflowStore().activeWorkflow as ComfyWorkflow\n if (!workflow) return\n\n await workflowService.saveWorkflow(workflow)\n }\n },\n {\n id: 'Comfy.SaveWorkflowAs',\n icon: 'pi pi-save',\n label: 'Save Workflow As',\n menubarLabel: 'Save As',\n function: async () => {\n const workflow = useWorkflowStore().activeWorkflow as ComfyWorkflow\n if (!workflow) return\n\n await workflowService.saveWorkflowAs(workflow)\n }\n },\n {\n id: 'Comfy.ExportWorkflow',\n icon: 'pi pi-download',\n label: 'Export Workflow',\n menubarLabel: 'Export',\n function: () => {\n workflowService.exportWorkflow('workflow', 'workflow')\n }\n },\n {\n id: 'Comfy.ExportWorkflowAPI',\n icon: 'pi pi-download',\n label: 'Export Workflow (API Format)',\n menubarLabel: 'Export (API)',\n function: () => {\n workflowService.exportWorkflow('workflow_api', 'output')\n }\n },\n {\n id: 'Comfy.Undo',\n icon: 'pi pi-undo',\n label: 'Undo',\n function: async () => {\n await getTracker()?.undo?.()\n }\n },\n {\n id: 'Comfy.Redo',\n icon: 'pi pi-refresh',\n label: 'Redo',\n function: async () => {\n await getTracker()?.redo?.()\n }\n },\n {\n id: 'Comfy.ClearWorkflow',\n icon: 'pi pi-trash',\n label: 'Clear Workflow',\n function: () => {\n if (\n !settingStore.get('Comfy.ComfirmClear') ||\n confirm('Clear workflow?')\n ) {\n app.clean()\n app.graph.clear()\n api.dispatchEvent(new CustomEvent('graphCleared'))\n }\n }\n },\n {\n id: 'Comfy.Canvas.ResetView',\n icon: 'pi pi-expand',\n label: 'Reset View',\n function: () => {\n app.resetView()\n }\n },\n {\n id: 'Comfy.OpenClipspace',\n icon: 'pi pi-clipboard',\n label: 'Clipspace',\n function: () => {\n app.openClipspace()\n }\n },\n {\n id: 'Comfy.RefreshNodeDefinitions',\n icon: 'pi pi-refresh',\n label: 'Refresh Node Definitions',\n function: async () => {\n await app.refreshComboInNodes()\n }\n },\n {\n id: 'Comfy.Interrupt',\n icon: 'pi pi-stop',\n label: 'Interrupt',\n function: async () => {\n await api.interrupt()\n useToastStore().add({\n severity: 'info',\n summary: 'Interrupted',\n detail: 'Execution has been interrupted',\n life: 1000\n })\n }\n },\n {\n id: 'Comfy.ClearPendingTasks',\n icon: 'pi pi-stop',\n label: 'Clear Pending Tasks',\n function: async () => {\n await useQueueStore().clear(['queue'])\n useToastStore().add({\n severity: 'info',\n summary: 'Confirmed',\n detail: 'Pending tasks deleted',\n life: 3000\n })\n }\n },\n {\n id: 'Comfy.BrowseTemplates',\n icon: 'pi pi-folder-open',\n label: 'Browse Templates',\n function: showTemplateWorkflowsDialog\n },\n {\n id: 'Comfy.Canvas.ZoomIn',\n icon: 'pi pi-plus',\n label: 'Zoom In',\n function: () => {\n const ds = app.canvas.ds\n ds.changeScale(\n ds.scale * 1.1,\n ds.element ? [ds.element.width / 2, ds.element.height / 2] : undefined\n )\n app.canvas.setDirty(true, true)\n }\n },\n {\n id: 'Comfy.Canvas.ZoomOut',\n icon: 'pi pi-minus',\n label: 'Zoom Out',\n function: () => {\n const ds = app.canvas.ds\n ds.changeScale(\n ds.scale / 1.1,\n ds.element ? [ds.element.width / 2, ds.element.height / 2] : undefined\n )\n app.canvas.setDirty(true, true)\n }\n },\n {\n id: 'Comfy.Canvas.FitView',\n icon: 'pi pi-expand',\n label: 'Fit view to selected nodes',\n function: () => app.canvas.fitViewToSelectionAnimated()\n },\n {\n id: 'Comfy.Canvas.ToggleLock',\n icon: 'pi pi-lock',\n label: 'Toggle Lock',\n function: () => {\n app.canvas['read_only'] = !app.canvas['read_only']\n }\n },\n {\n id: 'Comfy.Canvas.ToggleLinkVisibility',\n icon: 'pi pi-eye',\n label: 'Toggle Link Visibility',\n versionAdded: '1.3.6',\n\n function: (() => {\n let lastLinksRenderMode = LiteGraph.SPLINE_LINK\n\n return () => {\n const currentMode = settingStore.get('Comfy.LinkRenderMode')\n\n if (currentMode === LiteGraph.HIDDEN_LINK) {\n // If links are hidden, restore the last positive value or default to spline mode\n settingStore.set('Comfy.LinkRenderMode', lastLinksRenderMode)\n } else {\n // If links are visible, store the current mode and hide links\n lastLinksRenderMode = currentMode\n settingStore.set('Comfy.LinkRenderMode', LiteGraph.HIDDEN_LINK)\n }\n }\n })()\n },\n {\n id: 'Comfy.QueuePrompt',\n icon: 'pi pi-play',\n label: 'Queue Prompt',\n versionAdded: '1.3.7',\n function: () => {\n const batchCount = useQueueSettingsStore().batchCount\n app.queuePrompt(0, batchCount)\n }\n },\n {\n id: 'Comfy.QueuePromptFront',\n icon: 'pi pi-play',\n label: 'Queue Prompt (Front)',\n versionAdded: '1.3.7',\n function: () => {\n const batchCount = useQueueSettingsStore().batchCount\n app.queuePrompt(-1, batchCount)\n }\n },\n {\n id: 'Comfy.ShowSettingsDialog',\n icon: 'pi pi-cog',\n label: 'Settings',\n versionAdded: '1.3.7',\n function: () => {\n showSettingsDialog()\n }\n },\n {\n id: 'Comfy.Graph.GroupSelectedNodes',\n icon: 'pi pi-sitemap',\n label: 'Group Selected Nodes',\n versionAdded: '1.3.7',\n function: () => {\n const { canvas } = app\n if (!canvas.selectedItems?.size) {\n useToastStore().add({\n severity: 'error',\n summary: 'Nothing to group',\n detail:\n 'Please select the nodes (or other groups) to create a group for',\n life: 3000\n })\n return\n }\n const group = new LGraphGroup()\n const padding = useSettingStore().get(\n 'Comfy.GroupSelectedNodes.Padding'\n )\n group.resizeTo(canvas.selectedItems, padding)\n canvas.graph.add(group)\n useTitleEditorStore().titleEditorTarget = group\n }\n },\n {\n id: 'Workspace.NextOpenedWorkflow',\n icon: 'pi pi-step-forward',\n label: 'Next Opened Workflow',\n versionAdded: '1.3.9',\n function: () => {\n workflowService.loadNextOpenedWorkflow()\n }\n },\n {\n id: 'Workspace.PreviousOpenedWorkflow',\n icon: 'pi pi-step-backward',\n label: 'Previous Opened Workflow',\n versionAdded: '1.3.9',\n function: () => {\n workflowService.loadPreviousOpenedWorkflow()\n }\n },\n {\n id: 'Comfy.Canvas.ToggleSelectedNodes.Mute',\n icon: 'pi pi-volume-off',\n label: 'Mute/Unmute Selected Nodes',\n versionAdded: '1.3.11',\n function: () => {\n toggleSelectedNodesMode(2) // muted\n }\n },\n {\n id: 'Comfy.Canvas.ToggleSelectedNodes.Bypass',\n icon: 'pi pi-shield',\n label: 'Bypass/Unbypass Selected Nodes',\n versionAdded: '1.3.11',\n function: () => {\n toggleSelectedNodesMode(4) // bypassed\n }\n },\n {\n id: 'Comfy.Canvas.ToggleSelectedNodes.Pin',\n icon: 'pi pi-pin',\n label: 'Pin/Unpin Selected Nodes',\n versionAdded: '1.3.11',\n function: () => {\n getSelectedNodes().forEach((node) => {\n node.pin(!node.pinned)\n })\n }\n },\n {\n id: 'Comfy.Canvas.ToggleSelected.Pin',\n icon: 'pi pi-pin',\n label: 'Pin/Unpin Selected Items',\n versionAdded: '1.3.33',\n function: () => {\n for (const item of app.canvas.selectedItems) {\n if (item instanceof LGraphNode || item instanceof LGraphGroup) {\n item.pin(!item.pinned)\n }\n }\n }\n },\n {\n id: 'Comfy.Canvas.ToggleSelectedNodes.Collapse',\n icon: 'pi pi-minus',\n label: 'Collapse/Expand Selected Nodes',\n versionAdded: '1.3.11',\n function: () => {\n getSelectedNodes().forEach((node) => {\n node.collapse()\n })\n }\n },\n {\n id: 'Comfy.ToggleTheme',\n icon: 'pi pi-moon',\n label: 'Toggle Theme',\n versionAdded: '1.3.12',\n function: (() => {\n let previousDarkTheme: string = 'dark'\n\n // Official light theme is the only light theme supported now.\n const isDarkMode = (themeId: string) => themeId !== 'light'\n return () => {\n const currentTheme = settingStore.get('Comfy.ColorPalette')\n if (isDarkMode(currentTheme)) {\n previousDarkTheme = currentTheme\n settingStore.set('Comfy.ColorPalette', 'light')\n } else {\n settingStore.set('Comfy.ColorPalette', previousDarkTheme)\n }\n }\n })()\n },\n {\n id: 'Workspace.ToggleBottomPanel',\n icon: 'pi pi-list',\n label: 'Toggle Bottom Panel',\n versionAdded: '1.3.22',\n function: () => {\n useBottomPanelStore().toggleBottomPanel()\n }\n },\n {\n id: 'Workspace.ToggleFocusMode',\n icon: 'pi pi-eye',\n label: 'Toggle Focus Mode',\n versionAdded: '1.3.27',\n function: () => {\n useWorkspaceStore().toggleFocusMode()\n }\n }\n ]\n\n commandDefinitions.forEach(registerCommand)\n const getCommand = (command: string) => {\n return commandsById.value[command]\n }\n\n const { wrapWithErrorHandlingAsync } = useErrorHandling()\n const execute = async (\n commandId: string,\n errorHandler?: (error: any) => void\n ) => {\n const command = getCommand(commandId)\n if (command) {\n await wrapWithErrorHandlingAsync(command.function, errorHandler)()\n } else {\n throw new Error(`Command ${commandId} not found`)\n }\n }\n\n const isRegistered = (command: string) => {\n return !!commandsById.value[command]\n }\n\n const loadExtensionCommands = (extension: ComfyExtension) => {\n if (extension.commands) {\n for (const command of extension.commands) {\n registerCommand(command)\n }\n }\n }\n\n return {\n commands,\n execute,\n getCommand,\n registerCommand,\n isRegistered,\n loadExtensionCommands\n }\n})\n","import BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-tree {\\n background: \".concat(dt('tree.background'), \";\\n color: \").concat(dt('tree.color'), \";\\n padding: \").concat(dt('tree.padding'), \";\\n}\\n\\n.p-tree-root-children,\\n.p-tree-node-children {\\n display: flex;\\n list-style-type: none;\\n flex-direction: column;\\n margin: 0;\\n gap: \").concat(dt('tree.gap'), \";\\n}\\n\\n.p-tree-root-children {\\n padding: \").concat(dt('tree.gap'), \" 0 0 0;\\n}\\n\\n.p-tree-node-children {\\n padding: \").concat(dt('tree.gap'), \" 0 0 \").concat(dt('tree.indent'), \";\\n}\\n\\n.p-tree-node {\\n padding: 0;\\n outline: 0 none;\\n}\\n\\n.p-tree-node-content {\\n border-radius: \").concat(dt('tree.node.border.radius'), \";\\n padding: \").concat(dt('tree.node.padding'), \";\\n display: flex;\\n align-items: center;\\n outline-color: transparent;\\n color: \").concat(dt('tree.node.color'), \";\\n gap: \").concat(dt('tree.node.gap'), \";\\n transition: background \").concat(dt('tree.transition.duration'), \", color \").concat(dt('tree.transition.duration'), \", outline-color \").concat(dt('tree.transition.duration'), \", box-shadow \").concat(dt('tree.transition.duration'), \";\\n}\\n\\n.p-tree-node:focus-visible > .p-tree-node-content {\\n box-shadow: \").concat(dt('tree.node.focus.ring.shadow'), \";\\n outline: \").concat(dt('tree.node.focus.ring.width'), \" \").concat(dt('tree.node.focus.ring.style'), \" \").concat(dt('tree.node.focus.ring.color'), \";\\n outline-offset: \").concat(dt('tree.node.focus.ring.offset'), \";\\n}\\n\\n.p-tree-node-content.p-tree-node-selectable:not(.p-tree-node-selected):hover {\\n background: \").concat(dt('tree.node.hover.background'), \";\\n color: \").concat(dt('tree.node.hover.color'), \";\\n}\\n\\n.p-tree-node-content.p-tree-node-selectable:not(.p-tree-node-selected):hover .p-tree-node-icon {\\n color: \").concat(dt('tree.node.icon.hover.color'), \";\\n}\\n\\n.p-tree-node-content.p-tree-node-selected {\\n background: \").concat(dt('tree.node.selected.background'), \";\\n color: \").concat(dt('tree.node.selected.color'), \";\\n}\\n\\n.p-tree-node-content.p-tree-node-selected .p-tree-node-toggle-button {\\n color: inherit;\\n}\\n\\n.p-tree-node-toggle-button {\\n cursor: pointer;\\n user-select: none;\\n display: inline-flex;\\n align-items: center;\\n justify-content: center;\\n overflow: hidden;\\n position: relative;\\n flex-shrink: 0;\\n width: \").concat(dt('tree.node.toggle.button.size'), \";\\n height: \").concat(dt('tree.node.toggle.button.size'), \";\\n color: \").concat(dt('tree.node.toggle.button.color'), \";\\n border: 0 none;\\n background: transparent;\\n border-radius: \").concat(dt('tree.node.toggle.button.border.radius'), \";\\n transition: background \").concat(dt('tree.transition.duration'), \", color \").concat(dt('tree.transition.duration'), \", border-color \").concat(dt('tree.transition.duration'), \", outline-color \").concat(dt('tree.transition.duration'), \", box-shadow \").concat(dt('tree.transition.duration'), \";\\n outline-color: transparent;\\n padding: 0;\\n}\\n\\n.p-tree-node-toggle-button:enabled:hover {\\n background: \").concat(dt('tree.node.toggle.button.hover.background'), \";\\n color: \").concat(dt('tree.node.toggle.button.hover.color'), \";\\n}\\n\\n.p-tree-node-content.p-tree-node-selected .p-tree-node-toggle-button:hover {\\n background: \").concat(dt('tree.node.toggle.button.selected.hover.background'), \";\\n color: \").concat(dt('tree.node.toggle.button.selected.hover.color'), \";\\n}\\n\\n.p-tree-root {\\n overflow: auto;\\n}\\n\\n.p-tree-node-selectable {\\n cursor: pointer;\\n user-select: none;\\n}\\n\\n.p-tree-node-leaf > .p-tree-node-content .p-tree-node-toggle-button {\\n visibility: hidden;\\n}\\n\\n.p-tree-node-icon {\\n color: \").concat(dt('tree.node.icon.color'), \";\\n transition: color \").concat(dt('tree.transition.duration'), \";\\n}\\n\\n.p-tree-node-content.p-tree-node-selected .p-tree-node-icon {\\n color: \").concat(dt('tree.node.icon.selected.color'), \";\\n}\\n\\n.p-tree-filter-input {\\n width: 100%;\\n}\\n\\n.p-tree-loading {\\n position: relative;\\n height: 100%;\\n}\\n\\n.p-tree-loading-icon {\\n font-size: \").concat(dt('tree.loading.icon.size'), \";\\n width: \").concat(dt('tree.loading.icon.size'), \";\\n height: \").concat(dt('tree.loading.icon.size'), \";\\n}\\n\\n.p-tree .p-tree-mask {\\n position: absolute;\\n z-index: 1;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n}\\n\\n.p-tree-flex-scrollable {\\n display: flex;\\n flex: 1;\\n height: 100%;\\n flex-direction: column;\\n}\\n\\n.p-tree-flex-scrollable .p-tree-root {\\n flex: 1;\\n}\\n\");\n};\nvar classes = {\n root: function root(_ref2) {\n var props = _ref2.props;\n return ['p-tree p-component', {\n 'p-tree-selectable': props.selectionMode != null,\n 'p-tree-loading': props.loading,\n 'p-tree-flex-scrollable': props.scrollHeight === 'flex'\n }];\n },\n mask: 'p-tree-mask p-overlay-mask',\n loadingIcon: 'p-tree-loading-icon',\n pcFilterInput: 'p-tree-filter-input',\n wrapper: 'p-tree-root',\n //TODO: discuss\n rootChildren: 'p-tree-root-children',\n node: function node(_ref3) {\n var instance = _ref3.instance;\n return ['p-tree-node', {\n 'p-tree-node-leaf': instance.leaf\n }];\n },\n nodeContent: function nodeContent(_ref4) {\n var instance = _ref4.instance;\n return ['p-tree-node-content', instance.node.styleClass, {\n 'p-tree-node-selectable': instance.selectable,\n 'p-tree-node-selected': instance.checkboxMode && instance.$parentInstance.highlightOnSelect ? instance.checked : instance.selected\n }];\n },\n nodeToggleButton: 'p-tree-node-toggle-button',\n nodeToggleIcon: 'p-tree-node-toggle-icon',\n nodeCheckbox: 'p-tree-node-checkbox',\n nodeIcon: 'p-tree-node-icon',\n nodeLabel: 'p-tree-node-label',\n nodeChildren: 'p-tree-node-children'\n};\nvar TreeStyle = BaseStyle.extend({\n name: 'tree',\n theme: theme,\n classes: classes\n});\n\nexport { TreeStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseIcon from '@primevue/icons/baseicon';\nimport { openBlock, createElementBlock, mergeProps, createElementVNode } from 'vue';\n\nvar script = {\n name: 'MinusIcon',\n \"extends\": BaseIcon\n};\n\nvar _hoisted_1 = /*#__PURE__*/createElementVNode(\"path\", {\n d: \"M13.2222 7.77778H0.777778C0.571498 7.77778 0.373667 7.69584 0.227806 7.54998C0.0819442 7.40412 0 7.20629 0 7.00001C0 6.79373 0.0819442 6.5959 0.227806 6.45003C0.373667 6.30417 0.571498 6.22223 0.777778 6.22223H13.2222C13.4285 6.22223 13.6263 6.30417 13.7722 6.45003C13.9181 6.5959 14 6.79373 14 7.00001C14 7.20629 13.9181 7.40412 13.7722 7.54998C13.6263 7.69584 13.4285 7.77778 13.2222 7.77778Z\",\n fill: \"currentColor\"\n}, null, -1);\nvar _hoisted_2 = [_hoisted_1];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"svg\", mergeProps({\n width: \"14\",\n height: \"14\",\n viewBox: \"0 0 14 14\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, _ctx.pti()), _hoisted_2, 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-checkbox {\\n position: relative;\\n display: inline-flex;\\n user-select: none;\\n vertical-align: bottom;\\n width: \".concat(dt('checkbox.width'), \";\\n height: \").concat(dt('checkbox.height'), \";\\n}\\n\\n.p-checkbox-input {\\n cursor: pointer;\\n appearance: none;\\n position: absolute;\\n top: 0;\\n left: 0;\\n width: 100%;\\n height: 100%;\\n padding: 0;\\n margin: 0;\\n opacity: 0;\\n z-index: 1;\\n outline: 0 none;\\n border: 1px solid transparent;\\n border-radius: \").concat(dt('checkbox.border.radius'), \";\\n}\\n\\n.p-checkbox-box {\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n border-radius: \").concat(dt('checkbox.border.radius'), \";\\n border: 1px solid \").concat(dt('checkbox.border.color'), \";\\n background: \").concat(dt('checkbox.background'), \";\\n width: \").concat(dt('checkbox.width'), \";\\n height: \").concat(dt('checkbox.height'), \";\\n transition: background \").concat(dt('checkbox.transition.duration'), \", color \").concat(dt('checkbox.transition.duration'), \", border-color \").concat(dt('checkbox.transition.duration'), \", box-shadow \").concat(dt('checkbox.transition.duration'), \", outline-color \").concat(dt('checkbox.transition.duration'), \";\\n outline-color: transparent;\\n box-shadow: \").concat(dt('checkbox.shadow'), \";\\n}\\n\\n.p-checkbox-icon {\\n transition-duration: \").concat(dt('checkbox.transition.duration'), \";\\n color: \").concat(dt('checkbox.icon.color'), \";\\n font-size: \").concat(dt('checkbox.icon.size'), \";\\n width: \").concat(dt('checkbox.icon.size'), \";\\n height: \").concat(dt('checkbox.icon.size'), \";\\n}\\n\\n.p-checkbox:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-box {\\n border-color: \").concat(dt('checkbox.hover.border.color'), \";\\n}\\n\\n.p-checkbox-checked .p-checkbox-box {\\n border-color: \").concat(dt('checkbox.checked.border.color'), \";\\n background: \").concat(dt('checkbox.checked.background'), \";\\n}\\n\\n.p-checkbox-checked .p-checkbox-icon {\\n color: \").concat(dt('checkbox.icon.checked.color'), \";\\n}\\n\\n.p-checkbox-checked:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-box {\\n background: \").concat(dt('checkbox.checked.hover.background'), \";\\n border-color: \").concat(dt('checkbox.checked.hover.border.color'), \";\\n}\\n\\n.p-checkbox-checked:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-icon {\\n color: \").concat(dt('checkbox.icon.checked.hover.color'), \";\\n}\\n\\n.p-checkbox:not(.p-disabled):has(.p-checkbox-input:focus-visible) .p-checkbox-box {\\n border-color: \").concat(dt('checkbox.focus.border.color'), \";\\n box-shadow: \").concat(dt('checkbox.focus.ring.shadow'), \";\\n outline: \").concat(dt('checkbox.focus.ring.width'), \" \").concat(dt('checkbox.focus.ring.style'), \" \").concat(dt('checkbox.focus.ring.color'), \";\\n outline-offset: \").concat(dt('checkbox.focus.ring.offset'), \";\\n}\\n\\n.p-checkbox-checked:not(.p-disabled):has(.p-checkbox-input:focus-visible) .p-checkbox-box {\\n border-color: \").concat(dt('checkbox.checked.focus.border.color'), \";\\n}\\n\\n.p-checkbox.p-invalid > .p-checkbox-box {\\n border-color: \").concat(dt('checkbox.invalid.border.color'), \";\\n}\\n\\n.p-checkbox.p-variant-filled .p-checkbox-box {\\n background: \").concat(dt('checkbox.filled.background'), \";\\n}\\n\\n.p-checkbox-checked.p-variant-filled .p-checkbox-box {\\n background: \").concat(dt('checkbox.checked.background'), \";\\n}\\n\\n.p-checkbox-checked.p-variant-filled:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-box {\\n background: \").concat(dt('checkbox.checked.hover.background'), \";\\n}\\n\\n.p-checkbox.p-disabled {\\n opacity: 1;\\n}\\n\\n.p-checkbox.p-disabled .p-checkbox-box {\\n background: \").concat(dt('checkbox.disabled.background'), \";\\n border-color: \").concat(dt('checkbox.checked.disabled.border.color'), \";\\n}\\n\\n.p-checkbox.p-disabled .p-checkbox-box .p-checkbox-icon {\\n color: \").concat(dt('checkbox.icon.disabled.color'), \";\\n}\\n\");\n};\nvar classes = {\n root: function root(_ref2) {\n var instance = _ref2.instance,\n props = _ref2.props;\n return ['p-checkbox p-component', {\n 'p-checkbox-checked': instance.checked,\n 'p-disabled': props.disabled,\n 'p-invalid': props.invalid,\n 'p-variant-filled': props.variant ? props.variant === 'filled' : instance.$primevue.config.inputStyle === 'filled' || instance.$primevue.config.inputVariant === 'filled'\n }];\n },\n box: 'p-checkbox-box',\n input: 'p-checkbox-input',\n icon: 'p-checkbox-icon'\n};\nvar CheckboxStyle = BaseStyle.extend({\n name: 'checkbox',\n theme: theme,\n classes: classes\n});\n\nexport { CheckboxStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import { equals, contains } from '@primeuix/utils/object';\nimport CheckIcon from '@primevue/icons/check';\nimport MinusIcon from '@primevue/icons/minus';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport CheckboxStyle from 'primevue/checkbox/style';\nimport { resolveComponent, openBlock, createElementBlock, mergeProps, createElementVNode, renderSlot, normalizeClass, createBlock, createCommentVNode } from 'vue';\n\nvar script$1 = {\n name: 'BaseCheckbox',\n \"extends\": BaseComponent,\n props: {\n value: null,\n modelValue: null,\n binary: Boolean,\n name: {\n type: String,\n \"default\": null\n },\n indeterminate: {\n type: Boolean,\n \"default\": false\n },\n trueValue: {\n type: null,\n \"default\": true\n },\n falseValue: {\n type: null,\n \"default\": false\n },\n variant: {\n type: String,\n \"default\": null\n },\n invalid: {\n type: Boolean,\n \"default\": false\n },\n disabled: {\n type: Boolean,\n \"default\": false\n },\n readonly: {\n type: Boolean,\n \"default\": false\n },\n required: {\n type: Boolean,\n \"default\": false\n },\n tabindex: {\n type: Number,\n \"default\": null\n },\n inputId: {\n type: String,\n \"default\": null\n },\n inputClass: {\n type: [String, Object],\n \"default\": null\n },\n inputStyle: {\n type: Object,\n \"default\": null\n },\n ariaLabelledby: {\n type: String,\n \"default\": null\n },\n ariaLabel: {\n type: String,\n \"default\": null\n }\n },\n style: CheckboxStyle,\n provide: function provide() {\n return {\n $pcCheckbox: this,\n $parentInstance: this\n };\n }\n};\n\nfunction _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _iterableToArray(r) { if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r); }\nfunction _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nvar script = {\n name: 'Checkbox',\n \"extends\": script$1,\n inheritAttrs: false,\n emits: ['update:modelValue', 'change', 'focus', 'blur', 'update:indeterminate'],\n data: function data() {\n return {\n d_indeterminate: this.indeterminate\n };\n },\n watch: {\n indeterminate: function indeterminate(newValue) {\n this.d_indeterminate = newValue;\n }\n },\n methods: {\n getPTOptions: function getPTOptions(key) {\n var _ptm = key === 'root' ? this.ptmi : this.ptm;\n return _ptm(key, {\n context: {\n checked: this.checked,\n indeterminate: this.d_indeterminate,\n disabled: this.disabled\n }\n });\n },\n onChange: function onChange(event) {\n var _this = this;\n if (!this.disabled && !this.readonly) {\n var newModelValue;\n if (this.binary) {\n newModelValue = this.d_indeterminate ? this.trueValue : this.checked ? this.falseValue : this.trueValue;\n } else {\n if (this.checked || this.d_indeterminate) newModelValue = this.modelValue.filter(function (val) {\n return !equals(val, _this.value);\n });else newModelValue = this.modelValue ? [].concat(_toConsumableArray(this.modelValue), [this.value]) : [this.value];\n }\n if (this.d_indeterminate) {\n this.d_indeterminate = false;\n this.$emit('update:indeterminate', this.d_indeterminate);\n }\n this.$emit('update:modelValue', newModelValue);\n this.$emit('change', event);\n }\n },\n onFocus: function onFocus(event) {\n this.$emit('focus', event);\n },\n onBlur: function onBlur(event) {\n this.$emit('blur', event);\n }\n },\n computed: {\n checked: function checked() {\n return this.d_indeterminate ? false : this.binary ? this.modelValue === this.trueValue : contains(this.value, this.modelValue);\n }\n },\n components: {\n CheckIcon: CheckIcon,\n MinusIcon: MinusIcon\n }\n};\n\nvar _hoisted_1 = [\"data-p-checked\", \"data-p-indeterminate\", \"data-p-disabled\"];\nvar _hoisted_2 = [\"id\", \"value\", \"name\", \"checked\", \"tabindex\", \"disabled\", \"readonly\", \"required\", \"aria-labelledby\", \"aria-label\", \"aria-invalid\", \"aria-checked\"];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n var _component_CheckIcon = resolveComponent(\"CheckIcon\");\n var _component_MinusIcon = resolveComponent(\"MinusIcon\");\n return openBlock(), createElementBlock(\"div\", mergeProps({\n \"class\": _ctx.cx('root')\n }, $options.getPTOptions('root'), {\n \"data-p-checked\": $options.checked,\n \"data-p-indeterminate\": $data.d_indeterminate || undefined,\n \"data-p-disabled\": _ctx.disabled\n }), [createElementVNode(\"input\", mergeProps({\n id: _ctx.inputId,\n type: \"checkbox\",\n \"class\": [_ctx.cx('input'), _ctx.inputClass],\n style: _ctx.inputStyle,\n value: _ctx.value,\n name: _ctx.name,\n checked: $options.checked,\n tabindex: _ctx.tabindex,\n disabled: _ctx.disabled,\n readonly: _ctx.readonly,\n required: _ctx.required,\n \"aria-labelledby\": _ctx.ariaLabelledby,\n \"aria-label\": _ctx.ariaLabel,\n \"aria-invalid\": _ctx.invalid || undefined,\n \"aria-checked\": $data.d_indeterminate ? 'mixed' : undefined,\n onFocus: _cache[0] || (_cache[0] = function () {\n return $options.onFocus && $options.onFocus.apply($options, arguments);\n }),\n onBlur: _cache[1] || (_cache[1] = function () {\n return $options.onBlur && $options.onBlur.apply($options, arguments);\n }),\n onChange: _cache[2] || (_cache[2] = function () {\n return $options.onChange && $options.onChange.apply($options, arguments);\n })\n }, $options.getPTOptions('input')), null, 16, _hoisted_2), createElementVNode(\"div\", mergeProps({\n \"class\": _ctx.cx('box')\n }, $options.getPTOptions('box')), [renderSlot(_ctx.$slots, \"icon\", {\n checked: $options.checked,\n indeterminate: $data.d_indeterminate,\n \"class\": normalizeClass(_ctx.cx('icon'))\n }, function () {\n return [$options.checked ? (openBlock(), createBlock(_component_CheckIcon, mergeProps({\n key: 0,\n \"class\": _ctx.cx('icon')\n }, $options.getPTOptions('icon')), null, 16, [\"class\"])) : $data.d_indeterminate ? (openBlock(), createBlock(_component_MinusIcon, mergeProps({\n key: 1,\n \"class\": _ctx.cx('icon')\n }, $options.getPTOptions('icon')), null, 16, [\"class\"])) : createCommentVNode(\"\", true)];\n })], 16)], 16, _hoisted_1);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import { resolveFieldData } from '@primeuix/utils/object';\nimport SearchIcon from '@primevue/icons/search';\nimport SpinnerIcon from '@primevue/icons/spinner';\nimport IconField from 'primevue/iconfield';\nimport InputIcon from 'primevue/inputicon';\nimport InputText from 'primevue/inputtext';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport TreeStyle from 'primevue/tree/style';\nimport { getAttribute, findSingle, find } from '@primeuix/utils/dom';\nimport CheckIcon from '@primevue/icons/check';\nimport ChevronDownIcon from '@primevue/icons/chevrondown';\nimport ChevronRightIcon from '@primevue/icons/chevronright';\nimport MinusIcon from '@primevue/icons/minus';\nimport Checkbox from 'primevue/checkbox';\nimport Ripple from 'primevue/ripple';\nimport { resolveComponent, resolveDirective, openBlock, createElementBlock, mergeProps, createElementVNode, withDirectives, Fragment, createBlock, resolveDynamicComponent, normalizeClass, withCtx, createCommentVNode, withModifiers, createTextVNode, toDisplayString, renderList, renderSlot, createVNode } from 'vue';\n\nvar script$2 = {\n name: 'BaseTree',\n \"extends\": BaseComponent,\n props: {\n value: {\n type: null,\n \"default\": null\n },\n expandedKeys: {\n type: null,\n \"default\": null\n },\n selectionKeys: {\n type: null,\n \"default\": null\n },\n selectionMode: {\n type: String,\n \"default\": null\n },\n metaKeySelection: {\n type: Boolean,\n \"default\": false\n },\n loading: {\n type: Boolean,\n \"default\": false\n },\n loadingIcon: {\n type: String,\n \"default\": undefined\n },\n loadingMode: {\n type: String,\n \"default\": 'mask'\n },\n filter: {\n type: Boolean,\n \"default\": false\n },\n filterBy: {\n type: String,\n \"default\": 'label'\n },\n filterMode: {\n type: String,\n \"default\": 'lenient'\n },\n filterPlaceholder: {\n type: String,\n \"default\": null\n },\n filterLocale: {\n type: String,\n \"default\": undefined\n },\n highlightOnSelect: {\n type: Boolean,\n \"default\": false\n },\n scrollHeight: {\n type: String,\n \"default\": null\n },\n level: {\n type: Number,\n \"default\": 0\n },\n ariaLabelledby: {\n type: String,\n \"default\": null\n },\n ariaLabel: {\n type: String,\n \"default\": null\n }\n },\n style: TreeStyle,\n provide: function provide() {\n return {\n $pcTree: this,\n $parentInstance: this\n };\n }\n};\n\nfunction _typeof$1(o) { \"@babel/helpers - typeof\"; return _typeof$1 = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof$1(o); }\nfunction _createForOfIteratorHelper$1(r, e) { var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$1(r)) || e) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t[\"return\"] || t[\"return\"](); } finally { if (u) throw o; } } }; }\nfunction ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty$1(e, r, t) { return (r = _toPropertyKey$1(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey$1(t) { var i = _toPrimitive$1(t, \"string\"); return \"symbol\" == _typeof$1(i) ? i : i + \"\"; }\nfunction _toPrimitive$1(t, r) { if (\"object\" != _typeof$1(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof$1(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _toConsumableArray$1(r) { return _arrayWithoutHoles$1(r) || _iterableToArray$1(r) || _unsupportedIterableToArray$1(r) || _nonIterableSpread$1(); }\nfunction _nonIterableSpread$1() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray$1(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray$1(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0; } }\nfunction _iterableToArray$1(r) { if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r); }\nfunction _arrayWithoutHoles$1(r) { if (Array.isArray(r)) return _arrayLikeToArray$1(r); }\nfunction _arrayLikeToArray$1(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nvar script$1 = {\n name: 'TreeNode',\n hostName: 'Tree',\n \"extends\": BaseComponent,\n emits: ['node-toggle', 'node-click', 'checkbox-change'],\n props: {\n node: {\n type: null,\n \"default\": null\n },\n expandedKeys: {\n type: null,\n \"default\": null\n },\n loadingMode: {\n type: String,\n \"default\": 'mask'\n },\n selectionKeys: {\n type: null,\n \"default\": null\n },\n selectionMode: {\n type: String,\n \"default\": null\n },\n templates: {\n type: null,\n \"default\": null\n },\n level: {\n type: Number,\n \"default\": null\n },\n index: null\n },\n nodeTouched: false,\n toggleClicked: false,\n mounted: function mounted() {\n this.setAllNodesTabIndexes();\n },\n methods: {\n toggle: function toggle() {\n this.$emit('node-toggle', this.node);\n this.toggleClicked = true;\n },\n label: function label(node) {\n return typeof node.label === 'function' ? node.label() : node.label;\n },\n onChildNodeToggle: function onChildNodeToggle(node) {\n this.$emit('node-toggle', node);\n },\n getPTOptions: function getPTOptions(key) {\n return this.ptm(key, {\n context: {\n index: this.index,\n expanded: this.expanded,\n selected: this.selected,\n checked: this.checked,\n leaf: this.leaf\n }\n });\n },\n onClick: function onClick(event) {\n if (this.toggleClicked || getAttribute(event.target, '[data-pc-section=\"nodetogglebutton\"]') || getAttribute(event.target.parentElement, '[data-pc-section=\"nodetogglebutton\"]')) {\n this.toggleClicked = false;\n return;\n }\n if (this.isCheckboxSelectionMode()) {\n if (this.node.selectable != false) {\n this.toggleCheckbox();\n }\n } else {\n this.$emit('node-click', {\n originalEvent: event,\n nodeTouched: this.nodeTouched,\n node: this.node\n });\n }\n this.nodeTouched = false;\n },\n onChildNodeClick: function onChildNodeClick(event) {\n this.$emit('node-click', event);\n },\n onTouchEnd: function onTouchEnd() {\n this.nodeTouched = true;\n },\n onKeyDown: function onKeyDown(event) {\n if (!this.isSameNode(event)) return;\n switch (event.code) {\n case 'Tab':\n this.onTabKey(event);\n break;\n case 'ArrowDown':\n this.onArrowDown(event);\n break;\n case 'ArrowUp':\n this.onArrowUp(event);\n break;\n case 'ArrowRight':\n this.onArrowRight(event);\n break;\n case 'ArrowLeft':\n this.onArrowLeft(event);\n break;\n case 'Enter':\n case 'NumpadEnter':\n case 'Space':\n this.onEnterKey(event);\n break;\n }\n },\n onArrowDown: function onArrowDown(event) {\n var nodeElement = event.target.getAttribute('data-pc-section') === 'nodetogglebutton' ? event.target.closest('[role=\"treeitem\"]') : event.target;\n var listElement = nodeElement.children[1];\n if (listElement) {\n this.focusRowChange(nodeElement, listElement.children[0]);\n } else {\n if (nodeElement.nextElementSibling) {\n this.focusRowChange(nodeElement, nodeElement.nextElementSibling);\n } else {\n var nextSiblingAncestor = this.findNextSiblingOfAncestor(nodeElement);\n if (nextSiblingAncestor) {\n this.focusRowChange(nodeElement, nextSiblingAncestor);\n }\n }\n }\n event.preventDefault();\n },\n onArrowUp: function onArrowUp(event) {\n var nodeElement = event.target;\n if (nodeElement.previousElementSibling) {\n this.focusRowChange(nodeElement, nodeElement.previousElementSibling, this.findLastVisibleDescendant(nodeElement.previousElementSibling));\n } else {\n var parentNodeElement = this.getParentNodeElement(nodeElement);\n if (parentNodeElement) {\n this.focusRowChange(nodeElement, parentNodeElement);\n }\n }\n event.preventDefault();\n },\n onArrowRight: function onArrowRight(event) {\n var _this = this;\n if (this.leaf || this.expanded) return;\n event.currentTarget.tabIndex = -1;\n this.$emit('node-toggle', this.node);\n this.$nextTick(function () {\n _this.onArrowDown(event);\n });\n },\n onArrowLeft: function onArrowLeft(event) {\n var togglerElement = findSingle(event.currentTarget, '[data-pc-section=\"nodetogglebutton\"]');\n if (this.level === 0 && !this.expanded) {\n return false;\n }\n if (this.expanded && !this.leaf) {\n togglerElement.click();\n return false;\n }\n var target = this.findBeforeClickableNode(event.currentTarget);\n if (target) {\n this.focusRowChange(event.currentTarget, target);\n }\n },\n onEnterKey: function onEnterKey(event) {\n this.setTabIndexForSelectionMode(event, this.nodeTouched);\n this.onClick(event);\n event.preventDefault();\n },\n onTabKey: function onTabKey() {\n this.setAllNodesTabIndexes();\n },\n setAllNodesTabIndexes: function setAllNodesTabIndexes() {\n var nodes = find(this.$refs.currentNode.closest('[data-pc-section=\"rootchildren\"]'), '[role=\"treeitem\"]');\n var hasSelectedNode = _toConsumableArray$1(nodes).some(function (node) {\n return node.getAttribute('aria-selected') === 'true' || node.getAttribute('aria-checked') === 'true';\n });\n _toConsumableArray$1(nodes).forEach(function (node) {\n node.tabIndex = -1;\n });\n if (hasSelectedNode) {\n var selectedNodes = _toConsumableArray$1(nodes).filter(function (node) {\n return node.getAttribute('aria-selected') === 'true' || node.getAttribute('aria-checked') === 'true';\n });\n selectedNodes[0].tabIndex = 0;\n return;\n }\n _toConsumableArray$1(nodes)[0].tabIndex = 0;\n },\n setTabIndexForSelectionMode: function setTabIndexForSelectionMode(event, nodeTouched) {\n if (this.selectionMode !== null) {\n var elements = _toConsumableArray$1(find(this.$refs.currentNode.parentElement, '[role=\"treeitem\"]'));\n event.currentTarget.tabIndex = nodeTouched === false ? -1 : 0;\n if (elements.every(function (element) {\n return element.tabIndex === -1;\n })) {\n elements[0].tabIndex = 0;\n }\n }\n },\n focusRowChange: function focusRowChange(firstFocusableRow, currentFocusedRow, lastVisibleDescendant) {\n firstFocusableRow.tabIndex = '-1';\n currentFocusedRow.tabIndex = '0';\n this.focusNode(lastVisibleDescendant || currentFocusedRow);\n },\n findBeforeClickableNode: function findBeforeClickableNode(node) {\n var parentListElement = node.closest('ul').closest('li');\n if (parentListElement) {\n var prevNodeButton = findSingle(parentListElement, 'button');\n if (prevNodeButton && prevNodeButton.style.visibility !== 'hidden') {\n return parentListElement;\n }\n return this.findBeforeClickableNode(node.previousElementSibling);\n }\n return null;\n },\n toggleCheckbox: function toggleCheckbox() {\n var _selectionKeys = this.selectionKeys ? _objectSpread$1({}, this.selectionKeys) : {};\n var _check = !this.checked;\n this.propagateDown(this.node, _check, _selectionKeys);\n this.$emit('checkbox-change', {\n node: this.node,\n check: _check,\n selectionKeys: _selectionKeys\n });\n },\n propagateDown: function propagateDown(node, check, selectionKeys) {\n if (check && node.selectable != false) selectionKeys[node.key] = {\n checked: true,\n partialChecked: false\n };else delete selectionKeys[node.key];\n if (node.children && node.children.length) {\n var _iterator = _createForOfIteratorHelper$1(node.children),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var child = _step.value;\n this.propagateDown(child, check, selectionKeys);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n }\n },\n propagateUp: function propagateUp(event) {\n var check = event.check;\n var _selectionKeys = _objectSpread$1({}, event.selectionKeys);\n var checkedChildCount = 0;\n var childPartialSelected = false;\n var _iterator2 = _createForOfIteratorHelper$1(this.node.children),\n _step2;\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var child = _step2.value;\n if (_selectionKeys[child.key] && _selectionKeys[child.key].checked) checkedChildCount++;else if (_selectionKeys[child.key] && _selectionKeys[child.key].partialChecked) childPartialSelected = true;\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n if (check && checkedChildCount === this.node.children.length) {\n _selectionKeys[this.node.key] = {\n checked: true,\n partialChecked: false\n };\n } else {\n if (!check) {\n delete _selectionKeys[this.node.key];\n }\n if (childPartialSelected || checkedChildCount > 0 && checkedChildCount !== this.node.children.length) _selectionKeys[this.node.key] = {\n checked: false,\n partialChecked: true\n };else delete _selectionKeys[this.node.key];\n }\n this.$emit('checkbox-change', {\n node: event.node,\n check: event.check,\n selectionKeys: _selectionKeys\n });\n },\n onChildCheckboxChange: function onChildCheckboxChange(event) {\n this.$emit('checkbox-change', event);\n },\n findNextSiblingOfAncestor: function findNextSiblingOfAncestor(nodeElement) {\n var parentNodeElement = this.getParentNodeElement(nodeElement);\n if (parentNodeElement) {\n if (parentNodeElement.nextElementSibling) return parentNodeElement.nextElementSibling;else return this.findNextSiblingOfAncestor(parentNodeElement);\n } else {\n return null;\n }\n },\n findLastVisibleDescendant: function findLastVisibleDescendant(nodeElement) {\n var childrenListElement = nodeElement.children[1];\n if (childrenListElement) {\n var lastChildElement = childrenListElement.children[childrenListElement.children.length - 1];\n return this.findLastVisibleDescendant(lastChildElement);\n } else {\n return nodeElement;\n }\n },\n getParentNodeElement: function getParentNodeElement(nodeElement) {\n var parentNodeElement = nodeElement.parentElement.parentElement;\n return getAttribute(parentNodeElement, 'role') === 'treeitem' ? parentNodeElement : null;\n },\n focusNode: function focusNode(element) {\n element.focus();\n },\n isCheckboxSelectionMode: function isCheckboxSelectionMode() {\n return this.selectionMode === 'checkbox';\n },\n isSameNode: function isSameNode(event) {\n return event.currentTarget && (event.currentTarget.isSameNode(event.target) || event.currentTarget.isSameNode(event.target.closest('[role=\"treeitem\"]')));\n }\n },\n computed: {\n hasChildren: function hasChildren() {\n return this.node.children && this.node.children.length > 0;\n },\n expanded: function expanded() {\n return this.expandedKeys && this.expandedKeys[this.node.key] === true;\n },\n leaf: function leaf() {\n return this.node.leaf === false ? false : !(this.node.children && this.node.children.length);\n },\n selectable: function selectable() {\n return this.node.selectable === false ? false : this.selectionMode != null;\n },\n selected: function selected() {\n return this.selectionMode && this.selectionKeys ? this.selectionKeys[this.node.key] === true : false;\n },\n checkboxMode: function checkboxMode() {\n return this.selectionMode === 'checkbox' && this.node.selectable !== false;\n },\n checked: function checked() {\n return this.selectionKeys ? this.selectionKeys[this.node.key] && this.selectionKeys[this.node.key].checked : false;\n },\n partialChecked: function partialChecked() {\n return this.selectionKeys ? this.selectionKeys[this.node.key] && this.selectionKeys[this.node.key].partialChecked : false;\n },\n ariaChecked: function ariaChecked() {\n return this.selectionMode === 'single' || this.selectionMode === 'multiple' ? this.selected : undefined;\n },\n ariaSelected: function ariaSelected() {\n return this.checkboxMode ? this.checked : undefined;\n }\n },\n components: {\n Checkbox: Checkbox,\n ChevronDownIcon: ChevronDownIcon,\n ChevronRightIcon: ChevronRightIcon,\n CheckIcon: CheckIcon,\n MinusIcon: MinusIcon,\n SpinnerIcon: SpinnerIcon\n },\n directives: {\n ripple: Ripple\n }\n};\n\nvar _hoisted_1$1 = [\"aria-label\", \"aria-selected\", \"aria-expanded\", \"aria-setsize\", \"aria-posinset\", \"aria-level\", \"aria-checked\", \"tabindex\"];\nvar _hoisted_2 = [\"data-p-selected\", \"data-p-selectable\"];\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n var _component_SpinnerIcon = resolveComponent(\"SpinnerIcon\");\n var _component_Checkbox = resolveComponent(\"Checkbox\");\n var _component_TreeNode = resolveComponent(\"TreeNode\", true);\n var _directive_ripple = resolveDirective(\"ripple\");\n return openBlock(), createElementBlock(\"li\", mergeProps({\n ref: \"currentNode\",\n \"class\": _ctx.cx('node'),\n role: \"treeitem\",\n \"aria-label\": $options.label($props.node),\n \"aria-selected\": $options.ariaSelected,\n \"aria-expanded\": $options.expanded,\n \"aria-setsize\": $props.node.children ? $props.node.children.length : 0,\n \"aria-posinset\": $props.index + 1,\n \"aria-level\": $props.level,\n \"aria-checked\": $options.ariaChecked,\n tabindex: $props.index === 0 ? 0 : -1,\n onKeydown: _cache[4] || (_cache[4] = function () {\n return $options.onKeyDown && $options.onKeyDown.apply($options, arguments);\n })\n }, $props.level === 1 ? $options.getPTOptions('node') : _ctx.ptm('nodeChildren')), [createElementVNode(\"div\", mergeProps({\n \"class\": _ctx.cx('nodeContent'),\n onClick: _cache[2] || (_cache[2] = function () {\n return $options.onClick && $options.onClick.apply($options, arguments);\n }),\n onTouchend: _cache[3] || (_cache[3] = function () {\n return $options.onTouchEnd && $options.onTouchEnd.apply($options, arguments);\n }),\n style: $props.node.style\n }, $options.getPTOptions('nodeContent'), {\n \"data-p-selected\": $options.checkboxMode ? $options.checked : $options.selected,\n \"data-p-selectable\": $options.selectable\n }), [withDirectives((openBlock(), createElementBlock(\"button\", mergeProps({\n type: \"button\",\n \"class\": _ctx.cx('nodeToggleButton'),\n onClick: _cache[0] || (_cache[0] = function () {\n return $options.toggle && $options.toggle.apply($options, arguments);\n }),\n tabindex: \"-1\"\n }, $options.getPTOptions('nodeToggleButton')), [$props.node.loading && $props.loadingMode === 'icon' ? (openBlock(), createElementBlock(Fragment, {\n key: 0\n }, [$props.templates['nodetoggleicon'] || $props.templates['nodetogglericon'] ? (openBlock(), createBlock(resolveDynamicComponent($props.templates['nodetoggleicon'] || $props.templates['nodetogglericon']), {\n key: 0,\n \"class\": normalizeClass(_ctx.cx('nodeToggleIcon'))\n }, null, 8, [\"class\"])) : (openBlock(), createBlock(_component_SpinnerIcon, mergeProps({\n key: 1,\n spin: \"\",\n \"class\": _ctx.cx('nodetogglericon')\n }, _ctx.ptm('nodeToggleIcon')), null, 16, [\"class\"]))], 64)) : (openBlock(), createElementBlock(Fragment, {\n key: 1\n }, [$props.templates['nodetoggleicon'] || $props.templates['togglericon'] ? (openBlock(), createBlock(resolveDynamicComponent($props.templates['nodetoggleicon'] || $props.templates['togglericon']), {\n key: 0,\n node: $props.node,\n expanded: $options.expanded,\n \"class\": normalizeClass(_ctx.cx('nodeToggleIcon'))\n }, null, 8, [\"node\", \"expanded\", \"class\"])) : $options.expanded ? (openBlock(), createBlock(resolveDynamicComponent($props.node.expandedIcon ? 'span' : 'ChevronDownIcon'), mergeProps({\n key: 1,\n \"class\": _ctx.cx('nodeToggleIcon')\n }, $options.getPTOptions('nodeToggleIcon')), null, 16, [\"class\"])) : (openBlock(), createBlock(resolveDynamicComponent($props.node.collapsedIcon ? 'span' : 'ChevronRightIcon'), mergeProps({\n key: 2,\n \"class\": _ctx.cx('nodeToggleIcon')\n }, $options.getPTOptions('nodeToggleIcon')), null, 16, [\"class\"]))], 64))], 16)), [[_directive_ripple]]), $options.checkboxMode ? (openBlock(), createBlock(_component_Checkbox, {\n key: 0,\n modelValue: $options.checked,\n binary: true,\n indeterminate: $options.partialChecked,\n \"class\": normalizeClass(_ctx.cx('nodeCheckbox')),\n tabindex: -1,\n unstyled: _ctx.unstyled,\n pt: $options.getPTOptions('nodeCheckbox'),\n \"data-p-partialchecked\": $options.partialChecked\n }, {\n icon: withCtx(function (slotProps) {\n return [$props.templates['checkboxicon'] ? (openBlock(), createBlock(resolveDynamicComponent($props.templates['checkboxicon']), {\n key: 0,\n checked: slotProps.checked,\n partialChecked: $options.partialChecked,\n \"class\": normalizeClass(slotProps[\"class\"])\n }, null, 8, [\"checked\", \"partialChecked\", \"class\"])) : createCommentVNode(\"\", true)];\n }),\n _: 1\n }, 8, [\"modelValue\", \"indeterminate\", \"class\", \"unstyled\", \"pt\", \"data-p-partialchecked\"])) : createCommentVNode(\"\", true), $props.templates['nodeicon'] ? (openBlock(), createBlock(resolveDynamicComponent($props.templates['nodeicon']), mergeProps({\n key: 1,\n node: $props.node,\n \"class\": [_ctx.cx('nodeIcon')]\n }, $options.getPTOptions('nodeIcon')), null, 16, [\"node\", \"class\"])) : (openBlock(), createElementBlock(\"span\", mergeProps({\n key: 2,\n \"class\": [_ctx.cx('nodeIcon'), $props.node.icon]\n }, $options.getPTOptions('nodeIcon')), null, 16)), createElementVNode(\"span\", mergeProps({\n \"class\": _ctx.cx('nodeLabel')\n }, $options.getPTOptions('nodeLabel'), {\n onKeydown: _cache[1] || (_cache[1] = withModifiers(function () {}, [\"stop\"]))\n }), [$props.templates[$props.node.type] || $props.templates['default'] ? (openBlock(), createBlock(resolveDynamicComponent($props.templates[$props.node.type] || $props.templates['default']), {\n key: 0,\n node: $props.node,\n selected: $options.checkboxMode ? $options.checked : $options.selected\n }, null, 8, [\"node\", \"selected\"])) : (openBlock(), createElementBlock(Fragment, {\n key: 1\n }, [createTextVNode(toDisplayString($options.label($props.node)), 1)], 64))], 16)], 16, _hoisted_2), $options.hasChildren && $options.expanded ? (openBlock(), createElementBlock(\"ul\", mergeProps({\n key: 0,\n \"class\": _ctx.cx('nodeChildren'),\n role: \"group\"\n }, _ctx.ptm('nodeChildren')), [(openBlock(true), createElementBlock(Fragment, null, renderList($props.node.children, function (childNode) {\n return openBlock(), createBlock(_component_TreeNode, {\n key: childNode.key,\n node: childNode,\n templates: $props.templates,\n level: $props.level + 1,\n loadingMode: $props.loadingMode,\n expandedKeys: $props.expandedKeys,\n onNodeToggle: $options.onChildNodeToggle,\n onNodeClick: $options.onChildNodeClick,\n selectionMode: $props.selectionMode,\n selectionKeys: $props.selectionKeys,\n onCheckboxChange: $options.propagateUp,\n unstyled: _ctx.unstyled,\n pt: _ctx.pt\n }, null, 8, [\"node\", \"templates\", \"level\", \"loadingMode\", \"expandedKeys\", \"onNodeToggle\", \"onNodeClick\", \"selectionMode\", \"selectionKeys\", \"onCheckboxChange\", \"unstyled\", \"pt\"]);\n }), 128))], 16)) : createCommentVNode(\"\", true)], 16, _hoisted_1$1);\n}\n\nscript$1.render = render$1;\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _createForOfIteratorHelper(r, e) { var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t[\"return\"] || t[\"return\"](); } finally { if (u) throw o; } } }; }\nfunction _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _iterableToArray(r) { if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r); }\nfunction _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nvar script = {\n name: 'Tree',\n \"extends\": script$2,\n inheritAttrs: false,\n emits: ['node-expand', 'node-collapse', 'update:expandedKeys', 'update:selectionKeys', 'node-select', 'node-unselect', 'filter'],\n data: function data() {\n return {\n d_expandedKeys: this.expandedKeys || {},\n filterValue: null\n };\n },\n watch: {\n expandedKeys: function expandedKeys(newValue) {\n this.d_expandedKeys = newValue;\n }\n },\n methods: {\n onNodeToggle: function onNodeToggle(node) {\n var key = node.key;\n if (this.d_expandedKeys[key]) {\n delete this.d_expandedKeys[key];\n this.$emit('node-collapse', node);\n } else {\n this.d_expandedKeys[key] = true;\n this.$emit('node-expand', node);\n }\n this.d_expandedKeys = _objectSpread({}, this.d_expandedKeys);\n this.$emit('update:expandedKeys', this.d_expandedKeys);\n },\n onNodeClick: function onNodeClick(event) {\n if (this.selectionMode != null && event.node.selectable !== false) {\n var metaSelection = event.nodeTouched ? false : this.metaKeySelection;\n var _selectionKeys = metaSelection ? this.handleSelectionWithMetaKey(event) : this.handleSelectionWithoutMetaKey(event);\n this.$emit('update:selectionKeys', _selectionKeys);\n }\n },\n onCheckboxChange: function onCheckboxChange(event) {\n this.$emit('update:selectionKeys', event.selectionKeys);\n if (event.check) this.$emit('node-select', event.node);else this.$emit('node-unselect', event.node);\n },\n handleSelectionWithMetaKey: function handleSelectionWithMetaKey(event) {\n var originalEvent = event.originalEvent;\n var node = event.node;\n var metaKey = originalEvent.metaKey || originalEvent.ctrlKey;\n var selected = this.isNodeSelected(node);\n var _selectionKeys;\n if (selected && metaKey) {\n if (this.isSingleSelectionMode()) {\n _selectionKeys = {};\n } else {\n _selectionKeys = _objectSpread({}, this.selectionKeys);\n delete _selectionKeys[node.key];\n }\n this.$emit('node-unselect', node);\n } else {\n if (this.isSingleSelectionMode()) {\n _selectionKeys = {};\n } else if (this.isMultipleSelectionMode()) {\n _selectionKeys = !metaKey ? {} : this.selectionKeys ? _objectSpread({}, this.selectionKeys) : {};\n }\n _selectionKeys[node.key] = true;\n this.$emit('node-select', node);\n }\n return _selectionKeys;\n },\n handleSelectionWithoutMetaKey: function handleSelectionWithoutMetaKey(event) {\n var node = event.node;\n var selected = this.isNodeSelected(node);\n var _selectionKeys;\n if (this.isSingleSelectionMode()) {\n if (selected) {\n _selectionKeys = {};\n this.$emit('node-unselect', node);\n } else {\n _selectionKeys = {};\n _selectionKeys[node.key] = true;\n this.$emit('node-select', node);\n }\n } else {\n if (selected) {\n _selectionKeys = _objectSpread({}, this.selectionKeys);\n delete _selectionKeys[node.key];\n this.$emit('node-unselect', node);\n } else {\n _selectionKeys = this.selectionKeys ? _objectSpread({}, this.selectionKeys) : {};\n _selectionKeys[node.key] = true;\n this.$emit('node-select', node);\n }\n }\n return _selectionKeys;\n },\n isSingleSelectionMode: function isSingleSelectionMode() {\n return this.selectionMode === 'single';\n },\n isMultipleSelectionMode: function isMultipleSelectionMode() {\n return this.selectionMode === 'multiple';\n },\n isNodeSelected: function isNodeSelected(node) {\n return this.selectionMode && this.selectionKeys ? this.selectionKeys[node.key] === true : false;\n },\n isChecked: function isChecked(node) {\n return this.selectionKeys ? this.selectionKeys[node.key] && this.selectionKeys[node.key].checked : false;\n },\n isNodeLeaf: function isNodeLeaf(node) {\n return node.leaf === false ? false : !(node.children && node.children.length);\n },\n onFilterKeydown: function onFilterKeydown(event) {\n if (event.code === 'Enter' || event.code === 'NumpadEnter') {\n event.preventDefault();\n }\n this.$emit('filter', {\n originalEvent: event,\n value: event.target.value\n });\n },\n findFilteredNodes: function findFilteredNodes(node, paramsWithoutNode) {\n if (node) {\n var matched = false;\n if (node.children) {\n var childNodes = _toConsumableArray(node.children);\n node.children = [];\n var _iterator = _createForOfIteratorHelper(childNodes),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var childNode = _step.value;\n var copyChildNode = _objectSpread({}, childNode);\n if (this.isFilterMatched(copyChildNode, paramsWithoutNode)) {\n matched = true;\n node.children.push(copyChildNode);\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n }\n if (matched) {\n return true;\n }\n }\n },\n isFilterMatched: function isFilterMatched(node, _ref) {\n var searchFields = _ref.searchFields,\n filterText = _ref.filterText,\n strict = _ref.strict;\n var matched = false;\n var _iterator2 = _createForOfIteratorHelper(searchFields),\n _step2;\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var field = _step2.value;\n var fieldValue = String(resolveFieldData(node, field)).toLocaleLowerCase(this.filterLocale);\n if (fieldValue.indexOf(filterText) > -1) {\n matched = true;\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n if (!matched || strict && !this.isNodeLeaf(node)) {\n matched = this.findFilteredNodes(node, {\n searchFields: searchFields,\n filterText: filterText,\n strict: strict\n }) || matched;\n }\n return matched;\n }\n },\n computed: {\n filteredValue: function filteredValue() {\n var filteredNodes = [];\n var searchFields = this.filterBy.split(',');\n var filterText = this.filterValue.trim().toLocaleLowerCase(this.filterLocale);\n var strict = this.filterMode === 'strict';\n var _iterator3 = _createForOfIteratorHelper(this.value),\n _step3;\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var node = _step3.value;\n var _node = _objectSpread({}, node);\n var paramsWithoutNode = {\n searchFields: searchFields,\n filterText: filterText,\n strict: strict\n };\n if (strict && (this.findFilteredNodes(_node, paramsWithoutNode) || this.isFilterMatched(_node, paramsWithoutNode)) || !strict && (this.isFilterMatched(_node, paramsWithoutNode) || this.findFilteredNodes(_node, paramsWithoutNode))) {\n filteredNodes.push(_node);\n }\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n return filteredNodes;\n },\n valueToRender: function valueToRender() {\n if (this.filterValue && this.filterValue.trim().length > 0) return this.filteredValue;else return this.value;\n }\n },\n components: {\n TreeNode: script$1,\n InputText: InputText,\n InputIcon: InputIcon,\n IconField: IconField,\n SearchIcon: SearchIcon,\n SpinnerIcon: SpinnerIcon\n }\n};\n\nvar _hoisted_1 = [\"aria-labelledby\", \"aria-label\"];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n var _component_SpinnerIcon = resolveComponent(\"SpinnerIcon\");\n var _component_InputText = resolveComponent(\"InputText\");\n var _component_SearchIcon = resolveComponent(\"SearchIcon\");\n var _component_InputIcon = resolveComponent(\"InputIcon\");\n var _component_IconField = resolveComponent(\"IconField\");\n var _component_TreeNode = resolveComponent(\"TreeNode\");\n return openBlock(), createElementBlock(\"div\", mergeProps({\n \"class\": _ctx.cx('root')\n }, _ctx.ptmi('root')), [_ctx.loading && _ctx.loadingMode === 'mask' ? (openBlock(), createElementBlock(\"div\", mergeProps({\n key: 0,\n \"class\": _ctx.cx('mask')\n }, _ctx.ptm('mask')), [renderSlot(_ctx.$slots, \"loadingicon\", {\n \"class\": normalizeClass(_ctx.cx('loadingIcon'))\n }, function () {\n return [_ctx.loadingIcon ? (openBlock(), createElementBlock(\"i\", mergeProps({\n key: 0,\n \"class\": [_ctx.cx('loadingIcon'), 'pi-spin', _ctx.loadingIcon]\n }, _ctx.ptm('loadingIcon')), null, 16)) : (openBlock(), createBlock(_component_SpinnerIcon, mergeProps({\n key: 1,\n spin: \"\",\n \"class\": _ctx.cx('loadingIcon')\n }, _ctx.ptm('loadingIcon')), null, 16, [\"class\"]))];\n })], 16)) : createCommentVNode(\"\", true), _ctx.filter ? (openBlock(), createBlock(_component_IconField, {\n key: 1,\n unstyled: _ctx.unstyled,\n pt: _ctx.ptm('pcFilterContainer')\n }, {\n \"default\": withCtx(function () {\n return [createVNode(_component_InputText, {\n modelValue: $data.filterValue,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = function ($event) {\n return $data.filterValue = $event;\n }),\n autocomplete: \"off\",\n \"class\": normalizeClass(_ctx.cx('pcFilter')),\n placeholder: _ctx.filterPlaceholder,\n unstyled: _ctx.unstyled,\n onKeydown: $options.onFilterKeydown,\n pt: _ctx.ptm('pcFilter')\n }, null, 8, [\"modelValue\", \"class\", \"placeholder\", \"unstyled\", \"onKeydown\", \"pt\"]), createVNode(_component_InputIcon, {\n unstyled: _ctx.unstyled,\n pt: _ctx.ptm('pcFilterIconContainer')\n }, {\n \"default\": withCtx(function () {\n return [renderSlot(_ctx.$slots, _ctx.$slots.filtericon ? 'filtericon' : 'searchicon', {\n \"class\": normalizeClass(_ctx.cx('filterIcon'))\n }, function () {\n return [createVNode(_component_SearchIcon, mergeProps({\n \"class\": _ctx.cx('filterIcon')\n }, _ctx.ptm('filterIcon')), null, 16, [\"class\"])];\n })];\n }),\n _: 3\n }, 8, [\"unstyled\", \"pt\"])];\n }),\n _: 3\n }, 8, [\"unstyled\", \"pt\"])) : createCommentVNode(\"\", true), createElementVNode(\"div\", mergeProps({\n \"class\": _ctx.cx('wrapper'),\n style: {\n maxHeight: _ctx.scrollHeight\n }\n }, _ctx.ptm('wrapper')), [createElementVNode(\"ul\", mergeProps({\n \"class\": _ctx.cx('rootChildren'),\n role: \"tree\",\n \"aria-labelledby\": _ctx.ariaLabelledby,\n \"aria-label\": _ctx.ariaLabel\n }, _ctx.ptm('rootChildren')), [(openBlock(true), createElementBlock(Fragment, null, renderList($options.valueToRender, function (node, index) {\n return openBlock(), createBlock(_component_TreeNode, {\n key: node.key,\n node: node,\n templates: _ctx.$slots,\n level: _ctx.level + 1,\n index: index,\n expandedKeys: $data.d_expandedKeys,\n onNodeToggle: $options.onNodeToggle,\n onNodeClick: $options.onNodeClick,\n selectionMode: _ctx.selectionMode,\n selectionKeys: _ctx.selectionKeys,\n onCheckboxChange: $options.onCheckboxChange,\n loadingMode: _ctx.loadingMode,\n unstyled: _ctx.unstyled,\n pt: _ctx.pt\n }, null, 8, [\"node\", \"templates\", \"level\", \"index\", \"expandedKeys\", \"onNodeToggle\", \"onNodeClick\", \"selectionMode\", \"selectionKeys\", \"onCheckboxChange\", \"loadingMode\", \"unstyled\", \"pt\"]);\n }), 128))], 16, _hoisted_1)], 16)], 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseStyle from '@primevue/core/base/style';\n\nvar theme = function theme(_ref) {\n var dt = _ref.dt;\n return \"\\n.p-contextmenu {\\n background: \".concat(dt('contextmenu.background'), \";\\n color: \").concat(dt('contextmenu.color'), \";\\n border: 1px solid \").concat(dt('contextmenu.border.color'), \";\\n border-radius: \").concat(dt('contextmenu.border.radius'), \";\\n box-shadow: \").concat(dt('contextmenu.shadow'), \";\\n min-width: 12.5rem;\\n}\\n\\n.p-contextmenu-root-list,\\n.p-contextmenu-submenu {\\n margin: 0;\\n padding: \").concat(dt('contextmenu.list.padding'), \";\\n list-style: none;\\n outline: 0 none;\\n display: flex;\\n flex-direction: column;\\n gap: \").concat(dt('contextmenu.list.gap'), \";\\n}\\n\\n.p-contextmenu-submenu {\\n position: absolute;\\n display: flex;\\n flex-direction: column;\\n min-width: 100%;\\n z-index: 1;\\n background: \").concat(dt('contextmenu.background'), \";\\n color: \").concat(dt('contextmenu.color'), \";\\n border: 1px solid \").concat(dt('contextmenu.border.color'), \";\\n border-radius: \").concat(dt('contextmenu.border.radius'), \";\\n box-shadow: \").concat(dt('contextmenu.shadow'), \";\\n}\\n\\n.p-contextmenu-item {\\n position: relative;\\n}\\n\\n.p-contextmenu-item-content {\\n transition: background \").concat(dt('contextmenu.transition.duration'), \", color \").concat(dt('contextmenu.transition.duration'), \";\\n border-radius: \").concat(dt('contextmenu.item.border.radius'), \";\\n color: \").concat(dt('contextmenu.item.color'), \";\\n}\\n\\n.p-contextmenu-item-link {\\n cursor: pointer;\\n display: flex;\\n align-items: center;\\n text-decoration: none;\\n overflow: hidden;\\n position: relative;\\n color: inherit;\\n padding: \").concat(dt('contextmenu.item.padding'), \";\\n gap: \").concat(dt('contextmenu.item.gap'), \";\\n user-select: none;\\n}\\n\\n.p-contextmenu-item-label {\\n line-height: 1;\\n}\\n\\n.p-contextmenu-item-icon {\\n color: \").concat(dt('contextmenu.item.icon.color'), \";\\n}\\n\\n.p-contextmenu-submenu-icon {\\n color: \").concat(dt('contextmenu.submenu.icon.color'), \";\\n margin-left: auto;\\n font-size: \").concat(dt('contextmenu.submenu.icon.size'), \";\\n width: \").concat(dt('contextmenu.submenu.icon.size'), \";\\n height: \").concat(dt('contextmenu.submenu.icon.size'), \";\\n}\\n\\n.p-contextmenu-item.p-focus > .p-contextmenu-item-content {\\n color: \").concat(dt('contextmenu.item.focus.color'), \";\\n background: \").concat(dt('contextmenu.item.focus.background'), \";\\n}\\n\\n.p-contextmenu-item.p-focus > .p-contextmenu-item-content .p-contextmenu-item-icon {\\n color: \").concat(dt('contextmenu.item.icon.focus.color'), \";\\n}\\n\\n.p-contextmenu-item.p-focus > .p-contextmenu-item-content .p-contextmenu-submenu-icon {\\n color: \").concat(dt('contextmenu.submenu.icon.focus.color'), \";\\n}\\n\\n.p-contextmenu-item:not(.p-disabled) > .p-contextmenu-item-content:hover {\\n color: \").concat(dt('contextmenu.item.focus.color'), \";\\n background: \").concat(dt('contextmenu.item.focus.background'), \";\\n}\\n\\n.p-contextmenu-item:not(.p-disabled) > .p-contextmenu-item-content:hover .p-contextmenu-item-icon {\\n color: \").concat(dt('contextmenu.item.icon.focus.color'), \";\\n}\\n\\n.p-contextmenu-item:not(.p-disabled) > .p-contextmenu-item-content:hover .p-contextmenu-submenu-icon {\\n color: \").concat(dt('contextmenu.submenu.icon.focus.color'), \";\\n}\\n\\n.p-contextmenu-item-active > .p-contextmenu-item-content {\\n color: \").concat(dt('contextmenu.item.active.color'), \";\\n background: \").concat(dt('contextmenu.item.active.background'), \";\\n}\\n\\n.p-contextmenu-item-active > .p-contextmenu-item-content .p-contextmenu-item-icon {\\n color: \").concat(dt('contextmenu.item.icon.active.color'), \";\\n}\\n\\n.p-contextmenu-item-active > .p-contextmenu-item-content .p-contextmenu-submenu-icon {\\n color: \").concat(dt('contextmenu.submenu.icon.active.color'), \";\\n}\\n\\n.p-contextmenu-separator {\\n border-top: 1px solid \").concat(dt('contextmenu.separator.border.color'), \";\\n}\\n\\n.p-contextmenu-enter-from,\\n.p-contextmenu-leave-active {\\n opacity: 0;\\n}\\n\\n.p-contextmenu-enter-active {\\n transition: opacity 250ms;\\n}\\n\");\n};\nvar classes = {\n root: 'p-contextmenu p-component',\n rootList: 'p-contextmenu-root-list',\n item: function item(_ref2) {\n var instance = _ref2.instance,\n processedItem = _ref2.processedItem;\n return ['p-contextmenu-item', {\n 'p-contextmenu-item-active': instance.isItemActive(processedItem),\n 'p-focus': instance.isItemFocused(processedItem),\n 'p-disabled': instance.isItemDisabled(processedItem)\n }];\n },\n itemContent: 'p-contextmenu-item-content',\n itemLink: 'p-contextmenu-item-link',\n itemIcon: 'p-contextmenu-item-icon',\n itemLabel: 'p-contextmenu-item-label',\n submenuIcon: 'p-contextmenu-submenu-icon',\n submenu: 'p-contextmenu-submenu',\n separator: 'p-contextmenu-separator'\n};\nvar ContextMenuStyle = BaseStyle.extend({\n name: 'contextmenu',\n theme: theme,\n classes: classes\n});\n\nexport { ContextMenuStyle as default };\n//# sourceMappingURL=index.mjs.map\n","import BaseIcon from '@primevue/icons/baseicon';\nimport { openBlock, createElementBlock, mergeProps, createElementVNode } from 'vue';\n\nvar script = {\n name: 'AngleRightIcon',\n \"extends\": BaseIcon\n};\n\nvar _hoisted_1 = /*#__PURE__*/createElementVNode(\"path\", {\n d: \"M5.25 11.1728C5.14929 11.1694 5.05033 11.1455 4.9592 11.1025C4.86806 11.0595 4.78666 10.9984 4.72 10.9228C4.57955 10.7822 4.50066 10.5916 4.50066 10.3928C4.50066 10.1941 4.57955 10.0035 4.72 9.86283L7.72 6.86283L4.72 3.86283C4.66067 3.71882 4.64765 3.55991 4.68275 3.40816C4.71785 3.25642 4.79932 3.11936 4.91585 3.01602C5.03238 2.91268 5.17819 2.84819 5.33305 2.83149C5.4879 2.81479 5.64411 2.84671 5.78 2.92283L9.28 6.42283C9.42045 6.56346 9.49934 6.75408 9.49934 6.95283C9.49934 7.15158 9.42045 7.34221 9.28 7.48283L5.78 10.9228C5.71333 10.9984 5.63193 11.0595 5.5408 11.1025C5.44966 11.1455 5.35071 11.1694 5.25 11.1728Z\",\n fill: \"currentColor\"\n}, null, -1);\nvar _hoisted_2 = [_hoisted_1];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return openBlock(), createElementBlock(\"svg\", mergeProps({\n width: \"14\",\n height: \"14\",\n viewBox: \"0 0 14 14\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, _ctx.pti()), _hoisted_2, 16);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","import { UniqueComponentId } from '@primevue/core/utils';\nimport { nestedPosition, focus, findSingle, addStyle, getHiddenElementOuterWidth, getHiddenElementOuterHeight, getViewport, isTouchDevice } from '@primeuix/utils/dom';\nimport { resolve, isNotEmpty, isPrintableCharacter, isEmpty, findLastIndex } from '@primeuix/utils/object';\nimport { ZIndex } from '@primeuix/utils/zindex';\nimport Portal from 'primevue/portal';\nimport BaseComponent from '@primevue/core/basecomponent';\nimport ContextMenuStyle from 'primevue/contextmenu/style';\nimport AngleRightIcon from '@primevue/icons/angleright';\nimport Ripple from 'primevue/ripple';\nimport { mergeProps, resolveComponent, resolveDirective, openBlock, createBlock, Transition, withCtx, createElementBlock, Fragment, renderList, createElementVNode, withDirectives, resolveDynamicComponent, normalizeClass, createCommentVNode, toDisplayString, createVNode } from 'vue';\n\nvar script$2 = {\n name: 'BaseContextMenu',\n \"extends\": BaseComponent,\n props: {\n model: {\n type: Array,\n \"default\": null\n },\n appendTo: {\n type: [String, Object],\n \"default\": 'body'\n },\n autoZIndex: {\n type: Boolean,\n \"default\": true\n },\n baseZIndex: {\n type: Number,\n \"default\": 0\n },\n global: {\n type: Boolean,\n \"default\": false\n },\n tabindex: {\n type: Number,\n \"default\": 0\n },\n ariaLabelledby: {\n type: String,\n \"default\": null\n },\n ariaLabel: {\n type: String,\n \"default\": null\n }\n },\n style: ContextMenuStyle,\n provide: function provide() {\n return {\n $pcContextMenu: this,\n $parentInstance: this\n };\n }\n};\n\nvar script$1 = {\n name: 'ContextMenuSub',\n hostName: 'ContextMenu',\n \"extends\": BaseComponent,\n emits: ['item-click', 'item-mouseenter', 'item-mousemove'],\n props: {\n items: {\n type: Array,\n \"default\": null\n },\n menuId: {\n type: String,\n \"default\": null\n },\n focusedItemId: {\n type: String,\n \"default\": null\n },\n root: {\n type: Boolean,\n \"default\": false\n },\n visible: {\n type: Boolean,\n \"default\": false\n },\n level: {\n type: Number,\n \"default\": 0\n },\n templates: {\n type: Object,\n \"default\": null\n },\n activeItemPath: {\n type: Object,\n \"default\": null\n },\n tabindex: {\n type: Number,\n \"default\": 0\n }\n },\n methods: {\n getItemId: function getItemId(processedItem) {\n return \"\".concat(this.menuId, \"_\").concat(processedItem.key);\n },\n getItemKey: function getItemKey(processedItem) {\n return this.getItemId(processedItem);\n },\n getItemProp: function getItemProp(processedItem, name, params) {\n return processedItem && processedItem.item ? resolve(processedItem.item[name], params) : undefined;\n },\n getItemLabel: function getItemLabel(processedItem) {\n return this.getItemProp(processedItem, 'label');\n },\n getItemLabelId: function getItemLabelId(processedItem) {\n return \"\".concat(this.menuId, \"_\").concat(processedItem.key, \"_label\");\n },\n getPTOptions: function getPTOptions(key, processedItem, index) {\n return this.ptm(key, {\n context: {\n item: processedItem.item,\n active: this.isItemActive(processedItem),\n focused: this.isItemFocused(processedItem),\n disabled: this.isItemDisabled(processedItem),\n index: index\n }\n });\n },\n isItemActive: function isItemActive(processedItem) {\n return this.activeItemPath.some(function (path) {\n return path.key === processedItem.key;\n });\n },\n isItemVisible: function isItemVisible(processedItem) {\n return this.getItemProp(processedItem, 'visible') !== false;\n },\n isItemDisabled: function isItemDisabled(processedItem) {\n return this.getItemProp(processedItem, 'disabled');\n },\n isItemFocused: function isItemFocused(processedItem) {\n return this.focusedItemId === this.getItemId(processedItem);\n },\n isItemGroup: function isItemGroup(processedItem) {\n return isNotEmpty(processedItem.items);\n },\n onItemClick: function onItemClick(event, processedItem) {\n this.getItemProp(processedItem, 'command', {\n originalEvent: event,\n item: processedItem.item\n });\n this.$emit('item-click', {\n originalEvent: event,\n processedItem: processedItem,\n isFocus: true\n });\n },\n onItemMouseEnter: function onItemMouseEnter(event, processedItem) {\n this.$emit('item-mouseenter', {\n originalEvent: event,\n processedItem: processedItem\n });\n },\n onItemMouseMove: function onItemMouseMove(event, processedItem) {\n this.$emit('item-mousemove', {\n originalEvent: event,\n processedItem: processedItem,\n isFocus: true\n });\n },\n getAriaSetSize: function getAriaSetSize() {\n var _this = this;\n return this.items.filter(function (processedItem) {\n return _this.isItemVisible(processedItem) && !_this.getItemProp(processedItem, 'separator');\n }).length;\n },\n getAriaPosInset: function getAriaPosInset(index) {\n var _this2 = this;\n return index - this.items.slice(0, index).filter(function (processedItem) {\n return _this2.isItemVisible(processedItem) && _this2.getItemProp(processedItem, 'separator');\n }).length + 1;\n },\n onEnter: function onEnter() {\n nestedPosition(this.$refs.container, this.level);\n },\n getMenuItemProps: function getMenuItemProps(processedItem, index) {\n return {\n action: mergeProps({\n \"class\": this.cx('itemLink'),\n tabindex: -1,\n 'aria-hidden': true\n }, this.getPTOptions('itemLink', processedItem, index)),\n icon: mergeProps({\n \"class\": [this.cx('itemIcon'), this.getItemProp(processedItem, 'icon')]\n }, this.getPTOptions('itemIcon', processedItem, index)),\n label: mergeProps({\n \"class\": this.cx('itemLabel')\n }, this.getPTOptions('itemLabel', processedItem, index)),\n submenuicon: mergeProps({\n \"class\": this.cx('submenuIcon')\n }, this.getPTOptions('submenuicon', processedItem, index))\n };\n }\n },\n components: {\n AngleRightIcon: AngleRightIcon\n },\n directives: {\n ripple: Ripple\n }\n};\n\nvar _hoisted_1 = [\"tabindex\"];\nvar _hoisted_2 = [\"id\", \"aria-label\", \"aria-disabled\", \"aria-expanded\", \"aria-haspopup\", \"aria-level\", \"aria-setsize\", \"aria-posinset\", \"data-p-active\", \"data-p-focused\", \"data-p-disabled\"];\nvar _hoisted_3 = [\"onClick\", \"onMouseenter\", \"onMousemove\"];\nvar _hoisted_4 = [\"href\", \"target\"];\nvar _hoisted_5 = [\"id\"];\nvar _hoisted_6 = [\"id\"];\nfunction render$1(_ctx, _cache, $props, $setup, $data, $options) {\n var _component_AngleRightIcon = resolveComponent(\"AngleRightIcon\");\n var _component_ContextMenuSub = resolveComponent(\"ContextMenuSub\", true);\n var _directive_ripple = resolveDirective(\"ripple\");\n return openBlock(), createBlock(Transition, mergeProps({\n name: \"p-contextmenusub\",\n onEnter: $options.onEnter\n }, _ctx.ptm('menu.transition')), {\n \"default\": withCtx(function () {\n return [($props.root ? true : $props.visible) ? (openBlock(), createElementBlock(\"ul\", mergeProps({\n key: 0,\n ref: \"container\",\n tabindex: $props.tabindex\n }, _ctx.ptm('rootList')), [(openBlock(true), createElementBlock(Fragment, null, renderList($props.items, function (processedItem, index) {\n return openBlock(), createElementBlock(Fragment, {\n key: $options.getItemKey(processedItem)\n }, [$options.isItemVisible(processedItem) && !$options.getItemProp(processedItem, 'separator') ? (openBlock(), createElementBlock(\"li\", mergeProps({\n key: 0,\n id: $options.getItemId(processedItem),\n style: $options.getItemProp(processedItem, 'style'),\n \"class\": [_ctx.cx('item', {\n processedItem: processedItem\n }), $options.getItemProp(processedItem, 'class')],\n role: \"menuitem\",\n \"aria-label\": $options.getItemLabel(processedItem),\n \"aria-disabled\": $options.isItemDisabled(processedItem) || undefined,\n \"aria-expanded\": $options.isItemGroup(processedItem) ? $options.isItemActive(processedItem) : undefined,\n \"aria-haspopup\": $options.isItemGroup(processedItem) && !$options.getItemProp(processedItem, 'to') ? 'menu' : undefined,\n \"aria-level\": $props.level + 1,\n \"aria-setsize\": $options.getAriaSetSize(),\n \"aria-posinset\": $options.getAriaPosInset(index),\n ref_for: true\n }, $options.getPTOptions('item', processedItem, index), {\n \"data-p-active\": $options.isItemActive(processedItem),\n \"data-p-focused\": $options.isItemFocused(processedItem),\n \"data-p-disabled\": $options.isItemDisabled(processedItem)\n }), [createElementVNode(\"div\", mergeProps({\n \"class\": _ctx.cx('itemContent'),\n onClick: function onClick($event) {\n return $options.onItemClick($event, processedItem);\n },\n onMouseenter: function onMouseenter($event) {\n return $options.onItemMouseEnter($event, processedItem);\n },\n onMousemove: function onMousemove($event) {\n return $options.onItemMouseMove($event, processedItem);\n },\n ref_for: true\n }, $options.getPTOptions('itemContent', processedItem, index)), [!$props.templates.item ? withDirectives((openBlock(), createElementBlock(\"a\", mergeProps({\n key: 0,\n href: $options.getItemProp(processedItem, 'url'),\n \"class\": _ctx.cx('itemLink'),\n target: $options.getItemProp(processedItem, 'target'),\n tabindex: \"-1\",\n ref_for: true\n }, $options.getPTOptions('itemLink', processedItem, index)), [$props.templates.itemicon ? (openBlock(), createBlock(resolveDynamicComponent($props.templates.itemicon), {\n key: 0,\n item: processedItem.item,\n \"class\": normalizeClass(_ctx.cx('itemIcon'))\n }, null, 8, [\"item\", \"class\"])) : $options.getItemProp(processedItem, 'icon') ? (openBlock(), createElementBlock(\"span\", mergeProps({\n key: 1,\n \"class\": [_ctx.cx('itemIcon'), $options.getItemProp(processedItem, 'icon')],\n ref_for: true\n }, $options.getPTOptions('itemIcon', processedItem, index)), null, 16)) : createCommentVNode(\"\", true), createElementVNode(\"span\", mergeProps({\n id: $options.getItemLabelId(processedItem),\n \"class\": _ctx.cx('itemLabel'),\n ref_for: true\n }, $options.getPTOptions('itemLabel', processedItem, index)), toDisplayString($options.getItemLabel(processedItem)), 17, _hoisted_5), $options.getItemProp(processedItem, 'items') ? (openBlock(), createElementBlock(Fragment, {\n key: 2\n }, [$props.templates.submenuicon ? (openBlock(), createBlock(resolveDynamicComponent($props.templates.submenuicon), {\n key: 0,\n active: $options.isItemActive(processedItem),\n \"class\": normalizeClass(_ctx.cx('submenuIcon'))\n }, null, 8, [\"active\", \"class\"])) : (openBlock(), createBlock(_component_AngleRightIcon, mergeProps({\n key: 1,\n \"class\": _ctx.cx('submenuIcon'),\n ref_for: true\n }, $options.getPTOptions('submenuicon', processedItem, index)), null, 16, [\"class\"]))], 64)) : createCommentVNode(\"\", true)], 16, _hoisted_4)), [[_directive_ripple]]) : (openBlock(), createBlock(resolveDynamicComponent($props.templates.item), {\n key: 1,\n item: processedItem.item,\n hasSubmenu: $options.getItemProp(processedItem, 'items'),\n label: $options.getItemLabel(processedItem),\n props: $options.getMenuItemProps(processedItem, index)\n }, null, 8, [\"item\", \"hasSubmenu\", \"label\", \"props\"]))], 16, _hoisted_3), $options.isItemVisible(processedItem) && $options.isItemGroup(processedItem) ? (openBlock(), createBlock(_component_ContextMenuSub, mergeProps({\n key: 0,\n id: $options.getItemId(processedItem) + '_list',\n role: \"menu\",\n \"class\": _ctx.cx('submenu'),\n menuId: $props.menuId,\n focusedItemId: $props.focusedItemId,\n items: processedItem.items,\n templates: $props.templates,\n activeItemPath: $props.activeItemPath,\n level: $props.level + 1,\n visible: $options.isItemActive(processedItem) && $options.isItemGroup(processedItem),\n pt: _ctx.pt,\n unstyled: _ctx.unstyled,\n onItemClick: _cache[0] || (_cache[0] = function ($event) {\n return _ctx.$emit('item-click', $event);\n }),\n onItemMouseenter: _cache[1] || (_cache[1] = function ($event) {\n return _ctx.$emit('item-mouseenter', $event);\n }),\n onItemMousemove: _cache[2] || (_cache[2] = function ($event) {\n return _ctx.$emit('item-mousemove', $event);\n }),\n \"aria-labelledby\": $options.getItemLabelId(processedItem),\n ref_for: true\n }, _ctx.ptm('submenu')), null, 16, [\"id\", \"class\", \"menuId\", \"focusedItemId\", \"items\", \"templates\", \"activeItemPath\", \"level\", \"visible\", \"pt\", \"unstyled\", \"aria-labelledby\"])) : createCommentVNode(\"\", true)], 16, _hoisted_2)) : createCommentVNode(\"\", true), $options.isItemVisible(processedItem) && $options.getItemProp(processedItem, 'separator') ? (openBlock(), createElementBlock(\"li\", mergeProps({\n key: 1,\n id: $options.getItemId(processedItem),\n style: $options.getItemProp(processedItem, 'style'),\n \"class\": [_ctx.cx('separator'), $options.getItemProp(processedItem, 'class')],\n role: \"separator\",\n ref_for: true\n }, _ctx.ptm('separator')), null, 16, _hoisted_6)) : createCommentVNode(\"\", true)], 64);\n }), 128))], 16, _hoisted_1)) : createCommentVNode(\"\", true)];\n }),\n _: 1\n }, 16, [\"onEnter\"]);\n}\n\nscript$1.render = render$1;\n\nvar script = {\n name: 'ContextMenu',\n \"extends\": script$2,\n inheritAttrs: false,\n emits: ['focus', 'blur', 'show', 'hide', 'before-show', 'before-hide'],\n target: null,\n outsideClickListener: null,\n resizeListener: null,\n documentContextMenuListener: null,\n pageX: null,\n pageY: null,\n container: null,\n list: null,\n data: function data() {\n return {\n id: this.$attrs.id,\n focused: false,\n focusedItemInfo: {\n index: -1,\n level: 0,\n parentKey: ''\n },\n activeItemPath: [],\n visible: false,\n submenuVisible: false\n };\n },\n watch: {\n '$attrs.id': function $attrsId(newValue) {\n this.id = newValue || UniqueComponentId();\n },\n activeItemPath: function activeItemPath(newPath) {\n if (isNotEmpty(newPath)) {\n this.bindOutsideClickListener();\n this.bindResizeListener();\n } else if (!this.visible) {\n this.unbindOutsideClickListener();\n this.unbindResizeListener();\n }\n }\n },\n mounted: function mounted() {\n this.id = this.id || UniqueComponentId();\n if (this.global) {\n this.bindDocumentContextMenuListener();\n }\n },\n beforeUnmount: function beforeUnmount() {\n this.unbindResizeListener();\n this.unbindOutsideClickListener();\n this.unbindDocumentContextMenuListener();\n if (this.container && this.autoZIndex) {\n ZIndex.clear(this.container);\n }\n this.target = null;\n this.container = null;\n },\n methods: {\n getItemProp: function getItemProp(item, name) {\n return item ? resolve(item[name]) : undefined;\n },\n getItemLabel: function getItemLabel(item) {\n return this.getItemProp(item, 'label');\n },\n isItemDisabled: function isItemDisabled(item) {\n return this.getItemProp(item, 'disabled');\n },\n isItemVisible: function isItemVisible(item) {\n return this.getItemProp(item, 'visible') !== false;\n },\n isItemGroup: function isItemGroup(item) {\n return isNotEmpty(this.getItemProp(item, 'items'));\n },\n isItemSeparator: function isItemSeparator(item) {\n return this.getItemProp(item, 'separator');\n },\n getProccessedItemLabel: function getProccessedItemLabel(processedItem) {\n return processedItem ? this.getItemLabel(processedItem.item) : undefined;\n },\n isProccessedItemGroup: function isProccessedItemGroup(processedItem) {\n return processedItem && isNotEmpty(processedItem.items);\n },\n toggle: function toggle(event) {\n this.visible ? this.hide() : this.show(event);\n },\n show: function show(event) {\n this.$emit('before-show');\n this.activeItemPath = [];\n this.focusedItemInfo = {\n index: -1,\n level: 0,\n parentKey: ''\n };\n focus(this.list);\n this.pageX = event.pageX;\n this.pageY = event.pageY;\n this.visible ? this.position() : this.visible = true;\n event.stopPropagation();\n event.preventDefault();\n },\n hide: function hide() {\n this.$emit('before-hide');\n this.visible = false;\n this.activeItemPath = [];\n this.focusedItemInfo = {\n index: -1,\n level: 0,\n parentKey: ''\n };\n },\n onFocus: function onFocus(event) {\n this.focused = true;\n this.focusedItemInfo = this.focusedItemInfo.index !== -1 ? this.focusedItemInfo : {\n index: -1,\n level: 0,\n parentKey: ''\n };\n this.$emit('focus', event);\n },\n onBlur: function onBlur(event) {\n this.focused = false;\n this.focusedItemInfo = {\n index: -1,\n level: 0,\n parentKey: ''\n };\n this.searchValue = '';\n this.$emit('blur', event);\n },\n onKeyDown: function onKeyDown(event) {\n var metaKey = event.metaKey || event.ctrlKey;\n switch (event.code) {\n case 'ArrowDown':\n this.onArrowDownKey(event);\n break;\n case 'ArrowUp':\n this.onArrowUpKey(event);\n break;\n case 'ArrowLeft':\n this.onArrowLeftKey(event);\n break;\n case 'ArrowRight':\n this.onArrowRightKey(event);\n break;\n case 'Home':\n this.onHomeKey(event);\n break;\n case 'End':\n this.onEndKey(event);\n break;\n case 'Space':\n this.onSpaceKey(event);\n break;\n case 'Enter':\n case 'NumpadEnter':\n this.onEnterKey(event);\n break;\n case 'Escape':\n this.onEscapeKey(event);\n break;\n case 'Tab':\n this.onTabKey(event);\n break;\n case 'PageDown':\n case 'PageUp':\n case 'Backspace':\n case 'ShiftLeft':\n case 'ShiftRight':\n //NOOP\n break;\n default:\n if (!metaKey && isPrintableCharacter(event.key)) {\n this.searchItems(event, event.key);\n }\n break;\n }\n },\n onItemChange: function onItemChange(event) {\n var processedItem = event.processedItem,\n isFocus = event.isFocus;\n if (isEmpty(processedItem)) return;\n var index = processedItem.index,\n key = processedItem.key,\n level = processedItem.level,\n parentKey = processedItem.parentKey,\n items = processedItem.items;\n var grouped = isNotEmpty(items);\n var activeItemPath = this.activeItemPath.filter(function (p) {\n return p.parentKey !== parentKey && p.parentKey !== key;\n });\n if (grouped) {\n activeItemPath.push(processedItem);\n this.submenuVisible = true;\n }\n this.focusedItemInfo = {\n index: index,\n level: level,\n parentKey: parentKey\n };\n this.activeItemPath = activeItemPath;\n isFocus && focus(this.list);\n },\n onItemClick: function onItemClick(event) {\n var processedItem = event.processedItem;\n var grouped = this.isProccessedItemGroup(processedItem);\n var selected = this.isSelected(processedItem);\n if (selected) {\n var index = processedItem.index,\n key = processedItem.key,\n level = processedItem.level,\n parentKey = processedItem.parentKey;\n this.activeItemPath = this.activeItemPath.filter(function (p) {\n return key !== p.key && key.startsWith(p.key);\n });\n this.focusedItemInfo = {\n index: index,\n level: level,\n parentKey: parentKey\n };\n focus(this.list);\n } else {\n grouped ? this.onItemChange(event) : this.hide();\n }\n },\n onItemMouseEnter: function onItemMouseEnter(event) {\n this.onItemChange(event);\n },\n onItemMouseMove: function onItemMouseMove(event) {\n if (this.focused) {\n this.changeFocusedItemIndex(event, event.processedItem.index);\n }\n },\n onArrowDownKey: function onArrowDownKey(event) {\n var itemIndex = this.focusedItemInfo.index !== -1 ? this.findNextItemIndex(this.focusedItemInfo.index) : this.findFirstFocusedItemIndex();\n this.changeFocusedItemIndex(event, itemIndex);\n event.preventDefault();\n },\n onArrowUpKey: function onArrowUpKey(event) {\n if (event.altKey) {\n if (this.focusedItemInfo.index !== -1) {\n var processedItem = this.visibleItems[this.focusedItemInfo.index];\n var grouped = this.isProccessedItemGroup(processedItem);\n !grouped && this.onItemChange({\n originalEvent: event,\n processedItem: processedItem\n });\n }\n this.popup && this.hide();\n event.preventDefault();\n } else {\n var itemIndex = this.focusedItemInfo.index !== -1 ? this.findPrevItemIndex(this.focusedItemInfo.index) : this.findLastFocusedItemIndex();\n this.changeFocusedItemIndex(event, itemIndex);\n event.preventDefault();\n }\n },\n onArrowLeftKey: function onArrowLeftKey(event) {\n var _this = this;\n var processedItem = this.visibleItems[this.focusedItemInfo.index];\n var parentItem = this.activeItemPath.find(function (p) {\n return p.key === processedItem.parentKey;\n });\n var root = isEmpty(processedItem.parent);\n if (!root) {\n this.focusedItemInfo = {\n index: -1,\n parentKey: parentItem ? parentItem.parentKey : ''\n };\n this.searchValue = '';\n this.onArrowDownKey(event);\n }\n this.activeItemPath = this.activeItemPath.filter(function (p) {\n return p.parentKey !== _this.focusedItemInfo.parentKey;\n });\n event.preventDefault();\n },\n onArrowRightKey: function onArrowRightKey(event) {\n var processedItem = this.visibleItems[this.focusedItemInfo.index];\n var grouped = this.isProccessedItemGroup(processedItem);\n if (grouped) {\n this.onItemChange({\n originalEvent: event,\n processedItem: processedItem\n });\n this.focusedItemInfo = {\n index: -1,\n parentKey: processedItem.key\n };\n this.searchValue = '';\n this.onArrowDownKey(event);\n }\n event.preventDefault();\n },\n onHomeKey: function onHomeKey(event) {\n this.changeFocusedItemIndex(event, this.findFirstItemIndex());\n event.preventDefault();\n },\n onEndKey: function onEndKey(event) {\n this.changeFocusedItemIndex(event, this.findLastItemIndex());\n event.preventDefault();\n },\n onEnterKey: function onEnterKey(event) {\n if (this.focusedItemInfo.index !== -1) {\n var element = findSingle(this.list, \"li[id=\\\"\".concat(\"\".concat(this.focusedItemIdx), \"\\\"]\"));\n var anchorElement = element && findSingle(element, '[data-pc-section=\"itemlink\"]');\n anchorElement ? anchorElement.click() : element && element.click();\n var processedItem = this.visibleItems[this.focusedItemInfo.index];\n var grouped = this.isProccessedItemGroup(processedItem);\n !grouped && (this.focusedItemInfo.index = this.findFirstFocusedItemIndex());\n }\n event.preventDefault();\n },\n onSpaceKey: function onSpaceKey(event) {\n this.onEnterKey(event);\n },\n onEscapeKey: function onEscapeKey(event) {\n this.hide();\n !this.popup && (this.focusedItemInfo.index = this.findFirstFocusedItemIndex());\n event.preventDefault();\n },\n onTabKey: function onTabKey(event) {\n if (this.focusedItemInfo.index !== -1) {\n var processedItem = this.visibleItems[this.focusedItemInfo.index];\n var grouped = this.isProccessedItemGroup(processedItem);\n !grouped && this.onItemChange({\n originalEvent: event,\n processedItem: processedItem\n });\n }\n this.hide();\n },\n onEnter: function onEnter(el) {\n addStyle(el, {\n position: 'absolute'\n });\n this.position();\n if (this.autoZIndex) {\n ZIndex.set('menu', el, this.baseZIndex + this.$primevue.config.zIndex.menu);\n }\n },\n onAfterEnter: function onAfterEnter() {\n this.bindOutsideClickListener();\n this.bindResizeListener();\n this.$emit('show');\n focus(this.list);\n },\n onLeave: function onLeave() {\n this.$emit('hide');\n this.container = null;\n },\n onAfterLeave: function onAfterLeave(el) {\n if (this.autoZIndex) {\n ZIndex.clear(el);\n }\n this.unbindOutsideClickListener();\n this.unbindResizeListener();\n },\n position: function position() {\n var left = this.pageX + 1;\n var top = this.pageY + 1;\n var width = this.container.offsetParent ? this.container.offsetWidth : getHiddenElementOuterWidth(this.container);\n var height = this.container.offsetParent ? this.container.offsetHeight : getHiddenElementOuterHeight(this.container);\n var viewport = getViewport();\n\n //flip\n if (left + width - document.body.scrollLeft > viewport.width) {\n left -= width;\n }\n\n //flip\n if (top + height - document.body.scrollTop > viewport.height) {\n top -= height;\n }\n\n //fit\n if (left < document.body.scrollLeft) {\n left = document.body.scrollLeft;\n }\n\n //fit\n if (top < document.body.scrollTop) {\n top = document.body.scrollTop;\n }\n this.container.style.left = left + 'px';\n this.container.style.top = top + 'px';\n },\n bindOutsideClickListener: function bindOutsideClickListener() {\n var _this2 = this;\n if (!this.outsideClickListener) {\n this.outsideClickListener = function (event) {\n var isOutsideContainer = _this2.container && !_this2.container.contains(event.target);\n var isOutsideTarget = _this2.visible ? !(_this2.target && (_this2.target === event.target || _this2.target.contains(event.target))) : true;\n if (isOutsideContainer && isOutsideTarget) {\n _this2.hide();\n }\n };\n document.addEventListener('click', this.outsideClickListener);\n }\n },\n unbindOutsideClickListener: function unbindOutsideClickListener() {\n if (this.outsideClickListener) {\n document.removeEventListener('click', this.outsideClickListener);\n this.outsideClickListener = null;\n }\n },\n bindResizeListener: function bindResizeListener() {\n var _this3 = this;\n if (!this.resizeListener) {\n this.resizeListener = function () {\n if (_this3.visible && !isTouchDevice()) {\n _this3.hide();\n }\n };\n window.addEventListener('resize', this.resizeListener);\n }\n },\n unbindResizeListener: function unbindResizeListener() {\n if (this.resizeListener) {\n window.removeEventListener('resize', this.resizeListener);\n this.resizeListener = null;\n }\n },\n bindDocumentContextMenuListener: function bindDocumentContextMenuListener() {\n var _this4 = this;\n if (!this.documentContextMenuListener) {\n this.documentContextMenuListener = function (event) {\n event.button === 2 && _this4.show(event);\n };\n document.addEventListener('contextmenu', this.documentContextMenuListener);\n }\n },\n unbindDocumentContextMenuListener: function unbindDocumentContextMenuListener() {\n if (this.documentContextMenuListener) {\n document.removeEventListener('contextmenu', this.documentContextMenuListener);\n this.documentContextMenuListener = null;\n }\n },\n isItemMatched: function isItemMatched(processedItem) {\n var _this$getProccessedIt;\n return this.isValidItem(processedItem) && ((_this$getProccessedIt = this.getProccessedItemLabel(processedItem)) === null || _this$getProccessedIt === void 0 ? void 0 : _this$getProccessedIt.toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase()));\n },\n isValidItem: function isValidItem(processedItem) {\n return !!processedItem && !this.isItemDisabled(processedItem.item) && !this.isItemSeparator(processedItem.item) && this.isItemVisible(processedItem.item);\n },\n isValidSelectedItem: function isValidSelectedItem(processedItem) {\n return this.isValidItem(processedItem) && this.isSelected(processedItem);\n },\n isSelected: function isSelected(processedItem) {\n return this.activeItemPath.some(function (p) {\n return p.key === processedItem.key;\n });\n },\n findFirstItemIndex: function findFirstItemIndex() {\n var _this5 = this;\n return this.visibleItems.findIndex(function (processedItem) {\n return _this5.isValidItem(processedItem);\n });\n },\n findLastItemIndex: function findLastItemIndex() {\n var _this6 = this;\n return findLastIndex(this.visibleItems, function (processedItem) {\n return _this6.isValidItem(processedItem);\n });\n },\n findNextItemIndex: function findNextItemIndex(index) {\n var _this7 = this;\n var matchedItemIndex = index < this.visibleItems.length - 1 ? this.visibleItems.slice(index + 1).findIndex(function (processedItem) {\n return _this7.isValidItem(processedItem);\n }) : -1;\n return matchedItemIndex > -1 ? matchedItemIndex + index + 1 : index;\n },\n findPrevItemIndex: function findPrevItemIndex(index) {\n var _this8 = this;\n var matchedItemIndex = index > 0 ? findLastIndex(this.visibleItems.slice(0, index), function (processedItem) {\n return _this8.isValidItem(processedItem);\n }) : -1;\n return matchedItemIndex > -1 ? matchedItemIndex : index;\n },\n findSelectedItemIndex: function findSelectedItemIndex() {\n var _this9 = this;\n return this.visibleItems.findIndex(function (processedItem) {\n return _this9.isValidSelectedItem(processedItem);\n });\n },\n findFirstFocusedItemIndex: function findFirstFocusedItemIndex() {\n var selectedIndex = this.findSelectedItemIndex();\n return selectedIndex < 0 ? this.findFirstItemIndex() : selectedIndex;\n },\n findLastFocusedItemIndex: function findLastFocusedItemIndex() {\n var selectedIndex = this.findSelectedItemIndex();\n return selectedIndex < 0 ? this.findLastItemIndex() : selectedIndex;\n },\n searchItems: function searchItems(event, _char) {\n var _this10 = this;\n this.searchValue = (this.searchValue || '') + _char;\n var itemIndex = -1;\n var matched = false;\n if (this.focusedItemInfo.index !== -1) {\n itemIndex = this.visibleItems.slice(this.focusedItemInfo.index).findIndex(function (processedItem) {\n return _this10.isItemMatched(processedItem);\n });\n itemIndex = itemIndex === -1 ? this.visibleItems.slice(0, this.focusedItemInfo.index).findIndex(function (processedItem) {\n return _this10.isItemMatched(processedItem);\n }) : itemIndex + this.focusedItemInfo.index;\n } else {\n itemIndex = this.visibleItems.findIndex(function (processedItem) {\n return _this10.isItemMatched(processedItem);\n });\n }\n if (itemIndex !== -1) {\n matched = true;\n }\n if (itemIndex === -1 && this.focusedItemInfo.index === -1) {\n itemIndex = this.findFirstFocusedItemIndex();\n }\n if (itemIndex !== -1) {\n this.changeFocusedItemIndex(event, itemIndex);\n }\n if (this.searchTimeout) {\n clearTimeout(this.searchTimeout);\n }\n this.searchTimeout = setTimeout(function () {\n _this10.searchValue = '';\n _this10.searchTimeout = null;\n }, 500);\n return matched;\n },\n changeFocusedItemIndex: function changeFocusedItemIndex(event, index) {\n if (this.focusedItemInfo.index !== index) {\n this.focusedItemInfo.index = index;\n this.scrollInView();\n }\n },\n scrollInView: function scrollInView() {\n var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;\n var id = index !== -1 ? \"\".concat(this.id, \"_\").concat(index) : this.focusedItemIdx;\n var element = findSingle(this.list, \"li[id=\\\"\".concat(id, \"\\\"]\"));\n if (element) {\n element.scrollIntoView && element.scrollIntoView({\n block: 'nearest',\n inline: 'start'\n });\n }\n },\n createProcessedItems: function createProcessedItems(items) {\n var _this11 = this;\n var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var parent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var parentKey = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';\n var processedItems = [];\n items && items.forEach(function (item, index) {\n var key = (parentKey !== '' ? parentKey + '_' : '') + index;\n var newItem = {\n item: item,\n index: index,\n level: level,\n key: key,\n parent: parent,\n parentKey: parentKey\n };\n newItem['items'] = _this11.createProcessedItems(item.items, level + 1, newItem, key);\n processedItems.push(newItem);\n });\n return processedItems;\n },\n containerRef: function containerRef(el) {\n this.container = el;\n },\n listRef: function listRef(el) {\n this.list = el ? el.$el : undefined;\n }\n },\n computed: {\n processedItems: function processedItems() {\n return this.createProcessedItems(this.model || []);\n },\n visibleItems: function visibleItems() {\n var _this12 = this;\n var processedItem = this.activeItemPath.find(function (p) {\n return p.key === _this12.focusedItemInfo.parentKey;\n });\n return processedItem ? processedItem.items : this.processedItems;\n },\n focusedItemIdx: function focusedItemIdx() {\n return this.focusedItemInfo.index !== -1 ? \"\".concat(this.id).concat(isNotEmpty(this.focusedItemInfo.parentKey) ? '_' + this.focusedItemInfo.parentKey : '', \"_\").concat(this.focusedItemInfo.index) : null;\n }\n },\n components: {\n ContextMenuSub: script$1,\n Portal: Portal\n }\n};\n\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n var _component_ContextMenuSub = resolveComponent(\"ContextMenuSub\");\n var _component_Portal = resolveComponent(\"Portal\");\n return openBlock(), createBlock(_component_Portal, {\n appendTo: _ctx.appendTo\n }, {\n \"default\": withCtx(function () {\n return [createVNode(Transition, mergeProps({\n name: \"p-contextmenu\",\n onEnter: $options.onEnter,\n onAfterEnter: $options.onAfterEnter,\n onLeave: $options.onLeave,\n onAfterLeave: $options.onAfterLeave\n }, _ctx.ptm('transition')), {\n \"default\": withCtx(function () {\n return [$data.visible ? (openBlock(), createElementBlock(\"div\", mergeProps({\n key: 0,\n ref: $options.containerRef,\n \"class\": _ctx.cx('root')\n }, _ctx.ptmi('root')), [createVNode(_component_ContextMenuSub, {\n ref: $options.listRef,\n id: $data.id + '_list',\n \"class\": normalizeClass(_ctx.cx('rootList')),\n role: \"menubar\",\n root: true,\n tabindex: _ctx.tabindex,\n \"aria-orientation\": \"vertical\",\n \"aria-activedescendant\": $data.focused ? $options.focusedItemIdx : undefined,\n menuId: $data.id,\n focusedItemId: $data.focused ? $options.focusedItemIdx : undefined,\n items: $options.processedItems,\n templates: _ctx.$slots,\n activeItemPath: $data.activeItemPath,\n \"aria-labelledby\": _ctx.ariaLabelledby,\n \"aria-label\": _ctx.ariaLabel,\n level: 0,\n visible: $data.submenuVisible,\n pt: _ctx.pt,\n unstyled: _ctx.unstyled,\n onFocus: $options.onFocus,\n onBlur: $options.onBlur,\n onKeydown: $options.onKeyDown,\n onItemClick: $options.onItemClick,\n onItemMouseenter: $options.onItemMouseEnter,\n onItemMousemove: $options.onItemMouseMove\n }, null, 8, [\"id\", \"class\", \"tabindex\", \"aria-activedescendant\", \"menuId\", \"focusedItemId\", \"items\", \"templates\", \"activeItemPath\", \"aria-labelledby\", \"aria-label\", \"visible\", \"pt\", \"unstyled\", \"onFocus\", \"onBlur\", \"onKeydown\", \"onItemClick\", \"onItemMouseenter\", \"onItemMousemove\"])], 16)) : createCommentVNode(\"\", true)];\n }),\n _: 1\n }, 16, [\"onEnter\", \"onAfterEnter\", \"onLeave\", \"onAfterLeave\"])];\n }),\n _: 1\n }, 8, [\"appendTo\"]);\n}\n\nscript.render = render;\n\nexport { script as default };\n//# sourceMappingURL=index.mjs.map\n","\n\n\n\n\n","function _arrayWithHoles(r) {\n if (Array.isArray(r)) return r;\n}\nexport { _arrayWithHoles as default };","function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}\nexport { _iterableToArrayLimit as default };","function _arrayLikeToArray(r, a) {\n (null == a || a > r.length) && (a = r.length);\n for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n return n;\n}\nexport { _arrayLikeToArray as default };","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nfunction _unsupportedIterableToArray(r, a) {\n if (r) {\n if (\"string\" == typeof r) return arrayLikeToArray(r, a);\n var t = {}.toString.call(r).slice(8, -1);\n return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0;\n }\n}\nexport { _unsupportedIterableToArray as default };","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nexport { _nonIterableRest as default };","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nfunction _slicedToArray(r, e) {\n return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();\n}\nexport { _slicedToArray as default };","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.bind = void 0;\nfunction bind(target, _a) {\n var type = _a.type, listener = _a.listener, options = _a.options;\n target.addEventListener(type, listener, options);\n return function unbind() {\n target.removeEventListener(type, listener, options);\n };\n}\nexports.bind = bind;\n","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.bindAll = void 0;\nvar bind_1 = require(\"./bind\");\nfunction toOptions(value) {\n if (typeof value === 'undefined') {\n return undefined;\n }\n if (typeof value === 'boolean') {\n return {\n capture: value,\n };\n }\n return value;\n}\nfunction getBinding(original, sharedOptions) {\n if (sharedOptions == null) {\n return original;\n }\n var binding = __assign(__assign({}, original), { options: __assign(__assign({}, toOptions(sharedOptions)), toOptions(original.options)) });\n return binding;\n}\nfunction bindAll(target, bindings, sharedOptions) {\n var unbinds = bindings.map(function (original) {\n var binding = getBinding(original, sharedOptions);\n return (0, bind_1.bind)(target, binding);\n });\n return function unbindAll() {\n unbinds.forEach(function (unbind) { return unbind(); });\n };\n}\nexports.bindAll = bindAll;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.bindAll = exports.bind = void 0;\nvar bind_1 = require(\"./bind\");\nObject.defineProperty(exports, \"bind\", { enumerable: true, get: function () { return bind_1.bind; } });\nvar bind_all_1 = require(\"./bind-all\");\nObject.defineProperty(exports, \"bindAll\", { enumerable: true, get: function () { return bind_all_1.bindAll; } });\n","// pulling this into a separate file so adapter(s) that don't\n// need the honey pot can pay as little as possible for it.\nexport var honeyPotDataAttribute = 'data-pdnd-honey-pot';","import { honeyPotDataAttribute } from './honey-pot-data-attribute';\nexport function isHoneyPotElement(target) {\n return target instanceof Element && target.hasAttribute(honeyPotDataAttribute);\n}","import _slicedToArray from \"@babel/runtime/helpers/slicedToArray\";\nimport { isHoneyPotElement } from './is-honey-pot-element';\nexport function getElementFromPointWithoutHoneypot(client) {\n // eslint-disable-next-line no-restricted-syntax\n var _document$elementsFro = document.elementsFromPoint(client.x, client.y),\n _document$elementsFro2 = _slicedToArray(_document$elementsFro, 2),\n top = _document$elementsFro2[0],\n second = _document$elementsFro2[1];\n if (!top) {\n return null;\n }\n if (isHoneyPotElement(top)) {\n return second !== null && second !== void 0 ? second : null;\n }\n return top;\n}","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nexport { _typeof as default };","import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nexport { _defineProperty as default };","// Maximum possible z-index\n// https://stackoverflow.com/questions/491052/minimum-and-maximum-value-of-z-index\nexport var maxZIndex = 2147483647;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nimport { bind, bindAll } from 'bind-event-listener';\nimport { maxZIndex } from '../util/max-z-index';\nimport { honeyPotDataAttribute } from './honey-pot-data-attribute';\nvar honeyPotSize = 2;\nvar halfHoneyPotSize = honeyPotSize / 2;\n\n/**\n * `clientX` and `clientY` can be in sub pixels (eg `2.332`)\n * However, browser hitbox testing is commonly do to the closest pixel.\n *\n * → https://issues.chromium.org/issues/40940531\n *\n * To be sure that the honey pot will be over the `client` position,\n * we `.floor()` `clientX` and`clientY` and then make it `2px` in size.\n **/\nfunction floorToClosestPixel(point) {\n return {\n x: Math.floor(point.x),\n y: Math.floor(point.y)\n };\n}\n\n/**\n * We want to make sure the honey pot sits around the users position.\n * This seemed to be the most resilient while testing.\n */\nfunction pullBackByHalfHoneyPotSize(point) {\n return {\n x: point.x - halfHoneyPotSize,\n y: point.y - halfHoneyPotSize\n };\n}\n\n/**\n * Prevent the honey pot from changing the window size.\n * This is super unlikely to occur, but just being safe.\n */\nfunction preventGoingBackwardsOffScreen(point) {\n return {\n x: Math.max(point.x, 0),\n y: Math.max(point.y, 0)\n };\n}\n\n/**\n * Prevent the honey pot from changing the window size.\n * This is super unlikely to occur, but just being safe.\n */\nfunction preventGoingForwardsOffScreen(point) {\n return {\n x: Math.min(point.x, window.innerWidth - honeyPotSize),\n y: Math.min(point.y, window.innerHeight - honeyPotSize)\n };\n}\n\n/**\n * Create a `2x2` `DOMRect` around the `client` position\n */\nfunction getHoneyPotRectFor(_ref) {\n var client = _ref.client;\n var point = preventGoingForwardsOffScreen(preventGoingBackwardsOffScreen(pullBackByHalfHoneyPotSize(floorToClosestPixel(client))));\n\n // When debugging, it is helpful to\n // make this element a bit bigger\n return DOMRect.fromRect({\n x: point.x,\n y: point.y,\n width: honeyPotSize,\n height: honeyPotSize\n });\n}\nfunction getRectStyles(_ref2) {\n var clientRect = _ref2.clientRect;\n return {\n left: \"\".concat(clientRect.left, \"px\"),\n top: \"\".concat(clientRect.top, \"px\"),\n width: \"\".concat(clientRect.width, \"px\"),\n height: \"\".concat(clientRect.height, \"px\")\n };\n}\nfunction isWithin(_ref3) {\n var client = _ref3.client,\n clientRect = _ref3.clientRect;\n return (\n // is within horizontal bounds\n client.x >= clientRect.x && client.x <= clientRect.x + clientRect.width &&\n // is within vertical bounds\n client.y >= clientRect.y && client.y <= clientRect.y + clientRect.height\n );\n}\n/**\n * The honey pot fix is designed to get around a painful bug in all browsers.\n *\n * [Overview](https://www.youtube.com/watch?v=udE9qbFTeQg)\n *\n * **Background**\n *\n * When a drag starts, browsers incorrectly think that the users pointer is\n * still depressed where the drag started. Any element that goes under this position\n * will be entered into, causing `\"mouseenter\"` events and `\":hover\"` styles to be applied.\n *\n * _This is a violation of the spec_\n *\n * > \"From the moment that the user agent is to initiate the drag-and-drop operation,\n * > until the end \tof the drag-and-drop operation, device input events\n * > (e.g. mouse and keyboard events) must be suppressed.\"\n * >\n * > - https://html.spec.whatwg.org/multipage/dnd.html#drag-and-drop-processing-model\n *\n * _Some impacts_\n *\n * - `\":hover\"` styles being applied where they shouldn't (looks messy)\n * - components such as tooltips responding to `\"mouseenter\"` can show during a drag,\n * and on an element the user isn't even over\n *\n * Bug: https://issues.chromium.org/issues/41129937\n *\n * **Honey pot fix**\n *\n * 1. Create an element where the browser thinks the depressed pointer is\n * to absorb the incorrect pointer events\n * 2. Remove that element when it is no longer needed\n */\nfunction mountHoneyPot(_ref4) {\n var initial = _ref4.initial;\n var element = document.createElement('div');\n element.setAttribute(honeyPotDataAttribute, 'true');\n\n // can shift during the drag thanks to Firefox\n var clientRect = getHoneyPotRectFor({\n client: initial\n });\n Object.assign(element.style, _objectSpread(_objectSpread({\n // Setting a background color explicitly to avoid any inherited styles.\n // Looks like this could be `opacity: 0`, but worried that _might_\n // cause the element to be ignored on some platforms.\n // When debugging, set backgroundColor to something like \"red\".\n backgroundColor: 'transparent',\n position: 'fixed',\n // Being explicit to avoid inheriting styles\n padding: 0,\n margin: 0,\n boxSizing: 'border-box'\n }, getRectStyles({\n clientRect: clientRect\n })), {}, {\n // We want this element to absorb pointer events,\n // it's kind of the whole point 😉\n pointerEvents: 'auto',\n // Want to make sure the honey pot is top of everything else.\n // Don't need to worry about native drag previews, as they will\n // have been rendered (and removed) before the honey pot is rendered\n zIndex: maxZIndex\n }));\n document.body.appendChild(element);\n\n /**\n * 🦊 In firefox we can get `\"pointermove\"` events after the drag\n * has started, which is a spec violation.\n * The final `\"pointermove\"` will reveal where the \"depressed\" position\n * is for our honey pot fix.\n */\n var unbindPointerMove = bind(window, {\n type: 'pointermove',\n listener: function listener(event) {\n var client = {\n x: event.clientX,\n y: event.clientY\n };\n clientRect = getHoneyPotRectFor({\n client: client\n });\n Object.assign(element.style, getRectStyles({\n clientRect: clientRect\n }));\n },\n // using capture so we are less likely to be impacted by event stopping\n options: {\n capture: true\n }\n });\n return function finish(_ref5) {\n var current = _ref5.current;\n // Don't need this any more\n unbindPointerMove();\n\n // If the user is hover the honey pot, we remove it\n // so that the user can continue to interact with the page normally.\n if (isWithin({\n client: current,\n clientRect: clientRect\n })) {\n element.remove();\n return;\n }\n function cleanup() {\n unbindPostDragEvents();\n element.remove();\n }\n var unbindPostDragEvents = bindAll(window, [{\n type: 'pointerdown',\n listener: cleanup\n }, {\n type: 'pointermove',\n listener: cleanup\n }, {\n type: 'focusin',\n listener: cleanup\n }, {\n type: 'focusout',\n listener: cleanup\n },\n // a 'pointerdown' should happen before 'dragstart', but just being super safe\n {\n type: 'dragstart',\n listener: cleanup\n },\n // if the user has dragged something out of the window\n // and then is dragging something back into the window\n // the first events we will see are \"dragenter\" (and then \"dragover\").\n // So if we see any of these we need to clear the post drag fix.\n {\n type: 'dragenter',\n listener: cleanup\n }, {\n type: 'dragover',\n listener: cleanup\n }\n\n // Not adding a \"wheel\" event listener, as \"wheel\" by itself does not\n // resolve the bug.\n ], {\n // Using `capture` so less likely to be impacted by other code stopping events\n capture: true\n });\n };\n}\nexport function makeHoneyPotFix() {\n var latestPointerMove = null;\n function bindEvents() {\n // For sanity, only collecting this value from when events are first bound.\n // This prevents the case where a super old \"pointermove\" could be used\n // from a prior interaction.\n latestPointerMove = null;\n return bind(window, {\n type: 'pointermove',\n listener: function listener(event) {\n latestPointerMove = {\n x: event.clientX,\n y: event.clientY\n };\n },\n // listening for pointer move in capture phase\n // so we are less likely to be impacted by events being stopped.\n options: {\n capture: true\n }\n });\n }\n function getOnPostDispatch() {\n var finish = null;\n return function onPostEvent(_ref6) {\n var eventName = _ref6.eventName,\n payload = _ref6.payload;\n // We are adding the honey pot `onDragStart` so we don't\n // impact the creation of the native drag preview.\n if (eventName === 'onDragStart') {\n var _latestPointerMove;\n var input = payload.location.initial.input;\n\n // Sometimes there will be no latest \"pointermove\" (eg iOS).\n // In which case, we use the start position of the drag.\n var initial = (_latestPointerMove = latestPointerMove) !== null && _latestPointerMove !== void 0 ? _latestPointerMove : {\n x: input.clientX,\n y: input.clientY\n };\n\n // Don't need to defensively call `finish()` as `onDrop` from\n // one interaction is guaranteed to be called before `onDragStart`\n // of the next.\n finish = mountHoneyPot({\n initial: initial\n });\n }\n if (eventName === 'onDrop') {\n var _finish;\n var _input = payload.location.current.input;\n (_finish = finish) === null || _finish === void 0 || _finish({\n current: {\n x: _input.clientX,\n y: _input.clientY\n }\n });\n finish = null;\n // this interaction is finished, we want to use\n // the latest \"pointermove\" for each interaction\n latestPointerMove = null;\n }\n };\n }\n return {\n bindEvents: bindEvents,\n getOnPostDispatch: getOnPostDispatch\n };\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nfunction _arrayWithoutHoles(r) {\n if (Array.isArray(r)) return arrayLikeToArray(r);\n}\nexport { _arrayWithoutHoles as default };","function _iterableToArray(r) {\n if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r);\n}\nexport { _iterableToArray as default };","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nexport { _nonIterableSpread as default };","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nfunction _toConsumableArray(r) {\n return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread();\n}\nexport { _toConsumableArray as default };","/** Provide a function that you only ever want to be called a single time */\nexport function once(fn) {\n var cache = null;\n return function wrapped() {\n if (!cache) {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n var result = fn.apply(this, args);\n cache = {\n result: result\n };\n }\n return cache.result;\n };\n}","import { once } from '../public-utils/once';\n\n// using `cache` as our `isFirefox()` result will not change in a browser\n\n/**\n * Returns `true` if a `Firefox` browser\n * */\nexport var isFirefox = once(function isFirefox() {\n if (process.env.NODE_ENV === 'test') {\n return false;\n }\n return navigator.userAgent.includes('Firefox');\n});","import { once } from '../public-utils/once';\n\n// using `cache` as our `isSafari()` result will not change in a browser\n\n/**\n * Returns `true` if a `Safari` browser.\n * Returns `true` if the browser is running on iOS (they are all Safari).\n * */\nexport var isSafari = once(function isSafari() {\n if (process.env.NODE_ENV === 'test') {\n return false;\n }\n var _navigator = navigator,\n userAgent = _navigator.userAgent;\n return userAgent.includes('AppleWebKit') && !userAgent.includes('Chrome');\n});","import { bindAll } from 'bind-event-listener';\nimport { isSafari } from '../is-safari';\n\n/* For \"dragenter\" events, the browser should set `relatedTarget` to the previous element.\n * For external drag operations, our first \"dragenter\" event should have a `event.relatedTarget` of `null`.\n *\n * Unfortunately in Safari `event.relatedTarget` is *always* set to `null`\n * Safari bug: https://bugs.webkit.org/show_bug.cgi?id=242627\n * To work around this we count \"dragenter\" and \"dragleave\" events */\n\n// Using symbols for event properties so we don't clash with\n// anything on the `event` object\nvar symbols = {\n isLeavingWindow: Symbol('leaving'),\n isEnteringWindow: Symbol('entering')\n};\nexport function isEnteringWindowInSafari(_ref) {\n var dragEnter = _ref.dragEnter;\n if (!isSafari()) {\n return false;\n }\n return dragEnter.hasOwnProperty(symbols.isEnteringWindow);\n}\nexport function isLeavingWindowInSafari(_ref2) {\n var dragLeave = _ref2.dragLeave;\n if (!isSafari()) {\n return false;\n }\n return dragLeave.hasOwnProperty(symbols.isLeavingWindow);\n}\n(function fixSafari() {\n // Don't do anything when server side rendering\n if (typeof window === 'undefined') {\n return;\n }\n\n // rather than checking the userAgent for \"jsdom\" we can do this check\n // so that the check will be removed completely in production code\n if (process.env.NODE_ENV === 'test') {\n return;\n }\n if (!isSafari()) {\n return;\n }\n function getInitialState() {\n return {\n enterCount: 0,\n isOverWindow: false\n };\n }\n var state = getInitialState();\n function resetState() {\n state = getInitialState();\n }\n\n // These event listeners are bound _forever_ and _never_ removed\n // We don't bother cleaning up these event listeners (for now)\n // as this workaround is only for Safari\n\n // This is how the event count works:\n //\n // lift (+1 enterCount)\n // - dragstart(draggable) [enterCount: 0]\n // - dragenter(draggable) [enterCount: 1]\n // leaving draggable (+0 enterCount)\n // - dragenter(document.body) [enterCount: 2]\n // - dragleave(draggable) [enterCount: 1]\n // leaving window (-1 enterCount)\n // - dragleave(document.body) [enterCount: 0] {leaving the window}\n\n // Things to note:\n // - dragenter and dragleave bubble\n // - the first dragenter when entering a window might not be on `window`\n // - it could be on an element that is pressed up against the window\n // - (so we cannot rely on `event.target` values)\n\n bindAll(window, [{\n type: 'dragstart',\n listener: function listener() {\n state.enterCount = 0;\n // drag start occurs in the source window\n state.isOverWindow = true;\n // When a drag first starts it will also trigger a \"dragenter\" on the draggable element\n }\n }, {\n type: 'drop',\n listener: resetState\n }, {\n type: 'dragend',\n listener: resetState\n }, {\n type: 'dragenter',\n listener: function listener(event) {\n if (!state.isOverWindow && state.enterCount === 0) {\n // Patching the `event` object\n // The `event` object is shared with all event listeners for the event\n // @ts-expect-error: adding property to the event object\n event[symbols.isEnteringWindow] = true;\n }\n state.isOverWindow = true;\n state.enterCount++;\n }\n }, {\n type: 'dragleave',\n listener: function listener(event) {\n state.enterCount--;\n if (state.isOverWindow && state.enterCount === 0) {\n // Patching the `event` object as it is shared with all event listeners\n // The `event` object is shared with all event listeners for the event\n // @ts-expect-error: adding property to the event object\n event[symbols.isLeavingWindow] = true;\n state.isOverWindow = false;\n }\n }\n }],\n // using `capture: true` so that adding event listeners\n // in bubble phase will have the correct symbols\n {\n capture: true\n });\n})();","/**\n * Does the `EventTarget` look like a `Node` based on \"duck typing\".\n *\n * Helpful when the `Node` might be outside of the current document\n * so we cannot to an `target instanceof Node` check.\n */\nfunction isNodeLike(target) {\n return 'nodeName' in target;\n}\n\n/**\n * Is an `EventTarget` a `Node` from another `window`?\n */\nexport function isFromAnotherWindow(eventTarget) {\n return isNodeLike(eventTarget) && eventTarget.ownerDocument !== document;\n}","import { isFirefox } from '../is-firefox';\nimport { isSafari } from '../is-safari';\nimport { isLeavingWindowInSafari } from './count-events-for-safari';\nimport { isFromAnotherWindow } from './is-from-another-window';\nexport function isLeavingWindow(_ref) {\n var dragLeave = _ref.dragLeave;\n var type = dragLeave.type,\n relatedTarget = dragLeave.relatedTarget;\n if (type !== 'dragleave') {\n return false;\n }\n if (isSafari()) {\n return isLeavingWindowInSafari({\n dragLeave: dragLeave\n });\n }\n\n // Standard check: if going to `null` we are leaving the `window`\n if (relatedTarget == null) {\n return true;\n }\n\n /**\n * 🦊 Exception: `iframe` in Firefox (`125.0`)\n *\n * Case 1: parent `window` → child `iframe`\n * `dragLeave.relatedTarget` is element _inside_ the child `iframe`\n * (foreign element)\n *\n * Case 2: child `iframe` → parent `window`\n * `dragLeave.relatedTarget` is the `iframe` in the parent `window`\n * (foreign element)\n */\n\n if (isFirefox()) {\n return isFromAnotherWindow(relatedTarget);\n }\n\n /**\n * 🌏 Exception: `iframe` in Chrome (`124.0`)\n *\n * Case 1: parent `window` → child `iframe`\n * `dragLeave.relatedTarget` is the `iframe` in the parent `window`\n *\n * Case 2: child `iframe` → parent `window`\n * `dragLeave.relatedTarget` is `null` *(standard check)*\n */\n\n // Case 2\n // Using `instanceof` check as the element will be in the same `window`\n return relatedTarget instanceof HTMLIFrameElement;\n}","export function getBindingsForBrokenDrags(_ref) {\n var onDragEnd = _ref.onDragEnd;\n return [\n // ## Detecting drag ending for removed draggables\n //\n // If a draggable element is removed during a drag and the user drops:\n // 1. if over a valid drop target: we get a \"drop\" event to know the drag is finished\n // 2. if not over a valid drop target (or cancelled): we get nothing\n // The \"dragend\" event will not fire on the source draggable if it has been\n // removed from the DOM.\n // So we need to figure out if a drag operation has finished by looking at other events\n // We can do this by looking at other events\n\n // ### First detection: \"pointermove\" events\n\n // 1. \"pointermove\" events cannot fire during a drag and drop operation\n // according to the spec. So if we get a \"pointermove\" it means that\n // the drag and drop operations has finished. So if we get a \"pointermove\"\n // we know that the drag is over\n // 2. 🦊😤 Drag and drop operations are _supposed_ to suppress\n // other pointer events. However, firefox will allow a few\n // pointer event to get through after a drag starts.\n // The most I've seen is 3\n {\n type: 'pointermove',\n listener: function () {\n var callCount = 0;\n return function listener() {\n // Using 20 as it is far bigger than the most observed (3)\n if (callCount < 20) {\n callCount++;\n return;\n }\n onDragEnd();\n };\n }()\n },\n // ### Second detection: \"pointerdown\" events\n\n // If we receive this event then we know that a drag operation has finished\n // and potentially another one is about to start.\n // Note: `pointerdown` fires on all browsers / platforms before \"dragstart\"\n {\n type: 'pointerdown',\n listener: onDragEnd\n }];\n}","export function getInput(event) {\n return {\n altKey: event.altKey,\n button: event.button,\n buttons: event.buttons,\n ctrlKey: event.ctrlKey,\n metaKey: event.metaKey,\n shiftKey: event.shiftKey,\n clientX: event.clientX,\n clientY: event.clientY,\n pageX: event.pageX,\n pageY: event.pageY\n };\n}","var rafSchd = function rafSchd(fn) {\n var lastArgs = [];\n var frameId = null;\n\n var wrapperFn = function wrapperFn() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n lastArgs = args;\n\n if (frameId) {\n return;\n }\n\n frameId = requestAnimationFrame(function () {\n frameId = null;\n fn.apply(void 0, lastArgs);\n });\n };\n\n wrapperFn.cancel = function () {\n if (!frameId) {\n return;\n }\n\n cancelAnimationFrame(frameId);\n frameId = null;\n };\n\n return wrapperFn;\n};\n\nexport default rafSchd;\n","import rafSchd from 'raf-schd';\nvar scheduleOnDrag = rafSchd(function (fn) {\n return fn();\n});\nvar dragStart = function () {\n var scheduled = null;\n function schedule(fn) {\n var frameId = requestAnimationFrame(function () {\n scheduled = null;\n fn();\n });\n scheduled = {\n frameId: frameId,\n fn: fn\n };\n }\n function flush() {\n if (scheduled) {\n cancelAnimationFrame(scheduled.frameId);\n scheduled.fn();\n scheduled = null;\n }\n }\n return {\n schedule: schedule,\n flush: flush\n };\n}();\nexport function makeDispatch(_ref) {\n var source = _ref.source,\n initial = _ref.initial,\n dispatchEvent = _ref.dispatchEvent;\n var previous = {\n dropTargets: []\n };\n function safeDispatch(args) {\n dispatchEvent(args);\n previous = {\n dropTargets: args.payload.location.current.dropTargets\n };\n }\n var dispatch = {\n start: function start(_ref2) {\n var nativeSetDragImage = _ref2.nativeSetDragImage;\n // Ensuring that both `onGenerateDragPreview` and `onDragStart` get the same location.\n // We do this so that `previous` is`[]` in `onDragStart` (which is logical)\n var location = {\n current: initial,\n previous: previous,\n initial: initial\n };\n // a `onGenerateDragPreview` does _not_ add another entry for `previous`\n // onDragPreview\n safeDispatch({\n eventName: 'onGenerateDragPreview',\n payload: {\n source: source,\n location: location,\n nativeSetDragImage: nativeSetDragImage\n }\n });\n dragStart.schedule(function () {\n safeDispatch({\n eventName: 'onDragStart',\n payload: {\n source: source,\n location: location\n }\n });\n });\n },\n dragUpdate: function dragUpdate(_ref3) {\n var current = _ref3.current;\n dragStart.flush();\n scheduleOnDrag.cancel();\n safeDispatch({\n eventName: 'onDropTargetChange',\n payload: {\n source: source,\n location: {\n initial: initial,\n previous: previous,\n current: current\n }\n }\n });\n },\n drag: function drag(_ref4) {\n var current = _ref4.current;\n scheduleOnDrag(function () {\n dragStart.flush();\n var location = {\n initial: initial,\n previous: previous,\n current: current\n };\n safeDispatch({\n eventName: 'onDrag',\n payload: {\n source: source,\n location: location\n }\n });\n });\n },\n drop: function drop(_ref5) {\n var current = _ref5.current,\n updatedSourcePayload = _ref5.updatedSourcePayload;\n dragStart.flush();\n scheduleOnDrag.cancel();\n safeDispatch({\n eventName: 'onDrop',\n payload: {\n source: updatedSourcePayload !== null && updatedSourcePayload !== void 0 ? updatedSourcePayload : source,\n location: {\n current: current,\n previous: previous,\n initial: initial\n }\n }\n });\n }\n };\n return dispatch;\n}","import _toConsumableArray from \"@babel/runtime/helpers/toConsumableArray\";\nimport { bindAll } from 'bind-event-listener';\nimport { getElementFromPointWithoutHoneypot } from '../honey-pot-fix/get-element-from-point-without-honey-pot';\nimport { isHoneyPotElement } from '../honey-pot-fix/is-honey-pot-element';\nimport { isLeavingWindow } from '../util/changing-window/is-leaving-window';\nimport { getBindingsForBrokenDrags } from '../util/detect-broken-drag';\nimport { getInput } from '../util/get-input';\nimport { makeDispatch } from './dispatch-consumer-event';\nvar globalState = {\n isActive: false\n};\nfunction canStart() {\n return !globalState.isActive;\n}\nfunction getNativeSetDragImage(event) {\n if (event.dataTransfer) {\n // need to use `.bind` as `setDragImage` is required\n // to be run with `event.dataTransfer` as the \"this\" context\n return event.dataTransfer.setDragImage.bind(event.dataTransfer);\n }\n return null;\n}\nfunction hasHierarchyChanged(_ref) {\n var current = _ref.current,\n next = _ref.next;\n if (current.length !== next.length) {\n return true;\n }\n // not checking stickiness, data or dropEffect,\n // just whether the hierarchy has changed\n for (var i = 0; i < current.length; i++) {\n if (current[i].element !== next[i].element) {\n return true;\n }\n }\n return false;\n}\nfunction start(_ref2) {\n var event = _ref2.event,\n dragType = _ref2.dragType,\n getDropTargetsOver = _ref2.getDropTargetsOver,\n dispatchEvent = _ref2.dispatchEvent;\n if (!canStart()) {\n return;\n }\n var initial = getStartLocation({\n event: event,\n dragType: dragType,\n getDropTargetsOver: getDropTargetsOver\n });\n globalState.isActive = true;\n var state = {\n current: initial\n };\n\n // Setting initial drop effect for the drag\n setDropEffectOnEvent({\n event: event,\n current: initial.dropTargets\n });\n var dispatch = makeDispatch({\n source: dragType.payload,\n dispatchEvent: dispatchEvent,\n initial: initial\n });\n function updateState(next) {\n // only looking at whether hierarchy has changed to determine whether something as 'changed'\n var hasChanged = hasHierarchyChanged({\n current: state.current.dropTargets,\n next: next.dropTargets\n });\n\n // Always updating the state to include latest data, dropEffect and stickiness\n // Only updating consumers if the hierarchy has changed in some way\n // Consumers can get the latest data by using `onDrag`\n state.current = next;\n if (hasChanged) {\n dispatch.dragUpdate({\n current: state.current\n });\n }\n }\n function onUpdateEvent(event) {\n var input = getInput(event);\n\n // If we are over the honey pot, we need to get the element\n // that the user would have been over if not for the honey pot\n var target = isHoneyPotElement(event.target) ? getElementFromPointWithoutHoneypot({\n x: input.clientX,\n y: input.clientY\n }) : event.target;\n var nextDropTargets = getDropTargetsOver({\n target: target,\n input: input,\n source: dragType.payload,\n current: state.current.dropTargets\n });\n if (nextDropTargets.length) {\n // 🩸 must call `event.preventDefault()` to allow a browser drop to occur\n event.preventDefault();\n setDropEffectOnEvent({\n event: event,\n current: nextDropTargets\n });\n }\n updateState({\n dropTargets: nextDropTargets,\n input: input\n });\n }\n function cancel() {\n // The spec behaviour is that when a drag is cancelled, or when dropping on no drop targets,\n // a \"dragleave\" event is fired on the active drop target before a \"dragend\" event.\n // We are replicating that behaviour in `cancel` if there are any active drop targets to\n // ensure consistent behaviour.\n //\n // Note: When cancelling, or dropping on no drop targets, a \"dragleave\" event\n // will have already cleared the dropTargets to `[]` (as that particular \"dragleave\" has a `relatedTarget` of `null`)\n\n if (state.current.dropTargets.length) {\n updateState({\n dropTargets: [],\n input: state.current.input\n });\n }\n dispatch.drop({\n current: state.current,\n updatedSourcePayload: null\n });\n finish();\n }\n function finish() {\n globalState.isActive = false;\n unbindEvents();\n }\n var unbindEvents = bindAll(window, [{\n // 👋 Note: we are repurposing the `dragover` event as our `drag` event\n // this is because firefox does not publish pointer coordinates during\n // a `drag` event, but does for every other type of drag event\n // `dragover` fires on all elements that are being dragged over\n // Because we are binding to `window` - our `dragover` is effectively the same as a `drag`\n // 🦊😤\n type: 'dragover',\n listener: function listener(event) {\n // We need to regularly calculate the drop targets in order to allow:\n // - dynamic `canDrop()` checks\n // - rapid updating `getData()` calls to attach data in response to user input (eg for edge detection)\n // Sadly we cannot schedule inspecting changes resulting from this event\n // we need to be able to conditionally cancel the event with `event.preventDefault()`\n // to enable the correct native drop experience.\n\n // 1. check to see if anything has changed\n onUpdateEvent(event);\n\n // 2. let consumers know a move has occurred\n // This will include the latest 'input' values\n dispatch.drag({\n current: state.current\n });\n }\n }, {\n type: 'dragenter',\n listener: onUpdateEvent\n }, {\n type: 'dragleave',\n listener: function listener(event) {\n if (!isLeavingWindow({\n dragLeave: event\n })) {\n return;\n }\n\n /**\n * At this point we don't know if a drag is being cancelled,\n * or if a drag is leaving the `window`.\n *\n * Both have:\n * 1. \"dragleave\" (with `relatedTarget: null`)\n * 2. \"dragend\" (a \"dragend\" can occur when outside the `window`)\n *\n * **Clearing drop targets**\n *\n * For either case we are clearing the the drop targets\n *\n * - cancelling: we clear drop targets in `\"dragend\"` anyway\n * - leaving the `window`: we clear the drop targets (to clear stickiness)\n *\n * **Leaving the window and finishing the drag**\n *\n * _internal drags_\n *\n * - The drag continues when the user is outside the `window`\n * and can resume if the user drags back over the `window`,\n * or end when the user drops in an external `window`.\n * - We will get a `\"dragend\"`, or we can listen for other\n * events to determine the drag is finished when the user re-enters the `window`).\n *\n * _external drags_\n *\n * - We conclude the drag operation.\n * - We have no idea if the user will drag back over the `window`,\n * or if the drag ends elsewhere.\n * - We will create a new drag if the user re-enters the `window`.\n *\n * **Not updating `input`**\n *\n * 🐛 Bug[Chrome] the final `\"dragleave\"` has default input values (eg `clientX == 0`)\n * Workaround: intentionally not updating `input` in \"dragleave\"\n * rather than the users current input values\n * - [Conversation](https://twitter.com/alexandereardon/status/1642697633864241152)\n * - [Bug](https://bugs.chromium.org/p/chromium/issues/detail?id=1429937)\n **/\n\n updateState({\n input: state.current.input,\n dropTargets: []\n });\n if (dragType.startedFrom === 'external') {\n cancel();\n }\n }\n }, {\n // A \"drop\" can only happen if the browser allowed the drop\n type: 'drop',\n listener: function listener(event) {\n // Capture the final input.\n // We are capturing the final `input` for the\n // most accurate honey pot experience\n state.current = {\n dropTargets: state.current.dropTargets,\n input: getInput(event)\n };\n\n /** If there are no drop targets, then we will get\n * a \"drop\" event if:\n * - `preventUnhandled()` is being used\n * - there is an unmanaged drop target (eg another library)\n * In these cases, it's up to the consumer\n * to handle the drop if it's not over one of our drop targets\n * - `preventUnhandled()` will cancel the \"drop\"\n * - unmanaged drop targets can handle the \"drop\" how they want to\n * We won't call `event.preventDefault()` in this call path */\n\n if (!state.current.dropTargets.length) {\n cancel();\n return;\n }\n event.preventDefault();\n\n // applying the latest drop effect to the event\n setDropEffectOnEvent({\n event: event,\n current: state.current.dropTargets\n });\n dispatch.drop({\n current: state.current,\n // When dropping something native, we need to extract the latest\n // `.items` from the \"drop\" event as it is now accessible\n updatedSourcePayload: dragType.type === 'external' ? dragType.getDropPayload(event) : null\n });\n finish();\n }\n }, {\n // \"dragend\" fires when on the drag source (eg a draggable element)\n // when the drag is finished.\n // \"dragend\" will fire after \"drop\" (if there was a successful drop)\n // \"dragend\" does not fire if the draggable source has been removed during the drag\n // or for external drag sources (eg files)\n\n // This \"dragend\" listener will not fire if there was a successful drop\n // as we will have already removed the event listener\n\n type: 'dragend',\n listener: function listener(event) {\n // In firefox, the position of the \"dragend\" event can\n // be a bit different to the last \"dragover\" event.\n // Updating the input so we can get the best possible\n // information for the honey pot.\n state.current = {\n dropTargets: state.current.dropTargets,\n input: getInput(event)\n };\n cancel();\n }\n }].concat(_toConsumableArray(getBindingsForBrokenDrags({\n onDragEnd: cancel\n }))),\n // Once we have started a managed drag operation it is important that we see / own all drag events\n // We got one adoption bug pop up where some code was stopping (`event.stopPropagation()`)\n // all \"drop\" events in the bubble phase on the `document.body`.\n // This meant that we never saw the \"drop\" event.\n {\n capture: true\n });\n dispatch.start({\n nativeSetDragImage: getNativeSetDragImage(event)\n });\n}\nfunction setDropEffectOnEvent(_ref3) {\n var _current$;\n var event = _ref3.event,\n current = _ref3.current;\n // setting the `dropEffect` to be the innerMost drop targets dropEffect\n var innerMost = (_current$ = current[0]) === null || _current$ === void 0 ? void 0 : _current$.dropEffect;\n if (innerMost != null && event.dataTransfer) {\n event.dataTransfer.dropEffect = innerMost;\n }\n}\nfunction getStartLocation(_ref4) {\n var event = _ref4.event,\n dragType = _ref4.dragType,\n getDropTargetsOver = _ref4.getDropTargetsOver;\n var input = getInput(event);\n\n // When dragging from outside of the browser,\n // the drag is not being sourced from any local drop targets\n if (dragType.startedFrom === 'external') {\n return {\n input: input,\n dropTargets: []\n };\n }\n var dropTargets = getDropTargetsOver({\n input: input,\n source: dragType.payload,\n target: event.target,\n current: []\n });\n return {\n input: input,\n dropTargets: dropTargets\n };\n}\nexport var lifecycle = {\n canStart: canStart,\n start: start\n};","// Extending `Map` to allow us to link Key and Values together\n\nvar ledger = new Map();\nfunction registerUsage(_ref) {\n var typeKey = _ref.typeKey,\n mount = _ref.mount;\n var entry = ledger.get(typeKey);\n if (entry) {\n entry.usageCount++;\n return entry;\n }\n var initial = {\n typeKey: typeKey,\n unmount: mount(),\n usageCount: 1\n };\n ledger.set(typeKey, initial);\n return initial;\n}\nexport function register(args) {\n var entry = registerUsage(args);\n return function unregister() {\n entry.usageCount--;\n if (entry.usageCount > 0) {\n return;\n }\n // Only a single usage left, remove it\n entry.unmount();\n ledger.delete(args.typeKey);\n };\n}","/** Create a new combined function that will call all the provided functions */\nexport function combine() {\n for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {\n fns[_key] = arguments[_key];\n }\n return function cleanup() {\n fns.forEach(function (fn) {\n return fn();\n });\n };\n}","export function addAttribute(element, _ref) {\n var attribute = _ref.attribute,\n value = _ref.value;\n element.setAttribute(attribute, value);\n return function () {\n return element.removeAttribute(attribute);\n };\n}","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _toConsumableArray from \"@babel/runtime/helpers/toConsumableArray\";\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _createForOfIteratorHelper(r, e) { var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && \"number\" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nimport { combine } from '../public-utils/combine';\nimport { addAttribute } from '../util/add-attribute';\nfunction copyReverse(array) {\n return array.slice(0).reverse();\n}\nexport function makeDropTarget(_ref) {\n var typeKey = _ref.typeKey,\n defaultDropEffect = _ref.defaultDropEffect;\n var registry = new WeakMap();\n var dropTargetDataAtt = \"data-drop-target-for-\".concat(typeKey);\n var dropTargetSelector = \"[\".concat(dropTargetDataAtt, \"]\");\n function addToRegistry(args) {\n registry.set(args.element, args);\n return function () {\n return registry.delete(args.element);\n };\n }\n function dropTargetForConsumers(args) {\n // Guardrail: warn if the draggable element is already registered\n if (process.env.NODE_ENV !== 'production') {\n var existing = registry.get(args.element);\n if (existing) {\n // eslint-disable-next-line no-console\n console.warn(\"You have already registered a [\".concat(typeKey, \"] dropTarget on the same element\"), {\n existing: existing,\n proposed: args\n });\n }\n if (args.element instanceof HTMLIFrameElement) {\n // eslint-disable-next-line no-console\n console.warn(\"\\n We recommend not registering