@zihanw/pi-forge 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +49 -1
- package/README.md +11 -11
- package/README.zh-CN.md +4 -6
- package/SUBAGENT_ADAPTER_CONTRACT.md +3 -1
- package/dist/agent-profile.d.ts +21 -42
- package/dist/agent-profile.d.ts.map +1 -1
- package/dist/agent-profile.js +82 -194
- package/dist/agent-profile.js.map +1 -1
- package/dist/catalog.d.ts +27 -0
- package/dist/catalog.d.ts.map +1 -0
- package/dist/catalog.js +59 -0
- package/dist/catalog.js.map +1 -0
- package/dist/codecs/agent-profile.d.ts +53 -0
- package/dist/codecs/agent-profile.d.ts.map +1 -0
- package/dist/codecs/agent-profile.js +176 -0
- package/dist/codecs/agent-profile.js.map +1 -0
- package/dist/codecs/index.d.ts +5 -0
- package/dist/codecs/index.d.ts.map +1 -0
- package/dist/codecs/index.js +3 -0
- package/dist/codecs/index.js.map +1 -0
- package/dist/codecs/prompt-stack.d.ts +18 -0
- package/dist/codecs/prompt-stack.d.ts.map +1 -0
- package/dist/codecs/prompt-stack.js +479 -0
- package/dist/codecs/prompt-stack.js.map +1 -0
- package/dist/compile-cycle.d.ts +18 -0
- package/dist/compile-cycle.d.ts.map +1 -0
- package/dist/compile-cycle.js +13 -0
- package/dist/compile-cycle.js.map +1 -0
- package/dist/compiler.d.ts +10 -4
- package/dist/compiler.d.ts.map +1 -1
- package/dist/compiler.js +53 -19
- package/dist/compiler.js.map +1 -1
- package/dist/extension-registry.d.ts.map +1 -1
- package/dist/extension-registry.js +5 -2
- package/dist/extension-registry.js.map +1 -1
- package/dist/forge-config.d.ts +2 -81
- package/dist/forge-config.d.ts.map +1 -1
- package/dist/forge-config.js +5 -280
- package/dist/forge-config.js.map +1 -1
- package/dist/forge-v1/analyzer.d.ts +3 -0
- package/dist/forge-v1/analyzer.d.ts.map +1 -0
- package/dist/forge-v1/analyzer.js +50 -0
- package/dist/forge-v1/analyzer.js.map +1 -0
- package/dist/forge-v1/index.d.ts +6 -0
- package/dist/forge-v1/index.d.ts.map +1 -0
- package/dist/forge-v1/index.js +13 -0
- package/dist/forge-v1/index.js.map +1 -0
- package/dist/forge-v1/parser.d.ts +3 -0
- package/dist/forge-v1/parser.d.ts.map +1 -0
- package/dist/forge-v1/parser.js +186 -0
- package/dist/forge-v1/parser.js.map +1 -0
- package/dist/forge-v1/renderer.d.ts +9 -0
- package/dist/forge-v1/renderer.d.ts.map +1 -0
- package/dist/forge-v1/renderer.js +181 -0
- package/dist/forge-v1/renderer.js.map +1 -0
- package/dist/forge-v1/types.d.ts +87 -0
- package/dist/forge-v1/types.d.ts.map +1 -0
- package/dist/forge-v1/types.js +4 -0
- package/dist/forge-v1/types.js.map +1 -0
- package/dist/index.d.ts +12 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +49 -59
- package/dist/index.js.map +1 -1
- package/dist/lifecycle.d.ts +7 -5
- package/dist/lifecycle.d.ts.map +1 -1
- package/dist/lifecycle.js +44 -110
- package/dist/lifecycle.js.map +1 -1
- package/dist/loader.d.ts +16 -3
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js +42 -440
- package/dist/loader.js.map +1 -1
- package/dist/macro-engine.d.ts +9 -14
- package/dist/macro-engine.d.ts.map +1 -1
- package/dist/macro-engine.js +5 -238
- package/dist/macro-engine.js.map +1 -1
- package/dist/payload-command.d.ts +6 -6
- package/dist/payload-command.d.ts.map +1 -1
- package/dist/payload-command.js.map +1 -1
- package/dist/payload-state.d.ts +16 -0
- package/dist/payload-state.d.ts.map +1 -0
- package/dist/payload-state.js +14 -0
- package/dist/payload-state.js.map +1 -0
- package/dist/preset-command.d.ts +4 -4
- package/dist/preset-command.d.ts.map +1 -1
- package/dist/preset-command.js +55 -98
- package/dist/preset-command.js.map +1 -1
- package/dist/preview.d.ts +4 -4
- package/dist/preview.d.ts.map +1 -1
- package/dist/preview.js +17 -8
- package/dist/preview.js.map +1 -1
- package/dist/profile-command.d.ts +2 -2
- package/dist/profile-command.d.ts.map +1 -1
- package/dist/profile-command.js +52 -26
- package/dist/profile-command.js.map +1 -1
- package/dist/profile-service.d.ts +5 -2
- package/dist/profile-service.d.ts.map +1 -1
- package/dist/profile-service.js +63 -42
- package/dist/profile-service.js.map +1 -1
- package/dist/prompt-analysis.d.ts +24 -0
- package/dist/prompt-analysis.d.ts.map +1 -0
- package/dist/prompt-analysis.js +84 -0
- package/dist/prompt-analysis.js.map +1 -0
- package/dist/prompt-runtime.d.ts +19 -0
- package/dist/prompt-runtime.d.ts.map +1 -0
- package/dist/prompt-runtime.js +30 -0
- package/dist/prompt-runtime.js.map +1 -0
- package/dist/regex.js +6 -12
- package/dist/regex.js.map +1 -1
- package/dist/render-helpers.d.ts +2 -10
- package/dist/render-helpers.d.ts.map +1 -1
- package/dist/render-helpers.js +3 -53
- package/dist/render-helpers.js.map +1 -1
- package/dist/repositories/agent-profile.d.ts +36 -0
- package/dist/repositories/agent-profile.d.ts.map +1 -0
- package/dist/repositories/agent-profile.js +153 -0
- package/dist/repositories/agent-profile.js.map +1 -0
- package/dist/repositories/index.d.ts +3 -0
- package/dist/repositories/index.d.ts.map +1 -0
- package/dist/repositories/index.js +3 -0
- package/dist/repositories/index.js.map +1 -0
- package/dist/repositories/prompt-stack.d.ts +57 -0
- package/dist/repositories/prompt-stack.d.ts.map +1 -0
- package/dist/repositories/prompt-stack.js +175 -0
- package/dist/repositories/prompt-stack.js.map +1 -0
- package/dist/resource-identity.d.ts +33 -0
- package/dist/resource-identity.d.ts.map +1 -0
- package/dist/resource-identity.js +56 -0
- package/dist/resource-identity.js.map +1 -0
- package/dist/runtime/profile-runtime.d.ts +2 -2
- package/dist/runtime/profile-runtime.d.ts.map +1 -1
- package/dist/runtime/profile-runtime.js +18 -10
- package/dist/runtime/profile-runtime.js.map +1 -1
- package/dist/runtime/prompt-stack-runtime.d.ts +5 -4
- package/dist/runtime/prompt-stack-runtime.d.ts.map +1 -1
- package/dist/runtime/prompt-stack-runtime.js +47 -52
- package/dist/runtime/prompt-stack-runtime.js.map +1 -1
- package/dist/runtime/tool-policy-runtime.d.ts +2 -2
- package/dist/runtime/tool-policy-runtime.d.ts.map +1 -1
- package/dist/runtime/tool-policy-runtime.js +3 -3
- package/dist/runtime/tool-policy-runtime.js.map +1 -1
- package/dist/session-adapter.d.ts +17 -0
- package/dist/session-adapter.d.ts.map +1 -0
- package/dist/session-adapter.js +57 -0
- package/dist/session-adapter.js.map +1 -0
- package/dist/slot-renderers.d.ts +16 -3
- package/dist/slot-renderers.d.ts.map +1 -1
- package/dist/slot-renderers.js +15 -63
- package/dist/slot-renderers.js.map +1 -1
- package/dist/stack-migration.d.ts +6 -0
- package/dist/stack-migration.d.ts.map +1 -1
- package/dist/stack-migration.js +49 -52
- package/dist/stack-migration.js.map +1 -1
- package/dist/storage.d.ts +10 -0
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +45 -10
- package/dist/storage.js.map +1 -1
- package/dist/subagent/fingerprints.d.ts +24 -0
- package/dist/subagent/fingerprints.d.ts.map +1 -0
- package/dist/subagent/fingerprints.js +81 -0
- package/dist/subagent/fingerprints.js.map +1 -0
- package/dist/subagent/host-port.d.ts +296 -0
- package/dist/subagent/host-port.d.ts.map +1 -0
- package/dist/subagent/host-port.js +560 -0
- package/dist/subagent/host-port.js.map +1 -0
- package/dist/subagent/index.d.ts +10 -10
- package/dist/subagent/index.d.ts.map +1 -1
- package/dist/subagent/index.js +9 -10
- package/dist/subagent/index.js.map +1 -1
- package/dist/subagent-host.d.ts +99 -18
- package/dist/subagent-host.d.ts.map +1 -1
- package/dist/subagent-host.js +185 -162
- package/dist/subagent-host.js.map +1 -1
- package/dist/template-render.d.ts +18 -0
- package/dist/template-render.d.ts.map +1 -0
- package/dist/template-render.js +232 -0
- package/dist/template-render.js.map +1 -0
- package/dist/types.d.ts +43 -27
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/web-editor/client-script.generated.d.ts.map +1 -1
- package/dist/web-editor/client-script.generated.js +1 -1
- package/dist/web-editor/client-script.generated.js.map +1 -1
- package/dist/web-editor/client-styles.generated.d.ts.map +1 -1
- package/dist/web-editor/client-styles.generated.js +1 -1
- package/dist/web-editor/client-styles.generated.js.map +1 -1
- package/dist/web-editor/server.d.ts.map +1 -1
- package/dist/web-editor/server.js +32 -72
- package/dist/web-editor/server.js.map +1 -1
- package/dist/web-editor/styles.d.ts.map +1 -1
- package/dist/web-editor/styles.js +13 -0
- package/dist/web-editor/styles.js.map +1 -1
- package/dist/web-editor/types.d.ts +10 -37
- package/dist/web-editor/types.d.ts.map +1 -1
- package/dist/web-host.d.ts +4 -2
- package/dist/web-host.d.ts.map +1 -1
- package/dist/web-host.js +110 -138
- package/dist/web-host.js.map +1 -1
- package/dist/workspace.d.ts +74 -0
- package/dist/workspace.d.ts.map +1 -0
- package/dist/workspace.js +351 -0
- package/dist/workspace.js.map +1 -0
- package/docs/README.md +6 -4
- package/docs/concepts/agent-profiles.md +2 -2
- package/docs/concepts/prompt-stacks.md +12 -7
- package/docs/design/README.md +21 -3
- package/docs/design/architecture-0.5.md +211 -0
- package/docs/design/archive/0.5-full-proposal/0.5-consumer-audit.md +62 -0
- package/docs/design/archive/0.5-full-proposal/0.5-inventory.md +208 -0
- package/docs/design/archive/0.5-full-proposal/0.5-phase0-decision-drafts.md +237 -0
- package/docs/design/archive/0.5-full-proposal/README.md +12 -0
- package/docs/design/archive/0.5-full-proposal/architecture-0.5.md +423 -0
- package/docs/design/archive/0.5-full-proposal/host-discovery-spike.md +103 -0
- package/docs/design/archive/0.5-full-proposal/template-language-spike.md +156 -0
- package/docs/design/context-diff-plan.md +72 -0
- package/docs/design/decision-template.md +33 -0
- package/docs/design/roadmap-0.4-archive.md +1 -1
- package/docs/design/subagents/interface-design.md +1 -1
- package/docs/development/architecture-rules.md +148 -0
- package/docs/development/roadmap.md +39 -13
- package/docs/development/scoped-global-profiles-stacks.md +325 -0
- package/docs/development/setup.md +6 -4
- package/docs/getting-started.md +9 -6
- package/docs/guides/custom-macros-and-slots.md +8 -7
- package/docs/guides/debugging.md +1 -1
- package/docs/guides/delegation.md +25 -21
- package/docs/guides/migrating-to-0.5.md +107 -0
- package/docs/guides/use-cases.md +7 -11
- package/docs/guides/web-editor.md +7 -11
- package/docs/reference/commands.md +4 -3
- package/docs/reference/configuration.md +18 -17
- package/docs/reference/features.md +34 -79
- package/docs/reference/macros-and-slots.md +70 -49
- package/docs/reference/public-api.md +64 -17
- package/docs/reference/stack-schema.md +14 -9
- package/docs/reference/subagent-host-port.md +49 -0
- package/docs/zh-CN/README.md +3 -3
- package/docs/zh-CN/concepts/agent-profiles.md +4 -2
- package/docs/zh-CN/concepts/prompt-stacks.md +9 -7
- package/docs/zh-CN/getting-started.md +10 -7
- package/docs/zh-CN/guides/delegation.md +11 -13
- package/docs/zh-CN/guides/migrating-to-0.5.md +92 -0
- package/docs/zh-CN/guides/web-editor.md +7 -7
- package/docs/zh-CN/reference/commands.md +6 -3
- package/examples/custom-system-status-extension/README.md +3 -3
- package/examples/custom-system-status-extension/index.ts +2 -1
- package/examples/custom-system-status-extension/prompt-stack.json +4 -3
- package/examples/default-prompt-stack.json +9 -4
- package/examples/image-reader-prompt-stack.json +16 -26
- package/examples/reviewer-prompt-stack.json +13 -24
- package/package.json +101 -120
- package/dist/runtime/subagent-runtime.d.ts +0 -45
- package/dist/runtime/subagent-runtime.d.ts.map +0 -1
- package/dist/runtime/subagent-runtime.js +0 -335
- package/dist/runtime/subagent-runtime.js.map +0 -1
- package/dist/runtime-state.d.ts +0 -30
- package/dist/runtime-state.d.ts.map +0 -1
- package/dist/runtime-state.js +0 -17
- package/dist/runtime-state.js.map +0 -1
- package/dist/sillytavern-importer/items.d.ts +0 -3
- package/dist/sillytavern-importer/items.d.ts.map +0 -1
- package/dist/sillytavern-importer/items.js +0 -88
- package/dist/sillytavern-importer/items.js.map +0 -1
- package/dist/sillytavern-importer/macros.d.ts +0 -15
- package/dist/sillytavern-importer/macros.d.ts.map +0 -1
- package/dist/sillytavern-importer/macros.js +0 -141
- package/dist/sillytavern-importer/macros.js.map +0 -1
- package/dist/sillytavern-importer/prompt-order.d.ts +0 -6
- package/dist/sillytavern-importer/prompt-order.d.ts.map +0 -1
- package/dist/sillytavern-importer/prompt-order.js +0 -38
- package/dist/sillytavern-importer/prompt-order.js.map +0 -1
- package/dist/sillytavern-importer/regex.d.ts +0 -3
- package/dist/sillytavern-importer/regex.d.ts.map +0 -1
- package/dist/sillytavern-importer/regex.js +0 -275
- package/dist/sillytavern-importer/regex.js.map +0 -1
- package/dist/sillytavern-importer/report.d.ts +0 -21
- package/dist/sillytavern-importer/report.d.ts.map +0 -1
- package/dist/sillytavern-importer/report.js +0 -166
- package/dist/sillytavern-importer/report.js.map +0 -1
- package/dist/sillytavern-importer/types.d.ts +0 -106
- package/dist/sillytavern-importer/types.d.ts.map +0 -1
- package/dist/sillytavern-importer/types.js +0 -2
- package/dist/sillytavern-importer/types.js.map +0 -1
- package/dist/sillytavern-importer.d.ts +0 -5
- package/dist/sillytavern-importer.d.ts.map +0 -1
- package/dist/sillytavern-importer.js +0 -117
- package/dist/sillytavern-importer.js.map +0 -1
- package/dist/subagent/canonical.d.ts +0 -22
- package/dist/subagent/canonical.d.ts.map +0 -1
- package/dist/subagent/canonical.js +0 -24
- package/dist/subagent/canonical.js.map +0 -1
- package/dist/subagent/context.d.ts +0 -8
- package/dist/subagent/context.d.ts.map +0 -1
- package/dist/subagent/context.js +0 -125
- package/dist/subagent/context.js.map +0 -1
- package/dist/subagent/contract.d.ts +0 -10
- package/dist/subagent/contract.d.ts.map +0 -1
- package/dist/subagent/contract.js +0 -10
- package/dist/subagent/contract.js.map +0 -1
- package/dist/subagent/plan.d.ts +0 -18
- package/dist/subagent/plan.d.ts.map +0 -1
- package/dist/subagent/plan.js +0 -157
- package/dist/subagent/plan.js.map +0 -1
- package/dist/subagent/preflight.d.ts +0 -4
- package/dist/subagent/preflight.d.ts.map +0 -1
- package/dist/subagent/preflight.js +0 -108
- package/dist/subagent/preflight.js.map +0 -1
- package/dist/subagent/request.d.ts +0 -4
- package/dist/subagent/request.d.ts.map +0 -1
- package/dist/subagent/request.js +0 -122
- package/dist/subagent/request.js.map +0 -1
- package/dist/subagent/response.d.ts +0 -8
- package/dist/subagent/response.d.ts.map +0 -1
- package/dist/subagent/response.js +0 -155
- package/dist/subagent/response.js.map +0 -1
- package/dist/subagent/tools.d.ts +0 -4
- package/dist/subagent/tools.d.ts.map +0 -1
- package/dist/subagent/tools.js +0 -42
- package/dist/subagent/tools.js.map +0 -1
- package/dist/subagent/types.d.ts +0 -268
- package/dist/subagent/types.d.ts.map +0 -1
- package/dist/subagent/types.js +0 -3
- package/dist/subagent/types.js.map +0 -1
- package/dist/subagent/validation.d.ts +0 -35
- package/dist/subagent/validation.d.ts.map +0 -1
- package/dist/subagent/validation.js +0 -314
- package/dist/subagent/validation.js.map +0 -1
- package/dist/subagent-command.d.ts +0 -4
- package/dist/subagent-command.d.ts.map +0 -1
- package/dist/subagent-command.js +0 -246
- package/dist/subagent-command.js.map +0 -1
- package/dist/subagent-profile-tool.d.ts +0 -49
- package/dist/subagent-profile-tool.d.ts.map +0 -1
- package/dist/subagent-profile-tool.js +0 -124
- package/dist/subagent-profile-tool.js.map +0 -1
- package/dist/subagent-tool.d.ts +0 -53
- package/dist/subagent-tool.d.ts.map +0 -1
- package/dist/subagent-tool.js +0 -456
- package/dist/subagent-tool.js.map +0 -1
- package/docs/guides/sillytavern-import.md +0 -47
- package/docs/reference/subagent-adapter.md +0 -204
- package/examples/sillytavern-dm-writer-prompt-stack.json +0 -190
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Generated by scripts/build-web-client.mjs. Do not edit.
|
|
2
|
-
export const EDITOR_CLIENT_SCRIPT = "(function() {\n\t//#region \\0rolldown/runtime.js\n\tvar __defProp = Object.defineProperty;\n\tvar __esmMin = (fn, res, err) => () => {\n\t\tif (err) throw err[0];\n\t\ttry {\n\t\t\treturn fn && (res = fn(fn = 0)), res;\n\t\t} catch (e) {\n\t\t\tthrow err = [e], e;\n\t\t}\n\t};\n\tvar __exportAll = (all, no_symbols) => {\n\t\tlet target = {};\n\t\tfor (var name in all) __defProp(target, name, {\n\t\t\tget: all[name],\n\t\t\tenumerable: true\n\t\t});\n\t\tif (!no_symbols) __defProp(target, Symbol.toStringTag, { value: \"Module\" });\n\t\treturn target;\n\t};\n\t//#endregion\n\t//#region node_modules/@vue/shared/dist/shared.esm-bundler.js\n\t/**\n\t* @vue/shared v3.5.40\n\t* (c) 2018-present Yuxi (Evan) You and Vue contributors\n\t* @license MIT\n\t**/\n\t// @__NO_SIDE_EFFECTS__\n\tfunction makeMap(str) {\n\t\tconst map = /* @__PURE__ */ Object.create(null);\n\t\tfor (const key of str.split(\",\")) map[key] = 1;\n\t\treturn (val) => val in map;\n\t}\n\tfunction normalizeStyle(value) {\n\t\tif (isArray(value)) {\n\t\t\tconst res = {};\n\t\t\tfor (let i = 0; i < value.length; i++) {\n\t\t\t\tconst item = value[i];\n\t\t\t\tconst normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);\n\t\t\t\tif (normalized) for (const key in normalized) res[key] = normalized[key];\n\t\t\t}\n\t\t\treturn res;\n\t\t} else if (isString(value) || isObject(value)) return value;\n\t}\n\tfunction parseStringStyle(cssText) {\n\t\tconst ret = {};\n\t\tcssText.replace(styleCommentRE, \"\").split(listDelimiterRE).forEach((item) => {\n\t\t\tif (item) {\n\t\t\t\tconst tmp = item.split(propertyDelimiterRE);\n\t\t\t\ttmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());\n\t\t\t}\n\t\t});\n\t\treturn ret;\n\t}\n\tfunction normalizeClass(value) {\n\t\tlet res = \"\";\n\t\tif (isString(value)) res = value;\n\t\telse if (isArray(value)) for (let i = 0; i < value.length; i++) {\n\t\t\tconst normalized = normalizeClass(value[i]);\n\t\t\tif (normalized) res += normalized + \" \";\n\t\t}\n\t\telse if (isObject(value)) {\n\t\t\tfor (const name in value) if (value[name]) res += name + \" \";\n\t\t}\n\t\treturn res.trim();\n\t}\n\tfunction includeBooleanAttr(value) {\n\t\treturn !!value || value === \"\";\n\t}\n\tfunction looseCompareArrays(a, b) {\n\t\tif (a.length !== b.length) return false;\n\t\tlet equal = true;\n\t\tfor (let i = 0; equal && i < a.length; i++) equal = looseEqual(a[i], b[i]);\n\t\treturn equal;\n\t}\n\tfunction looseEqual(a, b) {\n\t\tif (a === b) return true;\n\t\tlet aValidType = isDate(a);\n\t\tlet bValidType = isDate(b);\n\t\tif (aValidType || bValidType) return aValidType && bValidType ? a.getTime() === b.getTime() : false;\n\t\taValidType = isSymbol(a);\n\t\tbValidType = isSymbol(b);\n\t\tif (aValidType || bValidType) return a === b;\n\t\taValidType = isArray(a);\n\t\tbValidType = isArray(b);\n\t\tif (aValidType || bValidType) return aValidType && bValidType ? looseCompareArrays(a, b) : false;\n\t\taValidType = isObject(a);\n\t\tbValidType = isObject(b);\n\t\tif (aValidType || bValidType) {\n\t\t\tif (!aValidType || !bValidType) return false;\n\t\t\tif (Object.keys(a).length !== Object.keys(b).length) return false;\n\t\t\tfor (const key in a) {\n\t\t\t\tconst aHasKey = a.hasOwnProperty(key);\n\t\t\t\tconst bHasKey = b.hasOwnProperty(key);\n\t\t\t\tif (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) return false;\n\t\t\t}\n\t\t}\n\t\treturn String(a) === String(b);\n\t}\n\tfunction looseIndexOf(arr, val) {\n\t\treturn arr.findIndex((item) => looseEqual(item, val));\n\t}\n\tvar EMPTY_OBJ, EMPTY_ARR, NOOP, NO, isOn, isModelListener, extend, remove, hasOwnProperty$1, hasOwn, isArray, isMap, isSet, isDate, isFunction, isString, isSymbol, isObject, isPromise, objectToString, toTypeString, toRawType, isPlainObject, isIntegerKey, isReservedProp, cacheStringFunction, camelizeRE, camelize, hyphenateRE, hyphenate, capitalize, toHandlerKey, hasChanged, invokeArrayFns, def, looseToNumber, _globalThis, getGlobalThis, listDelimiterRE, propertyDelimiterRE, styleCommentRE, specialBooleanAttrs, isSpecialBooleanAttr, isRef$1, toDisplayString, replacer, stringifySymbol;\n\tvar init_shared_esm_bundler = __esmMin((() => {\n\t\tEMPTY_OBJ = {};\n\t\tEMPTY_ARR = [];\n\t\tNOOP = () => {};\n\t\tNO = () => false;\n\t\tisOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);\n\t\tisModelListener = (key) => key.startsWith(\"onUpdate:\");\n\t\textend = Object.assign;\n\t\tremove = (arr, el) => {\n\t\t\tconst i = arr.indexOf(el);\n\t\t\tif (i > -1) arr.splice(i, 1);\n\t\t};\n\t\thasOwnProperty$1 = Object.prototype.hasOwnProperty;\n\t\thasOwn = (val, key) => hasOwnProperty$1.call(val, key);\n\t\tisArray = Array.isArray;\n\t\tisMap = (val) => toTypeString(val) === \"[object Map]\";\n\t\tisSet = (val) => toTypeString(val) === \"[object Set]\";\n\t\tisDate = (val) => toTypeString(val) === \"[object Date]\";\n\t\tisFunction = (val) => typeof val === \"function\";\n\t\tisString = (val) => typeof val === \"string\";\n\t\tisSymbol = (val) => typeof val === \"symbol\";\n\t\tisObject = (val) => val !== null && typeof val === \"object\";\n\t\tisPromise = (val) => {\n\t\t\treturn (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);\n\t\t};\n\t\tobjectToString = Object.prototype.toString;\n\t\ttoTypeString = (value) => objectToString.call(value);\n\t\ttoRawType = (value) => {\n\t\t\treturn toTypeString(value).slice(8, -1);\n\t\t};\n\t\tisPlainObject = (val) => toTypeString(val) === \"[object Object]\";\n\t\tisIntegerKey = (key) => isString(key) && key !== \"NaN\" && key[0] !== \"-\" && \"\" + parseInt(key, 10) === key;\n\t\tisReservedProp = /* @__PURE__ */ makeMap(\",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted\");\n\t\tcacheStringFunction = (fn) => {\n\t\t\tconst cache = /* @__PURE__ */ Object.create(null);\n\t\t\treturn ((str) => {\n\t\t\t\treturn cache[str] || (cache[str] = fn(str));\n\t\t\t});\n\t\t};\n\t\tcamelizeRE = /-\\w/g;\n\t\tcamelize = cacheStringFunction((str) => {\n\t\t\treturn str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());\n\t\t});\n\t\thyphenateRE = /\\B([A-Z])/g;\n\t\thyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, \"-$1\").toLowerCase());\n\t\tcapitalize = cacheStringFunction((str) => {\n\t\t\treturn str.charAt(0).toUpperCase() + str.slice(1);\n\t\t});\n\t\ttoHandlerKey = cacheStringFunction((str) => {\n\t\t\treturn str ? `on${capitalize(str)}` : ``;\n\t\t});\n\t\thasChanged = (value, oldValue) => !Object.is(value, oldValue);\n\t\tinvokeArrayFns = (fns, ...arg) => {\n\t\t\tfor (let i = 0; i < fns.length; i++) fns[i](...arg);\n\t\t};\n\t\tdef = (obj, key, value, writable = false) => {\n\t\t\tObject.defineProperty(obj, key, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\twritable,\n\t\t\t\tvalue\n\t\t\t});\n\t\t};\n\t\tlooseToNumber = (val) => {\n\t\t\tconst n = parseFloat(val);\n\t\t\treturn isNaN(n) ? val : n;\n\t\t};\n\t\tgetGlobalThis = () => {\n\t\t\treturn _globalThis || (_globalThis = typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {});\n\t\t};\n\t\tlistDelimiterRE = /;(?![^(]*\\))/g;\n\t\tpropertyDelimiterRE = /:([^]+)/;\n\t\tstyleCommentRE = /\\/\\*[^]*?\\*\\//g;\n\t\tspecialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;\n\t\tisSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);\n\t\tspecialBooleanAttrs + \"\";\n\t\tisRef$1 = (val) => {\n\t\t\treturn !!(val && val[\"__v_isRef\"] === true);\n\t\t};\n\t\ttoDisplayString = (val) => {\n\t\t\treturn isString(val) ? val : val == null ? \"\" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef$1(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val);\n\t\t};\n\t\treplacer = (_key, val) => {\n\t\t\tif (isRef$1(val)) return replacer(_key, val.value);\n\t\t\telse if (isMap(val)) return { [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val2], i) => {\n\t\t\t\tentries[stringifySymbol(key, i) + \" =>\"] = val2;\n\t\t\t\treturn entries;\n\t\t\t}, {}) };\n\t\t\telse if (isSet(val)) return { [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) };\n\t\t\telse if (isSymbol(val)) return stringifySymbol(val);\n\t\t\telse if (isObject(val) && !isArray(val) && !isPlainObject(val)) return String(val);\n\t\t\treturn val;\n\t\t};\n\t\tstringifySymbol = (v, i = \"\") => {\n\t\t\tvar _a;\n\t\t\treturn isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v;\n\t\t};\n\t}));\n\t//#endregion\n\t//#region node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js\n\t/**\n\t* @vue/reactivity v3.5.40\n\t* (c) 2018-present Yuxi (Evan) You and Vue contributors\n\t* @license MIT\n\t**/\n\tfunction getCurrentScope() {\n\t\treturn activeEffectScope;\n\t}\n\tfunction batch(sub, isComputed = false) {\n\t\tsub.flags |= 8;\n\t\tif (isComputed) {\n\t\t\tsub.next = batchedComputed;\n\t\t\tbatchedComputed = sub;\n\t\t\treturn;\n\t\t}\n\t\tsub.next = batchedSub;\n\t\tbatchedSub = sub;\n\t}\n\tfunction startBatch() {\n\t\tbatchDepth++;\n\t}\n\tfunction endBatch() {\n\t\tif (--batchDepth > 0) return;\n\t\tif (batchedComputed) {\n\t\t\tlet e = batchedComputed;\n\t\t\tbatchedComputed = void 0;\n\t\t\twhile (e) {\n\t\t\t\tconst next = e.next;\n\t\t\t\te.next = void 0;\n\t\t\t\te.flags &= -9;\n\t\t\t\te = next;\n\t\t\t}\n\t\t}\n\t\tlet error;\n\t\twhile (batchedSub) {\n\t\t\tlet e = batchedSub;\n\t\t\tbatchedSub = void 0;\n\t\t\twhile (e) {\n\t\t\t\tconst next = e.next;\n\t\t\t\te.next = void 0;\n\t\t\t\te.flags &= -9;\n\t\t\t\tif (e.flags & 1) try {\n\t\t\t\t\te.trigger();\n\t\t\t\t} catch (err) {\n\t\t\t\t\tif (!error) error = err;\n\t\t\t\t}\n\t\t\t\te = next;\n\t\t\t}\n\t\t}\n\t\tif (error) throw error;\n\t}\n\tfunction prepareDeps(sub) {\n\t\tfor (let link = sub.deps; link; link = link.nextDep) {\n\t\t\tlink.version = -1;\n\t\t\tlink.prevActiveLink = link.dep.activeLink;\n\t\t\tlink.dep.activeLink = link;\n\t\t}\n\t}\n\tfunction cleanupDeps(sub) {\n\t\tlet head;\n\t\tlet tail = sub.depsTail;\n\t\tlet link = tail;\n\t\twhile (link) {\n\t\t\tconst prev = link.prevDep;\n\t\t\tif (link.version === -1) {\n\t\t\t\tif (link === tail) tail = prev;\n\t\t\t\tremoveSub(link);\n\t\t\t\tremoveDep(link);\n\t\t\t} else head = link;\n\t\t\tlink.dep.activeLink = link.prevActiveLink;\n\t\t\tlink.prevActiveLink = void 0;\n\t\t\tlink = prev;\n\t\t}\n\t\tsub.deps = head;\n\t\tsub.depsTail = tail;\n\t}\n\tfunction isDirty(sub) {\n\t\tfor (let link = sub.deps; link; link = link.nextDep) if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) return true;\n\t\tif (sub._dirty) return true;\n\t\treturn false;\n\t}\n\tfunction refreshComputed(computed) {\n\t\tif (computed.flags & 4 && !(computed.flags & 16)) return;\n\t\tcomputed.flags &= -17;\n\t\tif (computed.globalVersion === globalVersion) return;\n\t\tcomputed.globalVersion = globalVersion;\n\t\tif (!computed.isSSR && computed.flags & 128 && (!computed.deps && !computed._dirty || !isDirty(computed))) return;\n\t\tcomputed.flags |= 2;\n\t\tconst dep = computed.dep;\n\t\tconst prevSub = activeSub;\n\t\tconst prevShouldTrack = shouldTrack;\n\t\tactiveSub = computed;\n\t\tshouldTrack = true;\n\t\ttry {\n\t\t\tprepareDeps(computed);\n\t\t\tconst value = computed.fn(computed._value);\n\t\t\tif (dep.version === 0 || hasChanged(value, computed._value)) {\n\t\t\t\tcomputed.flags |= 128;\n\t\t\t\tcomputed._value = value;\n\t\t\t\tdep.version++;\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tdep.version++;\n\t\t\tthrow err;\n\t\t} finally {\n\t\t\tactiveSub = prevSub;\n\t\t\tshouldTrack = prevShouldTrack;\n\t\t\tcleanupDeps(computed);\n\t\t\tcomputed.flags &= -3;\n\t\t}\n\t}\n\tfunction removeSub(link, soft = false) {\n\t\tconst { dep, prevSub, nextSub } = link;\n\t\tif (prevSub) {\n\t\t\tprevSub.nextSub = nextSub;\n\t\t\tlink.prevSub = void 0;\n\t\t}\n\t\tif (nextSub) {\n\t\t\tnextSub.prevSub = prevSub;\n\t\t\tlink.nextSub = void 0;\n\t\t}\n\t\tif (dep.subs === link) {\n\t\t\tdep.subs = prevSub;\n\t\t\tif (!prevSub && dep.computed) {\n\t\t\t\tdep.computed.flags &= -5;\n\t\t\t\tfor (let l = dep.computed.deps; l; l = l.nextDep) removeSub(l, true);\n\t\t\t}\n\t\t}\n\t\tif (!soft && !--dep.sc && dep.map) dep.map.delete(dep.key);\n\t}\n\tfunction removeDep(link) {\n\t\tconst { prevDep, nextDep } = link;\n\t\tif (prevDep) {\n\t\t\tprevDep.nextDep = nextDep;\n\t\t\tlink.prevDep = void 0;\n\t\t}\n\t\tif (nextDep) {\n\t\t\tnextDep.prevDep = prevDep;\n\t\t\tlink.nextDep = void 0;\n\t\t}\n\t}\n\tfunction pauseTracking() {\n\t\ttrackStack.push(shouldTrack);\n\t\tshouldTrack = false;\n\t}\n\tfunction resetTracking() {\n\t\tconst last = trackStack.pop();\n\t\tshouldTrack = last === void 0 ? true : last;\n\t}\n\tfunction cleanupEffect(e) {\n\t\tconst { cleanup } = e;\n\t\te.cleanup = void 0;\n\t\tif (cleanup) {\n\t\t\tconst prevSub = activeSub;\n\t\t\tactiveSub = void 0;\n\t\t\ttry {\n\t\t\t\tcleanup();\n\t\t\t} finally {\n\t\t\t\tactiveSub = prevSub;\n\t\t\t}\n\t\t}\n\t}\n\tfunction addSub(link) {\n\t\tlink.dep.sc++;\n\t\tif (link.sub.flags & 4) {\n\t\t\tconst computed = link.dep.computed;\n\t\t\tif (computed && !link.dep.subs) {\n\t\t\t\tcomputed.flags |= 20;\n\t\t\t\tfor (let l = computed.deps; l; l = l.nextDep) addSub(l);\n\t\t\t}\n\t\t\tconst currentTail = link.dep.subs;\n\t\t\tif (currentTail !== link) {\n\t\t\t\tlink.prevSub = currentTail;\n\t\t\t\tif (currentTail) currentTail.nextSub = link;\n\t\t\t}\n\t\t\tlink.dep.subs = link;\n\t\t}\n\t}\n\tfunction track(target, type, key) {\n\t\tif (shouldTrack && activeSub) {\n\t\t\tlet depsMap = targetMap.get(target);\n\t\t\tif (!depsMap) targetMap.set(target, depsMap = /* @__PURE__ */ new Map());\n\t\t\tlet dep = depsMap.get(key);\n\t\t\tif (!dep) {\n\t\t\t\tdepsMap.set(key, dep = new Dep());\n\t\t\t\tdep.map = depsMap;\n\t\t\t\tdep.key = key;\n\t\t\t}\n\t\t\tdep.track();\n\t\t}\n\t}\n\tfunction trigger(target, type, key, newValue, oldValue, oldTarget) {\n\t\tconst depsMap = targetMap.get(target);\n\t\tif (!depsMap) {\n\t\t\tglobalVersion++;\n\t\t\treturn;\n\t\t}\n\t\tconst run = (dep) => {\n\t\t\tif (dep) dep.trigger();\n\t\t};\n\t\tstartBatch();\n\t\tif (type === \"clear\") depsMap.forEach(run);\n\t\telse {\n\t\t\tconst targetIsArray = isArray(target);\n\t\t\tconst isArrayIndex = targetIsArray && isIntegerKey(key);\n\t\t\tif (targetIsArray && key === \"length\") {\n\t\t\t\tconst newLength = Number(newValue);\n\t\t\t\tdepsMap.forEach((dep, key2) => {\n\t\t\t\t\tif (key2 === \"length\" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) run(dep);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tif (key !== void 0 || depsMap.has(void 0)) run(depsMap.get(key));\n\t\t\t\tif (isArrayIndex) run(depsMap.get(ARRAY_ITERATE_KEY));\n\t\t\t\tswitch (type) {\n\t\t\t\t\tcase \"add\":\n\t\t\t\t\t\tif (!targetIsArray) {\n\t\t\t\t\t\t\trun(depsMap.get(ITERATE_KEY));\n\t\t\t\t\t\t\tif (isMap(target)) run(depsMap.get(MAP_KEY_ITERATE_KEY));\n\t\t\t\t\t\t} else if (isArrayIndex) run(depsMap.get(\"length\"));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"delete\":\n\t\t\t\t\t\tif (!targetIsArray) {\n\t\t\t\t\t\t\trun(depsMap.get(ITERATE_KEY));\n\t\t\t\t\t\t\tif (isMap(target)) run(depsMap.get(MAP_KEY_ITERATE_KEY));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"set\":\n\t\t\t\t\t\tif (isMap(target)) run(depsMap.get(ITERATE_KEY));\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tendBatch();\n\t}\n\tfunction reactiveReadArray(array) {\n\t\tconst raw = /* @__PURE__ */ toRaw(array);\n\t\tif (raw === array) return raw;\n\t\ttrack(raw, \"iterate\", ARRAY_ITERATE_KEY);\n\t\treturn /* @__PURE__ */ isShallow(array) ? raw : raw.map(toReactive);\n\t}\n\tfunction shallowReadArray(arr) {\n\t\ttrack(arr = /* @__PURE__ */ toRaw(arr), \"iterate\", ARRAY_ITERATE_KEY);\n\t\treturn arr;\n\t}\n\tfunction toWrapped(target, item) {\n\t\tif (/* @__PURE__ */ isReadonly(target)) return /* @__PURE__ */ isReactive(target) ? toReadonly(toReactive(item)) : toReadonly(item);\n\t\treturn toReactive(item);\n\t}\n\tfunction iterator(self, method, wrapValue) {\n\t\tconst arr = shallowReadArray(self);\n\t\tconst iter = arr[method]();\n\t\tif (arr !== self && !/* @__PURE__ */ isShallow(self)) {\n\t\t\titer._next = iter.next;\n\t\t\titer.next = () => {\n\t\t\t\tconst result = iter._next();\n\t\t\t\tif (!result.done) result.value = wrapValue(result.value);\n\t\t\t\treturn result;\n\t\t\t};\n\t\t}\n\t\treturn iter;\n\t}\n\tfunction apply(self, method, fn, thisArg, wrappedRetFn, args) {\n\t\tconst arr = shallowReadArray(self);\n\t\tconst needsWrap = arr !== self && !/* @__PURE__ */ isShallow(self);\n\t\tconst methodFn = arr[method];\n\t\tif (methodFn !== arrayProto[method]) {\n\t\t\tconst result2 = methodFn.apply(self, args);\n\t\t\treturn needsWrap ? toReactive(result2) : result2;\n\t\t}\n\t\tlet wrappedFn = fn;\n\t\tif (arr !== self) {\n\t\t\tif (needsWrap) wrappedFn = function(item, index) {\n\t\t\t\treturn fn.call(this, toWrapped(self, item), index, self);\n\t\t\t};\n\t\t\telse if (fn.length > 2) wrappedFn = function(item, index) {\n\t\t\t\treturn fn.call(this, item, index, self);\n\t\t\t};\n\t\t}\n\t\tconst result = methodFn.call(arr, wrappedFn, thisArg);\n\t\treturn needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;\n\t}\n\tfunction reduce(self, method, fn, args) {\n\t\tconst arr = shallowReadArray(self);\n\t\tconst needsWrap = arr !== self && !/* @__PURE__ */ isShallow(self);\n\t\tlet wrappedFn = fn;\n\t\tlet wrapInitialAccumulator = false;\n\t\tif (arr !== self) {\n\t\t\tif (needsWrap) {\n\t\t\t\twrapInitialAccumulator = args.length === 0;\n\t\t\t\twrappedFn = function(acc, item, index) {\n\t\t\t\t\tif (wrapInitialAccumulator) {\n\t\t\t\t\t\twrapInitialAccumulator = false;\n\t\t\t\t\t\tacc = toWrapped(self, acc);\n\t\t\t\t\t}\n\t\t\t\t\treturn fn.call(this, acc, toWrapped(self, item), index, self);\n\t\t\t\t};\n\t\t\t} else if (fn.length > 3) wrappedFn = function(acc, item, index) {\n\t\t\t\treturn fn.call(this, acc, item, index, self);\n\t\t\t};\n\t\t}\n\t\tconst result = arr[method](wrappedFn, ...args);\n\t\treturn wrapInitialAccumulator ? toWrapped(self, result) : result;\n\t}\n\tfunction searchProxy(self, method, args) {\n\t\tconst arr = /* @__PURE__ */ toRaw(self);\n\t\ttrack(arr, \"iterate\", ARRAY_ITERATE_KEY);\n\t\tconst res = arr[method](...args);\n\t\tif ((res === -1 || res === false) && /* @__PURE__ */ isProxy(args[0])) {\n\t\t\targs[0] = /* @__PURE__ */ toRaw(args[0]);\n\t\t\treturn arr[method](...args);\n\t\t}\n\t\treturn res;\n\t}\n\tfunction noTracking(self, method, args = []) {\n\t\tpauseTracking();\n\t\tstartBatch();\n\t\tconst res = (/* @__PURE__ */ toRaw(self))[method].apply(self, args);\n\t\tendBatch();\n\t\tresetTracking();\n\t\treturn res;\n\t}\n\tfunction hasOwnProperty(key) {\n\t\tif (!isSymbol(key)) key = String(key);\n\t\tconst obj = /* @__PURE__ */ toRaw(this);\n\t\ttrack(obj, \"has\", key);\n\t\treturn obj.hasOwnProperty(key);\n\t}\n\tfunction createIterableMethod(method, isReadonly2, isShallow2) {\n\t\treturn function(...args) {\n\t\t\tconst target = this[\"__v_raw\"];\n\t\t\tconst rawTarget = /* @__PURE__ */ toRaw(target);\n\t\t\tconst targetIsMap = isMap(rawTarget);\n\t\t\tconst isPair = method === \"entries\" || method === Symbol.iterator && targetIsMap;\n\t\t\tconst isKeyOnly = method === \"keys\" && targetIsMap;\n\t\t\tconst innerIterator = target[method](...args);\n\t\t\tconst wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;\n\t\t\t!isReadonly2 && track(rawTarget, \"iterate\", isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY);\n\t\t\treturn extend(Object.create(innerIterator), { next() {\n\t\t\t\tconst { value, done } = innerIterator.next();\n\t\t\t\treturn done ? {\n\t\t\t\t\tvalue,\n\t\t\t\t\tdone\n\t\t\t\t} : {\n\t\t\t\t\tvalue: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),\n\t\t\t\t\tdone\n\t\t\t\t};\n\t\t\t} });\n\t\t};\n\t}\n\tfunction createReadonlyMethod(type) {\n\t\treturn function(...args) {\n\t\t\treturn type === \"delete\" ? false : type === \"clear\" ? void 0 : this;\n\t\t};\n\t}\n\tfunction createInstrumentations(readonly, shallow) {\n\t\tconst instrumentations = {\n\t\t\tget(key) {\n\t\t\t\tconst target = this[\"__v_raw\"];\n\t\t\t\tconst rawTarget = /* @__PURE__ */ toRaw(target);\n\t\t\t\tconst rawKey = /* @__PURE__ */ toRaw(key);\n\t\t\t\tif (!readonly) {\n\t\t\t\t\tif (hasChanged(key, rawKey)) track(rawTarget, \"get\", key);\n\t\t\t\t\ttrack(rawTarget, \"get\", rawKey);\n\t\t\t\t}\n\t\t\t\tconst { has } = getProto(rawTarget);\n\t\t\t\tconst wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;\n\t\t\t\tif (has.call(rawTarget, key)) return wrap(target.get(key));\n\t\t\t\telse if (has.call(rawTarget, rawKey)) return wrap(target.get(rawKey));\n\t\t\t\telse if (target !== rawTarget) target.get(key);\n\t\t\t},\n\t\t\tget size() {\n\t\t\t\tconst target = this[\"__v_raw\"];\n\t\t\t\t!readonly && track(/* @__PURE__ */ toRaw(target), \"iterate\", ITERATE_KEY);\n\t\t\t\treturn target.size;\n\t\t\t},\n\t\t\thas(key) {\n\t\t\t\tconst target = this[\"__v_raw\"];\n\t\t\t\tconst rawTarget = /* @__PURE__ */ toRaw(target);\n\t\t\t\tconst rawKey = /* @__PURE__ */ toRaw(key);\n\t\t\t\tif (!readonly) {\n\t\t\t\t\tif (hasChanged(key, rawKey)) track(rawTarget, \"has\", key);\n\t\t\t\t\ttrack(rawTarget, \"has\", rawKey);\n\t\t\t\t}\n\t\t\t\treturn key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);\n\t\t\t},\n\t\t\tforEach(callback, thisArg) {\n\t\t\t\tconst observed = this;\n\t\t\t\tconst target = observed[\"__v_raw\"];\n\t\t\t\tconst rawTarget = /* @__PURE__ */ toRaw(target);\n\t\t\t\tconst wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;\n\t\t\t\t!readonly && track(rawTarget, \"iterate\", ITERATE_KEY);\n\t\t\t\treturn target.forEach((value, key) => {\n\t\t\t\t\treturn callback.call(thisArg, wrap(value), wrap(key), observed);\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t\textend(instrumentations, readonly ? {\n\t\t\tadd: createReadonlyMethod(\"add\"),\n\t\t\tset: createReadonlyMethod(\"set\"),\n\t\t\tdelete: createReadonlyMethod(\"delete\"),\n\t\t\tclear: createReadonlyMethod(\"clear\")\n\t\t} : {\n\t\t\tadd(value) {\n\t\t\t\tconst target = /* @__PURE__ */ toRaw(this);\n\t\t\t\tconst proto = getProto(target);\n\t\t\t\tconst rawValue = /* @__PURE__ */ toRaw(value);\n\t\t\t\tconst valueToAdd = !shallow && !/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value) ? rawValue : value;\n\t\t\t\tif (!(proto.has.call(target, valueToAdd) || hasChanged(value, valueToAdd) && proto.has.call(target, value) || hasChanged(rawValue, valueToAdd) && proto.has.call(target, rawValue))) {\n\t\t\t\t\ttarget.add(valueToAdd);\n\t\t\t\t\ttrigger(target, \"add\", valueToAdd, valueToAdd);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tset(key, value) {\n\t\t\t\tif (!shallow && !/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value)) value = /* @__PURE__ */ toRaw(value);\n\t\t\t\tconst target = /* @__PURE__ */ toRaw(this);\n\t\t\t\tconst { has, get } = getProto(target);\n\t\t\t\tlet hadKey = has.call(target, key);\n\t\t\t\tif (!hadKey) {\n\t\t\t\t\tkey = /* @__PURE__ */ toRaw(key);\n\t\t\t\t\thadKey = has.call(target, key);\n\t\t\t\t}\n\t\t\t\tconst oldValue = get.call(target, key);\n\t\t\t\ttarget.set(key, value);\n\t\t\t\tif (!hadKey) trigger(target, \"add\", key, value);\n\t\t\t\telse if (hasChanged(value, oldValue)) trigger(target, \"set\", key, value, oldValue);\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdelete(key) {\n\t\t\t\tconst target = /* @__PURE__ */ toRaw(this);\n\t\t\t\tconst { has, get } = getProto(target);\n\t\t\t\tlet hadKey = has.call(target, key);\n\t\t\t\tif (!hadKey) {\n\t\t\t\t\tkey = /* @__PURE__ */ toRaw(key);\n\t\t\t\t\thadKey = has.call(target, key);\n\t\t\t\t}\n\t\t\t\tconst oldValue = get ? get.call(target, key) : void 0;\n\t\t\t\tconst result = target.delete(key);\n\t\t\t\tif (hadKey) trigger(target, \"delete\", key, void 0, oldValue);\n\t\t\t\treturn result;\n\t\t\t},\n\t\t\tclear() {\n\t\t\t\tconst target = /* @__PURE__ */ toRaw(this);\n\t\t\t\tconst hadItems = target.size !== 0;\n\t\t\t\tconst oldTarget = void 0;\n\t\t\t\tconst result = target.clear();\n\t\t\t\tif (hadItems) trigger(target, \"clear\", void 0, void 0, oldTarget);\n\t\t\t\treturn result;\n\t\t\t}\n\t\t});\n\t\t[\n\t\t\t\"keys\",\n\t\t\t\"values\",\n\t\t\t\"entries\",\n\t\t\tSymbol.iterator\n\t\t].forEach((method) => {\n\t\t\tinstrumentations[method] = createIterableMethod(method, readonly, shallow);\n\t\t});\n\t\treturn instrumentations;\n\t}\n\tfunction createInstrumentationGetter(isReadonly2, shallow) {\n\t\tconst instrumentations = createInstrumentations(isReadonly2, shallow);\n\t\treturn (target, key, receiver) => {\n\t\t\tif (key === \"__v_isReactive\") return !isReadonly2;\n\t\t\telse if (key === \"__v_isReadonly\") return isReadonly2;\n\t\t\telse if (key === \"__v_raw\") return target;\n\t\t\treturn Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver);\n\t\t};\n\t}\n\tfunction targetTypeMap(rawType) {\n\t\tswitch (rawType) {\n\t\t\tcase \"Object\":\n\t\t\tcase \"Array\": return 1;\n\t\t\tcase \"Map\":\n\t\t\tcase \"Set\":\n\t\t\tcase \"WeakMap\":\n\t\t\tcase \"WeakSet\": return 2;\n\t\t\tdefault: return 0;\n\t\t}\n\t}\n\t// @__NO_SIDE_EFFECTS__\n\tfunction reactive(target) {\n\t\tif (/* @__PURE__ */ isReadonly(target)) return target;\n\t\treturn createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);\n\t}\n\t// @__NO_SIDE_EFFECTS__\n\tfunction shallowReactive(target) {\n\t\treturn createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap);\n\t}\n\t// @__NO_SIDE_EFFECTS__\n\tfunction readonly(target) {\n\t\treturn createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);\n\t}\n\tfunction createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {\n\t\tif (!isObject(target)) return target;\n\t\tif (target[\"__v_raw\"] && !(isReadonly2 && target[\"__v_isReactive\"])) return target;\n\t\tif (target[\"__v_skip\"] || !Object.isExtensible(target)) return target;\n\t\tconst existingProxy = proxyMap.get(target);\n\t\tif (existingProxy) return existingProxy;\n\t\tconst targetType = targetTypeMap(toRawType(target));\n\t\tif (targetType === 0) return target;\n\t\tconst proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers);\n\t\tproxyMap.set(target, proxy);\n\t\treturn proxy;\n\t}\n\t// @__NO_SIDE_EFFECTS__\n\tfunction isReactive(value) {\n\t\tif (/* @__PURE__ */ isReadonly(value)) return /* @__PURE__ */ isReactive(value[\"__v_raw\"]);\n\t\treturn !!(value && value[\"__v_isReactive\"]);\n\t}\n\t// @__NO_SIDE_EFFECTS__\n\tfunction isReadonly(value) {\n\t\treturn !!(value && value[\"__v_isReadonly\"]);\n\t}\n\t// @__NO_SIDE_EFFECTS__\n\tfunction isShallow(value) {\n\t\treturn !!(value && value[\"__v_isShallow\"]);\n\t}\n\t// @__NO_SIDE_EFFECTS__\n\tfunction isProxy(value) {\n\t\treturn value ? !!value[\"__v_raw\"] : false;\n\t}\n\t// @__NO_SIDE_EFFECTS__\n\tfunction toRaw(observed) {\n\t\tconst raw = observed && observed[\"__v_raw\"];\n\t\treturn raw ? /* @__PURE__ */ toRaw(raw) : observed;\n\t}\n\tfunction markRaw(value) {\n\t\tif (!hasOwn(value, \"__v_skip\") && Object.isExtensible(value)) def(value, \"__v_skip\", true);\n\t\treturn value;\n\t}\n\t// @__NO_SIDE_EFFECTS__\n\tfunction isRef(r) {\n\t\treturn r ? r[\"__v_isRef\"] === true : false;\n\t}\n\t// @__NO_SIDE_EFFECTS__\n\tfunction ref(value) {\n\t\treturn createRef(value, false);\n\t}\n\tfunction createRef(rawValue, shallow) {\n\t\tif (/* @__PURE__ */ isRef(rawValue)) return rawValue;\n\t\treturn new RefImpl(rawValue, shallow);\n\t}\n\tfunction unref(ref2) {\n\t\treturn /* @__PURE__ */ isRef(ref2) ? ref2.value : ref2;\n\t}\n\tfunction proxyRefs(objectWithRefs) {\n\t\treturn /* @__PURE__ */ isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);\n\t}\n\t// @__NO_SIDE_EFFECTS__\n\tfunction computed$1(getterOrOptions, debugOptions, isSSR = false) {\n\t\tlet getter;\n\t\tlet setter;\n\t\tif (isFunction(getterOrOptions)) getter = getterOrOptions;\n\t\telse {\n\t\t\tgetter = getterOrOptions.get;\n\t\t\tsetter = getterOrOptions.set;\n\t\t}\n\t\treturn new ComputedRefImpl(getter, setter, isSSR);\n\t}\n\tfunction onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) {\n\t\tif (owner) {\n\t\t\tlet cleanups = cleanupMap.get(owner);\n\t\t\tif (!cleanups) cleanupMap.set(owner, cleanups = []);\n\t\t\tcleanups.push(cleanupFn);\n\t\t}\n\t}\n\tfunction watch$1(source, cb, options = EMPTY_OBJ) {\n\t\tconst { immediate, deep, once, scheduler, augmentJob, call } = options;\n\t\tconst reactiveGetter = (source2) => {\n\t\t\tif (deep) return source2;\n\t\t\tif (/* @__PURE__ */ isShallow(source2) || deep === false || deep === 0) return traverse(source2, 1);\n\t\t\treturn traverse(source2);\n\t\t};\n\t\tlet effect;\n\t\tlet getter;\n\t\tlet cleanup;\n\t\tlet boundCleanup;\n\t\tlet forceTrigger = false;\n\t\tlet isMultiSource = false;\n\t\tif (/* @__PURE__ */ isRef(source)) {\n\t\t\tgetter = () => source.value;\n\t\t\tforceTrigger = /* @__PURE__ */ isShallow(source);\n\t\t} else if (/* @__PURE__ */ isReactive(source)) {\n\t\t\tgetter = () => reactiveGetter(source);\n\t\t\tforceTrigger = true;\n\t\t} else if (isArray(source)) {\n\t\t\tisMultiSource = true;\n\t\t\tforceTrigger = source.some((s) => /* @__PURE__ */ isReactive(s) || /* @__PURE__ */ isShallow(s));\n\t\t\tgetter = () => source.map((s) => {\n\t\t\t\tif (/* @__PURE__ */ isRef(s)) return s.value;\n\t\t\t\telse if (/* @__PURE__ */ isReactive(s)) return reactiveGetter(s);\n\t\t\t\telse if (isFunction(s)) return call ? call(s, 2) : s();\n\t\t\t});\n\t\t} else if (isFunction(source)) if (cb) getter = call ? () => call(source, 2) : source;\n\t\telse getter = () => {\n\t\t\tif (cleanup) {\n\t\t\t\tpauseTracking();\n\t\t\t\ttry {\n\t\t\t\t\tcleanup();\n\t\t\t\t} finally {\n\t\t\t\t\tresetTracking();\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst currentEffect = activeWatcher;\n\t\t\tactiveWatcher = effect;\n\t\t\ttry {\n\t\t\t\treturn call ? call(source, 3, [boundCleanup]) : source(boundCleanup);\n\t\t\t} finally {\n\t\t\t\tactiveWatcher = currentEffect;\n\t\t\t}\n\t\t};\n\t\telse getter = NOOP;\n\t\tif (cb && deep) {\n\t\t\tconst baseGetter = getter;\n\t\t\tconst depth = deep === true ? Infinity : deep;\n\t\t\tgetter = () => traverse(baseGetter(), depth);\n\t\t}\n\t\tconst scope = getCurrentScope();\n\t\tconst watchHandle = () => {\n\t\t\teffect.stop();\n\t\t\tif (scope && scope.active) remove(scope.effects, effect);\n\t\t};\n\t\tif (once && cb) {\n\t\t\tconst _cb = cb;\n\t\t\tcb = (...args) => {\n\t\t\t\tconst res = _cb(...args);\n\t\t\t\twatchHandle();\n\t\t\t\treturn res;\n\t\t\t};\n\t\t}\n\t\tlet oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;\n\t\tconst job = (immediateFirstRun) => {\n\t\t\tif (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) return;\n\t\t\tif (cb) {\n\t\t\t\tconst newValue = effect.run();\n\t\t\t\tif (immediateFirstRun || deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {\n\t\t\t\t\tif (cleanup) cleanup();\n\t\t\t\t\tconst currentWatcher = activeWatcher;\n\t\t\t\t\tactiveWatcher = effect;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst args = [\n\t\t\t\t\t\t\tnewValue,\n\t\t\t\t\t\t\toldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,\n\t\t\t\t\t\t\tboundCleanup\n\t\t\t\t\t\t];\n\t\t\t\t\t\toldValue = newValue;\n\t\t\t\t\t\tcall ? call(cb, 3, args) : cb(...args);\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tactiveWatcher = currentWatcher;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else effect.run();\n\t\t};\n\t\tif (augmentJob) augmentJob(job);\n\t\teffect = new ReactiveEffect(getter);\n\t\teffect.scheduler = scheduler ? () => scheduler(job, false) : job;\n\t\tboundCleanup = (fn) => onWatcherCleanup(fn, false, effect);\n\t\tcleanup = effect.onStop = () => {\n\t\t\tconst cleanups = cleanupMap.get(effect);\n\t\t\tif (cleanups) {\n\t\t\t\tif (call) call(cleanups, 4);\n\t\t\t\telse for (const cleanup2 of cleanups) cleanup2();\n\t\t\t\tcleanupMap.delete(effect);\n\t\t\t}\n\t\t};\n\t\tif (cb) if (immediate) job(true);\n\t\telse oldValue = effect.run();\n\t\telse if (scheduler) scheduler(job.bind(null, true), true);\n\t\telse effect.run();\n\t\twatchHandle.pause = effect.pause.bind(effect);\n\t\twatchHandle.resume = effect.resume.bind(effect);\n\t\twatchHandle.stop = watchHandle;\n\t\treturn watchHandle;\n\t}\n\tfunction traverse(value, depth = Infinity, seen) {\n\t\tif (depth <= 0 || !isObject(value) || value[\"__v_skip\"]) return value;\n\t\tseen = seen || /* @__PURE__ */ new Map();\n\t\tif ((seen.get(value) || 0) >= depth) return value;\n\t\tseen.set(value, depth);\n\t\tdepth--;\n\t\tif (/* @__PURE__ */ isRef(value)) traverse(value.value, depth, seen);\n\t\telse if (isArray(value)) for (let i = 0; i < value.length; i++) traverse(value[i], depth, seen);\n\t\telse if (isSet(value) || isMap(value)) value.forEach((v) => {\n\t\t\ttraverse(v, depth, seen);\n\t\t});\n\t\telse if (isPlainObject(value)) {\n\t\t\tfor (const key in value) traverse(value[key], depth, seen);\n\t\t\tfor (const key of Object.getOwnPropertySymbols(value)) if (Object.prototype.propertyIsEnumerable.call(value, key)) traverse(value[key], depth, seen);\n\t\t}\n\t\treturn value;\n\t}\n\tvar activeEffectScope, EffectScope, activeSub, pausedQueueEffects, ReactiveEffect, batchDepth, batchedSub, batchedComputed, shouldTrack, trackStack, globalVersion, Link, Dep, targetMap, ITERATE_KEY, MAP_KEY_ITERATE_KEY, ARRAY_ITERATE_KEY, arrayInstrumentations, arrayProto, isNonTrackableKeys, builtInSymbols, BaseReactiveHandler, MutableReactiveHandler, ReadonlyReactiveHandler, mutableHandlers, readonlyHandlers, shallowReactiveHandlers, toShallow, getProto, mutableCollectionHandlers, shallowCollectionHandlers, readonlyCollectionHandlers, reactiveMap, shallowReactiveMap, readonlyMap, shallowReadonlyMap, toReactive, toReadonly, RefImpl, shallowUnwrapHandlers, ComputedRefImpl, INITIAL_WATCHER_VALUE, cleanupMap, activeWatcher;\n\tvar init_reactivity_esm_bundler = __esmMin((() => {\n\t\tinit_shared_esm_bundler();\n\t\tEffectScope = class {\n\t\t\tconstructor(detached = false) {\n\t\t\t\tthis.detached = detached;\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis._active = true;\n\t\t\t\t/**\n\t\t\t\t* @internal track `on` calls, allow `on` call multiple times\n\t\t\t\t*/\n\t\t\t\tthis._on = 0;\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis.effects = [];\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis.cleanups = [];\n\t\t\t\tthis._isPaused = false;\n\t\t\t\tthis._warnOnRun = true;\n\t\t\t\tthis.__v_skip = true;\n\t\t\t\tif (!detached && activeEffectScope) if (activeEffectScope.active) {\n\t\t\t\t\tthis.parent = activeEffectScope;\n\t\t\t\t\tthis.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;\n\t\t\t\t} else {\n\t\t\t\t\tthis._active = false;\n\t\t\t\t\tthis._warnOnRun = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tget active() {\n\t\t\t\treturn this._active;\n\t\t\t}\n\t\t\tpause() {\n\t\t\t\tif (this._active) {\n\t\t\t\t\tthis._isPaused = true;\n\t\t\t\t\tlet i, l;\n\t\t\t\t\tif (this.scopes) {\n\t\t\t\t\t\tconst scopes = this.scopes.slice();\n\t\t\t\t\t\tfor (i = 0, l = scopes.length; i < l; i++) scopes[i].pause();\n\t\t\t\t\t}\n\t\t\t\t\tfor (i = 0, l = this.effects.length; i < l; i++) this.effects[i].pause();\n\t\t\t\t}\n\t\t\t}\n\t\t\t/**\n\t\t\t* Resumes the effect scope, including all child scopes and effects.\n\t\t\t*/\n\t\t\tresume() {\n\t\t\t\tif (this._active) {\n\t\t\t\t\tif (this._isPaused) {\n\t\t\t\t\t\tthis._isPaused = false;\n\t\t\t\t\t\tlet i, l;\n\t\t\t\t\t\tif (this.scopes) {\n\t\t\t\t\t\t\tconst scopes = this.scopes.slice();\n\t\t\t\t\t\t\tfor (i = 0, l = scopes.length; i < l; i++) scopes[i].resume();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst effects = this.effects.slice();\n\t\t\t\t\t\tfor (i = 0, l = effects.length; i < l; i++) effects[i].resume();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\trun(fn) {\n\t\t\t\tif (this._active) {\n\t\t\t\t\tconst currentEffectScope = activeEffectScope;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tactiveEffectScope = this;\n\t\t\t\t\t\treturn fn();\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tactiveEffectScope = currentEffectScope;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t/**\n\t\t\t* This should only be called on non-detached scopes\n\t\t\t* @internal\n\t\t\t*/\n\t\t\ton() {\n\t\t\t\tif (++this._on === 1) {\n\t\t\t\t\tthis.prevScope = activeEffectScope;\n\t\t\t\t\tactiveEffectScope = this;\n\t\t\t\t}\n\t\t\t}\n\t\t\t/**\n\t\t\t* This should only be called on non-detached scopes\n\t\t\t* @internal\n\t\t\t*/\n\t\t\toff() {\n\t\t\t\tif (this._on > 0 && --this._on === 0) {\n\t\t\t\t\tif (activeEffectScope === this) activeEffectScope = this.prevScope;\n\t\t\t\t\telse {\n\t\t\t\t\t\tlet current = activeEffectScope;\n\t\t\t\t\t\twhile (current) {\n\t\t\t\t\t\t\tif (current.prevScope === this) {\n\t\t\t\t\t\t\t\tcurrent.prevScope = this.prevScope;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcurrent = current.prevScope;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.prevScope = void 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tstop(fromParent) {\n\t\t\t\tif (this._active) {\n\t\t\t\t\tthis._active = false;\n\t\t\t\t\tlet i, l;\n\t\t\t\t\tfor (i = 0, l = this.effects.length; i < l; i++) this.effects[i].stop();\n\t\t\t\t\tthis.effects.length = 0;\n\t\t\t\t\tfor (i = 0, l = this.cleanups.length; i < l; i++) this.cleanups[i]();\n\t\t\t\t\tthis.cleanups.length = 0;\n\t\t\t\t\tif (this.scopes) {\n\t\t\t\t\t\tconst scopes = this.scopes.slice();\n\t\t\t\t\t\tfor (i = 0, l = scopes.length; i < l; i++) scopes[i].stop(true);\n\t\t\t\t\t\tthis.scopes.length = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif (!this.detached && this.parent && !fromParent) {\n\t\t\t\t\t\tconst last = this.parent.scopes.pop();\n\t\t\t\t\t\tif (last && last !== this) {\n\t\t\t\t\t\t\tthis.parent.scopes[this.index] = last;\n\t\t\t\t\t\t\tlast.index = this.index;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.parent = void 0;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tpausedQueueEffects = /* @__PURE__ */ new WeakSet();\n\t\tReactiveEffect = class {\n\t\t\tconstructor(fn) {\n\t\t\t\tthis.fn = fn;\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis.deps = void 0;\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis.depsTail = void 0;\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis.flags = 5;\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis.next = void 0;\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis.cleanup = void 0;\n\t\t\t\tthis.scheduler = void 0;\n\t\t\t\tif (activeEffectScope) if (activeEffectScope.active) activeEffectScope.effects.push(this);\n\t\t\t\telse this.flags &= -2;\n\t\t\t}\n\t\t\tpause() {\n\t\t\t\tthis.flags |= 64;\n\t\t\t}\n\t\t\tresume() {\n\t\t\t\tif (this.flags & 64) {\n\t\t\t\t\tthis.flags &= -65;\n\t\t\t\t\tif (pausedQueueEffects.has(this)) {\n\t\t\t\t\t\tpausedQueueEffects.delete(this);\n\t\t\t\t\t\tthis.trigger();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t/**\n\t\t\t* @internal\n\t\t\t*/\n\t\t\tnotify() {\n\t\t\t\tif (this.flags & 2 && !(this.flags & 32)) return;\n\t\t\t\tif (!(this.flags & 8)) batch(this);\n\t\t\t}\n\t\t\trun() {\n\t\t\t\tif (!(this.flags & 1)) return this.fn();\n\t\t\t\tthis.flags |= 2;\n\t\t\t\tcleanupEffect(this);\n\t\t\t\tprepareDeps(this);\n\t\t\t\tconst prevEffect = activeSub;\n\t\t\t\tconst prevShouldTrack = shouldTrack;\n\t\t\t\tactiveSub = this;\n\t\t\t\tshouldTrack = true;\n\t\t\t\ttry {\n\t\t\t\t\treturn this.fn();\n\t\t\t\t} finally {\n\t\t\t\t\tcleanupDeps(this);\n\t\t\t\t\tactiveSub = prevEffect;\n\t\t\t\t\tshouldTrack = prevShouldTrack;\n\t\t\t\t\tthis.flags &= -3;\n\t\t\t\t}\n\t\t\t}\n\t\t\tstop() {\n\t\t\t\tif (this.flags & 1) {\n\t\t\t\t\tfor (let link = this.deps; link; link = link.nextDep) removeSub(link);\n\t\t\t\t\tthis.deps = this.depsTail = void 0;\n\t\t\t\t\tcleanupEffect(this);\n\t\t\t\t\tthis.onStop && this.onStop();\n\t\t\t\t\tthis.flags &= -2;\n\t\t\t\t}\n\t\t\t}\n\t\t\ttrigger() {\n\t\t\t\tif (this.flags & 64) pausedQueueEffects.add(this);\n\t\t\t\telse if (this.scheduler) this.scheduler();\n\t\t\t\telse this.runIfDirty();\n\t\t\t}\n\t\t\t/**\n\t\t\t* @internal\n\t\t\t*/\n\t\t\trunIfDirty() {\n\t\t\t\tif (isDirty(this)) this.run();\n\t\t\t}\n\t\t\tget dirty() {\n\t\t\t\treturn isDirty(this);\n\t\t\t}\n\t\t};\n\t\tbatchDepth = 0;\n\t\tshouldTrack = true;\n\t\ttrackStack = [];\n\t\tglobalVersion = 0;\n\t\tLink = class {\n\t\t\tconstructor(sub, dep) {\n\t\t\t\tthis.sub = sub;\n\t\t\t\tthis.dep = dep;\n\t\t\t\tthis.version = dep.version;\n\t\t\t\tthis.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0;\n\t\t\t}\n\t\t};\n\t\tDep = class {\n\t\t\tconstructor(computed) {\n\t\t\t\tthis.computed = computed;\n\t\t\t\tthis.version = 0;\n\t\t\t\t/**\n\t\t\t\t* Link between this dep and the current active effect\n\t\t\t\t*/\n\t\t\t\tthis.activeLink = void 0;\n\t\t\t\t/**\n\t\t\t\t* Doubly linked list representing the subscribing effects (tail)\n\t\t\t\t*/\n\t\t\t\tthis.subs = void 0;\n\t\t\t\t/**\n\t\t\t\t* For object property deps cleanup\n\t\t\t\t*/\n\t\t\t\tthis.map = void 0;\n\t\t\t\tthis.key = void 0;\n\t\t\t\t/**\n\t\t\t\t* Subscriber counter\n\t\t\t\t*/\n\t\t\t\tthis.sc = 0;\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis.__v_skip = true;\n\t\t\t}\n\t\t\ttrack(debugInfo) {\n\t\t\t\tif (!activeSub || !shouldTrack || activeSub === this.computed) return;\n\t\t\t\tlet link = this.activeLink;\n\t\t\t\tif (link === void 0 || link.sub !== activeSub) {\n\t\t\t\t\tlink = this.activeLink = new Link(activeSub, this);\n\t\t\t\t\tif (!activeSub.deps) activeSub.deps = activeSub.depsTail = link;\n\t\t\t\t\telse {\n\t\t\t\t\t\tlink.prevDep = activeSub.depsTail;\n\t\t\t\t\t\tactiveSub.depsTail.nextDep = link;\n\t\t\t\t\t\tactiveSub.depsTail = link;\n\t\t\t\t\t}\n\t\t\t\t\taddSub(link);\n\t\t\t\t} else if (link.version === -1) {\n\t\t\t\t\tlink.version = this.version;\n\t\t\t\t\tif (link.nextDep) {\n\t\t\t\t\t\tconst next = link.nextDep;\n\t\t\t\t\t\tnext.prevDep = link.prevDep;\n\t\t\t\t\t\tif (link.prevDep) link.prevDep.nextDep = next;\n\t\t\t\t\t\tlink.prevDep = activeSub.depsTail;\n\t\t\t\t\t\tlink.nextDep = void 0;\n\t\t\t\t\t\tactiveSub.depsTail.nextDep = link;\n\t\t\t\t\t\tactiveSub.depsTail = link;\n\t\t\t\t\t\tif (activeSub.deps === link) activeSub.deps = next;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn link;\n\t\t\t}\n\t\t\ttrigger(debugInfo) {\n\t\t\t\tthis.version++;\n\t\t\t\tglobalVersion++;\n\t\t\t\tthis.notify(debugInfo);\n\t\t\t}\n\t\t\tnotify(debugInfo) {\n\t\t\t\tstartBatch();\n\t\t\t\ttry {\n\t\t\t\t\tfor (let link = this.subs; link; link = link.prevSub) if (link.sub.notify()) link.sub.dep.notify();\n\t\t\t\t} finally {\n\t\t\t\t\tendBatch();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\ttargetMap = /* @__PURE__ */ new WeakMap();\n\t\tITERATE_KEY = /* @__PURE__ */ Symbol(\"\");\n\t\tMAP_KEY_ITERATE_KEY = /* @__PURE__ */ Symbol(\"\");\n\t\tARRAY_ITERATE_KEY = /* @__PURE__ */ Symbol(\"\");\n\t\tarrayInstrumentations = {\n\t\t\t__proto__: null,\n\t\t\t[Symbol.iterator]() {\n\t\t\t\treturn iterator(this, Symbol.iterator, (item) => toWrapped(this, item));\n\t\t\t},\n\t\t\tconcat(...args) {\n\t\t\t\treturn reactiveReadArray(this).concat(...args.map((x) => isArray(x) ? reactiveReadArray(x) : x));\n\t\t\t},\n\t\t\tentries() {\n\t\t\t\treturn iterator(this, \"entries\", (value) => {\n\t\t\t\t\tvalue[1] = toWrapped(this, value[1]);\n\t\t\t\t\treturn value;\n\t\t\t\t});\n\t\t\t},\n\t\t\tevery(fn, thisArg) {\n\t\t\t\treturn apply(this, \"every\", fn, thisArg, void 0, arguments);\n\t\t\t},\n\t\t\tfilter(fn, thisArg) {\n\t\t\t\treturn apply(this, \"filter\", fn, thisArg, (v) => v.map((item) => toWrapped(this, item)), arguments);\n\t\t\t},\n\t\t\tfind(fn, thisArg) {\n\t\t\t\treturn apply(this, \"find\", fn, thisArg, (item) => toWrapped(this, item), arguments);\n\t\t\t},\n\t\t\tfindIndex(fn, thisArg) {\n\t\t\t\treturn apply(this, \"findIndex\", fn, thisArg, void 0, arguments);\n\t\t\t},\n\t\t\tfindLast(fn, thisArg) {\n\t\t\t\treturn apply(this, \"findLast\", fn, thisArg, (item) => toWrapped(this, item), arguments);\n\t\t\t},\n\t\t\tfindLastIndex(fn, thisArg) {\n\t\t\t\treturn apply(this, \"findLastIndex\", fn, thisArg, void 0, arguments);\n\t\t\t},\n\t\t\tforEach(fn, thisArg) {\n\t\t\t\treturn apply(this, \"forEach\", fn, thisArg, void 0, arguments);\n\t\t\t},\n\t\t\tincludes(...args) {\n\t\t\t\treturn searchProxy(this, \"includes\", args);\n\t\t\t},\n\t\t\tindexOf(...args) {\n\t\t\t\treturn searchProxy(this, \"indexOf\", args);\n\t\t\t},\n\t\t\tjoin(separator) {\n\t\t\t\treturn reactiveReadArray(this).join(separator);\n\t\t\t},\n\t\t\tlastIndexOf(...args) {\n\t\t\t\treturn searchProxy(this, \"lastIndexOf\", args);\n\t\t\t},\n\t\t\tmap(fn, thisArg) {\n\t\t\t\treturn apply(this, \"map\", fn, thisArg, void 0, arguments);\n\t\t\t},\n\t\t\tpop() {\n\t\t\t\treturn noTracking(this, \"pop\");\n\t\t\t},\n\t\t\tpush(...args) {\n\t\t\t\treturn noTracking(this, \"push\", args);\n\t\t\t},\n\t\t\treduce(fn, ...args) {\n\t\t\t\treturn reduce(this, \"reduce\", fn, args);\n\t\t\t},\n\t\t\treduceRight(fn, ...args) {\n\t\t\t\treturn reduce(this, \"reduceRight\", fn, args);\n\t\t\t},\n\t\t\tshift() {\n\t\t\t\treturn noTracking(this, \"shift\");\n\t\t\t},\n\t\t\tsome(fn, thisArg) {\n\t\t\t\treturn apply(this, \"some\", fn, thisArg, void 0, arguments);\n\t\t\t},\n\t\t\tsplice(...args) {\n\t\t\t\treturn noTracking(this, \"splice\", args);\n\t\t\t},\n\t\t\ttoReversed() {\n\t\t\t\treturn reactiveReadArray(this).toReversed();\n\t\t\t},\n\t\t\ttoSorted(comparer) {\n\t\t\t\treturn reactiveReadArray(this).toSorted(comparer);\n\t\t\t},\n\t\t\ttoSpliced(...args) {\n\t\t\t\treturn reactiveReadArray(this).toSpliced(...args);\n\t\t\t},\n\t\t\tunshift(...args) {\n\t\t\t\treturn noTracking(this, \"unshift\", args);\n\t\t\t},\n\t\t\tvalues() {\n\t\t\t\treturn iterator(this, \"values\", (item) => toWrapped(this, item));\n\t\t\t}\n\t\t};\n\t\tarrayProto = Array.prototype;\n\t\tisNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);\n\t\tbuiltInSymbols = new Set(/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== \"arguments\" && key !== \"caller\").map((key) => Symbol[key]).filter(isSymbol));\n\t\tBaseReactiveHandler = class {\n\t\t\tconstructor(_isReadonly = false, _isShallow = false) {\n\t\t\t\tthis._isReadonly = _isReadonly;\n\t\t\t\tthis._isShallow = _isShallow;\n\t\t\t}\n\t\t\tget(target, key, receiver) {\n\t\t\t\tif (key === \"__v_skip\") return target[\"__v_skip\"];\n\t\t\t\tconst isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;\n\t\t\t\tif (key === \"__v_isReactive\") return !isReadonly2;\n\t\t\t\telse if (key === \"__v_isReadonly\") return isReadonly2;\n\t\t\t\telse if (key === \"__v_isShallow\") return isShallow2;\n\t\t\t\telse if (key === \"__v_raw\") {\n\t\t\t\t\tif (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) return target;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst targetIsArray = isArray(target);\n\t\t\t\tif (!isReadonly2) {\n\t\t\t\t\tlet fn;\n\t\t\t\t\tif (targetIsArray && (fn = arrayInstrumentations[key])) return fn;\n\t\t\t\t\tif (key === \"hasOwnProperty\") return hasOwnProperty;\n\t\t\t\t}\n\t\t\t\tconst res = Reflect.get(target, key, /* @__PURE__ */ isRef(target) ? target : receiver);\n\t\t\t\tif (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) return res;\n\t\t\t\tif (!isReadonly2) track(target, \"get\", key);\n\t\t\t\tif (isShallow2) return res;\n\t\t\t\tif (/* @__PURE__ */ isRef(res)) {\n\t\t\t\t\tconst value = targetIsArray && isIntegerKey(key) ? res : res.value;\n\t\t\t\t\treturn isReadonly2 && isObject(value) ? /* @__PURE__ */ readonly(value) : value;\n\t\t\t\t}\n\t\t\t\tif (isObject(res)) return isReadonly2 ? /* @__PURE__ */ readonly(res) : /* @__PURE__ */ reactive(res);\n\t\t\t\treturn res;\n\t\t\t}\n\t\t};\n\t\tMutableReactiveHandler = class extends BaseReactiveHandler {\n\t\t\tconstructor(isShallow2 = false) {\n\t\t\t\tsuper(false, isShallow2);\n\t\t\t}\n\t\t\tset(target, key, value, receiver) {\n\t\t\t\tlet oldValue = target[key];\n\t\t\t\tconst isArrayWithIntegerKey = isArray(target) && isIntegerKey(key);\n\t\t\t\tif (!this._isShallow) {\n\t\t\t\t\tconst isOldValueReadonly = /* @__PURE__ */ isReadonly(oldValue);\n\t\t\t\t\tif (!/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value)) {\n\t\t\t\t\t\toldValue = /* @__PURE__ */ toRaw(oldValue);\n\t\t\t\t\t\tvalue = /* @__PURE__ */ toRaw(value);\n\t\t\t\t\t}\n\t\t\t\t\tif (!isArrayWithIntegerKey && /* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) if (isOldValueReadonly) return true;\n\t\t\t\t\telse {\n\t\t\t\t\t\toldValue.value = value;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst hadKey = isArrayWithIntegerKey ? Number(key) < target.length : hasOwn(target, key);\n\t\t\t\tconst result = Reflect.set(target, key, value, /* @__PURE__ */ isRef(target) ? target : receiver);\n\t\t\t\tif (target === /* @__PURE__ */ toRaw(receiver) && result) {\n\t\t\t\t\tif (!hadKey) trigger(target, \"add\", key, value);\n\t\t\t\t\telse if (hasChanged(value, oldValue)) trigger(target, \"set\", key, value, oldValue);\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tdeleteProperty(target, key) {\n\t\t\t\tconst hadKey = hasOwn(target, key);\n\t\t\t\tconst oldValue = target[key];\n\t\t\t\tconst result = Reflect.deleteProperty(target, key);\n\t\t\t\tif (result && hadKey) trigger(target, \"delete\", key, void 0, oldValue);\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\thas(target, key) {\n\t\t\t\tconst result = Reflect.has(target, key);\n\t\t\t\tif (!isSymbol(key) || !builtInSymbols.has(key)) track(target, \"has\", key);\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\townKeys(target) {\n\t\t\t\ttrack(target, \"iterate\", isArray(target) ? \"length\" : ITERATE_KEY);\n\t\t\t\treturn Reflect.ownKeys(target);\n\t\t\t}\n\t\t};\n\t\tReadonlyReactiveHandler = class extends BaseReactiveHandler {\n\t\t\tconstructor(isShallow2 = false) {\n\t\t\t\tsuper(true, isShallow2);\n\t\t\t}\n\t\t\tset(target, key) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tdeleteProperty(target, key) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\tmutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();\n\t\treadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();\n\t\tshallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true);\n\t\ttoShallow = (value) => value;\n\t\tgetProto = (v) => Reflect.getPrototypeOf(v);\n\t\tmutableCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(false, false) };\n\t\tshallowCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(false, true) };\n\t\treadonlyCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(true, false) };\n\t\treactiveMap = /* @__PURE__ */ new WeakMap();\n\t\tshallowReactiveMap = /* @__PURE__ */ new WeakMap();\n\t\treadonlyMap = /* @__PURE__ */ new WeakMap();\n\t\tshallowReadonlyMap = /* @__PURE__ */ new WeakMap();\n\t\ttoReactive = (value) => isObject(value) ? /* @__PURE__ */ reactive(value) : value;\n\t\ttoReadonly = (value) => isObject(value) ? /* @__PURE__ */ readonly(value) : value;\n\t\tRefImpl = class {\n\t\t\tconstructor(value, isShallow2) {\n\t\t\t\tthis.dep = new Dep();\n\t\t\t\tthis[\"__v_isRef\"] = true;\n\t\t\t\tthis[\"__v_isShallow\"] = false;\n\t\t\t\tthis._rawValue = isShallow2 ? value : /* @__PURE__ */ toRaw(value);\n\t\t\t\tthis._value = isShallow2 ? value : toReactive(value);\n\t\t\t\tthis[\"__v_isShallow\"] = isShallow2;\n\t\t\t}\n\t\t\tget value() {\n\t\t\t\tthis.dep.track();\n\t\t\t\treturn this._value;\n\t\t\t}\n\t\t\tset value(newValue) {\n\t\t\t\tconst oldValue = this._rawValue;\n\t\t\t\tconst useDirectValue = this[\"__v_isShallow\"] || /* @__PURE__ */ isShallow(newValue) || /* @__PURE__ */ isReadonly(newValue);\n\t\t\t\tnewValue = useDirectValue ? newValue : /* @__PURE__ */ toRaw(newValue);\n\t\t\t\tif (hasChanged(newValue, oldValue)) {\n\t\t\t\t\tthis._rawValue = newValue;\n\t\t\t\t\tthis._value = useDirectValue ? newValue : toReactive(newValue);\n\t\t\t\t\tthis.dep.trigger();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tshallowUnwrapHandlers = {\n\t\t\tget: (target, key, receiver) => key === \"__v_raw\" ? target : unref(Reflect.get(target, key, receiver)),\n\t\t\tset: (target, key, value, receiver) => {\n\t\t\t\tconst oldValue = target[key];\n\t\t\t\tif (/* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) {\n\t\t\t\t\toldValue.value = value;\n\t\t\t\t\treturn true;\n\t\t\t\t} else return Reflect.set(target, key, value, receiver);\n\t\t\t}\n\t\t};\n\t\tComputedRefImpl = class {\n\t\t\tconstructor(fn, setter, isSSR) {\n\t\t\t\tthis.fn = fn;\n\t\t\t\tthis.setter = setter;\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis._value = void 0;\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis.dep = new Dep(this);\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis.__v_isRef = true;\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis.deps = void 0;\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis.depsTail = void 0;\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis.flags = 16;\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis.globalVersion = globalVersion - 1;\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis.next = void 0;\n\t\t\t\tthis.effect = this;\n\t\t\t\tthis[\"__v_isReadonly\"] = !setter;\n\t\t\t\tthis.isSSR = isSSR;\n\t\t\t}\n\t\t\t/**\n\t\t\t* @internal\n\t\t\t*/\n\t\t\tnotify() {\n\t\t\t\tthis.flags |= 16;\n\t\t\t\tif (!(this.flags & 8) && activeSub !== this) {\n\t\t\t\t\tbatch(this, true);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tget value() {\n\t\t\t\tconst link = this.dep.track();\n\t\t\t\trefreshComputed(this);\n\t\t\t\tif (link) link.version = this.dep.version;\n\t\t\t\treturn this._value;\n\t\t\t}\n\t\t\tset value(newValue) {\n\t\t\t\tif (this.setter) this.setter(newValue);\n\t\t\t}\n\t\t};\n\t\tINITIAL_WATCHER_VALUE = {};\n\t\tcleanupMap = /* @__PURE__ */ new WeakMap();\n\t\tactiveWatcher = void 0;\n\t}));\n\t//#endregion\n\t//#region node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js\n\t/**\n\t* @vue/runtime-core v3.5.40\n\t* (c) 2018-present Yuxi (Evan) You and Vue contributors\n\t* @license MIT\n\t**/\n\tfunction callWithErrorHandling(fn, instance, type, args) {\n\t\ttry {\n\t\t\treturn args ? fn(...args) : fn();\n\t\t} catch (err) {\n\t\t\thandleError(err, instance, type);\n\t\t}\n\t}\n\tfunction callWithAsyncErrorHandling(fn, instance, type, args) {\n\t\tif (isFunction(fn)) {\n\t\t\tconst res = callWithErrorHandling(fn, instance, type, args);\n\t\t\tif (res && isPromise(res)) res.catch((err) => {\n\t\t\t\thandleError(err, instance, type);\n\t\t\t});\n\t\t\treturn res;\n\t\t}\n\t\tif (isArray(fn)) {\n\t\t\tconst values = [];\n\t\t\tfor (let i = 0; i < fn.length; i++) values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));\n\t\t\treturn values;\n\t\t}\n\t}\n\tfunction handleError(err, instance, type, throwInDev = true) {\n\t\tconst contextVNode = instance ? instance.vnode : null;\n\t\tconst { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ;\n\t\tif (instance) {\n\t\t\tlet cur = instance.parent;\n\t\t\tconst exposedInstance = instance.proxy;\n\t\t\tconst errorInfo = `https://vuejs.org/error-reference/#runtime-${type}`;\n\t\t\twhile (cur) {\n\t\t\t\tconst errorCapturedHooks = cur.ec;\n\t\t\t\tif (errorCapturedHooks) {\n\t\t\t\t\tfor (let i = 0; i < errorCapturedHooks.length; i++) if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) return;\n\t\t\t\t}\n\t\t\t\tcur = cur.parent;\n\t\t\t}\n\t\t\tif (errorHandler) {\n\t\t\t\tpauseTracking();\n\t\t\t\tcallWithErrorHandling(errorHandler, null, 10, [\n\t\t\t\t\terr,\n\t\t\t\t\texposedInstance,\n\t\t\t\t\terrorInfo\n\t\t\t\t]);\n\t\t\t\tresetTracking();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tlogError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction);\n\t}\n\tfunction logError(err, type, contextVNode, throwInDev = true, throwInProd = false) {\n\t\tif (throwInProd) throw err;\n\t\telse console.error(err);\n\t}\n\tfunction nextTick(fn) {\n\t\tconst p = currentFlushPromise || resolvedPromise;\n\t\treturn fn ? p.then(this ? fn.bind(this) : fn) : p;\n\t}\n\tfunction findInsertionIndex(id) {\n\t\tlet start = flushIndex + 1;\n\t\tlet end = queue.length;\n\t\twhile (start < end) {\n\t\t\tconst middle = start + end >>> 1;\n\t\t\tconst middleJob = queue[middle];\n\t\t\tconst middleJobId = getId(middleJob);\n\t\t\tif (middleJobId < id || middleJobId === id && middleJob.flags & 2) start = middle + 1;\n\t\t\telse end = middle;\n\t\t}\n\t\treturn start;\n\t}\n\tfunction queueJob(job) {\n\t\tif (!(job.flags & 1)) {\n\t\t\tconst jobId = getId(job);\n\t\t\tconst lastJob = queue[queue.length - 1];\n\t\t\tif (!lastJob || !(job.flags & 2) && jobId >= getId(lastJob)) queue.push(job);\n\t\t\telse queue.splice(findInsertionIndex(jobId), 0, job);\n\t\t\tjob.flags |= 1;\n\t\t\tqueueFlush();\n\t\t}\n\t}\n\tfunction queueFlush() {\n\t\tif (!currentFlushPromise) currentFlushPromise = resolvedPromise.then(flushJobs);\n\t}\n\tfunction queuePostFlushCb(cb) {\n\t\tif (!isArray(cb)) {\n\t\t\tif (activePostFlushCbs && cb.id === -1) activePostFlushCbs.splice(postFlushIndex + 1, 0, cb);\n\t\t\telse if (!(cb.flags & 1)) {\n\t\t\t\tpendingPostFlushCbs.push(cb);\n\t\t\t\tcb.flags |= 1;\n\t\t\t}\n\t\t} else pendingPostFlushCbs.push(...cb);\n\t\tqueueFlush();\n\t}\n\tfunction flushPreFlushCbs(instance, seen, i = flushIndex + 1) {\n\t\tfor (; i < queue.length; i++) {\n\t\t\tconst cb = queue[i];\n\t\t\tif (cb && cb.flags & 2) {\n\t\t\t\tif (instance && cb.id !== instance.uid) continue;\n\t\t\t\tqueue.splice(i, 1);\n\t\t\t\ti--;\n\t\t\t\tif (cb.flags & 4) cb.flags &= -2;\n\t\t\t\tcb();\n\t\t\t\tif (!(cb.flags & 4)) cb.flags &= -2;\n\t\t\t}\n\t\t}\n\t}\n\tfunction flushPostFlushCbs(seen) {\n\t\tif (pendingPostFlushCbs.length) {\n\t\t\tconst deduped = [...new Set(pendingPostFlushCbs)].sort((a, b) => getId(a) - getId(b));\n\t\t\tpendingPostFlushCbs.length = 0;\n\t\t\tif (activePostFlushCbs) {\n\t\t\t\tactivePostFlushCbs.push(...deduped);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tactivePostFlushCbs = deduped;\n\t\t\tfor (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {\n\t\t\t\tconst cb = activePostFlushCbs[postFlushIndex];\n\t\t\t\tif (cb.flags & 4) cb.flags &= -2;\n\t\t\t\tif (!(cb.flags & 8)) cb();\n\t\t\t\tcb.flags &= -2;\n\t\t\t}\n\t\t\tactivePostFlushCbs = null;\n\t\t\tpostFlushIndex = 0;\n\t\t}\n\t}\n\tfunction flushJobs(seen) {\n\t\ttry {\n\t\t\tfor (flushIndex = 0; flushIndex < queue.length; flushIndex++) {\n\t\t\t\tconst job = queue[flushIndex];\n\t\t\t\tif (job && !(job.flags & 8)) {\n\t\t\t\t\tif (job.flags & 4) job.flags &= -2;\n\t\t\t\t\tcallWithErrorHandling(job, job.i, job.i ? 15 : 14);\n\t\t\t\t\tif (!(job.flags & 4)) job.flags &= -2;\n\t\t\t\t}\n\t\t\t}\n\t\t} finally {\n\t\t\tfor (; flushIndex < queue.length; flushIndex++) {\n\t\t\t\tconst job = queue[flushIndex];\n\t\t\t\tif (job) job.flags &= -2;\n\t\t\t}\n\t\t\tflushIndex = -1;\n\t\t\tqueue.length = 0;\n\t\t\tflushPostFlushCbs(seen);\n\t\t\tcurrentFlushPromise = null;\n\t\t\tif (queue.length || pendingPostFlushCbs.length) flushJobs(seen);\n\t\t}\n\t}\n\tfunction setCurrentRenderingInstance(instance) {\n\t\tconst prev = currentRenderingInstance;\n\t\tcurrentRenderingInstance = instance;\n\t\tcurrentScopeId = instance && instance.type.__scopeId || null;\n\t\treturn prev;\n\t}\n\tfunction withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {\n\t\tif (!ctx) return fn;\n\t\tif (fn._n) return fn;\n\t\tconst renderFnWithContext = (...args) => {\n\t\t\tif (renderFnWithContext._d) setBlockTracking(-1);\n\t\t\tconst prevInstance = setCurrentRenderingInstance(ctx);\n\t\t\tconst prevStackSize = blockStack.length;\n\t\t\tlet res;\n\t\t\ttry {\n\t\t\t\tres = fn(...args);\n\t\t\t} finally {\n\t\t\t\tfor (let i = blockStack.length; i > prevStackSize; i--) closeBlock();\n\t\t\t\tsetCurrentRenderingInstance(prevInstance);\n\t\t\t\tif (renderFnWithContext._d) setBlockTracking(1);\n\t\t\t}\n\t\t\treturn res;\n\t\t};\n\t\trenderFnWithContext._n = true;\n\t\trenderFnWithContext._c = true;\n\t\trenderFnWithContext._d = true;\n\t\treturn renderFnWithContext;\n\t}\n\tfunction withDirectives(vnode, directives) {\n\t\tif (currentRenderingInstance === null) return vnode;\n\t\tconst instance = getComponentPublicInstance(currentRenderingInstance);\n\t\tconst bindings = vnode.dirs || (vnode.dirs = []);\n\t\tfor (let i = 0; i < directives.length; i++) {\n\t\t\tlet [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];\n\t\t\tif (dir) {\n\t\t\t\tif (isFunction(dir)) dir = {\n\t\t\t\t\tmounted: dir,\n\t\t\t\t\tupdated: dir\n\t\t\t\t};\n\t\t\t\tif (dir.deep) traverse(value);\n\t\t\t\tbindings.push({\n\t\t\t\t\tdir,\n\t\t\t\t\tinstance,\n\t\t\t\t\tvalue,\n\t\t\t\t\toldValue: void 0,\n\t\t\t\t\targ,\n\t\t\t\t\tmodifiers\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn vnode;\n\t}\n\tfunction invokeDirectiveHook(vnode, prevVNode, instance, name) {\n\t\tconst bindings = vnode.dirs;\n\t\tconst oldBindings = prevVNode && prevVNode.dirs;\n\t\tfor (let i = 0; i < bindings.length; i++) {\n\t\t\tconst binding = bindings[i];\n\t\t\tif (oldBindings) binding.oldValue = oldBindings[i].value;\n\t\t\tlet hook = binding.dir[name];\n\t\t\tif (hook) {\n\t\t\t\tpauseTracking();\n\t\t\t\tcallWithAsyncErrorHandling(hook, instance, 8, [\n\t\t\t\t\tvnode.el,\n\t\t\t\t\tbinding,\n\t\t\t\t\tvnode,\n\t\t\t\t\tprevVNode\n\t\t\t\t]);\n\t\t\t\tresetTracking();\n\t\t\t}\n\t\t}\n\t}\n\tfunction inject(key, defaultValue, treatDefaultAsFactory = false) {\n\t\tconst instance = getCurrentInstance();\n\t\tif (instance || currentApp) {\n\t\t\tlet provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;\n\t\t\tif (provides && key in provides) return provides[key];\n\t\t\telse if (arguments.length > 1) return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;\n\t\t}\n\t}\n\tfunction watch(source, cb, options) {\n\t\treturn doWatch(source, cb, options);\n\t}\n\tfunction doWatch(source, cb, options = EMPTY_OBJ) {\n\t\tconst { immediate, deep, flush, once } = options;\n\t\tconst baseWatchOptions = extend({}, options);\n\t\tconst runsImmediately = cb && immediate || !cb && flush !== \"post\";\n\t\tlet ssrCleanup;\n\t\tif (isInSSRComponentSetup) {\n\t\t\tif (flush === \"sync\") {\n\t\t\t\tconst ctx = useSSRContext();\n\t\t\t\tssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);\n\t\t\t} else if (!runsImmediately) {\n\t\t\t\tconst watchStopHandle = () => {};\n\t\t\t\twatchStopHandle.stop = NOOP;\n\t\t\t\twatchStopHandle.resume = NOOP;\n\t\t\t\twatchStopHandle.pause = NOOP;\n\t\t\t\treturn watchStopHandle;\n\t\t\t}\n\t\t}\n\t\tconst instance = currentInstance;\n\t\tbaseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);\n\t\tlet isPre = false;\n\t\tif (flush === \"post\") baseWatchOptions.scheduler = (job) => {\n\t\t\tqueuePostRenderEffect(job, instance && instance.suspense);\n\t\t};\n\t\telse if (flush !== \"sync\") {\n\t\t\tisPre = true;\n\t\t\tbaseWatchOptions.scheduler = (job, isFirstRun) => {\n\t\t\t\tif (isFirstRun) job();\n\t\t\t\telse queueJob(job);\n\t\t\t};\n\t\t}\n\t\tbaseWatchOptions.augmentJob = (job) => {\n\t\t\tif (cb) job.flags |= 4;\n\t\t\tif (isPre) {\n\t\t\t\tjob.flags |= 2;\n\t\t\t\tif (instance) {\n\t\t\t\t\tjob.id = instance.uid;\n\t\t\t\t\tjob.i = instance;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tconst watchHandle = watch$1(source, cb, baseWatchOptions);\n\t\tif (isInSSRComponentSetup) {\n\t\t\tif (ssrCleanup) ssrCleanup.push(watchHandle);\n\t\t\telse if (runsImmediately) watchHandle();\n\t\t}\n\t\treturn watchHandle;\n\t}\n\tfunction setTransitionHooks(vnode, hooks) {\n\t\tif (vnode.shapeFlag & 6 && vnode.component) {\n\t\t\tvnode.transition = hooks;\n\t\t\tsetTransitionHooks(vnode.component.subTree, hooks);\n\t\t} else if (vnode.shapeFlag & 128) {\n\t\t\tvnode.ssContent.transition = hooks.clone(vnode.ssContent);\n\t\t\tvnode.ssFallback.transition = hooks.clone(vnode.ssFallback);\n\t\t} else vnode.transition = hooks;\n\t}\n\t// @__NO_SIDE_EFFECTS__\n\tfunction defineComponent(options, extraOptions) {\n\t\treturn isFunction(options) ? /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))() : options;\n\t}\n\tfunction markAsyncBoundary(instance) {\n\t\tinstance.ids = [\n\t\t\tinstance.ids[0] + instance.ids[2]++ + \"-\",\n\t\t\t0,\n\t\t\t0\n\t\t];\n\t}\n\tfunction isTemplateRefKey(refs, key) {\n\t\tlet desc;\n\t\treturn !!((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable);\n\t}\n\tfunction setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {\n\t\tif (isArray(rawRef)) {\n\t\t\trawRef.forEach((r, i) => setRef(r, oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount));\n\t\t\treturn;\n\t\t}\n\t\tif (isAsyncWrapper(vnode) && !isUnmount) {\n\t\t\tif (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree);\n\t\t\treturn;\n\t\t}\n\t\tconst refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;\n\t\tconst value = isUnmount ? null : refValue;\n\t\tconst { i: owner, r: ref } = rawRef;\n\t\tconst oldRef = oldRawRef && oldRawRef.r;\n\t\tconst refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;\n\t\tconst setupState = owner.setupState;\n\t\tconst rawSetupState = /* @__PURE__ */ toRaw(setupState);\n\t\tconst canSetSetupRef = setupState === EMPTY_OBJ ? NO : (key) => {\n\t\t\tif (isTemplateRefKey(refs, key)) return false;\n\t\t\treturn hasOwn(rawSetupState, key);\n\t\t};\n\t\tconst canSetRef = (ref2, key) => {\n\t\t\tif (key && isTemplateRefKey(refs, key)) return false;\n\t\t\treturn true;\n\t\t};\n\t\tif (oldRef != null && oldRef !== ref) {\n\t\t\tinvalidatePendingSetRef(oldRawRef);\n\t\t\tif (isString(oldRef)) {\n\t\t\t\trefs[oldRef] = null;\n\t\t\t\tif (canSetSetupRef(oldRef)) setupState[oldRef] = null;\n\t\t\t} else if (/* @__PURE__ */ isRef(oldRef)) {\n\t\t\t\tconst oldRawRefAtom = oldRawRef;\n\t\t\t\tif (canSetRef(oldRef, oldRawRefAtom.k)) oldRef.value = null;\n\t\t\t\tif (oldRawRefAtom.k) refs[oldRawRefAtom.k] = null;\n\t\t\t}\n\t\t}\n\t\tif (isFunction(ref)) callWithErrorHandling(ref, owner, 12, [value, refs]);\n\t\telse {\n\t\t\tconst _isString = isString(ref);\n\t\t\tconst _isRef = /* @__PURE__ */ isRef(ref);\n\t\t\tif (_isString || _isRef) {\n\t\t\t\tconst doSet = () => {\n\t\t\t\t\tif (rawRef.f) {\n\t\t\t\t\t\tconst existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : canSetRef(ref) || !rawRef.k ? ref.value : refs[rawRef.k];\n\t\t\t\t\t\tif (isUnmount) isArray(existing) && remove(existing, refValue);\n\t\t\t\t\t\telse if (!isArray(existing)) if (_isString) {\n\t\t\t\t\t\t\trefs[ref] = [refValue];\n\t\t\t\t\t\t\tif (canSetSetupRef(ref)) setupState[ref] = refs[ref];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconst newVal = [refValue];\n\t\t\t\t\t\t\tif (canSetRef(ref, rawRef.k)) ref.value = newVal;\n\t\t\t\t\t\t\tif (rawRef.k) refs[rawRef.k] = newVal;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (!existing.includes(refValue)) existing.push(refValue);\n\t\t\t\t\t} else if (_isString) {\n\t\t\t\t\t\trefs[ref] = value;\n\t\t\t\t\t\tif (canSetSetupRef(ref)) setupState[ref] = value;\n\t\t\t\t\t} else if (_isRef) {\n\t\t\t\t\t\tif (canSetRef(ref, rawRef.k)) ref.value = value;\n\t\t\t\t\t\tif (rawRef.k) refs[rawRef.k] = value;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tif (value) {\n\t\t\t\t\tconst job = () => {\n\t\t\t\t\t\tdoSet();\n\t\t\t\t\t\tpendingSetRefMap.delete(rawRef);\n\t\t\t\t\t};\n\t\t\t\t\tjob.id = -1;\n\t\t\t\t\tpendingSetRefMap.set(rawRef, job);\n\t\t\t\t\tqueuePostRenderEffect(job, parentSuspense);\n\t\t\t\t} else {\n\t\t\t\t\tinvalidatePendingSetRef(rawRef);\n\t\t\t\t\tdoSet();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfunction invalidatePendingSetRef(rawRef) {\n\t\tconst pendingSetRef = pendingSetRefMap.get(rawRef);\n\t\tif (pendingSetRef) {\n\t\t\tpendingSetRef.flags |= 8;\n\t\t\tpendingSetRefMap.delete(rawRef);\n\t\t}\n\t}\n\tfunction injectHook(type, hook, target = currentInstance, prepend = false) {\n\t\tif (target) {\n\t\t\tconst hooks = target[type] || (target[type] = []);\n\t\t\tconst wrappedHook = hook.__weh || (hook.__weh = (...args) => {\n\t\t\t\tpauseTracking();\n\t\t\t\tconst reset = setCurrentInstance(target);\n\t\t\t\tconst res = callWithAsyncErrorHandling(hook, target, type, args);\n\t\t\t\treset();\n\t\t\t\tresetTracking();\n\t\t\t\treturn res;\n\t\t\t});\n\t\t\tif (prepend) hooks.unshift(wrappedHook);\n\t\t\telse hooks.push(wrappedHook);\n\t\t\treturn wrappedHook;\n\t\t}\n\t}\n\tfunction renderList(source, renderItem, cache, index) {\n\t\tlet ret;\n\t\tconst cached = cache && cache[index];\n\t\tconst sourceIsArray = isArray(source);\n\t\tif (sourceIsArray || isString(source)) {\n\t\t\tconst sourceIsReactiveArray = sourceIsArray && /* @__PURE__ */ isReactive(source);\n\t\t\tlet needsWrap = false;\n\t\t\tlet isReadonlySource = false;\n\t\t\tif (sourceIsReactiveArray) {\n\t\t\t\tneedsWrap = !/* @__PURE__ */ isShallow(source);\n\t\t\t\tisReadonlySource = /* @__PURE__ */ isReadonly(source);\n\t\t\t\tsource = shallowReadArray(source);\n\t\t\t}\n\t\t\tret = new Array(source.length);\n\t\t\tfor (let i = 0, l = source.length; i < l; i++) ret[i] = renderItem(needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i])) : toReactive(source[i]) : source[i], i, void 0, cached && cached[i]);\n\t\t} else if (typeof source === \"number\") {\n\t\t\tret = new Array(source);\n\t\t\tfor (let i = 0; i < source; i++) ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);\n\t\t} else if (isObject(source)) if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));\n\t\telse {\n\t\t\tconst keys = Object.keys(source);\n\t\t\tret = new Array(keys.length);\n\t\t\tfor (let i = 0, l = keys.length; i < l; i++) {\n\t\t\t\tconst key = keys[i];\n\t\t\t\tret[i] = renderItem(source[key], key, i, cached && cached[i]);\n\t\t\t}\n\t\t}\n\t\telse ret = [];\n\t\tif (cache) cache[index] = ret;\n\t\treturn ret;\n\t}\n\tfunction createAppContext() {\n\t\treturn {\n\t\t\tapp: null,\n\t\t\tconfig: {\n\t\t\t\tisNativeTag: NO,\n\t\t\t\tperformance: false,\n\t\t\t\tglobalProperties: {},\n\t\t\t\toptionMergeStrategies: {},\n\t\t\t\terrorHandler: void 0,\n\t\t\t\twarnHandler: void 0,\n\t\t\t\tcompilerOptions: {}\n\t\t\t},\n\t\t\tmixins: [],\n\t\t\tcomponents: {},\n\t\t\tdirectives: {},\n\t\t\tprovides: /* @__PURE__ */ Object.create(null),\n\t\t\toptionsCache: /* @__PURE__ */ new WeakMap(),\n\t\t\tpropsCache: /* @__PURE__ */ new WeakMap(),\n\t\t\temitsCache: /* @__PURE__ */ new WeakMap()\n\t\t};\n\t}\n\tfunction createAppAPI(render, hydrate) {\n\t\treturn function createApp(rootComponent, rootProps = null) {\n\t\t\tif (!isFunction(rootComponent)) rootComponent = extend({}, rootComponent);\n\t\t\tif (rootProps != null && !isObject(rootProps)) rootProps = null;\n\t\t\tconst context = createAppContext();\n\t\t\tconst installedPlugins = /* @__PURE__ */ new WeakSet();\n\t\t\tconst pluginCleanupFns = [];\n\t\t\tlet isMounted = false;\n\t\t\tconst app = context.app = {\n\t\t\t\t_uid: uid$1++,\n\t\t\t\t_component: rootComponent,\n\t\t\t\t_props: rootProps,\n\t\t\t\t_container: null,\n\t\t\t\t_context: context,\n\t\t\t\t_instance: null,\n\t\t\t\tversion,\n\t\t\t\tget config() {\n\t\t\t\t\treturn context.config;\n\t\t\t\t},\n\t\t\t\tset config(v) {},\n\t\t\t\tuse(plugin, ...options) {\n\t\t\t\t\tif (installedPlugins.has(plugin)) {} else if (plugin && isFunction(plugin.install)) {\n\t\t\t\t\t\tinstalledPlugins.add(plugin);\n\t\t\t\t\t\tplugin.install(app, ...options);\n\t\t\t\t\t} else if (isFunction(plugin)) {\n\t\t\t\t\t\tinstalledPlugins.add(plugin);\n\t\t\t\t\t\tplugin(app, ...options);\n\t\t\t\t\t}\n\t\t\t\t\treturn app;\n\t\t\t\t},\n\t\t\t\tmixin(mixin) {\n\t\t\t\t\treturn app;\n\t\t\t\t},\n\t\t\t\tcomponent(name, component) {\n\t\t\t\t\tif (!component) return context.components[name];\n\t\t\t\t\tcontext.components[name] = component;\n\t\t\t\t\treturn app;\n\t\t\t\t},\n\t\t\t\tdirective(name, directive) {\n\t\t\t\t\tif (!directive) return context.directives[name];\n\t\t\t\t\tcontext.directives[name] = directive;\n\t\t\t\t\treturn app;\n\t\t\t\t},\n\t\t\t\tmount(rootContainer, isHydrate, namespace) {\n\t\t\t\t\tif (!isMounted) {\n\t\t\t\t\t\tconst vnode = app._ceVNode || createVNode(rootComponent, rootProps);\n\t\t\t\t\t\tvnode.appContext = context;\n\t\t\t\t\t\tif (namespace === true) namespace = \"svg\";\n\t\t\t\t\t\telse if (namespace === false) namespace = void 0;\n\t\t\t\t\t\tif (isHydrate && hydrate) hydrate(vnode, rootContainer);\n\t\t\t\t\t\telse render(vnode, rootContainer, namespace);\n\t\t\t\t\t\tisMounted = true;\n\t\t\t\t\t\tapp._container = rootContainer;\n\t\t\t\t\t\trootContainer.__vue_app__ = app;\n\t\t\t\t\t\treturn getComponentPublicInstance(vnode.component);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tonUnmount(cleanupFn) {\n\t\t\t\t\tpluginCleanupFns.push(cleanupFn);\n\t\t\t\t},\n\t\t\t\tunmount() {\n\t\t\t\t\tif (isMounted) {\n\t\t\t\t\t\tcallWithAsyncErrorHandling(pluginCleanupFns, app._instance, 16);\n\t\t\t\t\t\trender(null, app._container);\n\t\t\t\t\t\tdelete app._container.__vue_app__;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tprovide(key, value) {\n\t\t\t\t\tcontext.provides[key] = value;\n\t\t\t\t\treturn app;\n\t\t\t\t},\n\t\t\t\trunWithContext(fn) {\n\t\t\t\t\tconst lastApp = currentApp;\n\t\t\t\t\tcurrentApp = app;\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn fn();\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tcurrentApp = lastApp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\treturn app;\n\t\t};\n\t}\n\tfunction emit(instance, event, ...rawArgs) {\n\t\tif (instance.isUnmounted) return;\n\t\tconst props = instance.vnode.props || EMPTY_OBJ;\n\t\tlet args = rawArgs;\n\t\tconst isModelListener = event.startsWith(\"update:\");\n\t\tconst modifiers = isModelListener && getModelModifiers(props, event.slice(7));\n\t\tif (modifiers) {\n\t\t\tif (modifiers.trim) args = rawArgs.map((a) => isString(a) ? a.trim() : a);\n\t\t\tif (modifiers.number) args = rawArgs.map(looseToNumber);\n\t\t}\n\t\tlet handlerName;\n\t\tlet handler = props[handlerName = toHandlerKey(event)] || props[handlerName = toHandlerKey(camelize(event))];\n\t\tif (!handler && isModelListener) handler = props[handlerName = toHandlerKey(hyphenate(event))];\n\t\tif (handler) callWithAsyncErrorHandling(handler, instance, 6, args);\n\t\tconst onceHandler = props[handlerName + `Once`];\n\t\tif (onceHandler) {\n\t\t\tif (!instance.emitted) instance.emitted = {};\n\t\t\telse if (instance.emitted[handlerName]) return;\n\t\t\tinstance.emitted[handlerName] = true;\n\t\t\tcallWithAsyncErrorHandling(onceHandler, instance, 6, args);\n\t\t}\n\t}\n\tfunction normalizeEmitsOptions(comp, appContext, asMixin = false) {\n\t\tconst cache = appContext.emitsCache;\n\t\tconst cached = cache.get(comp);\n\t\tif (cached !== void 0) return cached;\n\t\tconst raw = comp.emits;\n\t\tlet normalized = {};\n\t\tif (!raw && true) {\n\t\t\tif (isObject(comp)) cache.set(comp, null);\n\t\t\treturn null;\n\t\t}\n\t\tif (isArray(raw)) raw.forEach((key) => normalized[key] = null);\n\t\telse extend(normalized, raw);\n\t\tif (isObject(comp)) cache.set(comp, normalized);\n\t\treturn normalized;\n\t}\n\tfunction isEmitListener(options, key) {\n\t\tif (!options || !isOn(key)) return false;\n\t\tkey = key.slice(2);\n\t\tkey = key === \"Once\" ? key : key.replace(/Once$/, \"\");\n\t\treturn hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);\n\t}\n\tfunction renderComponentRoot(instance) {\n\t\tconst { type: Component, vnode, proxy, withProxy, propsOptions: [propsOptions], slots, attrs, emit, render, renderCache, props, data, setupState, ctx, inheritAttrs } = instance;\n\t\tconst prev = setCurrentRenderingInstance(instance);\n\t\tlet result;\n\t\tlet fallthroughAttrs;\n\t\ttry {\n\t\t\tif (vnode.shapeFlag & 4) {\n\t\t\t\tconst proxyToUse = withProxy || proxy;\n\t\t\t\tconst thisProxy = proxyToUse;\n\t\t\t\tresult = normalizeVNode(render.call(thisProxy, proxyToUse, renderCache, props, setupState, data, ctx));\n\t\t\t\tfallthroughAttrs = attrs;\n\t\t\t} else {\n\t\t\t\tconst render2 = Component;\n\t\t\t\tresult = normalizeVNode(render2.length > 1 ? render2(props, {\n\t\t\t\t\tattrs,\n\t\t\t\t\tslots,\n\t\t\t\t\temit\n\t\t\t\t}) : render2(props, null));\n\t\t\t\tfallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tblockStack.length = 0;\n\t\t\thandleError(err, instance, 1);\n\t\t\tresult = createVNode(Comment);\n\t\t}\n\t\tlet root = result;\n\t\tif (fallthroughAttrs && inheritAttrs !== false) {\n\t\t\tconst keys = Object.keys(fallthroughAttrs);\n\t\t\tconst { shapeFlag } = root;\n\t\t\tif (keys.length) {\n\t\t\t\tif (shapeFlag & 7) {\n\t\t\t\t\tif (propsOptions && keys.some(isModelListener)) fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions);\n\t\t\t\t\troot = cloneVNode(root, fallthroughAttrs, false, true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (vnode.dirs) {\n\t\t\troot = cloneVNode(root, null, false, true);\n\t\t\troot.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;\n\t\t}\n\t\tif (vnode.transition) setTransitionHooks(root, vnode.transition);\n\t\tresult = root;\n\t\tsetCurrentRenderingInstance(prev);\n\t\treturn result;\n\t}\n\tfunction shouldUpdateComponent(prevVNode, nextVNode, optimized) {\n\t\tconst { props: prevProps, children: prevChildren, component } = prevVNode;\n\t\tconst { props: nextProps, children: nextChildren, patchFlag } = nextVNode;\n\t\tconst emits = component.emitsOptions;\n\t\tif (nextVNode.dirs || nextVNode.transition) return true;\n\t\tif (optimized && patchFlag >= 0) {\n\t\t\tif (patchFlag & 1024) return true;\n\t\t\tif (patchFlag & 16) {\n\t\t\t\tif (!prevProps) return !!nextProps;\n\t\t\t\treturn hasPropsChanged(prevProps, nextProps, emits);\n\t\t\t} else if (patchFlag & 8) {\n\t\t\t\tconst dynamicProps = nextVNode.dynamicProps;\n\t\t\t\tfor (let i = 0; i < dynamicProps.length; i++) {\n\t\t\t\t\tconst key = dynamicProps[i];\n\t\t\t\t\tif (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emits, key)) return true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (prevChildren || nextChildren) {\n\t\t\t\tif (!nextChildren || !nextChildren.$stable) return true;\n\t\t\t}\n\t\t\tif (prevProps === nextProps) return false;\n\t\t\tif (!prevProps) return !!nextProps;\n\t\t\tif (!nextProps) return true;\n\t\t\treturn hasPropsChanged(prevProps, nextProps, emits);\n\t\t}\n\t\treturn false;\n\t}\n\tfunction hasPropsChanged(prevProps, nextProps, emitsOptions) {\n\t\tconst nextKeys = Object.keys(nextProps);\n\t\tif (nextKeys.length !== Object.keys(prevProps).length) return true;\n\t\tfor (let i = 0; i < nextKeys.length; i++) {\n\t\t\tconst key = nextKeys[i];\n\t\t\tif (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) return true;\n\t\t}\n\t\treturn false;\n\t}\n\tfunction hasPropValueChanged(nextProps, prevProps, key) {\n\t\tconst nextProp = nextProps[key];\n\t\tconst prevProp = prevProps[key];\n\t\tif (key === \"style\" && isObject(nextProp) && isObject(prevProp)) return !looseEqual(nextProp, prevProp);\n\t\treturn nextProp !== prevProp;\n\t}\n\tfunction updateHOCHostEl({ vnode, parent, suspense }, el) {\n\t\twhile (parent) {\n\t\t\tconst root = parent.subTree;\n\t\t\tif (root.suspense && root.suspense.activeBranch === vnode) {\n\t\t\t\troot.suspense.vnode.el = root.el = el;\n\t\t\t\tvnode = root;\n\t\t\t}\n\t\t\tif (root === vnode) {\n\t\t\t\t(vnode = parent.vnode).el = el;\n\t\t\t\tparent = parent.parent;\n\t\t\t} else break;\n\t\t}\n\t\tif (suspense && suspense.activeBranch === vnode) suspense.vnode.el = el;\n\t}\n\tfunction initProps(instance, rawProps, isStateful, isSSR = false) {\n\t\tconst props = {};\n\t\tconst attrs = createInternalObject();\n\t\tinstance.propsDefaults = /* @__PURE__ */ Object.create(null);\n\t\tsetFullProps(instance, rawProps, props, attrs);\n\t\tfor (const key in instance.propsOptions[0]) if (!(key in props)) props[key] = void 0;\n\t\tif (isStateful) instance.props = isSSR ? props : /* @__PURE__ */ shallowReactive(props);\n\t\telse if (!instance.type.props) instance.props = attrs;\n\t\telse instance.props = props;\n\t\tinstance.attrs = attrs;\n\t}\n\tfunction updateProps(instance, rawProps, rawPrevProps, optimized) {\n\t\tconst { props, attrs, vnode: { patchFlag } } = instance;\n\t\tconst rawCurrentProps = /* @__PURE__ */ toRaw(props);\n\t\tconst [options] = instance.propsOptions;\n\t\tlet hasAttrsChanged = false;\n\t\tif ((optimized || patchFlag > 0) && !(patchFlag & 16)) {\n\t\t\tif (patchFlag & 8) {\n\t\t\t\tconst propsToUpdate = instance.vnode.dynamicProps;\n\t\t\t\tfor (let i = 0; i < propsToUpdate.length; i++) {\n\t\t\t\t\tlet key = propsToUpdate[i];\n\t\t\t\t\tif (isEmitListener(instance.emitsOptions, key)) continue;\n\t\t\t\t\tconst value = rawProps[key];\n\t\t\t\t\tif (options) if (hasOwn(attrs, key)) {\n\t\t\t\t\t\tif (value !== attrs[key]) {\n\t\t\t\t\t\t\tattrs[key] = value;\n\t\t\t\t\t\t\thasAttrsChanged = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst camelizedKey = camelize(key);\n\t\t\t\t\t\tprops[camelizedKey] = resolvePropValue(options, rawCurrentProps, camelizedKey, value, instance, false);\n\t\t\t\t\t}\n\t\t\t\t\telse if (value !== attrs[key]) {\n\t\t\t\t\t\tattrs[key] = value;\n\t\t\t\t\t\thasAttrsChanged = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (setFullProps(instance, rawProps, props, attrs)) hasAttrsChanged = true;\n\t\t\tlet kebabKey;\n\t\t\tfor (const key in rawCurrentProps) if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) if (options) {\n\t\t\t\tif (rawPrevProps && (rawPrevProps[key] !== void 0 || rawPrevProps[kebabKey] !== void 0)) props[key] = resolvePropValue(options, rawCurrentProps, key, void 0, instance, true);\n\t\t\t} else delete props[key];\n\t\t\tif (attrs !== rawCurrentProps) {\n\t\t\t\tfor (const key in attrs) if (!rawProps || !hasOwn(rawProps, key) && true) {\n\t\t\t\t\tdelete attrs[key];\n\t\t\t\t\thasAttrsChanged = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (hasAttrsChanged) trigger(instance.attrs, \"set\", \"\");\n\t}\n\tfunction setFullProps(instance, rawProps, props, attrs) {\n\t\tconst [options, needCastKeys] = instance.propsOptions;\n\t\tlet hasAttrsChanged = false;\n\t\tlet rawCastValues;\n\t\tif (rawProps) for (let key in rawProps) {\n\t\t\tif (isReservedProp(key)) continue;\n\t\t\tconst value = rawProps[key];\n\t\t\tlet camelKey;\n\t\t\tif (options && hasOwn(options, camelKey = camelize(key))) if (!needCastKeys || !needCastKeys.includes(camelKey)) props[camelKey] = value;\n\t\t\telse (rawCastValues || (rawCastValues = {}))[camelKey] = value;\n\t\t\telse if (!isEmitListener(instance.emitsOptions, key)) {\n\t\t\t\tif (!(key in attrs) || value !== attrs[key]) {\n\t\t\t\t\tattrs[key] = value;\n\t\t\t\t\thasAttrsChanged = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (needCastKeys) {\n\t\t\tconst rawCurrentProps = /* @__PURE__ */ toRaw(props);\n\t\t\tconst castValues = rawCastValues || EMPTY_OBJ;\n\t\t\tfor (let i = 0; i < needCastKeys.length; i++) {\n\t\t\t\tconst key = needCastKeys[i];\n\t\t\t\tprops[key] = resolvePropValue(options, rawCurrentProps, key, castValues[key], instance, !hasOwn(castValues, key));\n\t\t\t}\n\t\t}\n\t\treturn hasAttrsChanged;\n\t}\n\tfunction resolvePropValue(options, props, key, value, instance, isAbsent) {\n\t\tconst opt = options[key];\n\t\tif (opt != null) {\n\t\t\tconst hasDefault = hasOwn(opt, \"default\");\n\t\t\tif (hasDefault && value === void 0) {\n\t\t\t\tconst defaultValue = opt.default;\n\t\t\t\tif (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) {\n\t\t\t\t\tconst { propsDefaults } = instance;\n\t\t\t\t\tif (key in propsDefaults) value = propsDefaults[key];\n\t\t\t\t\telse {\n\t\t\t\t\t\tconst reset = setCurrentInstance(instance);\n\t\t\t\t\t\tvalue = propsDefaults[key] = defaultValue.call(null, props);\n\t\t\t\t\t\treset();\n\t\t\t\t\t}\n\t\t\t\t} else value = defaultValue;\n\t\t\t\tif (instance.ce) instance.ce._setProp(key, value);\n\t\t\t}\n\t\t\tif (opt[0]) {\n\t\t\t\tif (isAbsent && !hasDefault) value = false;\n\t\t\t\telse if (opt[1] && (value === \"\" || value === hyphenate(key))) value = true;\n\t\t\t}\n\t\t}\n\t\treturn value;\n\t}\n\tfunction normalizePropsOptions(comp, appContext, asMixin = false) {\n\t\tconst cache = appContext.propsCache;\n\t\tconst cached = cache.get(comp);\n\t\tif (cached) return cached;\n\t\tconst raw = comp.props;\n\t\tconst normalized = {};\n\t\tconst needCastKeys = [];\n\t\tif (!raw && true) {\n\t\t\tif (isObject(comp)) cache.set(comp, EMPTY_ARR);\n\t\t\treturn EMPTY_ARR;\n\t\t}\n\t\tif (isArray(raw)) for (let i = 0; i < raw.length; i++) {\n\t\t\tconst normalizedKey = camelize(raw[i]);\n\t\t\tif (validatePropName(normalizedKey)) normalized[normalizedKey] = EMPTY_OBJ;\n\t\t}\n\t\telse if (raw) for (const key in raw) {\n\t\t\tconst normalizedKey = camelize(key);\n\t\t\tif (validatePropName(normalizedKey)) {\n\t\t\t\tconst opt = raw[key];\n\t\t\t\tconst prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt);\n\t\t\t\tconst propType = prop.type;\n\t\t\t\tlet shouldCast = false;\n\t\t\t\tlet shouldCastTrue = true;\n\t\t\t\tif (isArray(propType)) for (let index = 0; index < propType.length; ++index) {\n\t\t\t\t\tconst type = propType[index];\n\t\t\t\t\tconst typeName = isFunction(type) && type.name;\n\t\t\t\t\tif (typeName === \"Boolean\") {\n\t\t\t\t\t\tshouldCast = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if (typeName === \"String\") shouldCastTrue = false;\n\t\t\t\t}\n\t\t\t\telse shouldCast = isFunction(propType) && propType.name === \"Boolean\";\n\t\t\t\tprop[0] = shouldCast;\n\t\t\t\tprop[1] = shouldCastTrue;\n\t\t\t\tif (shouldCast || hasOwn(prop, \"default\")) needCastKeys.push(normalizedKey);\n\t\t\t}\n\t\t}\n\t\tconst res = [normalized, needCastKeys];\n\t\tif (isObject(comp)) cache.set(comp, res);\n\t\treturn res;\n\t}\n\tfunction validatePropName(key) {\n\t\tif (key[0] !== \"$\" && !isReservedProp(key)) return true;\n\t\treturn false;\n\t}\n\tfunction createRenderer(options) {\n\t\treturn baseCreateRenderer(options);\n\t}\n\tfunction baseCreateRenderer(options, createHydrationFns) {\n\t\tconst target = getGlobalThis();\n\t\ttarget.__VUE__ = true;\n\t\tconst { insert: hostInsert, remove: hostRemove, patchProp: hostPatchProp, createElement: hostCreateElement, createText: hostCreateText, createComment: hostCreateComment, setText: hostSetText, setElementText: hostSetElementText, parentNode: hostParentNode, nextSibling: hostNextSibling, setScopeId: hostSetScopeId = NOOP, insertStaticContent: hostInsertStaticContent } = options;\n\t\tconst patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = !!n2.dynamicChildren) => {\n\t\t\tif (n1 === n2) return;\n\t\t\tif (n1 && !isSameVNodeType(n1, n2)) {\n\t\t\t\tanchor = getNextHostNode(n1);\n\t\t\t\tunmount(n1, parentComponent, parentSuspense, true);\n\t\t\t\tn1 = null;\n\t\t\t}\n\t\t\tif (n2.patchFlag === -2) {\n\t\t\t\toptimized = false;\n\t\t\t\tn2.dynamicChildren = null;\n\t\t\t}\n\t\t\tconst { type, ref, shapeFlag } = n2;\n\t\t\tswitch (type) {\n\t\t\t\tcase Text:\n\t\t\t\t\tprocessText(n1, n2, container, anchor);\n\t\t\t\t\tbreak;\n\t\t\t\tcase Comment:\n\t\t\t\t\tprocessCommentNode(n1, n2, container, anchor);\n\t\t\t\t\tbreak;\n\t\t\t\tcase Static:\n\t\t\t\t\tif (n1 == null) mountStaticNode(n2, container, anchor, namespace);\n\t\t\t\t\tbreak;\n\t\t\t\tcase Fragment:\n\t\t\t\t\tprocessFragment(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: if (shapeFlag & 1) processElement(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\t\telse if (shapeFlag & 6) processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\t\telse if (shapeFlag & 64) type.process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals);\n\t\t\t\telse if (shapeFlag & 128) type.process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals);\n\t\t\t}\n\t\t\tif (ref != null && parentComponent) setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2);\n\t\t\telse if (ref == null && n1 && n1.ref != null) setRef(n1.ref, null, parentSuspense, n1, true);\n\t\t};\n\t\tconst processText = (n1, n2, container, anchor) => {\n\t\t\tif (n1 == null) hostInsert(n2.el = hostCreateText(n2.children), container, anchor);\n\t\t\telse {\n\t\t\t\tconst el = n2.el = n1.el;\n\t\t\t\tif (n2.children !== n1.children) hostSetText(el, n2.children);\n\t\t\t}\n\t\t};\n\t\tconst processCommentNode = (n1, n2, container, anchor) => {\n\t\t\tif (n1 == null) hostInsert(n2.el = hostCreateComment(n2.children || \"\"), container, anchor);\n\t\t\telse n2.el = n1.el;\n\t\t};\n\t\tconst mountStaticNode = (n2, container, anchor, namespace) => {\n\t\t\t[n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container, anchor, namespace, n2.el, n2.anchor);\n\t\t};\n\t\tconst moveStaticNode = ({ el, anchor }, container, nextSibling) => {\n\t\t\tlet next;\n\t\t\twhile (el && el !== anchor) {\n\t\t\t\tnext = hostNextSibling(el);\n\t\t\t\thostInsert(el, container, nextSibling);\n\t\t\t\tel = next;\n\t\t\t}\n\t\t\thostInsert(anchor, container, nextSibling);\n\t\t};\n\t\tconst removeStaticNode = ({ el, anchor }) => {\n\t\t\tlet next;\n\t\t\twhile (el && el !== anchor) {\n\t\t\t\tnext = hostNextSibling(el);\n\t\t\t\thostRemove(el);\n\t\t\t\tel = next;\n\t\t\t}\n\t\t\thostRemove(anchor);\n\t\t};\n\t\tconst processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n\t\t\tif (n2.type === \"svg\") namespace = \"svg\";\n\t\t\telse if (n2.type === \"math\") namespace = \"mathml\";\n\t\t\tif (n1 == null) mountElement(n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\telse {\n\t\t\t\tconst customElement = n1.el && n1.el._isVueCE ? n1.el : null;\n\t\t\t\ttry {\n\t\t\t\t\tif (customElement) customElement._beginPatch();\n\t\t\t\t\tpatchElement(n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\t\t} finally {\n\t\t\t\t\tif (customElement) customElement._endPatch();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tconst mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n\t\t\tlet el;\n\t\t\tlet vnodeHook;\n\t\t\tconst { props, shapeFlag, transition, dirs } = vnode;\n\t\t\tel = vnode.el = hostCreateElement(vnode.type, namespace, props && props.is, props);\n\t\t\tif (shapeFlag & 8) hostSetElementText(el, vnode.children);\n\t\t\telse if (shapeFlag & 16) mountChildren(vnode.children, el, null, parentComponent, parentSuspense, resolveChildrenNamespace(vnode, namespace), slotScopeIds, optimized);\n\t\t\tif (dirs) invokeDirectiveHook(vnode, null, parentComponent, \"created\");\n\t\t\tsetScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);\n\t\t\tif (props) {\n\t\t\t\tfor (const key in props) if (key !== \"value\" && !isReservedProp(key)) hostPatchProp(el, key, null, props[key], namespace, parentComponent);\n\t\t\t\tif (\"value\" in props) hostPatchProp(el, \"value\", null, props.value, namespace);\n\t\t\t\tif (vnodeHook = props.onVnodeBeforeMount) invokeVNodeHook(vnodeHook, parentComponent, vnode);\n\t\t\t}\n\t\t\tif (dirs) invokeDirectiveHook(vnode, null, parentComponent, \"beforeMount\");\n\t\t\tconst needCallTransitionHooks = needTransition(parentSuspense, transition);\n\t\t\tif (needCallTransitionHooks) transition.beforeEnter(el);\n\t\t\thostInsert(el, container, anchor);\n\t\t\tif ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) queuePostRenderEffect(() => {\n\t\t\t\ttry {\n\t\t\t\t\tvnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);\n\t\t\t\t\tneedCallTransitionHooks && transition.enter(el);\n\t\t\t\t\tdirs && invokeDirectiveHook(vnode, null, parentComponent, \"mounted\");\n\t\t\t\t} finally {}\n\t\t\t}, parentSuspense);\n\t\t};\n\t\tconst setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => {\n\t\t\tif (scopeId) hostSetScopeId(el, scopeId);\n\t\t\tif (slotScopeIds) for (let i = 0; i < slotScopeIds.length; i++) hostSetScopeId(el, slotScopeIds[i]);\n\t\t\tif (parentComponent) {\n\t\t\t\tlet subTree = parentComponent.subTree;\n\t\t\t\tif (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) {\n\t\t\t\t\tconst parentVNode = parentComponent.vnode;\n\t\t\t\t\tsetScopeId(el, parentVNode, parentVNode.scopeId, parentVNode.slotScopeIds, parentComponent.parent);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tconst mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {\n\t\t\tfor (let i = start; i < children.length; i++) {\n\t\t\t\tconst child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);\n\t\t\t\tpatch(null, child, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\t}\n\t\t};\n\t\tconst patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n\t\t\tconst el = n2.el = n1.el;\n\t\t\tlet { patchFlag, dynamicChildren, dirs } = n2;\n\t\t\tpatchFlag |= n1.patchFlag & 16;\n\t\t\tconst oldProps = n1.props || EMPTY_OBJ;\n\t\t\tconst newProps = n2.props || EMPTY_OBJ;\n\t\t\tlet vnodeHook;\n\t\t\tparentComponent && toggleRecurse(parentComponent, false);\n\t\t\tif (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);\n\t\t\tif (dirs) invokeDirectiveHook(n2, n1, parentComponent, \"beforeUpdate\");\n\t\t\tparentComponent && toggleRecurse(parentComponent, true);\n\t\t\tif (dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)) {\n\t\t\t\tpatchFlag = 0;\n\t\t\t\toptimized = false;\n\t\t\t\tdynamicChildren = null;\n\t\t\t}\n\t\t\tif (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) hostSetElementText(el, \"\");\n\t\t\tif (dynamicChildren) patchBlockChildren(n1.dynamicChildren, dynamicChildren, el, parentComponent, parentSuspense, resolveChildrenNamespace(n2, namespace), slotScopeIds);\n\t\t\telse if (!optimized) patchChildren(n1, n2, el, null, parentComponent, parentSuspense, resolveChildrenNamespace(n2, namespace), slotScopeIds, false);\n\t\t\tif (patchFlag > 0) {\n\t\t\t\tif (patchFlag & 16) patchProps(el, oldProps, newProps, parentComponent, namespace);\n\t\t\t\telse {\n\t\t\t\t\tif (patchFlag & 2) {\n\t\t\t\t\t\tif (oldProps.class !== newProps.class) hostPatchProp(el, \"class\", null, newProps.class, namespace);\n\t\t\t\t\t}\n\t\t\t\t\tif (patchFlag & 4) hostPatchProp(el, \"style\", oldProps.style, newProps.style, namespace);\n\t\t\t\t\tif (patchFlag & 8) {\n\t\t\t\t\t\tconst propsToUpdate = n2.dynamicProps;\n\t\t\t\t\t\tfor (let i = 0; i < propsToUpdate.length; i++) {\n\t\t\t\t\t\t\tconst key = propsToUpdate[i];\n\t\t\t\t\t\t\tconst prev = oldProps[key];\n\t\t\t\t\t\t\tconst next = newProps[key];\n\t\t\t\t\t\t\tif (next !== prev || key === \"value\") hostPatchProp(el, key, prev, next, namespace, parentComponent);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (patchFlag & 1) {\n\t\t\t\t\tif (n1.children !== n2.children) hostSetElementText(el, n2.children);\n\t\t\t\t}\n\t\t\t} else if (!optimized && dynamicChildren == null) patchProps(el, oldProps, newProps, parentComponent, namespace);\n\t\t\tif ((vnodeHook = newProps.onVnodeUpdated) || dirs) queuePostRenderEffect(() => {\n\t\t\t\tvnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);\n\t\t\t\tdirs && invokeDirectiveHook(n2, n1, parentComponent, \"updated\");\n\t\t\t}, parentSuspense);\n\t\t};\n\t\tconst patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => {\n\t\t\tfor (let i = 0; i < newChildren.length; i++) {\n\t\t\t\tconst oldVNode = oldChildren[i];\n\t\t\t\tconst newVNode = newChildren[i];\n\t\t\t\tconst container = oldVNode.el && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldVNode.el) : fallbackContainer;\n\t\t\t\tpatch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);\n\t\t\t}\n\t\t};\n\t\tconst patchProps = (el, oldProps, newProps, parentComponent, namespace) => {\n\t\t\tif (oldProps !== newProps) {\n\t\t\t\tif (oldProps !== EMPTY_OBJ) {\n\t\t\t\t\tfor (const key in oldProps) if (!isReservedProp(key) && !(key in newProps)) hostPatchProp(el, key, oldProps[key], null, namespace, parentComponent);\n\t\t\t\t}\n\t\t\t\tfor (const key in newProps) {\n\t\t\t\t\tif (isReservedProp(key)) continue;\n\t\t\t\t\tconst next = newProps[key];\n\t\t\t\t\tconst prev = oldProps[key];\n\t\t\t\t\tif (next !== prev && key !== \"value\") hostPatchProp(el, key, prev, next, namespace, parentComponent);\n\t\t\t\t}\n\t\t\t\tif (\"value\" in newProps) hostPatchProp(el, \"value\", oldProps.value, newProps.value, namespace);\n\t\t\t}\n\t\t};\n\t\tconst processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n\t\t\tconst fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(\"\");\n\t\t\tconst fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(\"\");\n\t\t\tlet { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2;\n\t\t\tif (fragmentSlotScopeIds) slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;\n\t\t\tif (n1 == null) {\n\t\t\t\thostInsert(fragmentStartAnchor, container, anchor);\n\t\t\t\thostInsert(fragmentEndAnchor, container, anchor);\n\t\t\t\tmountChildren(n2.children || [], container, fragmentEndAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\t} else if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && n1.dynamicChildren && n1.dynamicChildren.length === dynamicChildren.length) {\n\t\t\t\tpatchBlockChildren(n1.dynamicChildren, dynamicChildren, container, parentComponent, parentSuspense, namespace, slotScopeIds);\n\t\t\t\tif (n2.key != null || parentComponent && n2 === parentComponent.subTree) traverseStaticChildren(n1, n2, true);\n\t\t\t} else patchChildren(n1, n2, container, fragmentEndAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t};\n\t\tconst processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n\t\t\tn2.slotScopeIds = slotScopeIds;\n\t\t\tif (n1 == null) if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);\n\t\t\telse mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);\n\t\t\telse updateComponent(n1, n2, optimized);\n\t\t};\n\t\tconst mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {\n\t\t\tconst instance = initialVNode.component = createComponentInstance(initialVNode, parentComponent, parentSuspense);\n\t\t\tif (isKeepAlive(initialVNode)) instance.ctx.renderer = internals;\n\t\t\tsetupComponent(instance, false, optimized);\n\t\t\tif (instance.asyncDep) {\n\t\t\t\tparentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);\n\t\t\t\tif (!initialVNode.el) {\n\t\t\t\t\tconst placeholder = instance.subTree = createVNode(Comment);\n\t\t\t\t\tprocessCommentNode(null, placeholder, container, anchor);\n\t\t\t\t\tinitialVNode.placeholder = placeholder.el;\n\t\t\t\t}\n\t\t\t} else setupRenderEffect(instance, initialVNode, container, anchor, parentSuspense, namespace, optimized);\n\t\t};\n\t\tconst updateComponent = (n1, n2, optimized) => {\n\t\t\tconst instance = n2.component = n1.component;\n\t\t\tif (shouldUpdateComponent(n1, n2, optimized)) if (instance.asyncDep && !instance.asyncResolved) {\n\t\t\t\tupdateComponentPreRender(instance, n2, optimized);\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tinstance.next = n2;\n\t\t\t\tinstance.update();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tn2.el = n1.el;\n\t\t\t\tinstance.vnode = n2;\n\t\t\t}\n\t\t};\n\t\tconst setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => {\n\t\t\tconst componentUpdateFn = () => {\n\t\t\t\tif (!instance.isMounted) {\n\t\t\t\t\tlet vnodeHook;\n\t\t\t\t\tconst { el, props } = initialVNode;\n\t\t\t\t\tconst { bm, m, parent, root, type } = instance;\n\t\t\t\t\tconst isAsyncWrapperVNode = isAsyncWrapper(initialVNode);\n\t\t\t\t\ttoggleRecurse(instance, false);\n\t\t\t\t\tif (bm) invokeArrayFns(bm);\n\t\t\t\t\tif (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) invokeVNodeHook(vnodeHook, parent, initialVNode);\n\t\t\t\t\ttoggleRecurse(instance, true);\n\t\t\t\t\tif (el && hydrateNode) {\n\t\t\t\t\t\tconst hydrateSubTree = () => {\n\t\t\t\t\t\t\tinstance.subTree = renderComponentRoot(instance);\n\t\t\t\t\t\t\thydrateNode(el, instance.subTree, instance, parentSuspense, null);\n\t\t\t\t\t\t};\n\t\t\t\t\t\tif (isAsyncWrapperVNode && type.__asyncHydrate) type.__asyncHydrate(el, instance, hydrateSubTree);\n\t\t\t\t\t\telse hydrateSubTree();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (root.ce && root.ce._hasShadowRoot()) root.ce._injectChildStyle(type, instance.parent ? instance.parent.type : void 0);\n\t\t\t\t\t\tconst subTree = instance.subTree = renderComponentRoot(instance);\n\t\t\t\t\t\tpatch(null, subTree, container, anchor, instance, parentSuspense, namespace);\n\t\t\t\t\t\tinitialVNode.el = subTree.el;\n\t\t\t\t\t}\n\t\t\t\t\tif (m) queuePostRenderEffect(m, parentSuspense);\n\t\t\t\t\tif (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) {\n\t\t\t\t\t\tconst scopedInitialVNode = initialVNode;\n\t\t\t\t\t\tqueuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), parentSuspense);\n\t\t\t\t\t}\n\t\t\t\t\tif (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) instance.a && queuePostRenderEffect(instance.a, parentSuspense);\n\t\t\t\t\tinstance.isMounted = true;\n\t\t\t\t\tinitialVNode = container = anchor = null;\n\t\t\t\t} else {\n\t\t\t\t\tlet { next, bu, u, parent, vnode } = instance;\n\t\t\t\t\t{\n\t\t\t\t\t\tconst nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance);\n\t\t\t\t\t\tif (nonHydratedAsyncRoot) {\n\t\t\t\t\t\t\tif (next) {\n\t\t\t\t\t\t\t\tnext.el = vnode.el;\n\t\t\t\t\t\t\t\tupdateComponentPreRender(instance, next, optimized);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tnonHydratedAsyncRoot.asyncDep.then(() => {\n\t\t\t\t\t\t\t\tqueuePostRenderEffect(() => {\n\t\t\t\t\t\t\t\t\tif (!instance.isUnmounted) update();\n\t\t\t\t\t\t\t\t}, parentSuspense);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlet originNext = next;\n\t\t\t\t\tlet vnodeHook;\n\t\t\t\t\ttoggleRecurse(instance, false);\n\t\t\t\t\tif (next) {\n\t\t\t\t\t\tnext.el = vnode.el;\n\t\t\t\t\t\tupdateComponentPreRender(instance, next, optimized);\n\t\t\t\t\t} else next = vnode;\n\t\t\t\t\tif (bu) invokeArrayFns(bu);\n\t\t\t\t\tif (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parent, next, vnode);\n\t\t\t\t\ttoggleRecurse(instance, true);\n\t\t\t\t\tconst nextTree = renderComponentRoot(instance);\n\t\t\t\t\tconst prevTree = instance.subTree;\n\t\t\t\t\tinstance.subTree = nextTree;\n\t\t\t\t\tpatch(prevTree, nextTree, hostParentNode(prevTree.el), getNextHostNode(prevTree), instance, parentSuspense, namespace);\n\t\t\t\t\tnext.el = nextTree.el;\n\t\t\t\t\tif (originNext === null) updateHOCHostEl(instance, nextTree.el);\n\t\t\t\t\tif (u) queuePostRenderEffect(u, parentSuspense);\n\t\t\t\t\tif (vnodeHook = next.props && next.props.onVnodeUpdated) queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), parentSuspense);\n\t\t\t\t}\n\t\t\t};\n\t\t\tinstance.scope.on();\n\t\t\tconst effect = instance.effect = new ReactiveEffect(componentUpdateFn);\n\t\t\tinstance.scope.off();\n\t\t\tconst update = instance.update = effect.run.bind(effect);\n\t\t\tconst job = instance.job = effect.runIfDirty.bind(effect);\n\t\t\tjob.i = instance;\n\t\t\tjob.id = instance.uid;\n\t\t\teffect.scheduler = () => queueJob(job);\n\t\t\ttoggleRecurse(instance, true);\n\t\t\tupdate();\n\t\t};\n\t\tconst updateComponentPreRender = (instance, nextVNode, optimized) => {\n\t\t\tnextVNode.component = instance;\n\t\t\tconst prevProps = instance.vnode.props;\n\t\t\tinstance.vnode = nextVNode;\n\t\t\tinstance.next = null;\n\t\t\tupdateProps(instance, nextVNode.props, prevProps, optimized);\n\t\t\tupdateSlots(instance, nextVNode.children, optimized);\n\t\t\tpauseTracking();\n\t\t\tflushPreFlushCbs(instance);\n\t\t\tresetTracking();\n\t\t};\n\t\tconst patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => {\n\t\t\tconst c1 = n1 && n1.children;\n\t\t\tconst prevShapeFlag = n1 ? n1.shapeFlag : 0;\n\t\t\tconst c2 = n2.children;\n\t\t\tconst { patchFlag, shapeFlag } = n2;\n\t\t\tif (patchFlag > 0) {\n\t\t\t\tif (patchFlag & 128) {\n\t\t\t\t\tpatchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\t\t\treturn;\n\t\t\t\t} else if (patchFlag & 256) {\n\t\t\t\t\tpatchUnkeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (shapeFlag & 8) {\n\t\t\t\tif (prevShapeFlag & 16) unmountChildren(c1, parentComponent, parentSuspense);\n\t\t\t\tif (c2 !== c1) hostSetElementText(container, c2);\n\t\t\t} else if (prevShapeFlag & 16) if (shapeFlag & 16) patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\telse unmountChildren(c1, parentComponent, parentSuspense, true);\n\t\t\telse {\n\t\t\t\tif (prevShapeFlag & 8) hostSetElementText(container, \"\");\n\t\t\t\tif (shapeFlag & 16) mountChildren(c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\t}\n\t\t};\n\t\tconst patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n\t\t\tc1 = c1 || EMPTY_ARR;\n\t\t\tc2 = c2 || EMPTY_ARR;\n\t\t\tconst oldLength = c1.length;\n\t\t\tconst newLength = c2.length;\n\t\t\tconst commonLength = Math.min(oldLength, newLength);\n\t\t\tlet i;\n\t\t\tfor (i = 0; i < commonLength; i++) {\n\t\t\t\tconst nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);\n\t\t\t\tpatch(c1[i], nextChild, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\t}\n\t\t\tif (oldLength > newLength) unmountChildren(c1, parentComponent, parentSuspense, true, false, commonLength);\n\t\t\telse mountChildren(c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, commonLength);\n\t\t};\n\t\tconst patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n\t\t\tlet i = 0;\n\t\t\tconst l2 = c2.length;\n\t\t\tlet e1 = c1.length - 1;\n\t\t\tlet e2 = l2 - 1;\n\t\t\twhile (i <= e1 && i <= e2) {\n\t\t\t\tconst n1 = c1[i];\n\t\t\t\tconst n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);\n\t\t\t\tif (isSameVNodeType(n1, n2)) patch(n1, n2, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\t\telse break;\n\t\t\t\ti++;\n\t\t\t}\n\t\t\twhile (i <= e1 && i <= e2) {\n\t\t\t\tconst n1 = c1[e1];\n\t\t\t\tconst n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]);\n\t\t\t\tif (isSameVNodeType(n1, n2)) patch(n1, n2, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\t\telse break;\n\t\t\t\te1--;\n\t\t\t\te2--;\n\t\t\t}\n\t\t\tif (i > e1) {\n\t\t\t\tif (i <= e2) {\n\t\t\t\t\tconst nextPos = e2 + 1;\n\t\t\t\t\tconst anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor;\n\t\t\t\t\twhile (i <= e2) {\n\t\t\t\t\t\tpatch(null, c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]), container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (i > e2) while (i <= e1) {\n\t\t\t\tunmount(c1[i], parentComponent, parentSuspense, true);\n\t\t\t\ti++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tconst s1 = i;\n\t\t\t\tconst s2 = i;\n\t\t\t\tconst keyToNewIndexMap = /* @__PURE__ */ new Map();\n\t\t\t\tfor (i = s2; i <= e2; i++) {\n\t\t\t\t\tconst nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);\n\t\t\t\t\tif (nextChild.key != null) keyToNewIndexMap.set(nextChild.key, i);\n\t\t\t\t}\n\t\t\t\tlet j;\n\t\t\t\tlet patched = 0;\n\t\t\t\tconst toBePatched = e2 - s2 + 1;\n\t\t\t\tlet moved = false;\n\t\t\t\tlet maxNewIndexSoFar = 0;\n\t\t\t\tconst newIndexToOldIndexMap = new Array(toBePatched);\n\t\t\t\tfor (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0;\n\t\t\t\tfor (i = s1; i <= e1; i++) {\n\t\t\t\t\tconst prevChild = c1[i];\n\t\t\t\t\tif (patched >= toBePatched) {\n\t\t\t\t\t\tunmount(prevChild, parentComponent, parentSuspense, true);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tlet newIndex;\n\t\t\t\t\tif (prevChild.key != null) newIndex = keyToNewIndexMap.get(prevChild.key);\n\t\t\t\t\telse for (j = s2; j <= e2; j++) if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) {\n\t\t\t\t\t\tnewIndex = j;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (newIndex === void 0) unmount(prevChild, parentComponent, parentSuspense, true);\n\t\t\t\t\telse {\n\t\t\t\t\t\tnewIndexToOldIndexMap[newIndex - s2] = i + 1;\n\t\t\t\t\t\tif (newIndex >= maxNewIndexSoFar) maxNewIndexSoFar = newIndex;\n\t\t\t\t\t\telse moved = true;\n\t\t\t\t\t\tpatch(prevChild, c2[newIndex], container, null, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\t\t\t\tpatched++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR;\n\t\t\t\tj = increasingNewIndexSequence.length - 1;\n\t\t\t\tfor (i = toBePatched - 1; i >= 0; i--) {\n\t\t\t\t\tconst nextIndex = s2 + i;\n\t\t\t\t\tconst nextChild = c2[nextIndex];\n\t\t\t\t\tconst anchorVNode = c2[nextIndex + 1];\n\t\t\t\t\tconst anchor = nextIndex + 1 < l2 ? anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode) : parentAnchor;\n\t\t\t\t\tif (newIndexToOldIndexMap[i] === 0) patch(null, nextChild, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\t\t\telse if (moved) if (j < 0 || i !== increasingNewIndexSequence[j]) move(nextChild, container, anchor, 2);\n\t\t\t\t\telse j--;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tconst move = (vnode, container, anchor, moveType, parentSuspense = null) => {\n\t\t\tconst { el, type, transition, children, shapeFlag } = vnode;\n\t\t\tif (shapeFlag & 6) {\n\t\t\t\tmove(vnode.component.subTree, container, anchor, moveType);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (shapeFlag & 128) {\n\t\t\t\tvnode.suspense.move(container, anchor, moveType);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (shapeFlag & 64) {\n\t\t\t\ttype.move(vnode, container, anchor, internals);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (type === Fragment) {\n\t\t\t\thostInsert(el, container, anchor);\n\t\t\t\tfor (let i = 0; i < children.length; i++) move(children[i], container, anchor, moveType);\n\t\t\t\thostInsert(vnode.anchor, container, anchor);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (type === Static) {\n\t\t\t\tmoveStaticNode(vnode, container, anchor);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (moveType !== 2 && shapeFlag & 1 && transition) if (moveType === 0) if (transition.persisted && !el[leaveCbKey]) hostInsert(el, container, anchor);\n\t\t\telse {\n\t\t\t\ttransition.beforeEnter(el);\n\t\t\t\thostInsert(el, container, anchor);\n\t\t\t\tqueuePostRenderEffect(() => transition.enter(el), parentSuspense);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tconst { leave, delayLeave, afterLeave } = transition;\n\t\t\t\tconst remove2 = () => {\n\t\t\t\t\tif (vnode.ctx.isUnmounted) hostRemove(el);\n\t\t\t\t\telse hostInsert(el, container, anchor);\n\t\t\t\t};\n\t\t\t\tconst performLeave = () => {\n\t\t\t\t\tconst wasLeaving = el._isLeaving || !!el[leaveCbKey];\n\t\t\t\t\tif (el._isLeaving) el[leaveCbKey](true);\n\t\t\t\t\tif (transition.persisted && !wasLeaving) remove2();\n\t\t\t\t\telse leave(el, () => {\n\t\t\t\t\t\tremove2();\n\t\t\t\t\t\tafterLeave && afterLeave();\n\t\t\t\t\t});\n\t\t\t\t};\n\t\t\t\tif (delayLeave) delayLeave(el, remove2, performLeave);\n\t\t\t\telse performLeave();\n\t\t\t}\n\t\t\telse hostInsert(el, container, anchor);\n\t\t};\n\t\tconst unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {\n\t\t\tconst { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs, cacheIndex, memo } = vnode;\n\t\t\tif (patchFlag === -2) optimized = false;\n\t\t\tif (ref != null) {\n\t\t\t\tpauseTracking();\n\t\t\t\tsetRef(ref, null, parentSuspense, vnode, true);\n\t\t\t\tresetTracking();\n\t\t\t}\n\t\t\tif (cacheIndex != null) parentComponent.renderCache[cacheIndex] = void 0;\n\t\t\tif (shapeFlag & 256) {\n\t\t\t\tparentComponent.ctx.deactivate(vnode);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst shouldInvokeDirs = shapeFlag & 1 && dirs;\n\t\t\tconst shouldInvokeVnodeHook = !isAsyncWrapper(vnode);\n\t\t\tlet vnodeHook;\n\t\t\tif (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) invokeVNodeHook(vnodeHook, parentComponent, vnode);\n\t\t\tif (shapeFlag & 6) unmountComponent(vnode.component, parentSuspense, doRemove);\n\t\t\telse {\n\t\t\t\tif (shapeFlag & 128) {\n\t\t\t\t\tvnode.suspense.unmount(parentSuspense, doRemove);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (shouldInvokeDirs) invokeDirectiveHook(vnode, null, parentComponent, \"beforeUnmount\");\n\t\t\t\tif (shapeFlag & 64) vnode.type.remove(vnode, parentComponent, parentSuspense, internals, doRemove);\n\t\t\t\telse if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);\n\t\t\t\telse if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);\n\t\t\t\tif (doRemove) remove(vnode);\n\t\t\t}\n\t\t\tconst shouldInvalidateMemo = memo != null && cacheIndex == null;\n\t\t\tif (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs || shouldInvalidateMemo) queuePostRenderEffect(() => {\n\t\t\t\tvnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);\n\t\t\t\tshouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, \"unmounted\");\n\t\t\t\tif (shouldInvalidateMemo) vnode.el = null;\n\t\t\t}, parentSuspense);\n\t\t};\n\t\tconst remove = (vnode) => {\n\t\t\tconst { type, el, anchor, transition } = vnode;\n\t\t\tif (type === Fragment) {\n\t\t\t\tremoveFragment(el, anchor);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (type === Static) {\n\t\t\t\tremoveStaticNode(vnode);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst performRemove = () => {\n\t\t\t\thostRemove(el);\n\t\t\t\tif (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();\n\t\t\t};\n\t\t\tif (vnode.shapeFlag & 1 && transition && !transition.persisted) {\n\t\t\t\tconst { leave, delayLeave } = transition;\n\t\t\t\tconst performLeave = () => leave(el, performRemove);\n\t\t\t\tif (delayLeave) delayLeave(vnode.el, performRemove, performLeave);\n\t\t\t\telse performLeave();\n\t\t\t} else performRemove();\n\t\t};\n\t\tconst removeFragment = (cur, end) => {\n\t\t\tlet next;\n\t\t\twhile (cur !== end) {\n\t\t\t\tnext = hostNextSibling(cur);\n\t\t\t\thostRemove(cur);\n\t\t\t\tcur = next;\n\t\t\t}\n\t\t\thostRemove(end);\n\t\t};\n\t\tconst unmountComponent = (instance, parentSuspense, doRemove) => {\n\t\t\tconst { bum, scope, job, subTree, um, m, a } = instance;\n\t\t\tinvalidateMount(m);\n\t\t\tinvalidateMount(a);\n\t\t\tif (bum) invokeArrayFns(bum);\n\t\t\tscope.stop();\n\t\t\tif (job) {\n\t\t\t\tjob.flags |= 8;\n\t\t\t\tunmount(subTree, instance, parentSuspense, doRemove);\n\t\t\t}\n\t\t\tif (um) queuePostRenderEffect(um, parentSuspense);\n\t\t\tqueuePostRenderEffect(() => {\n\t\t\t\tinstance.isUnmounted = true;\n\t\t\t}, parentSuspense);\n\t\t};\n\t\tconst unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {\n\t\t\tfor (let i = start; i < children.length; i++) unmount(children[i], parentComponent, parentSuspense, doRemove, optimized);\n\t\t};\n\t\tconst getNextHostNode = (vnode) => {\n\t\t\tif (vnode.shapeFlag & 6) return getNextHostNode(vnode.component.subTree);\n\t\t\tif (vnode.shapeFlag & 128) return vnode.suspense.next();\n\t\t\tconst el = hostNextSibling(vnode.anchor || vnode.el);\n\t\t\tconst teleportEnd = el && el[TeleportEndKey];\n\t\t\treturn teleportEnd ? hostNextSibling(teleportEnd) : el;\n\t\t};\n\t\tlet isFlushing = false;\n\t\tconst render = (vnode, container, namespace) => {\n\t\t\tlet instance;\n\t\t\tif (vnode == null) {\n\t\t\t\tif (container._vnode) {\n\t\t\t\t\tunmount(container._vnode, null, null, true);\n\t\t\t\t\tinstance = container._vnode.component;\n\t\t\t\t}\n\t\t\t} else patch(container._vnode || null, vnode, container, null, null, null, namespace);\n\t\t\tcontainer._vnode = vnode;\n\t\t\tif (!isFlushing) {\n\t\t\t\tisFlushing = true;\n\t\t\t\tflushPreFlushCbs(instance);\n\t\t\t\tflushPostFlushCbs();\n\t\t\t\tisFlushing = false;\n\t\t\t}\n\t\t};\n\t\tconst internals = {\n\t\t\tp: patch,\n\t\t\tum: unmount,\n\t\t\tm: move,\n\t\t\tr: remove,\n\t\t\tmt: mountComponent,\n\t\t\tmc: mountChildren,\n\t\t\tpc: patchChildren,\n\t\t\tpbc: patchBlockChildren,\n\t\t\tn: getNextHostNode,\n\t\t\to: options\n\t\t};\n\t\tlet hydrate;\n\t\tlet hydrateNode;\n\t\tif (createHydrationFns) [hydrate, hydrateNode] = createHydrationFns(internals);\n\t\treturn {\n\t\t\trender,\n\t\t\thydrate,\n\t\t\tcreateApp: createAppAPI(render, hydrate)\n\t\t};\n\t}\n\tfunction resolveChildrenNamespace({ type, props }, currentNamespace) {\n\t\treturn currentNamespace === \"svg\" && type === \"foreignObject\" || currentNamespace === \"mathml\" && type === \"annotation-xml\" && props && props.encoding && props.encoding.includes(\"html\") ? void 0 : currentNamespace;\n\t}\n\tfunction toggleRecurse({ effect, job }, allowed) {\n\t\tif (allowed) {\n\t\t\teffect.flags |= 32;\n\t\t\tjob.flags |= 4;\n\t\t} else {\n\t\t\teffect.flags &= -33;\n\t\t\tjob.flags &= -5;\n\t\t}\n\t}\n\tfunction needTransition(parentSuspense, transition) {\n\t\treturn (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;\n\t}\n\tfunction traverseStaticChildren(n1, n2, shallow = false) {\n\t\tconst ch1 = n1.children;\n\t\tconst ch2 = n2.children;\n\t\tif (isArray(ch1) && isArray(ch2)) for (let i = 0; i < ch1.length; i++) {\n\t\t\tconst c1 = ch1[i];\n\t\t\tlet c2 = ch2[i];\n\t\t\tif (c2.shapeFlag & 1 && !c2.dynamicChildren) {\n\t\t\t\tif (c2.patchFlag <= 0 || c2.patchFlag === 32) {\n\t\t\t\t\tc2 = ch2[i] = cloneIfMounted(ch2[i]);\n\t\t\t\t\tc2.el = c1.el;\n\t\t\t\t}\n\t\t\t\tif (!shallow && c2.patchFlag !== -2) traverseStaticChildren(c1, c2);\n\t\t\t}\n\t\t\tif (c2.type === Text) {\n\t\t\t\tif (c2.patchFlag === -1) c2 = ch2[i] = cloneIfMounted(c2);\n\t\t\t\tc2.el = c1.el;\n\t\t\t}\n\t\t\tif (c2.type === Comment && !c2.el) c2.el = c1.el;\n\t\t}\n\t}\n\tfunction getSequence(arr) {\n\t\tconst p = arr.slice();\n\t\tconst result = [0];\n\t\tlet i, j, u, v, c;\n\t\tconst len = arr.length;\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tconst arrI = arr[i];\n\t\t\tif (arrI !== 0) {\n\t\t\t\tj = result[result.length - 1];\n\t\t\t\tif (arr[j] < arrI) {\n\t\t\t\t\tp[i] = j;\n\t\t\t\t\tresult.push(i);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tu = 0;\n\t\t\t\tv = result.length - 1;\n\t\t\t\twhile (u < v) {\n\t\t\t\t\tc = u + v >> 1;\n\t\t\t\t\tif (arr[result[c]] < arrI) u = c + 1;\n\t\t\t\t\telse v = c;\n\t\t\t\t}\n\t\t\t\tif (arrI < arr[result[u]]) {\n\t\t\t\t\tif (u > 0) p[i] = result[u - 1];\n\t\t\t\t\tresult[u] = i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tu = result.length;\n\t\tv = result[u - 1];\n\t\twhile (u-- > 0) {\n\t\t\tresult[u] = v;\n\t\t\tv = p[v];\n\t\t}\n\t\treturn result;\n\t}\n\tfunction locateNonHydratedAsyncRoot(instance) {\n\t\tconst subComponent = instance.subTree.component;\n\t\tif (subComponent) if (subComponent.asyncDep && !subComponent.asyncResolved) return subComponent;\n\t\telse return locateNonHydratedAsyncRoot(subComponent);\n\t}\n\tfunction invalidateMount(hooks) {\n\t\tif (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 8;\n\t}\n\tfunction resolveAsyncComponentPlaceholder(anchorVnode) {\n\t\tif (anchorVnode.placeholder) return anchorVnode.placeholder;\n\t\tconst instance = anchorVnode.component;\n\t\tif (instance) return resolveAsyncComponentPlaceholder(instance.subTree);\n\t\treturn null;\n\t}\n\tfunction queueEffectWithSuspense(fn, suspense) {\n\t\tif (suspense && suspense.pendingBranch) if (isArray(fn)) suspense.effects.push(...fn);\n\t\telse suspense.effects.push(fn);\n\t\telse queuePostFlushCb(fn);\n\t}\n\tfunction openBlock(disableTracking = false) {\n\t\tblockStack.push(currentBlock = disableTracking ? null : []);\n\t}\n\tfunction closeBlock() {\n\t\tblockStack.pop();\n\t\tcurrentBlock = blockStack[blockStack.length - 1] || null;\n\t}\n\tfunction setBlockTracking(value, inVOnce = false) {\n\t\tisBlockTreeEnabled += value;\n\t\tif (value < 0 && currentBlock && inVOnce) currentBlock.hasOnce = true;\n\t}\n\tfunction setupBlock(vnode) {\n\t\tvnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null;\n\t\tcloseBlock();\n\t\tif (isBlockTreeEnabled > 0 && currentBlock) currentBlock.push(vnode);\n\t\treturn vnode;\n\t}\n\tfunction createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) {\n\t\treturn setupBlock(createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, true));\n\t}\n\tfunction createBlock(type, props, children, patchFlag, dynamicProps) {\n\t\treturn setupBlock(createVNode(type, props, children, patchFlag, dynamicProps, true));\n\t}\n\tfunction isVNode(value) {\n\t\treturn value ? value.__v_isVNode === true : false;\n\t}\n\tfunction isSameVNodeType(n1, n2) {\n\t\treturn n1.type === n2.type && n1.key === n2.key;\n\t}\n\tfunction createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) {\n\t\tconst vnode = {\n\t\t\t__v_isVNode: true,\n\t\t\t__v_skip: true,\n\t\t\ttype,\n\t\t\tprops,\n\t\t\tkey: props && normalizeKey(props),\n\t\t\tref: props && normalizeRef(props),\n\t\t\tscopeId: currentScopeId,\n\t\t\tslotScopeIds: null,\n\t\t\tchildren,\n\t\t\tcomponent: null,\n\t\t\tsuspense: null,\n\t\t\tssContent: null,\n\t\t\tssFallback: null,\n\t\t\tdirs: null,\n\t\t\ttransition: null,\n\t\t\tel: null,\n\t\t\tanchor: null,\n\t\t\ttarget: null,\n\t\t\ttargetStart: null,\n\t\t\ttargetAnchor: null,\n\t\t\tstaticCount: 0,\n\t\t\tshapeFlag,\n\t\t\tpatchFlag,\n\t\t\tdynamicProps,\n\t\t\tdynamicChildren: null,\n\t\t\tappContext: null,\n\t\t\tctx: currentRenderingInstance\n\t\t};\n\t\tif (needFullChildrenNormalization) {\n\t\t\tnormalizeChildren(vnode, children);\n\t\t\tif (shapeFlag & 128) type.normalize(vnode);\n\t\t} else if (children) vnode.shapeFlag |= isString(children) ? 8 : 16;\n\t\tif (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock && (vnode.patchFlag > 0 || shapeFlag & 6) && vnode.patchFlag !== 32) currentBlock.push(vnode);\n\t\treturn vnode;\n\t}\n\tfunction _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {\n\t\tif (!type || type === NULL_DYNAMIC_COMPONENT) type = Comment;\n\t\tif (isVNode(type)) {\n\t\t\tconst cloned = cloneVNode(type, props, true);\n\t\t\tif (children) normalizeChildren(cloned, children);\n\t\t\tif (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) if (cloned.shapeFlag & 6) currentBlock[currentBlock.indexOf(type)] = cloned;\n\t\t\telse currentBlock.push(cloned);\n\t\t\tcloned.patchFlag = -2;\n\t\t\treturn cloned;\n\t\t}\n\t\tif (isClassComponent(type)) type = type.__vccOpts;\n\t\tif (props) {\n\t\t\tprops = guardReactiveProps(props);\n\t\t\tlet { class: klass, style } = props;\n\t\t\tif (klass && !isString(klass)) props.class = normalizeClass(klass);\n\t\t\tif (isObject(style)) {\n\t\t\t\tif (/* @__PURE__ */ isProxy(style) && !isArray(style)) style = extend({}, style);\n\t\t\t\tprops.style = normalizeStyle(style);\n\t\t\t}\n\t\t}\n\t\tconst shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0;\n\t\treturn createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, isBlockNode, true);\n\t}\n\tfunction guardReactiveProps(props) {\n\t\tif (!props) return null;\n\t\treturn /* @__PURE__ */ isProxy(props) || isInternalObject(props) ? extend({}, props) : props;\n\t}\n\tfunction cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {\n\t\tconst { props, ref, patchFlag, children, transition } = vnode;\n\t\tconst mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;\n\t\tconst cloned = {\n\t\t\t__v_isVNode: true,\n\t\t\t__v_skip: true,\n\t\t\ttype: vnode.type,\n\t\t\tprops: mergedProps,\n\t\t\tkey: mergedProps && normalizeKey(mergedProps),\n\t\t\tref: extraProps && extraProps.ref ? mergeRef && ref ? isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) : ref,\n\t\t\tscopeId: vnode.scopeId,\n\t\t\tslotScopeIds: vnode.slotScopeIds,\n\t\t\tchildren,\n\t\t\ttarget: vnode.target,\n\t\t\ttargetStart: vnode.targetStart,\n\t\t\ttargetAnchor: vnode.targetAnchor,\n\t\t\tstaticCount: vnode.staticCount,\n\t\t\tshapeFlag: vnode.shapeFlag,\n\t\t\tpatchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag,\n\t\t\tdynamicProps: vnode.dynamicProps,\n\t\t\tdynamicChildren: vnode.dynamicChildren,\n\t\t\tappContext: vnode.appContext,\n\t\t\tdirs: vnode.dirs,\n\t\t\ttransition,\n\t\t\tcomponent: vnode.component,\n\t\t\tsuspense: vnode.suspense,\n\t\t\tssContent: vnode.ssContent && cloneVNode(vnode.ssContent),\n\t\t\tssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),\n\t\t\tplaceholder: vnode.placeholder,\n\t\t\tel: vnode.el,\n\t\t\tanchor: vnode.anchor,\n\t\t\tctx: vnode.ctx,\n\t\t\tce: vnode.ce\n\t\t};\n\t\tif (transition && cloneTransition) setTransitionHooks(cloned, transition.clone(cloned));\n\t\treturn cloned;\n\t}\n\tfunction createTextVNode(text = \" \", flag = 0) {\n\t\treturn createVNode(Text, null, text, flag);\n\t}\n\tfunction createStaticVNode(content, numberOfNodes) {\n\t\tconst vnode = createVNode(Static, null, content);\n\t\tvnode.staticCount = numberOfNodes;\n\t\treturn vnode;\n\t}\n\tfunction createCommentVNode(text = \"\", asBlock = false) {\n\t\treturn asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text);\n\t}\n\tfunction normalizeVNode(child) {\n\t\tif (child == null || typeof child === \"boolean\") return createVNode(Comment);\n\t\telse if (isArray(child)) return createVNode(Fragment, null, child.slice());\n\t\telse if (isVNode(child)) return cloneIfMounted(child);\n\t\telse return createVNode(Text, null, String(child));\n\t}\n\tfunction cloneIfMounted(child) {\n\t\treturn child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child);\n\t}\n\tfunction normalizeChildren(vnode, children) {\n\t\tlet type = 0;\n\t\tconst { shapeFlag } = vnode;\n\t\tif (children == null) children = null;\n\t\telse if (isArray(children)) type = 16;\n\t\telse if (typeof children === \"object\") if (shapeFlag & 65) {\n\t\t\tconst slot = children.default;\n\t\t\tif (slot) {\n\t\t\t\tslot._c && (slot._d = false);\n\t\t\t\tnormalizeChildren(vnode, slot());\n\t\t\t\tslot._c && (slot._d = true);\n\t\t\t}\n\t\t\treturn;\n\t\t} else {\n\t\t\ttype = 32;\n\t\t\tconst slotFlag = children._;\n\t\t\tif (!slotFlag && !isInternalObject(children)) children._ctx = currentRenderingInstance;\n\t\t\telse if (slotFlag === 3 && currentRenderingInstance) if (currentRenderingInstance.slots._ === 1) children._ = 1;\n\t\t\telse {\n\t\t\t\tchildren._ = 2;\n\t\t\t\tvnode.patchFlag |= 1024;\n\t\t\t}\n\t\t}\n\t\telse if (isFunction(children)) {\n\t\t\tif (shapeFlag & 65) {\n\t\t\t\tnormalizeChildren(vnode, { default: children });\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tchildren = {\n\t\t\t\tdefault: children,\n\t\t\t\t_ctx: currentRenderingInstance\n\t\t\t};\n\t\t\ttype = 32;\n\t\t} else {\n\t\t\tchildren = String(children);\n\t\t\tif (shapeFlag & 64) {\n\t\t\t\ttype = 16;\n\t\t\t\tchildren = [createTextVNode(children)];\n\t\t\t} else type = 8;\n\t\t}\n\t\tvnode.children = children;\n\t\tvnode.shapeFlag |= type;\n\t}\n\tfunction mergeProps(...args) {\n\t\tconst ret = {};\n\t\tfor (let i = 0; i < args.length; i++) {\n\t\t\tconst toMerge = args[i];\n\t\t\tfor (const key in toMerge) if (key === \"class\") {\n\t\t\t\tif (ret.class !== toMerge.class) ret.class = normalizeClass([ret.class, toMerge.class]);\n\t\t\t} else if (key === \"style\") ret.style = normalizeStyle([ret.style, toMerge.style]);\n\t\t\telse if (isOn(key)) {\n\t\t\t\tconst existing = ret[key];\n\t\t\t\tconst incoming = toMerge[key];\n\t\t\t\tif (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) ret[key] = existing ? [].concat(existing, incoming) : incoming;\n\t\t\t\telse if (incoming == null && existing == null && !isModelListener(key)) ret[key] = incoming;\n\t\t\t} else if (key !== \"\") ret[key] = toMerge[key];\n\t\t}\n\t\treturn ret;\n\t}\n\tfunction invokeVNodeHook(hook, instance, vnode, prevVNode = null) {\n\t\tcallWithAsyncErrorHandling(hook, instance, 7, [vnode, prevVNode]);\n\t}\n\tfunction createComponentInstance(vnode, parent, suspense) {\n\t\tconst type = vnode.type;\n\t\tconst appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;\n\t\tconst instance = {\n\t\t\tuid: uid++,\n\t\t\tvnode,\n\t\t\ttype,\n\t\t\tparent,\n\t\t\tappContext,\n\t\t\troot: null,\n\t\t\tnext: null,\n\t\t\tsubTree: null,\n\t\t\teffect: null,\n\t\t\tupdate: null,\n\t\t\tjob: null,\n\t\t\tscope: new EffectScope(true),\n\t\t\trender: null,\n\t\t\tproxy: null,\n\t\t\texposed: null,\n\t\t\texposeProxy: null,\n\t\t\twithProxy: null,\n\t\t\tprovides: parent ? parent.provides : Object.create(appContext.provides),\n\t\t\tids: parent ? parent.ids : [\n\t\t\t\t\"\",\n\t\t\t\t0,\n\t\t\t\t0\n\t\t\t],\n\t\t\taccessCache: null,\n\t\t\trenderCache: [],\n\t\t\tcomponents: null,\n\t\t\tdirectives: null,\n\t\t\tpropsOptions: normalizePropsOptions(type, appContext),\n\t\t\temitsOptions: normalizeEmitsOptions(type, appContext),\n\t\t\temit: null,\n\t\t\temitted: null,\n\t\t\tpropsDefaults: EMPTY_OBJ,\n\t\t\tinheritAttrs: type.inheritAttrs,\n\t\t\tctx: EMPTY_OBJ,\n\t\t\tdata: EMPTY_OBJ,\n\t\t\tprops: EMPTY_OBJ,\n\t\t\tattrs: EMPTY_OBJ,\n\t\t\tslots: EMPTY_OBJ,\n\t\t\trefs: EMPTY_OBJ,\n\t\t\tsetupState: EMPTY_OBJ,\n\t\t\tsetupContext: null,\n\t\t\tsuspense,\n\t\t\tsuspenseId: suspense ? suspense.pendingId : 0,\n\t\t\tasyncDep: null,\n\t\t\tasyncResolved: false,\n\t\t\tisMounted: false,\n\t\t\tisUnmounted: false,\n\t\t\tisDeactivated: false,\n\t\t\tbc: null,\n\t\t\tc: null,\n\t\t\tbm: null,\n\t\t\tm: null,\n\t\t\tbu: null,\n\t\t\tu: null,\n\t\t\tum: null,\n\t\t\tbum: null,\n\t\t\tda: null,\n\t\t\ta: null,\n\t\t\trtg: null,\n\t\t\trtc: null,\n\t\t\tec: null,\n\t\t\tsp: null\n\t\t};\n\t\tinstance.ctx = { _: instance };\n\t\tinstance.root = parent ? parent.root : instance;\n\t\tinstance.emit = emit.bind(null, instance);\n\t\tif (vnode.ce) vnode.ce(instance);\n\t\treturn instance;\n\t}\n\tfunction isStatefulComponent(instance) {\n\t\treturn instance.vnode.shapeFlag & 4;\n\t}\n\tfunction setupComponent(instance, isSSR = false, optimized = false) {\n\t\tisSSR && setInSSRSetupState(isSSR);\n\t\tconst { props, children } = instance.vnode;\n\t\tconst isStateful = isStatefulComponent(instance);\n\t\tinitProps(instance, props, isStateful, isSSR);\n\t\tinitSlots(instance, children, optimized || isSSR);\n\t\tconst setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;\n\t\tisSSR && setInSSRSetupState(false);\n\t\treturn setupResult;\n\t}\n\tfunction setupStatefulComponent(instance, isSSR) {\n\t\tconst Component = instance.type;\n\t\tinstance.accessCache = /* @__PURE__ */ Object.create(null);\n\t\tinstance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);\n\t\tconst { setup } = Component;\n\t\tif (setup) {\n\t\t\tpauseTracking();\n\t\t\tconst setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;\n\t\t\tconst reset = setCurrentInstance(instance);\n\t\t\tconst setupResult = callWithErrorHandling(setup, instance, 0, [instance.props, setupContext]);\n\t\t\tconst isAsyncSetup = isPromise(setupResult);\n\t\t\tresetTracking();\n\t\t\treset();\n\t\t\tif ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) markAsyncBoundary(instance);\n\t\t\tif (isAsyncSetup) {\n\t\t\t\tsetupResult.then(unsetCurrentInstance, unsetCurrentInstance);\n\t\t\t\tif (isSSR) return setupResult.then((resolvedResult) => {\n\t\t\t\t\thandleSetupResult(instance, resolvedResult, isSSR);\n\t\t\t\t}).catch((e) => {\n\t\t\t\t\thandleError(e, instance, 0);\n\t\t\t\t});\n\t\t\t\telse instance.asyncDep = setupResult;\n\t\t\t} else handleSetupResult(instance, setupResult, isSSR);\n\t\t} else finishComponentSetup(instance, isSSR);\n\t}\n\tfunction handleSetupResult(instance, setupResult, isSSR) {\n\t\tif (isFunction(setupResult)) if (instance.type.__ssrInlineRender) instance.ssrRender = setupResult;\n\t\telse instance.render = setupResult;\n\t\telse if (isObject(setupResult)) instance.setupState = proxyRefs(setupResult);\n\t\tfinishComponentSetup(instance, isSSR);\n\t}\n\tfunction finishComponentSetup(instance, isSSR, skipOptions) {\n\t\tconst Component = instance.type;\n\t\tif (!instance.render) {\n\t\t\tif (!isSSR && compile && !Component.render) {\n\t\t\t\tconst template = Component.template || false;\n\t\t\t\tif (template) {\n\t\t\t\t\tconst { isCustomElement, compilerOptions } = instance.appContext.config;\n\t\t\t\t\tconst { delimiters, compilerOptions: componentCompilerOptions } = Component;\n\t\t\t\t\tComponent.render = compile(template, extend(extend({\n\t\t\t\t\t\tisCustomElement,\n\t\t\t\t\t\tdelimiters\n\t\t\t\t\t}, compilerOptions), componentCompilerOptions));\n\t\t\t\t}\n\t\t\t}\n\t\t\tinstance.render = Component.render || NOOP;\n\t\t\tif (installWithProxy) installWithProxy(instance);\n\t\t}\n\t}\n\tfunction createSetupContext(instance) {\n\t\tconst expose = (exposed) => {\n\t\t\tinstance.exposed = exposed || {};\n\t\t};\n\t\treturn {\n\t\t\tattrs: new Proxy(instance.attrs, attrsProxyHandlers),\n\t\t\tslots: instance.slots,\n\t\t\temit: instance.emit,\n\t\t\texpose\n\t\t};\n\t}\n\tfunction getComponentPublicInstance(instance) {\n\t\tif (instance.exposed) return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {\n\t\t\tget(target, key) {\n\t\t\t\tif (key in target) return target[key];\n\t\t\t\telse if (key in publicPropertiesMap) return publicPropertiesMap[key](instance);\n\t\t\t},\n\t\t\thas(target, key) {\n\t\t\t\treturn key in target || key in publicPropertiesMap;\n\t\t\t}\n\t\t}));\n\t\telse return instance.proxy;\n\t}\n\tfunction isClassComponent(value) {\n\t\treturn isFunction(value) && \"__vccOpts\" in value;\n\t}\n\tvar queue, flushIndex, pendingPostFlushCbs, activePostFlushCbs, postFlushIndex, resolvedPromise, currentFlushPromise, getId, currentRenderingInstance, currentScopeId, ssrContextKey, useSSRContext, TeleportEndKey, isTeleport, leaveCbKey, pendingSetRefMap, isAsyncWrapper, isKeepAlive, createHook, onMounted, onBeforeUnmount, onUnmounted, NULL_DYNAMIC_COMPONENT, getPublicInstance, publicPropertiesMap, hasSetupBinding, PublicInstanceProxyHandlers, uid$1, currentApp, getModelModifiers, getFunctionalFallthrough, filterModelListeners, internalObjectProto, createInternalObject, isInternalObject, isInternalKey, normalizeSlotValue, normalizeSlot, normalizeObjectSlots, normalizeVNodeSlots, assignSlots, initSlots, updateSlots, queuePostRenderEffect, isSuspense, Fragment, Text, Comment, Static, blockStack, currentBlock, isBlockTreeEnabled, normalizeKey, normalizeRef, createVNode, emptyAppContext, uid, currentInstance, getCurrentInstance, internalSetCurrentInstance, setInSSRSetupState, setCurrentInstance, unsetCurrentInstance, isInSSRComponentSetup, compile, installWithProxy, attrsProxyHandlers, computed, version;\n\tvar init_runtime_core_esm_bundler = __esmMin((() => {\n\t\tinit_reactivity_esm_bundler();\n\t\tinit_shared_esm_bundler();\n\t\tqueue = [];\n\t\tflushIndex = -1;\n\t\tpendingPostFlushCbs = [];\n\t\tactivePostFlushCbs = null;\n\t\tpostFlushIndex = 0;\n\t\tresolvedPromise = /* @__PURE__ */ Promise.resolve();\n\t\tcurrentFlushPromise = null;\n\t\tgetId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;\n\t\tcurrentRenderingInstance = null;\n\t\tcurrentScopeId = null;\n\t\tssrContextKey = /* @__PURE__ */ Symbol.for(\"v-scx\");\n\t\tuseSSRContext = () => {\n\t\t\t{\n\t\t\t\tconst ctx = inject(ssrContextKey);\n\t\t\t\tif (!ctx) {}\n\t\t\t\treturn ctx;\n\t\t\t}\n\t\t};\n\t\tTeleportEndKey = /* @__PURE__ */ Symbol(\"_vte\");\n\t\tisTeleport = (type) => type.__isTeleport;\n\t\tleaveCbKey = /* @__PURE__ */ Symbol(\"_leaveCb\");\n\t\tpendingSetRefMap = /* @__PURE__ */ new WeakMap();\n\t\tgetGlobalThis().requestIdleCallback;\n\t\tgetGlobalThis().cancelIdleCallback;\n\t\tisAsyncWrapper = (i) => !!i.type.__asyncLoader;\n\t\tisKeepAlive = (vnode) => vnode.type.__isKeepAlive;\n\t\tcreateHook = (lifecycle) => (hook, target = currentInstance) => {\n\t\t\tif (!isInSSRComponentSetup || lifecycle === \"sp\") injectHook(lifecycle, (...args) => hook(...args), target);\n\t\t};\n\t\tcreateHook(\"bm\");\n\t\tonMounted = createHook(\"m\");\n\t\tcreateHook(\"bu\");\n\t\tcreateHook(\"u\");\n\t\tonBeforeUnmount = createHook(\"bum\");\n\t\tonUnmounted = createHook(\"um\");\n\t\tcreateHook(\"sp\");\n\t\tcreateHook(\"rtg\");\n\t\tcreateHook(\"rtc\");\n\t\tNULL_DYNAMIC_COMPONENT = /* @__PURE__ */ Symbol.for(\"v-ndc\");\n\t\tgetPublicInstance = (i) => {\n\t\t\tif (!i) return null;\n\t\t\tif (isStatefulComponent(i)) return getComponentPublicInstance(i);\n\t\t\treturn getPublicInstance(i.parent);\n\t\t};\n\t\tpublicPropertiesMap = /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {\n\t\t\t$: (i) => i,\n\t\t\t$el: (i) => i.vnode.el,\n\t\t\t$data: (i) => i.data,\n\t\t\t$props: (i) => i.props,\n\t\t\t$attrs: (i) => i.attrs,\n\t\t\t$slots: (i) => i.slots,\n\t\t\t$refs: (i) => i.refs,\n\t\t\t$parent: (i) => getPublicInstance(i.parent),\n\t\t\t$root: (i) => getPublicInstance(i.root),\n\t\t\t$host: (i) => i.ce,\n\t\t\t$emit: (i) => i.emit,\n\t\t\t$options: (i) => i.type,\n\t\t\t$forceUpdate: (i) => i.f || (i.f = () => {\n\t\t\t\tqueueJob(i.update);\n\t\t\t}),\n\t\t\t$nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),\n\t\t\t$watch: (i) => NOOP\n\t\t});\n\t\thasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);\n\t\tPublicInstanceProxyHandlers = {\n\t\t\tget({ _: instance }, key) {\n\t\t\t\tif (key === \"__v_skip\") return true;\n\t\t\t\tconst { ctx, setupState, data, props, accessCache, type, appContext } = instance;\n\t\t\t\tif (key[0] !== \"$\") {\n\t\t\t\t\tconst n = accessCache[key];\n\t\t\t\t\tif (n !== void 0) switch (n) {\n\t\t\t\t\t\tcase 1: return setupState[key];\n\t\t\t\t\t\tcase 2: return data[key];\n\t\t\t\t\t\tcase 4: return ctx[key];\n\t\t\t\t\t\tcase 3: return props[key];\n\t\t\t\t\t}\n\t\t\t\t\telse if (hasSetupBinding(setupState, key)) {\n\t\t\t\t\t\taccessCache[key] = 1;\n\t\t\t\t\t\treturn setupState[key];\n\t\t\t\t\t} else if (hasOwn(props, key)) {\n\t\t\t\t\t\taccessCache[key] = 3;\n\t\t\t\t\t\treturn props[key];\n\t\t\t\t\t} else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {\n\t\t\t\t\t\taccessCache[key] = 4;\n\t\t\t\t\t\treturn ctx[key];\n\t\t\t\t\t} else accessCache[key] = 0;\n\t\t\t\t}\n\t\t\t\tconst publicGetter = publicPropertiesMap[key];\n\t\t\t\tlet cssModule, globalProperties;\n\t\t\t\tif (publicGetter) {\n\t\t\t\t\tif (key === \"$attrs\") track(instance.attrs, \"get\", \"\");\n\t\t\t\t\treturn publicGetter(instance);\n\t\t\t\t} else if ((cssModule = type.__cssModules) && (cssModule = cssModule[key])) return cssModule;\n\t\t\t\telse if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {\n\t\t\t\t\taccessCache[key] = 4;\n\t\t\t\t\treturn ctx[key];\n\t\t\t\t} else if (globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)) return globalProperties[key];\n\t\t\t},\n\t\t\tset({ _: instance }, key, value) {\n\t\t\t\tconst { data, setupState, ctx } = instance;\n\t\t\t\tif (hasSetupBinding(setupState, key)) {\n\t\t\t\t\tsetupState[key] = value;\n\t\t\t\t\treturn true;\n\t\t\t\t} else if (hasOwn(instance.props, key)) return false;\n\t\t\t\tif (key[0] === \"$\" && key.slice(1) in instance) return false;\n\t\t\t\telse ctx[key] = value;\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\thas({ _: { data, setupState, accessCache, ctx, appContext, props, type } }, key) {\n\t\t\t\tlet cssModules;\n\t\t\t\treturn !!(accessCache[key] || hasSetupBinding(setupState, key) || hasOwn(props, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key) || (cssModules = type.__cssModules) && cssModules[key]);\n\t\t\t},\n\t\t\tdefineProperty(target, key, descriptor) {\n\t\t\t\tif (descriptor.get != null) target._.accessCache[key] = 0;\n\t\t\t\telse if (hasOwn(descriptor, \"value\")) this.set(target, key, descriptor.value, null);\n\t\t\t\treturn Reflect.defineProperty(target, key, descriptor);\n\t\t\t}\n\t\t};\n\t\tuid$1 = 0;\n\t\tcurrentApp = null;\n\t\tgetModelModifiers = (props, modelName) => {\n\t\t\treturn modelName === \"modelValue\" || modelName === \"model-value\" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize(modelName)}Modifiers`] || props[`${hyphenate(modelName)}Modifiers`];\n\t\t};\n\t\tgetFunctionalFallthrough = (attrs) => {\n\t\t\tlet res;\n\t\t\tfor (const key in attrs) if (key === \"class\" || key === \"style\" || isOn(key)) (res || (res = {}))[key] = attrs[key];\n\t\t\treturn res;\n\t\t};\n\t\tfilterModelListeners = (attrs, props) => {\n\t\t\tconst res = {};\n\t\t\tfor (const key in attrs) if (!isModelListener(key) || !(key.slice(9) in props)) res[key] = attrs[key];\n\t\t\treturn res;\n\t\t};\n\t\tinternalObjectProto = {};\n\t\tcreateInternalObject = () => Object.create(internalObjectProto);\n\t\tisInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;\n\t\tisInternalKey = (key) => key === \"_\" || key === \"_ctx\" || key === \"$stable\";\n\t\tnormalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];\n\t\tnormalizeSlot = (key, rawSlot, ctx) => {\n\t\t\tif (rawSlot._n) return rawSlot;\n\t\t\tconst normalized = withCtx((...args) => {\n\t\t\t\treturn normalizeSlotValue(rawSlot(...args));\n\t\t\t}, ctx);\n\t\t\tnormalized._c = false;\n\t\t\treturn normalized;\n\t\t};\n\t\tnormalizeObjectSlots = (rawSlots, slots, instance) => {\n\t\t\tconst ctx = rawSlots._ctx;\n\t\t\tfor (const key in rawSlots) {\n\t\t\t\tif (isInternalKey(key)) continue;\n\t\t\t\tconst value = rawSlots[key];\n\t\t\t\tif (isFunction(value)) slots[key] = normalizeSlot(key, value, ctx);\n\t\t\t\telse if (value != null) {\n\t\t\t\t\tconst normalized = normalizeSlotValue(value);\n\t\t\t\t\tslots[key] = () => normalized;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tnormalizeVNodeSlots = (instance, children) => {\n\t\t\tconst normalized = normalizeSlotValue(children);\n\t\t\tinstance.slots.default = () => normalized;\n\t\t};\n\t\tassignSlots = (slots, children, optimized) => {\n\t\t\tfor (const key in children) if (optimized || !isInternalKey(key)) slots[key] = children[key];\n\t\t};\n\t\tinitSlots = (instance, children, optimized) => {\n\t\t\tconst slots = instance.slots = createInternalObject();\n\t\t\tif (instance.vnode.shapeFlag & 32) {\n\t\t\t\tconst type = children._;\n\t\t\t\tif (type) {\n\t\t\t\t\tassignSlots(slots, children, optimized);\n\t\t\t\t\tif (optimized) def(slots, \"_\", type, true);\n\t\t\t\t} else normalizeObjectSlots(children, slots);\n\t\t\t} else if (children) normalizeVNodeSlots(instance, children);\n\t\t};\n\t\tupdateSlots = (instance, children, optimized) => {\n\t\t\tconst { vnode, slots } = instance;\n\t\t\tlet needDeletionCheck = true;\n\t\t\tlet deletionComparisonTarget = EMPTY_OBJ;\n\t\t\tif (vnode.shapeFlag & 32) {\n\t\t\t\tconst type = children._;\n\t\t\t\tif (type) if (optimized && type === 1) needDeletionCheck = false;\n\t\t\t\telse assignSlots(slots, children, optimized);\n\t\t\t\telse {\n\t\t\t\t\tneedDeletionCheck = !children.$stable;\n\t\t\t\t\tnormalizeObjectSlots(children, slots);\n\t\t\t\t}\n\t\t\t\tdeletionComparisonTarget = children;\n\t\t\t} else if (children) {\n\t\t\t\tnormalizeVNodeSlots(instance, children);\n\t\t\t\tdeletionComparisonTarget = { default: 1 };\n\t\t\t}\n\t\t\tif (needDeletionCheck) {\n\t\t\t\tfor (const key in slots) if (!isInternalKey(key) && deletionComparisonTarget[key] == null) delete slots[key];\n\t\t\t}\n\t\t};\n\t\tqueuePostRenderEffect = queueEffectWithSuspense;\n\t\tisSuspense = (type) => type.__isSuspense;\n\t\tFragment = /* @__PURE__ */ Symbol.for(\"v-fgt\");\n\t\tText = /* @__PURE__ */ Symbol.for(\"v-txt\");\n\t\tComment = /* @__PURE__ */ Symbol.for(\"v-cmt\");\n\t\tStatic = /* @__PURE__ */ Symbol.for(\"v-stc\");\n\t\tblockStack = [];\n\t\tcurrentBlock = null;\n\t\tisBlockTreeEnabled = 1;\n\t\tnormalizeKey = ({ key }) => key != null ? key : null;\n\t\tnormalizeRef = ({ ref, ref_key, ref_for }) => {\n\t\t\tif (typeof ref === \"number\") ref = \"\" + ref;\n\t\t\treturn ref != null ? isString(ref) || /* @__PURE__ */ isRef(ref) || isFunction(ref) ? {\n\t\t\t\ti: currentRenderingInstance,\n\t\t\t\tr: ref,\n\t\t\t\tk: ref_key,\n\t\t\t\tf: !!ref_for\n\t\t\t} : ref : null;\n\t\t};\n\t\tcreateVNode = _createVNode;\n\t\temptyAppContext = createAppContext();\n\t\tuid = 0;\n\t\tcurrentInstance = null;\n\t\tgetCurrentInstance = () => currentInstance || currentRenderingInstance;\n\t\t{\n\t\t\tconst g = getGlobalThis();\n\t\t\tconst registerGlobalSetter = (key, setter) => {\n\t\t\t\tlet setters;\n\t\t\t\tif (!(setters = g[key])) setters = g[key] = [];\n\t\t\t\tsetters.push(setter);\n\t\t\t\treturn (v) => {\n\t\t\t\t\tif (setters.length > 1) setters.forEach((set) => set(v));\n\t\t\t\t\telse setters[0](v);\n\t\t\t\t};\n\t\t\t};\n\t\t\tinternalSetCurrentInstance = registerGlobalSetter(`__VUE_INSTANCE_SETTERS__`, (v) => currentInstance = v);\n\t\t\tsetInSSRSetupState = registerGlobalSetter(`__VUE_SSR_SETTERS__`, (v) => isInSSRComponentSetup = v);\n\t\t}\n\t\tsetCurrentInstance = (instance) => {\n\t\t\tconst prev = currentInstance;\n\t\t\tinternalSetCurrentInstance(instance);\n\t\t\tinstance.scope.on();\n\t\t\treturn () => {\n\t\t\t\tinstance.scope.off();\n\t\t\t\tinternalSetCurrentInstance(prev);\n\t\t\t};\n\t\t};\n\t\tunsetCurrentInstance = () => {\n\t\t\tcurrentInstance && currentInstance.scope.off();\n\t\t\tinternalSetCurrentInstance(null);\n\t\t};\n\t\tisInSSRComponentSetup = false;\n\t\tattrsProxyHandlers = { get(target, key) {\n\t\t\ttrack(target, \"get\", \"\");\n\t\t\treturn target[key];\n\t\t} };\n\t\tcomputed = (getterOrOptions, debugOptions) => {\n\t\t\treturn /* @__PURE__ */ computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);\n\t\t};\n\t\tversion = \"3.5.40\";\n\t}));\n\t//#endregion\n\t//#region node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js\n\t/**\n\t* @vue/runtime-dom v3.5.40\n\t* (c) 2018-present Yuxi (Evan) You and Vue contributors\n\t* @license MIT\n\t**/\n\tfunction patchClass(el, value, isSVG) {\n\t\tconst transitionClasses = el[vtcKey];\n\t\tif (transitionClasses) value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(\" \");\n\t\tif (value == null) el.removeAttribute(\"class\");\n\t\telse if (isSVG) el.setAttribute(\"class\", value);\n\t\telse el.className = value;\n\t}\n\tfunction setDisplay(el, value) {\n\t\tel.style.display = value ? el[vShowOriginalDisplay] : \"none\";\n\t\tel[vShowHidden] = !value;\n\t}\n\tfunction patchStyle(el, prev, next) {\n\t\tconst style = el.style;\n\t\tconst isCssString = isString(next);\n\t\tlet hasControlledDisplay = false;\n\t\tif (next && !isCssString) {\n\t\t\tif (prev) if (!isString(prev)) {\n\t\t\t\tfor (const key in prev) if (next[key] == null) setStyle(style, key, \"\");\n\t\t\t} else for (const prevStyle of prev.split(\";\")) {\n\t\t\t\tconst key = prevStyle.slice(0, prevStyle.indexOf(\":\")).trim();\n\t\t\t\tif (next[key] == null) setStyle(style, key, \"\");\n\t\t\t}\n\t\t\tfor (const key in next) {\n\t\t\t\tif (key === \"display\") hasControlledDisplay = true;\n\t\t\t\tconst value = next[key];\n\t\t\t\tif (value != null) {\n\t\t\t\t\tif (!shouldPreserveTextareaResizeStyle(el, key, !isString(prev) && prev ? prev[key] : void 0, value)) setStyle(style, key, value);\n\t\t\t\t} else setStyle(style, key, \"\");\n\t\t\t}\n\t\t} else if (isCssString) {\n\t\t\tif (prev !== next) {\n\t\t\t\tconst cssVarText = style[CSS_VAR_TEXT];\n\t\t\t\tif (cssVarText) next += \";\" + cssVarText;\n\t\t\t\tstyle.cssText = next;\n\t\t\t\thasControlledDisplay = displayRE.test(next);\n\t\t\t}\n\t\t} else if (prev) el.removeAttribute(\"style\");\n\t\tif (vShowOriginalDisplay in el) {\n\t\t\tel[vShowOriginalDisplay] = hasControlledDisplay ? style.display : \"\";\n\t\t\tif (el[vShowHidden]) style.display = \"none\";\n\t\t}\n\t}\n\tfunction setStyle(style, name, val) {\n\t\tif (isArray(val)) val.forEach((v) => setStyle(style, name, v));\n\t\telse {\n\t\t\tif (val == null) val = \"\";\n\t\t\tif (name.startsWith(\"--\")) style.setProperty(name, val);\n\t\t\telse {\n\t\t\t\tconst prefixed = autoPrefix(style, name);\n\t\t\t\tif (importantRE.test(val)) style.setProperty(hyphenate(prefixed), val.replace(importantRE, \"\"), \"important\");\n\t\t\t\telse style[prefixed] = val;\n\t\t\t}\n\t\t}\n\t}\n\tfunction autoPrefix(style, rawName) {\n\t\tconst cached = prefixCache[rawName];\n\t\tif (cached) return cached;\n\t\tlet name = camelize(rawName);\n\t\tif (name !== \"filter\" && name in style) return prefixCache[rawName] = name;\n\t\tname = capitalize(name);\n\t\tfor (let i = 0; i < prefixes.length; i++) {\n\t\t\tconst prefixed = prefixes[i] + name;\n\t\t\tif (prefixed in style) return prefixCache[rawName] = prefixed;\n\t\t}\n\t\treturn rawName;\n\t}\n\tfunction shouldPreserveTextareaResizeStyle(el, key, prev, next) {\n\t\treturn el.tagName === \"TEXTAREA\" && (key === \"width\" || key === \"height\") && isString(next) && prev === next;\n\t}\n\tfunction patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key)) {\n\t\tif (isSVG && key.startsWith(\"xlink:\")) if (value == null) el.removeAttributeNS(xlinkNS, key.slice(6, key.length));\n\t\telse el.setAttributeNS(xlinkNS, key, value);\n\t\telse if (value == null || isBoolean && !includeBooleanAttr(value)) el.removeAttribute(key);\n\t\telse el.setAttribute(key, isBoolean ? \"\" : isSymbol(value) ? String(value) : value);\n\t}\n\tfunction patchDOMProp(el, key, value, parentComponent, attrName) {\n\t\tif (key === \"innerHTML\" || key === \"textContent\") {\n\t\t\tif (value != null) el[key] = key === \"innerHTML\" ? unsafeToTrustedHTML(value) : value;\n\t\t\treturn;\n\t\t}\n\t\tconst tag = el.tagName;\n\t\tif (key === \"value\" && tag !== \"PROGRESS\" && !tag.includes(\"-\")) {\n\t\t\tconst oldValue = tag === \"OPTION\" ? el.getAttribute(\"value\") || \"\" : el.value;\n\t\t\tconst newValue = value == null ? el.type === \"checkbox\" ? \"on\" : \"\" : String(value);\n\t\t\tif (oldValue !== newValue || !(\"_value\" in el)) el.value = newValue;\n\t\t\tif (value == null) el.removeAttribute(key);\n\t\t\tel._value = value;\n\t\t\treturn;\n\t\t}\n\t\tlet needRemove = false;\n\t\tif (value === \"\" || value == null) {\n\t\t\tconst type = typeof el[key];\n\t\t\tif (type === \"boolean\") value = includeBooleanAttr(value);\n\t\t\telse if (value == null && type === \"string\") {\n\t\t\t\tvalue = \"\";\n\t\t\t\tneedRemove = true;\n\t\t\t} else if (type === \"number\") {\n\t\t\t\tvalue = 0;\n\t\t\t\tneedRemove = true;\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tel[key] = value;\n\t\t} catch (e) {}\n\t\tneedRemove && el.removeAttribute(attrName || key);\n\t}\n\tfunction addEventListener(el, event, handler, options) {\n\t\tel.addEventListener(event, handler, options);\n\t}\n\tfunction removeEventListener(el, event, handler, options) {\n\t\tel.removeEventListener(event, handler, options);\n\t}\n\tfunction patchEvent(el, rawName, prevValue, nextValue, instance = null) {\n\t\tconst invokers = el[veiKey] || (el[veiKey] = {});\n\t\tconst existingInvoker = invokers[rawName];\n\t\tif (nextValue && existingInvoker) existingInvoker.value = nextValue;\n\t\telse {\n\t\t\tconst [name, options] = parseName(rawName);\n\t\t\tif (nextValue) addEventListener(el, name, invokers[rawName] = createInvoker(nextValue, instance), options);\n\t\t\telse if (existingInvoker) {\n\t\t\t\tremoveEventListener(el, name, existingInvoker, options);\n\t\t\t\tinvokers[rawName] = void 0;\n\t\t\t}\n\t\t}\n\t}\n\tfunction parseName(name) {\n\t\tlet options;\n\t\tlet m;\n\t\twhile ((m = name.match(optionsModifierRE)) && !optionsModifierEventRE.test(name)) {\n\t\t\tif (!options) options = {};\n\t\t\tname = name.slice(0, name.length - m[1].length);\n\t\t\toptions[m[1].toLowerCase()] = true;\n\t\t}\n\t\treturn [name[2] === \":\" ? name.slice(3) : hyphenate(name.slice(2)), options];\n\t}\n\tfunction createInvoker(initialValue, instance) {\n\t\tconst invoker = (e) => {\n\t\t\tif (!e._vts) e._vts = Date.now();\n\t\t\telse if (e._vts <= invoker.attached) return;\n\t\t\tconst value = invoker.value;\n\t\t\tif (isArray(value)) {\n\t\t\t\tconst originalStop = e.stopImmediatePropagation;\n\t\t\t\te.stopImmediatePropagation = () => {\n\t\t\t\t\toriginalStop.call(e);\n\t\t\t\t\te._stopped = true;\n\t\t\t\t};\n\t\t\t\tconst handlers = value.slice();\n\t\t\t\tconst args = [e];\n\t\t\t\tfor (let i = 0; i < handlers.length; i++) {\n\t\t\t\t\tif (e._stopped) break;\n\t\t\t\t\tconst handler = handlers[i];\n\t\t\t\t\tif (handler) callWithAsyncErrorHandling(handler, instance, 5, args);\n\t\t\t\t}\n\t\t\t} else callWithAsyncErrorHandling(value, instance, 5, [e]);\n\t\t};\n\t\tinvoker.value = initialValue;\n\t\tinvoker.attached = getNow();\n\t\treturn invoker;\n\t}\n\tfunction shouldSetAsProp(el, key, value, isSVG) {\n\t\tif (isSVG) {\n\t\t\tif (key === \"innerHTML\" || key === \"textContent\") return true;\n\t\t\tif (key in el && isNativeOn(key) && isFunction(value)) return true;\n\t\t\treturn false;\n\t\t}\n\t\tif (key === \"spellcheck\" || key === \"draggable\" || key === \"translate\" || key === \"autocorrect\") return false;\n\t\tif (key === \"sandbox\" && el.tagName === \"IFRAME\") return false;\n\t\tif (key === \"form\") return false;\n\t\tif (key === \"list\" && el.tagName === \"INPUT\") return false;\n\t\tif (key === \"type\" && el.tagName === \"TEXTAREA\") return false;\n\t\tif (key === \"width\" || key === \"height\") {\n\t\t\tconst tag = el.tagName;\n\t\t\tif (tag === \"IMG\" || tag === \"VIDEO\" || tag === \"CANVAS\" || tag === \"SOURCE\") return false;\n\t\t}\n\t\tif (isNativeOn(key) && isString(value)) return false;\n\t\treturn key in el;\n\t}\n\tfunction shouldSetAsPropForVueCE(el, key) {\n\t\tconst props = el._def.props;\n\t\tif (!props) return false;\n\t\tconst camelKey = camelize(key);\n\t\treturn Array.isArray(props) ? props.some((prop) => camelize(prop) === camelKey) : Object.keys(props).some((prop) => camelize(prop) === camelKey);\n\t}\n\tfunction onCompositionStart(e) {\n\t\te.target.composing = true;\n\t}\n\tfunction onCompositionEnd(e) {\n\t\tconst target = e.target;\n\t\tif (target.composing) {\n\t\t\ttarget.composing = false;\n\t\t\ttarget.dispatchEvent(new Event(\"input\"));\n\t\t}\n\t}\n\tfunction castValue(value, trim, number) {\n\t\tif (trim) value = value.trim();\n\t\tif (number) value = looseToNumber(value);\n\t\treturn value;\n\t}\n\tfunction setChecked(el, { value, oldValue }, vnode) {\n\t\tel._modelValue = value;\n\t\tlet checked;\n\t\tif (isArray(value)) checked = looseIndexOf(value, vnode.props.value) > -1;\n\t\telse if (isSet(value)) checked = value.has(vnode.props.value);\n\t\telse {\n\t\t\tif (value === oldValue) return;\n\t\t\tchecked = looseEqual(value, getCheckboxValue(el, true));\n\t\t}\n\t\tif (el.checked !== checked) el.checked = checked;\n\t}\n\tfunction setSelected(el, value) {\n\t\tconst isMultiple = el.multiple;\n\t\tconst isArrayValue = isArray(value);\n\t\tif (isMultiple && !isArrayValue && !isSet(value)) return;\n\t\tfor (let i = 0, l = el.options.length; i < l; i++) {\n\t\t\tconst option = el.options[i];\n\t\t\tconst optionValue = getValue(option);\n\t\t\tif (isMultiple) if (isArrayValue) {\n\t\t\t\tconst optionType = typeof optionValue;\n\t\t\t\tif (optionType === \"string\" || optionType === \"number\") option.selected = value.some((v) => String(v) === String(optionValue));\n\t\t\t\telse option.selected = looseIndexOf(value, optionValue) > -1;\n\t\t\t} else option.selected = value.has(optionValue);\n\t\t\telse if (looseEqual(getValue(option), value)) {\n\t\t\t\tif (el.selectedIndex !== i) el.selectedIndex = i;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (!isMultiple && el.selectedIndex !== -1) el.selectedIndex = -1;\n\t}\n\tfunction getValue(el) {\n\t\treturn \"_value\" in el ? el._value : el.value;\n\t}\n\tfunction getCheckboxValue(el, checked) {\n\t\tconst key = checked ? \"_trueValue\" : \"_falseValue\";\n\t\treturn key in el ? el[key] : checked;\n\t}\n\tfunction ensureRenderer() {\n\t\treturn renderer || (renderer = createRenderer(rendererOptions));\n\t}\n\tfunction resolveRootNamespace(container) {\n\t\tif (container instanceof SVGElement) return \"svg\";\n\t\tif (typeof MathMLElement === \"function\" && container instanceof MathMLElement) return \"mathml\";\n\t}\n\tfunction normalizeContainer(container) {\n\t\tif (isString(container)) return document.querySelector(container);\n\t\treturn container;\n\t}\n\tvar policy, tt, unsafeToTrustedHTML, svgNS, mathmlNS, doc, templateContainer, nodeOps, vtcKey, vShowOriginalDisplay, vShowHidden, vShow, CSS_VAR_TEXT, displayRE, importantRE, prefixes, prefixCache, xlinkNS, veiKey, optionsModifierRE, optionsModifierEventRE, cachedNow, p, getNow, isNativeOn, patchProp, getModelAssigner, assignKey, vModelText, vModelCheckbox, vModelSelect, systemModifiers, modifierGuards, withModifiers, keyNames, withKeys, rendererOptions, renderer, createApp;\n\tvar init_runtime_dom_esm_bundler = __esmMin((() => {\n\t\tinit_runtime_core_esm_bundler();\n\t\tinit_runtime_core_esm_bundler();\n\t\tinit_shared_esm_bundler();\n\t\tpolicy = void 0;\n\t\ttt = typeof window !== \"undefined\" && window.trustedTypes;\n\t\tif (tt) try {\n\t\t\tpolicy = /* @__PURE__ */ tt.createPolicy(\"vue\", { createHTML: (val) => val });\n\t\t} catch (e) {}\n\t\tunsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val;\n\t\tsvgNS = \"http://www.w3.org/2000/svg\";\n\t\tmathmlNS = \"http://www.w3.org/1998/Math/MathML\";\n\t\tdoc = typeof document !== \"undefined\" ? document : null;\n\t\ttemplateContainer = doc && /* @__PURE__ */ doc.createElement(\"template\");\n\t\tnodeOps = {\n\t\t\tinsert: (child, parent, anchor) => {\n\t\t\t\tparent.insertBefore(child, anchor || null);\n\t\t\t},\n\t\t\tremove: (child) => {\n\t\t\t\tconst parent = child.parentNode;\n\t\t\t\tif (parent) parent.removeChild(child);\n\t\t\t},\n\t\t\tcreateElement: (tag, namespace, is, props) => {\n\t\t\t\tconst el = namespace === \"svg\" ? doc.createElementNS(svgNS, tag) : namespace === \"mathml\" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag);\n\t\t\t\tif (tag === \"select\" && props && props.multiple != null) el.setAttribute(\"multiple\", props.multiple);\n\t\t\t\treturn el;\n\t\t\t},\n\t\t\tcreateText: (text) => doc.createTextNode(text),\n\t\t\tcreateComment: (text) => doc.createComment(text),\n\t\t\tsetText: (node, text) => {\n\t\t\t\tnode.nodeValue = text;\n\t\t\t},\n\t\t\tsetElementText: (el, text) => {\n\t\t\t\tel.textContent = text;\n\t\t\t},\n\t\t\tparentNode: (node) => node.parentNode,\n\t\t\tnextSibling: (node) => node.nextSibling,\n\t\t\tquerySelector: (selector) => doc.querySelector(selector),\n\t\t\tsetScopeId(el, id) {\n\t\t\t\tel.setAttribute(id, \"\");\n\t\t\t},\n\t\t\tinsertStaticContent(content, parent, anchor, namespace, start, end) {\n\t\t\t\tconst before = anchor ? anchor.previousSibling : parent.lastChild;\n\t\t\t\tif (start && (start === end || start.nextSibling)) while (true) {\n\t\t\t\t\tparent.insertBefore(start.cloneNode(true), anchor);\n\t\t\t\t\tif (start === end || !(start = start.nextSibling)) break;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttemplateContainer.innerHTML = unsafeToTrustedHTML(namespace === \"svg\" ? `<svg>${content}</svg>` : namespace === \"mathml\" ? `<math>${content}</math>` : content);\n\t\t\t\t\tconst template = templateContainer.content;\n\t\t\t\t\tif (namespace === \"svg\" || namespace === \"mathml\") {\n\t\t\t\t\t\tconst wrapper = template.firstChild;\n\t\t\t\t\t\twhile (wrapper.firstChild) template.appendChild(wrapper.firstChild);\n\t\t\t\t\t\ttemplate.removeChild(wrapper);\n\t\t\t\t\t}\n\t\t\t\t\tparent.insertBefore(template, anchor);\n\t\t\t\t}\n\t\t\t\treturn [before ? before.nextSibling : parent.firstChild, anchor ? anchor.previousSibling : parent.lastChild];\n\t\t\t}\n\t\t};\n\t\tvtcKey = /* @__PURE__ */ Symbol(\"_vtc\");\n\t\tvShowOriginalDisplay = /* @__PURE__ */ Symbol(\"_vod\");\n\t\tvShowHidden = /* @__PURE__ */ Symbol(\"_vsh\");\n\t\tvShow = {\n\t\t\tname: \"show\",\n\t\t\tbeforeMount(el, { value }, { transition }) {\n\t\t\t\tel[vShowOriginalDisplay] = el.style.display === \"none\" ? \"\" : el.style.display;\n\t\t\t\tif (transition && value) transition.beforeEnter(el);\n\t\t\t\telse setDisplay(el, value);\n\t\t\t},\n\t\t\tmounted(el, { value }, { transition }) {\n\t\t\t\tif (transition && value) transition.enter(el);\n\t\t\t},\n\t\t\tupdated(el, { value, oldValue }, { transition }) {\n\t\t\t\tif (!value === !oldValue) return;\n\t\t\t\tif (transition) if (value) {\n\t\t\t\t\ttransition.beforeEnter(el);\n\t\t\t\t\tsetDisplay(el, true);\n\t\t\t\t\ttransition.enter(el);\n\t\t\t\t} else transition.leave(el, () => {\n\t\t\t\t\tsetDisplay(el, false);\n\t\t\t\t});\n\t\t\t\telse setDisplay(el, value);\n\t\t\t},\n\t\t\tbeforeUnmount(el, { value }) {\n\t\t\t\tsetDisplay(el, value);\n\t\t\t}\n\t\t};\n\t\tCSS_VAR_TEXT = /* @__PURE__ */ Symbol(\"\");\n\t\tdisplayRE = /(?:^|;)\\s*display\\s*:/;\n\t\timportantRE = /\\s*!important$/;\n\t\tprefixes = [\n\t\t\t\"Webkit\",\n\t\t\t\"Moz\",\n\t\t\t\"ms\"\n\t\t];\n\t\tprefixCache = {};\n\t\txlinkNS = \"http://www.w3.org/1999/xlink\";\n\t\tveiKey = /* @__PURE__ */ Symbol(\"_vei\");\n\t\toptionsModifierRE = /(Once|Passive|Capture)$/;\n\t\toptionsModifierEventRE = /^on:?(?:Once|Passive|Capture)$/;\n\t\tcachedNow = 0;\n\t\tp = /* @__PURE__ */ Promise.resolve();\n\t\tgetNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());\n\t\tisNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;\n\t\tpatchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => {\n\t\t\tconst isSVG = namespace === \"svg\";\n\t\t\tif (key === \"class\") patchClass(el, nextValue, isSVG);\n\t\t\telse if (key === \"style\") patchStyle(el, prevValue, nextValue);\n\t\t\telse if (isOn(key)) {\n\t\t\t\tif (!isModelListener(key)) patchEvent(el, key, prevValue, nextValue, parentComponent);\n\t\t\t} else if (key[0] === \".\" ? (key = key.slice(1), true) : key[0] === \"^\" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) {\n\t\t\t\tpatchDOMProp(el, key, nextValue);\n\t\t\t\tif (!el.tagName.includes(\"-\") && (key === \"value\" || key === \"checked\" || key === \"selected\")) patchAttr(el, key, nextValue, isSVG, parentComponent, key !== \"value\");\n\t\t\t} else if (el._isVueCE && (shouldSetAsPropForVueCE(el, key) || el._def.__asyncLoader && (/[A-Z]/.test(key) || !isString(nextValue)))) patchDOMProp(el, camelize(key), nextValue, parentComponent, key);\n\t\t\telse {\n\t\t\t\tif (key === \"true-value\") el._trueValue = nextValue;\n\t\t\t\telse if (key === \"false-value\") el._falseValue = nextValue;\n\t\t\t\tpatchAttr(el, key, nextValue, isSVG);\n\t\t\t}\n\t\t};\n\t\tgetModelAssigner = (vnode) => {\n\t\t\tconst fn = vnode.props[\"onUpdate:modelValue\"] || false;\n\t\t\treturn isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn;\n\t\t};\n\t\tassignKey = /* @__PURE__ */ Symbol(\"_assign\");\n\t\tvModelText = {\n\t\t\tcreated(el, { modifiers: { lazy, trim, number } }, vnode) {\n\t\t\t\tel[assignKey] = getModelAssigner(vnode);\n\t\t\t\tconst castToNumber = number || vnode.props && vnode.props.type === \"number\";\n\t\t\t\taddEventListener(el, lazy ? \"change\" : \"input\", (e) => {\n\t\t\t\t\tif (e.target.composing) return;\n\t\t\t\t\tel[assignKey](castValue(el.value, trim, castToNumber));\n\t\t\t\t});\n\t\t\t\tif (trim || castToNumber) addEventListener(el, \"change\", () => {\n\t\t\t\t\tel.value = castValue(el.value, trim, castToNumber);\n\t\t\t\t});\n\t\t\t\tif (!lazy) {\n\t\t\t\t\taddEventListener(el, \"compositionstart\", onCompositionStart);\n\t\t\t\t\taddEventListener(el, \"compositionend\", onCompositionEnd);\n\t\t\t\t\taddEventListener(el, \"change\", onCompositionEnd);\n\t\t\t\t}\n\t\t\t},\n\t\t\tmounted(el, { value }) {\n\t\t\t\tel.value = value == null ? \"\" : value;\n\t\t\t},\n\t\t\tbeforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) {\n\t\t\t\tel[assignKey] = getModelAssigner(vnode);\n\t\t\t\tif (el.composing) return;\n\t\t\t\tconst elValue = (number || el.type === \"number\") && !/^0\\d/.test(el.value) ? looseToNumber(el.value) : el.value;\n\t\t\t\tconst newValue = value == null ? \"\" : value;\n\t\t\t\tif (elValue === newValue) return;\n\t\t\t\tconst rootNode = el.getRootNode();\n\t\t\t\tif ((rootNode instanceof Document || rootNode instanceof ShadowRoot) && rootNode.activeElement === el && el.type !== \"range\") {\n\t\t\t\t\tif (lazy && value === oldValue) return;\n\t\t\t\t\tif (trim && el.value.trim() === newValue) return;\n\t\t\t\t}\n\t\t\t\tel.value = newValue;\n\t\t\t}\n\t\t};\n\t\tvModelCheckbox = {\n\t\t\tdeep: true,\n\t\t\tcreated(el, _, vnode) {\n\t\t\t\tel[assignKey] = getModelAssigner(vnode);\n\t\t\t\taddEventListener(el, \"change\", () => {\n\t\t\t\t\tconst modelValue = el._modelValue;\n\t\t\t\t\tconst elementValue = getValue(el);\n\t\t\t\t\tconst checked = el.checked;\n\t\t\t\t\tconst assign = el[assignKey];\n\t\t\t\t\tif (isArray(modelValue)) {\n\t\t\t\t\t\tconst index = looseIndexOf(modelValue, elementValue);\n\t\t\t\t\t\tconst found = index !== -1;\n\t\t\t\t\t\tif (checked && !found) assign(modelValue.concat(elementValue));\n\t\t\t\t\t\telse if (!checked && found) {\n\t\t\t\t\t\t\tconst filtered = [...modelValue];\n\t\t\t\t\t\t\tfiltered.splice(index, 1);\n\t\t\t\t\t\t\tassign(filtered);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (isSet(modelValue)) {\n\t\t\t\t\t\tconst cloned = new Set(modelValue);\n\t\t\t\t\t\tif (checked) cloned.add(elementValue);\n\t\t\t\t\t\telse cloned.delete(elementValue);\n\t\t\t\t\t\tassign(cloned);\n\t\t\t\t\t} else assign(getCheckboxValue(el, checked));\n\t\t\t\t});\n\t\t\t},\n\t\t\tmounted: setChecked,\n\t\t\tbeforeUpdate(el, binding, vnode) {\n\t\t\t\tel[assignKey] = getModelAssigner(vnode);\n\t\t\t\tsetChecked(el, binding, vnode);\n\t\t\t}\n\t\t};\n\t\tvModelSelect = {\n\t\t\tdeep: true,\n\t\t\tcreated(el, { value, modifiers: { number } }, vnode) {\n\t\t\t\tel._modelValue = value;\n\t\t\t\taddEventListener(el, \"change\", () => {\n\t\t\t\t\tconst selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map((o) => number ? looseToNumber(getValue(o)) : getValue(o));\n\t\t\t\t\tel[assignKey](el.multiple ? isSet(el._modelValue) ? new Set(selectedVal) : selectedVal : selectedVal[0]);\n\t\t\t\t\tel._assigning = true;\n\t\t\t\t\tnextTick(() => {\n\t\t\t\t\t\tel._assigning = false;\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t\tel[assignKey] = getModelAssigner(vnode);\n\t\t\t},\n\t\t\tmounted(el, { value }) {\n\t\t\t\tsetSelected(el, value);\n\t\t\t},\n\t\t\tbeforeUpdate(el, { value }, vnode) {\n\t\t\t\tel._modelValue = value;\n\t\t\t\tel[assignKey] = getModelAssigner(vnode);\n\t\t\t},\n\t\t\tupdated(el, { value }) {\n\t\t\t\tif (!el._assigning) setSelected(el, value);\n\t\t\t}\n\t\t};\n\t\tsystemModifiers = [\n\t\t\t\"ctrl\",\n\t\t\t\"shift\",\n\t\t\t\"alt\",\n\t\t\t\"meta\"\n\t\t];\n\t\tmodifierGuards = {\n\t\t\tstop: (e) => e.stopPropagation(),\n\t\t\tprevent: (e) => e.preventDefault(),\n\t\t\tself: (e) => e.target !== e.currentTarget,\n\t\t\tctrl: (e) => !e.ctrlKey,\n\t\t\tshift: (e) => !e.shiftKey,\n\t\t\talt: (e) => !e.altKey,\n\t\t\tmeta: (e) => !e.metaKey,\n\t\t\tleft: (e) => \"button\" in e && e.button !== 0,\n\t\t\tmiddle: (e) => \"button\" in e && e.button !== 1,\n\t\t\tright: (e) => \"button\" in e && e.button !== 2,\n\t\t\texact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))\n\t\t};\n\t\twithModifiers = (fn, modifiers) => {\n\t\t\tif (!fn) return fn;\n\t\t\tconst cache = fn._withMods || (fn._withMods = {});\n\t\t\tconst cacheKey = modifiers.join(\".\");\n\t\t\treturn cache[cacheKey] || (cache[cacheKey] = ((event, ...args) => {\n\t\t\t\tfor (let i = 0; i < modifiers.length; i++) {\n\t\t\t\t\tconst guard = modifierGuards[modifiers[i]];\n\t\t\t\t\tif (guard && guard(event, modifiers)) return;\n\t\t\t\t}\n\t\t\t\treturn fn(event, ...args);\n\t\t\t}));\n\t\t};\n\t\tkeyNames = {\n\t\t\tesc: \"escape\",\n\t\t\tspace: \" \",\n\t\t\tup: \"arrow-up\",\n\t\t\tleft: \"arrow-left\",\n\t\t\tright: \"arrow-right\",\n\t\t\tdown: \"arrow-down\",\n\t\t\tdelete: \"backspace\"\n\t\t};\n\t\twithKeys = (fn, modifiers) => {\n\t\t\tconst cache = fn._withKeys || (fn._withKeys = {});\n\t\t\tconst cacheKey = modifiers.join(\".\");\n\t\t\treturn cache[cacheKey] || (cache[cacheKey] = ((event) => {\n\t\t\t\tif (!(\"key\" in event)) return;\n\t\t\t\tconst eventKey = hyphenate(event.key);\n\t\t\t\tif (modifiers.some((k) => k === eventKey || keyNames[k] === eventKey)) return fn(event);\n\t\t\t}));\n\t\t};\n\t\trendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);\n\t\tcreateApp = ((...args) => {\n\t\t\tconst app = ensureRenderer().createApp(...args);\n\t\t\tconst { mount } = app;\n\t\t\tapp.mount = (containerOrSelector) => {\n\t\t\t\tconst container = normalizeContainer(containerOrSelector);\n\t\t\t\tif (!container) return;\n\t\t\t\tconst component = app._component;\n\t\t\t\tif (!isFunction(component) && !component.render && !component.template) component.template = container.innerHTML;\n\t\t\t\tif (container.nodeType === 1) container.textContent = \"\";\n\t\t\t\tconst proxy = mount(container, false, resolveRootNamespace(container));\n\t\t\t\tif (container instanceof Element) {\n\t\t\t\t\tcontainer.removeAttribute(\"v-cloak\");\n\t\t\t\t\tcontainer.setAttribute(\"data-v-app\", \"\");\n\t\t\t\t}\n\t\t\t\treturn proxy;\n\t\t\t};\n\t\t\treturn app;\n\t\t});\n\t}));\n\t//#endregion\n\t//#region node_modules/vue/dist/vue.runtime.esm-bundler.js\n\tvar init_vue_runtime_esm_bundler = __esmMin((() => {\n\t\tinit_runtime_dom_esm_bundler();\n\t}));\n\t/**\n\t* vue v3.5.40\n\t* (c) 2018-present Yuxi (Evan) You and Vue contributors\n\t* @license MIT\n\t**/\n\t//#endregion\n\t//#region src/web-editor/client/api.ts\n\tfunction createEditorApi(token) {\n\t\treturn async function api(path, options = {}) {\n\t\t\tconst headers = new Headers(options.headers);\n\t\t\theaders.set(\"x-pi-forge-token\", token);\n\t\t\tlet body = options.body;\n\t\t\tif (body && typeof body === \"object\" && !(body instanceof Blob) && !(body instanceof FormData) && !(body instanceof URLSearchParams)) {\n\t\t\t\theaders.set(\"content-type\", \"application/json\");\n\t\t\t\tbody = JSON.stringify(body);\n\t\t\t}\n\t\t\tconst response = await fetch(path, {\n\t\t\t\t...options,\n\t\t\t\theaders,\n\t\t\t\tbody\n\t\t\t});\n\t\t\tconst text = await response.text();\n\t\t\tconst data = text ? JSON.parse(text) : {};\n\t\t\tif (!response.ok) throw new EditorApiError(data.error || response.statusText, response.status);\n\t\t\treturn data;\n\t\t};\n\t}\n\tvar EditorApiError;\n\tvar init_api = __esmMin((() => {\n\t\tEditorApiError = class extends Error {\n\t\t\tstatus;\n\t\t\tconstructor(message, status) {\n\t\t\t\tsuper(message);\n\t\t\t\tthis.status = status;\n\t\t\t\tthis.name = \"EditorApiError\";\n\t\t\t}\n\t\t};\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/components/ProfileDelegation.vue?vue&type=script&setup=true&lang.ts\n\tinit_vue_runtime_esm_bundler();\n\tinit_api();\n\tvar _hoisted_1$8 = { class: \"profile-card delegation-card\" };\n\tvar _hoisted_2$8 = { class: \"profile-card-title\" };\n\tvar _hoisted_3$8 = {\n\t\tkey: 0,\n\t\tclass: \"delegation-dirty\"\n\t};\n\tvar _hoisted_4$8 = {\n\t\tkey: 0,\n\t\tclass: \"delegation-warning\"\n\t};\n\tvar _hoisted_5$8 = { class: \"delegation-form\" };\n\tvar _hoisted_6$7 = { class: \"delegation-check\" };\n\tvar _hoisted_7$7 = [\"disabled\"];\n\tvar _hoisted_8$7 = { class: \"delegation-field\" };\n\tvar _hoisted_9$7 = [\"disabled\"];\n\tvar _hoisted_10$7 = { value: \"\" };\n\tvar _hoisted_11$7 = [\"value\"];\n\tvar _hoisted_12$6 = [\"value\"];\n\tvar _hoisted_13$6 = { class: \"delegation-field\" };\n\tvar _hoisted_14$6 = [\"placeholder\", \"disabled\"];\n\tvar _hoisted_15$6 = { class: \"delegation-actions\" };\n\tvar _hoisted_16$6 = {\n\t\tkey: 0,\n\t\tclass: \"delegation-error\",\n\t\t\"data-delegation-error\": \"\"\n\t};\n\tvar _hoisted_17$6 = {\n\t\tkey: 1,\n\t\tclass: \"delegation-error\",\n\t\t\"data-delegation-error\": \"\"\n\t};\n\tvar _hoisted_18$5 = [\"disabled\"];\n\tvar _hoisted_19$5 = { class: \"delegation-note\" };\n\tvar TIMEOUT_MIN = 1e3;\n\tvar TIMEOUT_MAX = 36e5;\n\tvar ProfileDelegation_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({\n\t\t__name: \"ProfileDelegation\",\n\t\tprops: {\n\t\t\tentry: {},\n\t\t\tsummary: {},\n\t\t\tbusy: { type: Boolean }\n\t\t},\n\t\temits: [\n\t\t\t\"update:busy\",\n\t\t\t\"update:dirty\",\n\t\t\t\"saved\",\n\t\t\t\"failed\"\n\t\t],\n\t\tsetup(__props, { emit: __emit }) {\n\t\t\tconst props = __props;\n\t\t\tconst emit = __emit;\n\t\t\tconst api = createEditorApi(new URLSearchParams(location.search).get(\"token\") || \"\");\n\t\t\tconst enabled = /* @__PURE__ */ ref(false);\n\t\t\tconst backend = /* @__PURE__ */ ref(\"\");\n\t\t\tconst timeoutText = /* @__PURE__ */ ref(\"\");\n\t\t\tconst localError = /* @__PURE__ */ ref(\"\");\n\t\t\tconst timeoutDraftText = () => String(timeoutText.value ?? \"\").trim();\n\t\t\tfunction draftMatches(entry) {\n\t\t\t\tconst configured = entry.subagent.configured;\n\t\t\t\treturn enabled.value === (configured.enabled === true) && backend.value === (configured.backend ?? \"\") && timeoutDraftText() === (configured.timeoutMs?.toString() ?? \"\");\n\t\t\t}\n\t\t\tfunction syncDraft(entry) {\n\t\t\t\tenabled.value = entry.subagent.configured.enabled === true;\n\t\t\t\tbackend.value = entry.subagent.configured.backend ?? \"\";\n\t\t\t\ttimeoutText.value = entry.subagent.configured.timeoutMs?.toString() ?? \"\";\n\t\t\t\tlocalError.value = \"\";\n\t\t\t}\n\t\t\twatch(() => props.entry, (entry, previous) => {\n\t\t\t\tif (!(previous?.filePath === entry.filePath && !draftMatches(previous))) syncDraft(entry);\n\t\t\t}, { immediate: true });\n\t\t\tconst timeoutValue = computed(() => {\n\t\t\t\tconst text = timeoutDraftText();\n\t\t\t\tif (!text) return void 0;\n\t\t\t\tconst parsed = Number(text);\n\t\t\t\treturn Number.isSafeInteger(parsed) ? parsed : NaN;\n\t\t\t});\n\t\t\tconst timeoutInvalid = computed(() => {\n\t\t\t\tif (timeoutValue.value === void 0) return false;\n\t\t\t\treturn !Number.isSafeInteger(timeoutValue.value) || timeoutValue.value < TIMEOUT_MIN || timeoutValue.value > TIMEOUT_MAX;\n\t\t\t});\n\t\t\tconst dirty = computed(() => !draftMatches(props.entry));\n\t\t\twatch(dirty, (value) => emit(\"update:dirty\", value), { immediate: true });\n\t\t\tfunction handleBeforeUnload(event) {\n\t\t\t\tif (!dirty.value) return;\n\t\t\t\tevent.preventDefault();\n\t\t\t\tevent.returnValue = \"\";\n\t\t\t}\n\t\t\tonMounted(() => window.addEventListener(\"beforeunload\", handleBeforeUnload));\n\t\t\tonBeforeUnmount(() => {\n\t\t\t\twindow.removeEventListener(\"beforeunload\", handleBeforeUnload);\n\t\t\t\temit(\"update:dirty\", false);\n\t\t\t});\n\t\t\tconst backendKnown = computed(() => {\n\t\t\t\treturn !backend.value || props.summary.backends.some((option) => option.id === backend.value);\n\t\t\t});\n\t\t\tasync function save() {\n\t\t\t\tif (!dirty.value || timeoutInvalid.value || props.busy) return;\n\t\t\t\tlocalError.value = \"\";\n\t\t\t\temit(\"update:busy\", true);\n\t\t\t\ttry {\n\t\t\t\t\tconst result = await api(`/api/profiles/${encodeURIComponent(props.entry.profile.id)}/subagent`, {\n\t\t\t\t\t\tmethod: \"PUT\",\n\t\t\t\t\t\tbody: {\n\t\t\t\t\t\t\tenabled: enabled.value,\n\t\t\t\t\t\t\tbackend: backend.value || null,\n\t\t\t\t\t\t\ttimeoutMs: timeoutValue.value === void 0 ? null : timeoutValue.value\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\temit(\"saved\", result, enabled.value ? `Delegation enabled for ${props.entry.profile.id}` : `Delegation settings saved for ${props.entry.profile.id}`);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\t\t\t\tlocalError.value = message;\n\t\t\t\t\temit(\"failed\", message);\n\t\t\t\t} finally {\n\t\t\t\t\temit(\"update:busy\", false);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn (_ctx, _cache) => {\n\t\t\t\treturn openBlock(), createElementBlock(\"section\", _hoisted_1$8, [\n\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_2$8, [_cache[3] || (_cache[3] = createTextVNode(\" Delegation (experimental) \", -1)), dirty.value ? (openBlock(), createElementBlock(\"span\", _hoisted_3$8, \"unsaved changes\")) : createCommentVNode(\"v-if\", true)]),\n\t\t\t\t\tcreateBaseVNode(\"div\", {\n\t\t\t\t\t\tclass: normalizeClass([\"delegation-status\", { ready: __props.entry.subagent.enabled }]),\n\t\t\t\t\t\t\"data-delegation-status\": \"\"\n\t\t\t\t\t}, [__props.entry.subagent.enabled ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [\n\t\t\t\t\t\t_cache[4] || (_cache[4] = createTextVNode(\" Saved: enabled · backend \", -1)),\n\t\t\t\t\t\tcreateBaseVNode(\"code\", null, toDisplayString(__props.entry.subagent.backend), 1),\n\t\t\t\t\t\tcreateTextVNode(\" (\" + toDisplayString(__props.entry.subagent.backendSource) + \") · timeout \" + toDisplayString(__props.entry.subagent.timeoutMs) + \" ms (\" + toDisplayString(__props.entry.subagent.timeoutSource) + \") \", 1)\n\t\t\t\t\t], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(\" Saved: disabled — the main agent cannot delegate tasks to this profile. \")], 64))], 2),\n\t\t\t\t\t__props.entry.subagent.enabled && !__props.entry.subagent.backendRegistered ? (openBlock(), createElementBlock(\"div\", _hoisted_4$8, \" Configured backend \\\"\" + toDisplayString(__props.entry.subagent.backend) + \"\\\" is not registered; planning and runs will fail. \", 1)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_5$8, [\n\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_6$7, [withDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\tid: \"delegationEnabled\",\n\t\t\t\t\t\t\t\"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event) => enabled.value = $event),\n\t\t\t\t\t\t\ttype: \"checkbox\",\n\t\t\t\t\t\t\tdisabled: __props.busy\n\t\t\t\t\t\t}, null, 8, _hoisted_7$7), [[vModelCheckbox, enabled.value]]), _cache[5] || (_cache[5] = createBaseVNode(\"span\", null, [createBaseVNode(\"strong\", null, \"Allow delegation to this profile\"), createBaseVNode(\"small\", null, \"Exposes it to forge_subagent discovery and execution in this trusted project.\")], -1))]),\n\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_8$7, [_cache[6] || (_cache[6] = createBaseVNode(\"span\", null, \"Backend override\", -1)), withDirectives(createBaseVNode(\"select\", {\n\t\t\t\t\t\t\tid: \"delegationBackend\",\n\t\t\t\t\t\t\t\"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event) => backend.value = $event),\n\t\t\t\t\t\t\tdisabled: __props.busy\n\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"option\", _hoisted_10$7, \"Default (\" + toDisplayString(__props.summary.defaultBackend) + \" · \" + toDisplayString(__props.summary.defaultBackendSource) + \")\", 1),\n\t\t\t\t\t\t\t(openBlock(true), createElementBlock(Fragment, null, renderList(__props.summary.backends, (option) => {\n\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"option\", {\n\t\t\t\t\t\t\t\t\tkey: option.id,\n\t\t\t\t\t\t\t\t\tvalue: option.id\n\t\t\t\t\t\t\t\t}, toDisplayString(option.id) + \" @ \" + toDisplayString(option.version), 9, _hoisted_11$7);\n\t\t\t\t\t\t\t}), 128)),\n\t\t\t\t\t\t\t!backendKnown.value ? (openBlock(), createElementBlock(\"option\", {\n\t\t\t\t\t\t\t\tkey: 0,\n\t\t\t\t\t\t\t\tvalue: backend.value\n\t\t\t\t\t\t\t}, toDisplayString(backend.value) + \" (not registered)\", 9, _hoisted_12$6)) : createCommentVNode(\"v-if\", true)\n\t\t\t\t\t\t], 8, _hoisted_9$7), [[vModelSelect, backend.value]])]),\n\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_13$6, [\n\t\t\t\t\t\t\t_cache[7] || (_cache[7] = createBaseVNode(\"span\", null, \"Timeout override (ms)\", -1)),\n\t\t\t\t\t\t\twithDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\tid: \"delegationTimeout\",\n\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": _cache[2] || (_cache[2] = ($event) => timeoutText.value = $event),\n\t\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t\t\tmin: TIMEOUT_MIN,\n\t\t\t\t\t\t\t\tmax: TIMEOUT_MAX,\n\t\t\t\t\t\t\t\tstep: \"1000\",\n\t\t\t\t\t\t\t\tplaceholder: `Default ${__props.summary.timeoutMs} ms (${__props.summary.timeoutSource})`,\n\t\t\t\t\t\t\t\tdisabled: __props.busy,\n\t\t\t\t\t\t\t\tautocomplete: \"off\"\n\t\t\t\t\t\t\t}, null, 8, _hoisted_14$6), [[vModelText, timeoutText.value]]),\n\t\t\t\t\t\t\tcreateBaseVNode(\"small\", null, \"Best-effort host abort, \" + toDisplayString(TIMEOUT_MIN) + \"–\" + toDisplayString(TIMEOUT_MAX) + \" ms. Empty inherits the configured default.\")\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_15$6, [\n\t\t\t\t\t\t\ttimeoutInvalid.value ? (openBlock(), createElementBlock(\"span\", _hoisted_16$6, \" Timeout must be an integer from \" + toDisplayString(TIMEOUT_MIN) + \" to \" + toDisplayString(TIMEOUT_MAX) + \" ms. \")) : localError.value ? (openBlock(), createElementBlock(\"span\", _hoisted_17$6, toDisplayString(localError.value), 1)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\t_cache[8] || (_cache[8] = createBaseVNode(\"span\", { class: \"action-spacer\" }, null, -1)),\n\t\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\t\tid: \"delegationSaveBtn\",\n\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\tclass: \"primary\",\n\t\t\t\t\t\t\t\tdisabled: __props.busy || !dirty.value || timeoutInvalid.value,\n\t\t\t\t\t\t\t\tonClick: save\n\t\t\t\t\t\t\t}, \" Save delegation \", 8, _hoisted_18$5)\n\t\t\t\t\t\t])\n\t\t\t\t\t]),\n\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_19$5, [\n\t\t\t\t\t\t_cache[12] || (_cache[12] = createTextVNode(\" Read-only execution boundary: shared-user subprocess with stack-filtered read tools. Approval is required per run unless this trusted project sets \", -1)),\n\t\t\t\t\t\t_cache[13] || (_cache[13] = createBaseVNode(\"code\", null, \"subagents.allowAgentInvocationWithoutApproval\", -1)),\n\t\t\t\t\t\t__props.summary.allowAgentInvocationWithoutApproval ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [\n\t\t\t\t\t\t\t_cache[9] || (_cache[9] = createTextVNode(\" (currently \", -1)),\n\t\t\t\t\t\t\t_cache[10] || (_cache[10] = createBaseVNode(\"strong\", null, \"on\", -1)),\n\t\t\t\t\t\t\t_cache[11] || (_cache[11] = createTextVNode(\")\", -1))\n\t\t\t\t\t\t], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(\" (currently off)\")], 64)),\n\t\t\t\t\t\t_cache[14] || (_cache[14] = createTextVNode(\". Configure project defaults (\", -1)),\n\t\t\t\t\t\t_cache[15] || (_cache[15] = createBaseVNode(\"code\", null, \"subagents.backend\", -1)),\n\t\t\t\t\t\t_cache[16] || (_cache[16] = createTextVNode(\", \", -1)),\n\t\t\t\t\t\t_cache[17] || (_cache[17] = createBaseVNode(\"code\", null, \"subagents.timeoutMs\", -1)),\n\t\t\t\t\t\t_cache[18] || (_cache[18] = createTextVNode(\") in \", -1)),\n\t\t\t\t\t\t_cache[19] || (_cache[19] = createBaseVNode(\"code\", null, \".pi/forge/config.json\", -1)),\n\t\t\t\t\t\t_cache[20] || (_cache[20] = createTextVNode(\". \", -1))\n\t\t\t\t\t]),\n\t\t\t\t\t(openBlock(true), createElementBlock(Fragment, null, renderList(__props.summary.warnings, (warning) => {\n\t\t\t\t\t\treturn openBlock(), createElementBlock(\"div\", {\n\t\t\t\t\t\t\tkey: warning,\n\t\t\t\t\t\t\tclass: \"delegation-warning\"\n\t\t\t\t\t\t}, toDisplayString(warning), 1);\n\t\t\t\t\t}), 128))\n\t\t\t\t]);\n\t\t\t};\n\t\t}\n\t});\n\t//#endregion\n\t//#region \\0plugin-vue:export-helper\n\tvar _plugin_vue_export_helper_default = (sfc, props) => {\n\t\tconst target = sfc.__vccOpts || sfc;\n\t\tfor (const [key, val] of props) target[key] = val;\n\t\treturn target;\n\t};\n\t//#endregion\n\t//#region src/web-editor/client/components/ProfileDelegation.vue\n\tvar ProfileDelegation_default = /*#__PURE__*/ _plugin_vue_export_helper_default(ProfileDelegation_vue_vue_type_script_setup_true_lang_default, [[\"__scopeId\", \"data-v-ab400c27\"]]);\n\t//#endregion\n\t//#region src/web-editor/client/components/ProfileEditor.vue?vue&type=script&setup=true&lang.ts\n\tinit_vue_runtime_esm_bundler();\n\tinit_api();\n\tvar _hoisted_1$7 = { class: \"profile-editor profile-card\" };\n\tvar _hoisted_2$7 = { class: \"profile-editor-head\" };\n\tvar _hoisted_3$7 = { class: \"profile-editor-title\" };\n\tvar _hoisted_4$7 = {\n\t\tkey: 0,\n\t\tclass: \"profile-editor-dirty\"\n\t};\n\tvar _hoisted_5$7 = [\"disabled\"];\n\tvar _hoisted_6$6 = [\"disabled\"];\n\tvar _hoisted_7$6 = [\"disabled\"];\n\tvar _hoisted_8$6 = { class: \"profile-form\" };\n\tvar _hoisted_9$6 = { class: \"profile-field\" };\n\tvar _hoisted_10$6 = [\"readonly\"];\n\tvar _hoisted_11$6 = { class: \"profile-field\" };\n\tvar _hoisted_12$5 = { class: \"profile-field profile-field-wide\" };\n\tvar _hoisted_13$5 = { class: \"profile-field\" };\n\tvar _hoisted_14$5 = { id: \"profileProviderOptions\" };\n\tvar _hoisted_15$5 = [\"value\"];\n\tvar _hoisted_16$5 = { class: \"profile-field\" };\n\tvar _hoisted_17$5 = { id: \"profileModelOptions\" };\n\tvar _hoisted_18$4 = [\"value\", \"label\"];\n\tvar _hoisted_19$4 = {\n\t\tkey: 0,\n\t\tclass: \"profile-field-warning\",\n\t\t\"data-model-auth-warning\": \"\"\n\t};\n\tvar _hoisted_20$4 = { class: \"profile-field\" };\n\tvar _hoisted_21$4 = [\"value\"];\n\tvar _hoisted_22$4 = { class: \"profile-field\" };\n\tvar _hoisted_23$4 = [\"value\"];\n\tvar _hoisted_24$3 = { class: \"profile-check profile-field-wide\" };\n\tvar _hoisted_25$3 = {\n\t\tkey: 1,\n\t\tclass: \"profile-editor-validation\"\n\t};\n\tvar _hoisted_26$3 = { class: \"profile-diagnostics\" };\n\tvar _hoisted_27$3 = {\n\t\tkey: 0,\n\t\tclass: \"diagnostic info\"\n\t};\n\t//#endregion\n\t//#region src/web-editor/client/components/ProfileEditor.vue\n\tvar ProfileEditor_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({\n\t\t__name: \"ProfileEditor\",\n\t\tprops: {\n\t\t\tmode: {},\n\t\t\tcollection: {},\n\t\t\tsource: {}\n\t\t},\n\t\temits: [\"cancel\", \"saved\"],\n\t\tsetup(__props, { emit: __emit }) {\n\t\t\tconst props = __props;\n\t\t\tconst emit = __emit;\n\t\t\tconst thinkingLevels = [\n\t\t\t\t\"off\",\n\t\t\t\t\"minimal\",\n\t\t\t\t\"low\",\n\t\t\t\t\"medium\",\n\t\t\t\t\"high\",\n\t\t\t\t\"xhigh\",\n\t\t\t\t\"max\"\n\t\t\t];\n\t\t\tconst api = createEditorApi(new URLSearchParams(location.search).get(\"token\") || \"\");\n\t\t\tconst initial = props.source ?? defaultProfile();\n\t\t\tconst draft = /* @__PURE__ */ reactive({\n\t\t\t\tid: initial.id,\n\t\t\t\tname: initial.name ?? \"\",\n\t\t\t\tdescription: initial.description ?? \"\",\n\t\t\t\tautoActivate: initial.autoActivate === true,\n\t\t\t\tprovider: initial.model.provider,\n\t\t\t\tmodelId: initial.model.id,\n\t\t\t\tthinkingLevel: initial.thinkingLevel,\n\t\t\t\tpromptStack: initial.promptStack ?? \"\"\n\t\t\t});\n\t\t\tconst validation = /* @__PURE__ */ ref();\n\t\t\tconst status = /* @__PURE__ */ ref(\"\");\n\t\t\tconst error = /* @__PURE__ */ ref(\"\");\n\t\t\tconst busy = /* @__PURE__ */ ref(false);\n\t\t\tconst providerOptions = computed(() => {\n\t\t\t\treturn [...new Set(props.collection.models.map((model) => model.provider))].sort();\n\t\t\t});\n\t\t\tconst modelOptions = computed(() => {\n\t\t\t\treturn props.collection.models.filter((model) => !draft.provider || model.provider === draft.provider).sort((left, right) => left.id.localeCompare(right.id));\n\t\t\t});\n\t\t\tconst promptStackOptions = computed(() => {\n\t\t\t\tconst options = [...props.collection.promptStacks];\n\t\t\t\tif (draft.promptStack && !options.some((stack) => stack.id === draft.promptStack)) options.push({ id: draft.promptStack });\n\t\t\t\treturn options.sort((left, right) => left.id.localeCompare(right.id));\n\t\t\t});\n\t\t\tconst typedModelUnavailable = computed(() => {\n\t\t\t\tconst provider = draft.provider.trim();\n\t\t\t\tconst modelId = draft.modelId.trim();\n\t\t\t\tif (!provider || !modelId) return false;\n\t\t\t\tconst match = props.collection.models.find((model) => model.provider === provider && model.id === modelId);\n\t\t\t\treturn match ? !match.available : false;\n\t\t\t});\n\t\t\twatch(draft, () => {\n\t\t\t\tvalidation.value = void 0;\n\t\t\t\tstatus.value = \"\";\n\t\t\t\terror.value = \"\";\n\t\t\t}, { deep: true });\n\t\t\tfunction defaultProfile() {\n\t\t\t\tconst current = props.collection.status.current;\n\t\t\t\tconst fallbackModel = current.model ?? props.collection.models.find((model) => model.available) ?? props.collection.models[0];\n\t\t\t\treturn {\n\t\t\t\t\tschemaVersion: 1,\n\t\t\t\t\ttype: \"pi-forge.agent-profile\",\n\t\t\t\t\tid: \"\",\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tprovider: fallbackModel?.provider ?? \"\",\n\t\t\t\t\t\tid: fallbackModel?.id ?? \"\"\n\t\t\t\t\t},\n\t\t\t\t\tthinkingLevel: current.thinkingLevel,\n\t\t\t\t\tpromptStack: current.promptStack\n\t\t\t\t};\n\t\t\t}\n\t\t\tfunction profileFromDraft() {\n\t\t\t\treturn {\n\t\t\t\t\tschemaVersion: 1,\n\t\t\t\t\ttype: \"pi-forge.agent-profile\",\n\t\t\t\t\tid: draft.id.trim(),\n\t\t\t\t\tname: draft.name.trim() || void 0,\n\t\t\t\t\tdescription: draft.description.trim() || void 0,\n\t\t\t\t\tautoActivate: draft.autoActivate || void 0,\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tprovider: draft.provider.trim(),\n\t\t\t\t\t\tid: draft.modelId.trim()\n\t\t\t\t\t},\n\t\t\t\t\tthinkingLevel: draft.thinkingLevel,\n\t\t\t\t\tpromptStack: draft.promptStack || null\n\t\t\t\t};\n\t\t\t}\n\t\t\tconst initialSnapshot = JSON.stringify(profileFromDraft());\n\t\t\tconst dirty = computed(() => JSON.stringify(profileFromDraft()) !== initialSnapshot);\n\t\t\tfunction handleBeforeUnload(event) {\n\t\t\t\tif (!dirty.value) return;\n\t\t\t\tevent.preventDefault();\n\t\t\t\tevent.returnValue = \"\";\n\t\t\t}\n\t\t\tonMounted(() => window.addEventListener(\"beforeunload\", handleBeforeUnload));\n\t\t\tonBeforeUnmount(() => window.removeEventListener(\"beforeunload\", handleBeforeUnload));\n\t\t\tfunction requestCancel() {\n\t\t\t\tif (dirty.value && !window.confirm(\"Discard unsaved agent-profile changes?\")) return;\n\t\t\t\temit(\"cancel\");\n\t\t\t}\n\t\t\tasync function validateDraft() {\n\t\t\t\tbusy.value = true;\n\t\t\t\terror.value = \"\";\n\t\t\t\tstatus.value = \"\";\n\t\t\t\ttry {\n\t\t\t\t\tconst result = await api(\"/api/profiles/validate\", {\n\t\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\t\tbody: {\n\t\t\t\t\t\t\tprofile: profileFromDraft(),\n\t\t\t\t\t\t\texistingId: props.mode === \"edit\" ? props.source?.id : void 0\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tvalidation.value = result;\n\t\t\t\t\tstatus.value = result.errors ? `${result.errors} validation error${result.errors === 1 ? \"\" : \"s\"}` : result.warnings ? `Valid with ${result.warnings} warning${result.warnings === 1 ? \"\" : \"s\"}` : \"Valid and ready to apply\";\n\t\t\t\t\treturn result;\n\t\t\t\t} catch (caught) {\n\t\t\t\t\terror.value = caught instanceof Error ? caught.message : String(caught);\n\t\t\t\t\treturn;\n\t\t\t\t} finally {\n\t\t\t\t\tbusy.value = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tasync function saveDraft() {\n\t\t\t\tbusy.value = true;\n\t\t\t\terror.value = \"\";\n\t\t\t\tstatus.value = \"\";\n\t\t\t\ttry {\n\t\t\t\t\tconst profile = profileFromDraft();\n\t\t\t\t\tconst path = props.mode === \"create\" ? \"/api/profiles\" : `/api/profiles/${encodeURIComponent(props.source.id)}`;\n\t\t\t\t\tconst result = await api(path, {\n\t\t\t\t\t\tmethod: props.mode === \"create\" ? \"POST\" : \"PUT\",\n\t\t\t\t\t\tbody: { profile }\n\t\t\t\t\t});\n\t\t\t\t\temit(\"saved\", result);\n\t\t\t\t} catch (caught) {\n\t\t\t\t\terror.value = caught instanceof Error ? caught.message : String(caught);\n\t\t\t\t} finally {\n\t\t\t\t\tbusy.value = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn (_ctx, _cache) => {\n\t\t\t\treturn openBlock(), createElementBlock(\"section\", _hoisted_1$7, [\n\t\t\t\t\tcreateBaseVNode(\"header\", _hoisted_2$7, [\n\t\t\t\t\t\tcreateBaseVNode(\"div\", null, [createBaseVNode(\"div\", _hoisted_3$7, toDisplayString(__props.mode === \"create\" ? \"New agent profile\" : `Edit ${__props.source?.id}`), 1), _cache[8] || (_cache[8] = createBaseVNode(\"div\", { class: \"profile-editor-note\" }, \" Profile application is preflighted separately; saving only updates the project-local definition. \", -1))]),\n\t\t\t\t\t\t_cache[9] || (_cache[9] = createBaseVNode(\"span\", { class: \"action-spacer\" }, null, -1)),\n\t\t\t\t\t\tdirty.value ? (openBlock(), createElementBlock(\"span\", _hoisted_4$7, \"Unsaved\")) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\tid: \"profileCancelBtn\",\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\tdisabled: busy.value,\n\t\t\t\t\t\t\tonClick: requestCancel\n\t\t\t\t\t\t}, \"Cancel\", 8, _hoisted_5$7),\n\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\tid: \"profileValidateBtn\",\n\t\t\t\t\t\t\t\"data-icon\": \"!\",\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\tdisabled: busy.value,\n\t\t\t\t\t\t\tonClick: validateDraft\n\t\t\t\t\t\t}, \" Validate \", 8, _hoisted_6$6),\n\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\tid: \"profileSaveBtn\",\n\t\t\t\t\t\t\tclass: \"primary\",\n\t\t\t\t\t\t\t\"data-icon\": \"✓\",\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\tdisabled: busy.value,\n\t\t\t\t\t\t\tonClick: saveDraft\n\t\t\t\t\t\t}, toDisplayString(__props.mode === \"create\" ? \"Create profile\" : \"Save profile\"), 9, _hoisted_7$6)\n\t\t\t\t\t]),\n\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_8$6, [\n\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_9$6, [\n\t\t\t\t\t\t\t_cache[10] || (_cache[10] = createBaseVNode(\"span\", null, \"Profile ID\", -1)),\n\t\t\t\t\t\t\twithDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\tid: \"profileId\",\n\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event) => draft.id = $event),\n\t\t\t\t\t\t\t\treadonly: __props.mode === \"edit\",\n\t\t\t\t\t\t\t\tplaceholder: \"reviewer\",\n\t\t\t\t\t\t\t\tautocomplete: \"off\"\n\t\t\t\t\t\t\t}, null, 8, _hoisted_10$6), [[vModelText, draft.id]]),\n\t\t\t\t\t\t\t_cache[11] || (_cache[11] = createBaseVNode(\"small\", null, \"Letters, numbers, dots, underscores, and hyphens; immutable after creation.\", -1))\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_11$6, [_cache[12] || (_cache[12] = createBaseVNode(\"span\", null, \"Name\", -1)), withDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\tid: \"profileName\",\n\t\t\t\t\t\t\t\"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event) => draft.name = $event),\n\t\t\t\t\t\t\tplaceholder: \"Reviewer\",\n\t\t\t\t\t\t\tautocomplete: \"off\"\n\t\t\t\t\t\t}, null, 512), [[vModelText, draft.name]])]),\n\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_12$5, [_cache[13] || (_cache[13] = createBaseVNode(\"span\", null, \"Description\", -1)), withDirectives(createBaseVNode(\"textarea\", {\n\t\t\t\t\t\t\tid: \"profileDescription\",\n\t\t\t\t\t\t\t\"onUpdate:modelValue\": _cache[2] || (_cache[2] = ($event) => draft.description = $event),\n\t\t\t\t\t\t\tplaceholder: \"What this profile is for.\"\n\t\t\t\t\t\t}, null, 512), [[vModelText, draft.description]])]),\n\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_13$5, [\n\t\t\t\t\t\t\t_cache[14] || (_cache[14] = createBaseVNode(\"span\", null, \"Model provider\", -1)),\n\t\t\t\t\t\t\twithDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\tid: \"profileModelProvider\",\n\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": _cache[3] || (_cache[3] = ($event) => draft.provider = $event),\n\t\t\t\t\t\t\t\tlist: \"profileProviderOptions\",\n\t\t\t\t\t\t\t\tautocomplete: \"off\"\n\t\t\t\t\t\t\t}, null, 512), [[vModelText, draft.provider]]),\n\t\t\t\t\t\t\tcreateBaseVNode(\"datalist\", _hoisted_14$5, [(openBlock(true), createElementBlock(Fragment, null, renderList(providerOptions.value, (provider) => {\n\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"option\", {\n\t\t\t\t\t\t\t\t\tkey: provider,\n\t\t\t\t\t\t\t\t\tvalue: provider\n\t\t\t\t\t\t\t\t}, null, 8, _hoisted_15$5);\n\t\t\t\t\t\t\t}), 128))])\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_16$5, [\n\t\t\t\t\t\t\t_cache[15] || (_cache[15] = createBaseVNode(\"span\", null, \"Model ID\", -1)),\n\t\t\t\t\t\t\twithDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\tid: \"profileModelId\",\n\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": _cache[4] || (_cache[4] = ($event) => draft.modelId = $event),\n\t\t\t\t\t\t\t\tlist: \"profileModelOptions\",\n\t\t\t\t\t\t\t\tautocomplete: \"off\"\n\t\t\t\t\t\t\t}, null, 512), [[vModelText, draft.modelId]]),\n\t\t\t\t\t\t\tcreateBaseVNode(\"datalist\", _hoisted_17$5, [(openBlock(true), createElementBlock(Fragment, null, renderList(modelOptions.value, (model) => {\n\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"option\", {\n\t\t\t\t\t\t\t\t\tkey: `${model.provider}/${model.id}`,\n\t\t\t\t\t\t\t\t\tvalue: model.id,\n\t\t\t\t\t\t\t\t\tlabel: `${model.name || model.id}${model.available ? \"\" : \" (authentication unavailable)\"}`\n\t\t\t\t\t\t\t\t}, null, 8, _hoisted_18$4);\n\t\t\t\t\t\t\t}), 128))]),\n\t\t\t\t\t\t\ttypedModelUnavailable.value ? (openBlock(), createElementBlock(\"small\", _hoisted_19$4, \" This model has no configured authentication; applying the profile will fail preflight. \")) : createCommentVNode(\"v-if\", true)\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_20$4, [_cache[16] || (_cache[16] = createBaseVNode(\"span\", null, \"Thinking level\", -1)), withDirectives(createBaseVNode(\"select\", {\n\t\t\t\t\t\t\tid: \"profileThinkingLevel\",\n\t\t\t\t\t\t\t\"onUpdate:modelValue\": _cache[5] || (_cache[5] = ($event) => draft.thinkingLevel = $event)\n\t\t\t\t\t\t}, [(openBlock(), createElementBlock(Fragment, null, renderList(thinkingLevels, (level) => {\n\t\t\t\t\t\t\treturn createBaseVNode(\"option\", {\n\t\t\t\t\t\t\t\tkey: level,\n\t\t\t\t\t\t\t\tvalue: level\n\t\t\t\t\t\t\t}, toDisplayString(level), 9, _hoisted_21$4);\n\t\t\t\t\t\t}), 64))], 512), [[vModelSelect, draft.thinkingLevel]])]),\n\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_22$4, [_cache[18] || (_cache[18] = createBaseVNode(\"span\", null, \"Prompt stack\", -1)), withDirectives(createBaseVNode(\"select\", {\n\t\t\t\t\t\t\tid: \"profilePromptStack\",\n\t\t\t\t\t\t\t\"onUpdate:modelValue\": _cache[6] || (_cache[6] = ($event) => draft.promptStack = $event)\n\t\t\t\t\t\t}, [_cache[17] || (_cache[17] = createBaseVNode(\"option\", { value: \"\" }, \"(none)\", -1)), (openBlock(true), createElementBlock(Fragment, null, renderList(promptStackOptions.value, (stack) => {\n\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"option\", {\n\t\t\t\t\t\t\t\tkey: stack.id,\n\t\t\t\t\t\t\t\tvalue: stack.id\n\t\t\t\t\t\t\t}, toDisplayString(stack.name ? `${stack.id} — ${stack.name}` : stack.id), 9, _hoisted_23$4);\n\t\t\t\t\t\t}), 128))], 512), [[vModelSelect, draft.promptStack]])]),\n\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_24$3, [withDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\tid: \"profileAutoActivate\",\n\t\t\t\t\t\t\t\"onUpdate:modelValue\": _cache[7] || (_cache[7] = ($event) => draft.autoActivate = $event),\n\t\t\t\t\t\t\ttype: \"checkbox\"\n\t\t\t\t\t\t}, null, 512), [[vModelCheckbox, draft.autoActivate]]), _cache[19] || (_cache[19] = createBaseVNode(\"span\", null, [createBaseVNode(\"strong\", null, \"Auto-activate on a fresh session\"), createBaseVNode(\"small\", null, \"Only one project profile may request auto-activation.\")], -1))])\n\t\t\t\t\t]),\n\t\t\t\t\tstatus.value || error.value ? (openBlock(), createElementBlock(\"div\", {\n\t\t\t\t\t\tkey: 0,\n\t\t\t\t\t\tid: \"profileEditorStatus\",\n\t\t\t\t\t\tclass: normalizeClass([\"profile-editor-status\", { error: !!error.value }])\n\t\t\t\t\t}, toDisplayString(error.value || status.value), 3)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\tvalidation.value ? (openBlock(), createElementBlock(\"div\", _hoisted_25$3, [createBaseVNode(\"div\", { class: normalizeClass([\"profile-editor-validation-summary\", {\n\t\t\t\t\t\terror: validation.value.errors > 0,\n\t\t\t\t\t\tready: validation.value.errors === 0\n\t\t\t\t\t}]) }, toDisplayString(validation.value.preview.applicable ? \"Ready to apply\" : \"Preflight failed\") + \" · \" + toDisplayString(validation.value.errors) + \" error(s) · \" + toDisplayString(validation.value.warnings) + \" warning(s) \", 3), createBaseVNode(\"div\", _hoisted_26$3, [!validation.value.diagnostics.length ? (openBlock(), createElementBlock(\"div\", _hoisted_27$3, \"No diagnostics.\")) : createCommentVNode(\"v-if\", true), (openBlock(true), createElementBlock(Fragment, null, renderList(validation.value.diagnostics, (diagnostic, index) => {\n\t\t\t\t\t\treturn openBlock(), createElementBlock(\"div\", {\n\t\t\t\t\t\t\tkey: `${diagnostic.field || \"\"}-${index}-${diagnostic.message}`,\n\t\t\t\t\t\t\tclass: normalizeClass([\"diagnostic\", diagnostic.level])\n\t\t\t\t\t\t}, [createBaseVNode(\"strong\", null, toDisplayString(diagnostic.level.toUpperCase()) + toDisplayString(diagnostic.field ? ` · ${diagnostic.field}` : \"\"), 1), createTextVNode(\": \" + toDisplayString(diagnostic.message), 1)], 2);\n\t\t\t\t\t}), 128))])])) : createCommentVNode(\"v-if\", true)\n\t\t\t\t]);\n\t\t\t};\n\t\t}\n\t}), [[\"__scopeId\", \"data-v-64ce7038\"]]);\n\t//#endregion\n\t//#region src/web-editor/client/components/ProfileBrowser.vue?vue&type=script&setup=true&lang.ts\n\tinit_vue_runtime_esm_bundler();\n\tinit_api();\n\tvar _hoisted_1$6 = { class: \"profile-surface\" };\n\tvar _hoisted_2$6 = { class: \"profile-toolbar\" };\n\tvar _hoisted_3$6 = {\n\t\tid: \"profilesStatus\",\n\t\tclass: \"status\"\n\t};\n\tvar _hoisted_4$6 = [\"disabled\"];\n\tvar _hoisted_5$6 = [\"disabled\"];\n\tvar _hoisted_6$5 = {\n\t\tkey: 0,\n\t\tclass: \"profile-message error\"\n\t};\n\tvar _hoisted_7$5 = {\n\t\tkey: 1,\n\t\tclass: \"profile-message warning\"\n\t};\n\tvar _hoisted_8$5 = {\n\t\tkey: 2,\n\t\tclass: \"profile-layout\"\n\t};\n\tvar _hoisted_9$5 = { class: \"profile-sidebar\" };\n\tvar _hoisted_10$5 = { class: \"side-head\" };\n\tvar _hoisted_11$5 = { class: \"cwd\" };\n\tvar _hoisted_12$4 = { class: \"profile-list\" };\n\tvar _hoisted_13$4 = [\n\t\t\"disabled\",\n\t\t\"data-profile-id\",\n\t\t\"onClick\"\n\t];\n\tvar _hoisted_14$4 = { class: \"profile-row-title\" };\n\tvar _hoisted_15$4 = {\n\t\tkey: 0,\n\t\tclass: \"badge\"\n\t};\n\tvar _hoisted_16$4 = {\n\t\tkey: 1,\n\t\tclass: \"badge\"\n\t};\n\tvar _hoisted_17$4 = {\n\t\tkey: 2,\n\t\tclass: \"badge\"\n\t};\n\tvar _hoisted_18$3 = { class: \"profile-row-name\" };\n\tvar _hoisted_19$3 = { class: \"profile-row-meta\" };\n\tvar _hoisted_20$3 = {\n\t\tkey: 0,\n\t\tclass: \"profile-empty\"\n\t};\n\tvar _hoisted_21$3 = { class: \"profile-main\" };\n\tvar _hoisted_22$3 = { class: \"profile-card profile-summary-card\" };\n\tvar _hoisted_23$3 = { class: \"profile-title\" };\n\tvar _hoisted_24$2 = { class: \"profile-path\" };\n\tvar _hoisted_25$2 = { class: \"profile-summary-actions\" };\n\tvar _hoisted_26$2 = [\"disabled\", \"title\"];\n\tvar _hoisted_27$2 = [\"disabled\"];\n\tvar _hoisted_28$2 = {\n\t\tkey: 0,\n\t\tclass: \"profile-description\"\n\t};\n\tvar _hoisted_29$2 = { class: \"profile-card\" };\n\tvar _hoisted_30$2 = { class: \"profile-transition-grid\" };\n\tvar _hoisted_31$2 = { class: \"profile-detail-row\" };\n\tvar _hoisted_32$2 = { class: \"profile-card\" };\n\tvar _hoisted_33$2 = { class: \"profile-diagnostics\" };\n\tvar _hoisted_34$2 = {\n\t\tkey: 0,\n\t\tclass: \"diagnostic info\"\n\t};\n\tvar _hoisted_35$2 = {\n\t\tkey: 2,\n\t\tclass: \"profile-card profile-empty\"\n\t};\n\tvar _hoisted_36$2 = { class: \"profile-card profile-runtime-card\" };\n\tvar _hoisted_37$2 = { class: \"profile-detail-row\" };\n\tvar _hoisted_38$2 = { class: \"profile-detail-row\" };\n\tvar _hoisted_39$2 = { class: \"profile-detail-row\" };\n\tvar _hoisted_40$2 = { class: \"profile-drift\" };\n\tvar _hoisted_41$2 = {\n\t\tkey: 1,\n\t\tclass: \"profile-note\"\n\t};\n\t//#endregion\n\t//#region src/web-editor/client/components/ProfileBrowser.vue\n\tvar ProfileBrowser_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({\n\t\t__name: \"ProfileBrowser\",\n\t\tprops: { active: { type: Boolean } },\n\t\tsetup(__props) {\n\t\t\tconst props = __props;\n\t\t\tconst api = createEditorApi(new URLSearchParams(location.search).get(\"token\") || \"\");\n\t\t\tconst collection = /* @__PURE__ */ ref();\n\t\t\tconst selectedPath = /* @__PURE__ */ ref(\"\");\n\t\t\tconst loadError = /* @__PURE__ */ ref(\"\");\n\t\t\tconst loading = /* @__PURE__ */ ref(false);\n\t\t\tconst editorMode = /* @__PURE__ */ ref();\n\t\t\tconst profileActionStatus = /* @__PURE__ */ ref(\"\");\n\t\t\tconst profileActionError = /* @__PURE__ */ ref(\"\");\n\t\t\tconst profileActionBusy = /* @__PURE__ */ ref(false);\n\t\t\tconst delegationDirty = /* @__PURE__ */ ref(false);\n\t\t\tconst delegationRevision = /* @__PURE__ */ ref(0);\n\t\t\tfunction preferredProfilePath(entries) {\n\t\t\t\treturn (entries.find((entry) => entry.lastApplied) ?? entries.find((entry) => entry.errors === 0) ?? entries[0])?.filePath ?? \"\";\n\t\t\t}\n\t\t\tconst selected = computed(() => {\n\t\t\t\tconst entries = collection.value?.profiles || [];\n\t\t\t\treturn entries.find((entry) => entry.filePath === selectedPath.value) ?? entries.find((entry) => entry.filePath === preferredProfilePath(entries)) ?? entries[0];\n\t\t\t});\n\t\t\twatch(() => props.active, (active) => {\n\t\t\t\tif (active) loadProfiles();\n\t\t\t}, { immediate: true });\n\t\t\tasync function loadProfiles(reloadFromDisk = false) {\n\t\t\t\tloading.value = true;\n\t\t\t\tloadError.value = \"\";\n\t\t\t\tprofileActionStatus.value = \"\";\n\t\t\t\tprofileActionError.value = \"\";\n\t\t\t\ttry {\n\t\t\t\t\tconst next = await api(reloadFromDisk ? \"/api/profiles/reload\" : \"/api/profiles\", reloadFromDisk ? { method: \"POST\" } : void 0);\n\t\t\t\t\tcollection.value = next;\n\t\t\t\t\tif (!next.profiles.some((entry) => entry.filePath === selectedPath.value)) selectedPath.value = preferredProfilePath(next.profiles);\n\t\t\t\t\tif (reloadFromDisk) editorMode.value = void 0;\n\t\t\t\t} catch (error) {\n\t\t\t\t\tloadError.value = error instanceof Error ? error.message : String(error);\n\t\t\t\t} finally {\n\t\t\t\t\tloading.value = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction confirmDiscardDelegation() {\n\t\t\t\tif (!delegationDirty.value) return true;\n\t\t\t\tif (!window.confirm(\"Discard unsaved delegation changes?\")) return false;\n\t\t\t\tdelegationDirty.value = false;\n\t\t\t\tdelegationRevision.value += 1;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tfunction selectProfile(entry) {\n\t\t\t\tif (entry.filePath === selected.value?.filePath) return;\n\t\t\t\tif (!confirmDiscardDelegation()) return;\n\t\t\t\tselectedPath.value = entry.filePath;\n\t\t\t\teditorMode.value = void 0;\n\t\t\t\tprofileActionStatus.value = \"\";\n\t\t\t\tprofileActionError.value = \"\";\n\t\t\t}\n\t\t\tfunction startEditor(mode) {\n\t\t\t\tif (!confirmDiscardDelegation()) return;\n\t\t\t\teditorMode.value = mode;\n\t\t\t}\n\t\t\tfunction refreshProfiles() {\n\t\t\t\tif (!confirmDiscardDelegation()) return;\n\t\t\t\tloadProfiles(true);\n\t\t\t}\n\t\t\tfunction handleProfileSaved(mutation) {\n\t\t\t\tcollection.value = mutation.collection;\n\t\t\t\tselectedPath.value = mutation.selectedPath;\n\t\t\t\tconst saved = mutation.collection.profiles.find((entry) => entry.filePath === mutation.selectedPath);\n\t\t\t\tprofileActionStatus.value = `${editorMode.value === \"create\" ? \"Created\" : \"Saved\"} ${saved?.profile.id || \"profile\"}`;\n\t\t\t\tprofileActionError.value = \"\";\n\t\t\t\teditorMode.value = void 0;\n\t\t\t}\n\t\t\tasync function applySelectedProfile() {\n\t\t\t\tconst target = selected.value;\n\t\t\t\tif (!target) return;\n\t\t\t\tprofileActionBusy.value = true;\n\t\t\t\tprofileActionStatus.value = \"\";\n\t\t\t\tprofileActionError.value = \"\";\n\t\t\t\ttry {\n\t\t\t\t\tconst result = await api(`/api/profiles/${encodeURIComponent(target.profile.id)}/apply`, { method: \"POST\" });\n\t\t\t\t\tcollection.value = result.collection;\n\t\t\t\t\tselectedPath.value = result.selectedPath;\n\t\t\t\t\tprofileActionStatus.value = `Applied ${target.profile.id} once`;\n\t\t\t\t\twindow.dispatchEvent(new Event(\"pi-forge:profile-applied\"));\n\t\t\t\t} catch (error) {\n\t\t\t\t\tprofileActionError.value = error instanceof Error ? error.message : String(error);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst refreshed = await api(\"/api/profiles\");\n\t\t\t\t\t\tcollection.value = refreshed;\n\t\t\t\t\t\tif (!refreshed.profiles.some((entry) => entry.filePath === selectedPath.value)) selectedPath.value = refreshed.profiles[0]?.filePath || \"\";\n\t\t\t\t\t} catch (refreshError) {\n\t\t\t\t\t\tconst detail = refreshError instanceof Error ? refreshError.message : String(refreshError);\n\t\t\t\t\t\tprofileActionError.value += ` Runtime refresh failed: ${detail}`;\n\t\t\t\t\t}\n\t\t\t\t\twindow.dispatchEvent(new Event(\"pi-forge:profile-applied\"));\n\t\t\t\t} finally {\n\t\t\t\t\tprofileActionBusy.value = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction handleDelegationSaved(mutation, message) {\n\t\t\t\tcollection.value = mutation.collection;\n\t\t\t\tselectedPath.value = mutation.selectedPath;\n\t\t\t\tprofileActionStatus.value = message;\n\t\t\t\tprofileActionError.value = \"\";\n\t\t\t}\n\t\t\tfunction handleDelegationFailed(message) {\n\t\t\t\tprofileActionStatus.value = \"\";\n\t\t\t\tprofileActionError.value = message;\n\t\t\t}\n\t\t\tasync function deleteSelectedProfile() {\n\t\t\t\tconst target = selected.value;\n\t\t\t\tif (!target) return;\n\t\t\t\tif (!confirmDiscardDelegation()) return;\n\t\t\t\tif (!window.confirm(`Delete agent profile ${target.profile.id} and its delegation settings?\\n\\n${target.filePath}`)) return;\n\t\t\t\tprofileActionBusy.value = true;\n\t\t\t\tprofileActionStatus.value = \"\";\n\t\t\t\tprofileActionError.value = \"\";\n\t\t\t\ttry {\n\t\t\t\t\tconst result = await api(`/api/profiles/${encodeURIComponent(target.profile.id)}`, { method: \"DELETE\" });\n\t\t\t\t\tcollection.value = result.collection;\n\t\t\t\t\tselectedPath.value = result.selectedPath;\n\t\t\t\t\tprofileActionStatus.value = `Deleted ${target.profile.id}`;\n\t\t\t\t} catch (error) {\n\t\t\t\t\tprofileActionError.value = error instanceof Error ? error.message : String(error);\n\t\t\t\t} finally {\n\t\t\t\t\tprofileActionBusy.value = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction modelLabel(model) {\n\t\t\t\treturn model ? `${model.provider}/${model.id}` : \"(none)\";\n\t\t\t}\n\t\t\tfunction promptStackLabel(value) {\n\t\t\t\treturn value ?? \"(none)\";\n\t\t\t}\n\t\t\tfunction profileState(entry) {\n\t\t\t\tif (entry.errors > 0) return `${entry.errors} error${entry.errors === 1 ? \"\" : \"s\"}`;\n\t\t\t\tif (entry.warnings > 0) return `${entry.warnings} warning${entry.warnings === 1 ? \"\" : \"s\"}`;\n\t\t\t\treturn \"ready\";\n\t\t\t}\n\t\t\tfunction driftLabel(changed) {\n\t\t\t\treturn changed ? \"drifted\" : \"unchanged\";\n\t\t\t}\n\t\t\treturn (_ctx, _cache) => {\n\t\t\t\treturn openBlock(), createElementBlock(\"section\", _hoisted_1$6, [createBaseVNode(\"header\", _hoisted_2$6, [\n\t\t\t\t\t_cache[5] || (_cache[5] = createBaseVNode(\"div\", null, [createBaseVNode(\"div\", { class: \"profile-heading\" }, \"Agent profiles\"), createBaseVNode(\"div\", { class: \"profile-subheading\" }, \" One-shot model, thinking, and prompt-stack presets. Applying a profile does not continuously own runtime state. \")], -1)),\n\t\t\t\t\t_cache[6] || (_cache[6] = createBaseVNode(\"span\", { class: \"action-spacer\" }, null, -1)),\n\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_3$6, toDisplayString(loading.value || profileActionBusy.value ? \"Working\" : loadError.value || profileActionError.value || profileActionStatus.value || `${collection.value?.profiles.length || 0} profile(s)`), 1),\n\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\tid: \"profileNewBtn\",\n\t\t\t\t\t\t\"data-icon\": \"+\",\n\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\tdisabled: loading.value || profileActionBusy.value || !!editorMode.value || !collection.value?.trusted,\n\t\t\t\t\t\tonClick: _cache[0] || (_cache[0] = ($event) => startEditor(\"create\"))\n\t\t\t\t\t}, \" New profile \", 8, _hoisted_4$6),\n\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\tid: \"profileRefreshBtn\",\n\t\t\t\t\t\t\"data-icon\": \"↻\",\n\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\tdisabled: loading.value || profileActionBusy.value || !!editorMode.value,\n\t\t\t\t\t\tonClick: refreshProfiles\n\t\t\t\t\t}, \" Refresh \", 8, _hoisted_5$6)\n\t\t\t\t]), loadError.value ? (openBlock(), createElementBlock(\"div\", _hoisted_6$5, toDisplayString(loadError.value), 1)) : collection.value && !collection.value.trusted ? (openBlock(), createElementBlock(\"div\", _hoisted_7$5, \" This project is not trusted, so project agent profiles are not loaded. \")) : collection.value ? (openBlock(), createElementBlock(\"div\", _hoisted_8$5, [createBaseVNode(\"aside\", _hoisted_9$5, [createBaseVNode(\"div\", _hoisted_10$5, [_cache[7] || (_cache[7] = createBaseVNode(\"div\", { class: \"side-title\" }, \"Project profiles\", -1)), createBaseVNode(\"div\", _hoisted_11$5, toDisplayString(collection.value.profileDirectory), 1)]), createBaseVNode(\"div\", _hoisted_12$4, [(openBlock(true), createElementBlock(Fragment, null, renderList(collection.value.profiles, (entry) => {\n\t\t\t\t\treturn openBlock(), createElementBlock(\"button\", {\n\t\t\t\t\t\tkey: entry.filePath,\n\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\tclass: normalizeClass([\"profile-row\", { selected: selected.value?.filePath === entry.filePath }]),\n\t\t\t\t\t\tdisabled: profileActionBusy.value || !!editorMode.value,\n\t\t\t\t\t\t\"data-profile-row\": \"\",\n\t\t\t\t\t\t\"data-profile-id\": entry.profile.id,\n\t\t\t\t\t\tonClick: ($event) => selectProfile(entry)\n\t\t\t\t\t}, [\n\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_14$4, [\n\t\t\t\t\t\t\tcreateTextVNode(toDisplayString(entry.profile.id) + \" \", 1),\n\t\t\t\t\t\t\tentry.profile.autoActivate ? (openBlock(), createElementBlock(\"span\", _hoisted_15$4, \"auto\")) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\tentry.subagent.enabled ? (openBlock(), createElementBlock(\"span\", _hoisted_16$4, \"subagent\")) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\tentry.lastApplied ? (openBlock(), createElementBlock(\"span\", _hoisted_17$4, \"last applied\")) : createCommentVNode(\"v-if\", true)\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_18$3, toDisplayString(entry.profile.name || \"(unnamed)\"), 1),\n\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_19$3, toDisplayString(modelLabel(entry.profile.model)) + \" · \" + toDisplayString(entry.profile.thinkingLevel), 1),\n\t\t\t\t\t\tcreateBaseVNode(\"span\", { class: normalizeClass([\"profile-row-state\", {\n\t\t\t\t\t\t\terror: entry.errors > 0,\n\t\t\t\t\t\t\twarning: !entry.errors && entry.warnings > 0,\n\t\t\t\t\t\t\tready: !entry.errors && !entry.warnings\n\t\t\t\t\t\t}]) }, toDisplayString(profileState(entry)), 3)\n\t\t\t\t\t], 10, _hoisted_13$4);\n\t\t\t\t}), 128)), !collection.value.profiles.length ? (openBlock(), createElementBlock(\"div\", _hoisted_20$3, \" No project agent profiles found. \")) : createCommentVNode(\"v-if\", true)])]), createBaseVNode(\"main\", _hoisted_21$3, [editorMode.value ? (openBlock(), createBlock(ProfileEditor_default, {\n\t\t\t\t\tkey: `${editorMode.value}-${selected.value?.filePath || \"new\"}`,\n\t\t\t\t\tmode: editorMode.value,\n\t\t\t\t\tcollection: collection.value,\n\t\t\t\t\tsource: editorMode.value === \"edit\" ? selected.value?.profile : void 0,\n\t\t\t\t\tonCancel: _cache[1] || (_cache[1] = ($event) => editorMode.value = void 0),\n\t\t\t\t\tonSaved: handleProfileSaved\n\t\t\t\t}, null, 8, [\n\t\t\t\t\t\"mode\",\n\t\t\t\t\t\"collection\",\n\t\t\t\t\t\"source\"\n\t\t\t\t])) : selected.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [\n\t\t\t\t\tcreateBaseVNode(\"section\", _hoisted_22$3, [\n\t\t\t\t\t\tcreateBaseVNode(\"div\", null, [createBaseVNode(\"div\", _hoisted_23$3, toDisplayString(selected.value.profile.name || selected.value.profile.id), 1), createBaseVNode(\"div\", _hoisted_24$2, toDisplayString(selected.value.filePath), 1)]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_25$2, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"span\", { class: normalizeClass([\"profile-applicability\", {\n\t\t\t\t\t\t\t\tready: selected.value.preview.applicable,\n\t\t\t\t\t\t\t\terror: !selected.value.preview.applicable\n\t\t\t\t\t\t\t}]) }, toDisplayString(selected.value.preview.applicable ? \"Ready to apply\" : \"Preflight failed\"), 3),\n\t\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\t\tid: \"profileEditBtn\",\n\t\t\t\t\t\t\t\t\"data-icon\": \"✎\",\n\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\tonClick: _cache[2] || (_cache[2] = ($event) => startEditor(\"edit\"))\n\t\t\t\t\t\t\t}, \" Edit \"),\n\t\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\t\tid: \"profileApplyBtn\",\n\t\t\t\t\t\t\t\tclass: \"primary\",\n\t\t\t\t\t\t\t\t\"data-icon\": \"▶\",\n\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\tdisabled: profileActionBusy.value || !selected.value.preview.applicable,\n\t\t\t\t\t\t\t\ttitle: selected.value.preview.applicable ? \"Apply this profile once\" : \"Resolve preflight errors before applying\",\n\t\t\t\t\t\t\t\tonClick: applySelectedProfile\n\t\t\t\t\t\t\t}, \" Apply once \", 8, _hoisted_26$2),\n\t\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\t\tid: \"profileDeleteBtn\",\n\t\t\t\t\t\t\t\tclass: \"danger\",\n\t\t\t\t\t\t\t\t\"data-icon\": \"×\",\n\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\tdisabled: profileActionBusy.value,\n\t\t\t\t\t\t\t\tonClick: deleteSelectedProfile\n\t\t\t\t\t\t\t}, \" Delete \", 8, _hoisted_27$2)\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tselected.value.profile.description ? (openBlock(), createElementBlock(\"p\", _hoisted_28$2, toDisplayString(selected.value.profile.description), 1)) : createCommentVNode(\"v-if\", true)\n\t\t\t\t\t]),\n\t\t\t\t\tcreateBaseVNode(\"section\", _hoisted_29$2, [\n\t\t\t\t\t\t_cache[15] || (_cache[15] = createBaseVNode(\"div\", { class: \"profile-card-title\" }, \"One-shot transition\", -1)),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_30$2, [\n\t\t\t\t\t\t\t_cache[8] || (_cache[8] = createBaseVNode(\"div\", { class: \"profile-transition-head\" }, null, -1)),\n\t\t\t\t\t\t\t_cache[9] || (_cache[9] = createBaseVNode(\"div\", { class: \"profile-transition-head\" }, \"Current runtime\", -1)),\n\t\t\t\t\t\t\t_cache[10] || (_cache[10] = createBaseVNode(\"div\", { class: \"profile-transition-head\" }, \"Profile target\", -1)),\n\t\t\t\t\t\t\t_cache[11] || (_cache[11] = createBaseVNode(\"div\", null, \"Model\", -1)),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, toDisplayString(modelLabel(selected.value.preview.current.model)), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, toDisplayString(modelLabel(selected.value.preview.target.model)), 1),\n\t\t\t\t\t\t\t_cache[12] || (_cache[12] = createBaseVNode(\"div\", null, \"Thinking\", -1)),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, toDisplayString(selected.value.preview.current.thinkingLevel), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, toDisplayString(selected.value.preview.target.thinkingLevel), 1),\n\t\t\t\t\t\t\t_cache[13] || (_cache[13] = createBaseVNode(\"div\", null, \"Prompt stack\", -1)),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, toDisplayString(promptStackLabel(selected.value.preview.current.promptStack)), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, toDisplayString(promptStackLabel(selected.value.preview.target.promptStack)), 1)\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_31$2, [_cache[14] || (_cache[14] = createBaseVNode(\"span\", null, \"Effective tools after stack policy\", -1)), createBaseVNode(\"code\", null, toDisplayString(selected.value.preview.target.effectiveTools.join(\", \") || \"(none)\"), 1)])\n\t\t\t\t\t]),\n\t\t\t\t\tcreateBaseVNode(\"section\", _hoisted_32$2, [_cache[16] || (_cache[16] = createBaseVNode(\"div\", { class: \"profile-card-title\" }, \"Resolution diagnostics\", -1)), createBaseVNode(\"div\", _hoisted_33$2, [!selected.value.preview.diagnostics.length ? (openBlock(), createElementBlock(\"div\", _hoisted_34$2, \" No diagnostics. \")) : createCommentVNode(\"v-if\", true), (openBlock(true), createElementBlock(Fragment, null, renderList(selected.value.preview.diagnostics, (diagnostic, index) => {\n\t\t\t\t\t\treturn openBlock(), createElementBlock(\"div\", {\n\t\t\t\t\t\t\tkey: `${diagnostic.field || \"\"}-${index}-${diagnostic.message}`,\n\t\t\t\t\t\t\tclass: normalizeClass([\"diagnostic\", diagnostic.level])\n\t\t\t\t\t\t}, [createBaseVNode(\"strong\", null, toDisplayString(diagnostic.level.toUpperCase()) + toDisplayString(diagnostic.field ? ` · ${diagnostic.field}` : \"\"), 1), createTextVNode(\": \" + toDisplayString(diagnostic.message), 1)], 2);\n\t\t\t\t\t}), 128))])]),\n\t\t\t\t\t(openBlock(), createBlock(ProfileDelegation_default, {\n\t\t\t\t\t\tkey: `${selected.value.filePath}:${delegationRevision.value}`,\n\t\t\t\t\t\tentry: selected.value,\n\t\t\t\t\t\tsummary: collection.value.subagents,\n\t\t\t\t\t\tbusy: profileActionBusy.value,\n\t\t\t\t\t\t\"onUpdate:busy\": _cache[3] || (_cache[3] = ($event) => profileActionBusy.value = $event),\n\t\t\t\t\t\t\"onUpdate:dirty\": _cache[4] || (_cache[4] = ($event) => delegationDirty.value = $event),\n\t\t\t\t\t\tonSaved: handleDelegationSaved,\n\t\t\t\t\t\tonFailed: handleDelegationFailed\n\t\t\t\t\t}, null, 8, [\n\t\t\t\t\t\t\"entry\",\n\t\t\t\t\t\t\"summary\",\n\t\t\t\t\t\t\"busy\"\n\t\t\t\t\t]))\n\t\t\t\t], 64)) : !editorMode.value ? (openBlock(), createElementBlock(\"section\", _hoisted_35$2, [..._cache[17] || (_cache[17] = [\n\t\t\t\t\tcreateTextVNode(\" Create a project profile here or capture the current runtime with \", -1),\n\t\t\t\t\tcreateBaseVNode(\"code\", null, \"/profile save <id>\", -1),\n\t\t\t\t\tcreateTextVNode(\". \", -1)\n\t\t\t\t])])) : createCommentVNode(\"v-if\", true), createBaseVNode(\"section\", _hoisted_36$2, [\n\t\t\t\t\t_cache[21] || (_cache[21] = createBaseVNode(\"div\", { class: \"profile-card-title\" }, \"Runtime and provenance\", -1)),\n\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_37$2, [_cache[18] || (_cache[18] = createBaseVNode(\"span\", null, \"Current\", -1)), createBaseVNode(\"code\", null, toDisplayString(modelLabel(collection.value.status.current.model)) + \" · \" + toDisplayString(collection.value.status.current.thinkingLevel) + \" · \" + toDisplayString(promptStackLabel(collection.value.status.current.promptStack)), 1)]),\n\t\t\t\t\tcollection.value.status.lastApplied ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_38$2, [_cache[19] || (_cache[19] = createBaseVNode(\"span\", null, \"Last applied\", -1)), createBaseVNode(\"code\", null, toDisplayString(collection.value.status.lastApplied.provenance.profileId), 1)]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_39$2, [_cache[20] || (_cache[20] = createBaseVNode(\"span\", null, \"Source definition\", -1)), createBaseVNode(\"code\", null, toDisplayString(collection.value.status.lastApplied.sourceState), 1)]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_40$2, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, \"Model: \" + toDisplayString(driftLabel(collection.value.status.lastApplied.drift.model.changed)), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, \"Thinking: \" + toDisplayString(driftLabel(collection.value.status.lastApplied.drift.thinkingLevel.changed)), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, \"Stack: \" + toDisplayString(driftLabel(collection.value.status.lastApplied.drift.promptStack.changed)), 1)\n\t\t\t\t\t\t])\n\t\t\t\t\t], 64)) : (openBlock(), createElementBlock(\"div\", _hoisted_41$2, \"No profile has been applied in this session.\"))\n\t\t\t\t])])])) : createCommentVNode(\"v-if\", true)]);\n\t\t\t};\n\t\t}\n\t}), [[\"__scopeId\", \"data-v-2e4dceca\"]]);\n\t//#endregion\n\t//#region src/web-editor/client/dom.ts\n\tfunction el(id) {\n\t\tconst element = document.getElementById(id);\n\t\tif (!element) throw new Error(`Editor element #${id} is missing.`);\n\t\treturn element;\n\t}\n\tfunction query(root, selector) {\n\t\treturn root.querySelector(selector);\n\t}\n\tfunction queryAll(root, selector) {\n\t\treturn root.querySelectorAll(selector);\n\t}\n\tfunction escapeHtml(value) {\n\t\treturn String(value ?? \"\").replace(/[&<>\"']/g, (character) => ({\n\t\t\t\"&\": \"&\",\n\t\t\t\"<\": \"<\",\n\t\t\t\">\": \">\",\n\t\t\t\"\\\"\": \""\",\n\t\t\t\"'\": \"'\"\n\t\t})[character]);\n\t}\n\tfunction attr(value) {\n\t\treturn escapeHtml(value).replace(/`/g, \"`\");\n\t}\n\tvar init_dom = __esmMin((() => {}));\n\t//#endregion\n\t//#region src/web-editor/client/inspector.ts\n\tfunction createInspector(deps) {\n\t\tconst { api, stackForSubmit, renderDiagnostics, renderItemList, setStatus } = deps;\n\t\tconst selectedId = deps.getSelectedId;\n\t\tlet payloadSnapshot = { status: \"idle\" };\n\t\tlet previewCopyTexts = [];\n\t\tasync function validateStack() {\n\t\t\tconst stack = stackForSubmit();\n\t\t\tconst data = await api(\"/api/stacks/\" + encodeURIComponent(selectedId()) + \"/validate\", {\n\t\t\t\tmethod: \"POST\",\n\t\t\t\tbody: { stack }\n\t\t\t});\n\t\t\trenderDiagnostics(data.diagnostics || []);\n\t\t\trenderItemList();\n\t\t\thidePreview();\n\t\t\tsetStatus(\"Validation complete\", \"success\");\n\t\t}\n\t\tasync function previewStack() {\n\t\t\tconst stack = stackForSubmit();\n\t\t\tconst data = await api(\"/api/stacks/\" + encodeURIComponent(selectedId()) + \"/preview\", {\n\t\t\t\tmethod: \"POST\",\n\t\t\t\tbody: { stack }\n\t\t\t});\n\t\t\trenderDiagnostics(data.diagnostics || []);\n\t\t\trenderItemList();\n\t\t\trenderPreviewInspector(data);\n\t\t\tsetStatus(\"Preview rendered\", \"success\");\n\t\t}\n\t\tasync function refreshPayloadCapture(options = {}) {\n\t\t\tconst previousCapturedAt = payloadSnapshot.status === \"captured\" ? payloadSnapshot.capture?.capturedAt : \"\";\n\t\t\tpayloadSnapshot = await api(\"/api/payload\");\n\t\t\tupdatePayloadButton();\n\t\t\tconst nextCapturedAt = payloadSnapshot.status === \"captured\" ? payloadSnapshot.capture?.capturedAt : \"\";\n\t\t\tif (options.open || options.autoOpen && nextCapturedAt && nextCapturedAt !== previousCapturedAt) renderPayloadInspector(payloadSnapshot);\n\t\t}\n\t\tasync function armPayloadCapture(showInspector = false) {\n\t\t\tpayloadSnapshot = await api(\"/api/payload/arm\", { method: \"POST\" });\n\t\t\tupdatePayloadButton();\n\t\t\tsetStatus(\"Payload capture armed; send the next Pi prompt\");\n\t\t\tif (showInspector) renderPayloadInspector(payloadSnapshot);\n\t\t}\n\t\tasync function clearPayloadCapture() {\n\t\t\tpayloadSnapshot = await api(\"/api/payload\", { method: \"DELETE\" });\n\t\t\tupdatePayloadButton();\n\t\t\thidePreview();\n\t\t\tsetStatus(\"Payload capture cleared\", \"success\");\n\t\t}\n\t\tasync function openPayloadCapture() {\n\t\t\tawait refreshPayloadCapture();\n\t\t\tif (payloadSnapshot.status === \"captured\" || payloadSnapshot.status === \"armed\") {\n\t\t\t\trenderPayloadInspector(payloadSnapshot);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tawait armPayloadCapture();\n\t\t}\n\t\tfunction updatePayloadButton() {\n\t\t\tconst button = el(\"payloadBtn\");\n\t\t\tif (!button) return;\n\t\t\tbutton.classList.remove(\"primary\");\n\t\t\tif (payloadSnapshot.status === \"armed\") {\n\t\t\t\tbutton.textContent = \"Payload armed\";\n\t\t\t\tbutton.classList.add(\"primary\");\n\t\t\t\tbutton.title = \"Waiting for the next provider payload\";\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (payloadSnapshot.status === \"captured\") {\n\t\t\t\tbutton.textContent = \"View payload\";\n\t\t\t\tbutton.title = \"Open the latest captured provider payload\";\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tbutton.textContent = \"Arm payload\";\n\t\t\tbutton.title = \"Capture the next provider payload in this editor\";\n\t\t}\n\t\tfunction hidePreview() {\n\t\t\tconst pane = el(\"preview\");\n\t\t\tpane.classList.remove(\"open\");\n\t\t\tpane.innerHTML = \"\";\n\t\t\tpreviewCopyTexts = [];\n\t\t}\n\t\tfunction renderPreviewInspector(data) {\n\t\t\tconst pane = el(\"preview\");\n\t\t\tconst preview = data.preview;\n\t\t\tif (!preview) {\n\t\t\t\tpreviewCopyTexts = [data.text || \"\"];\n\t\t\t\tpane.innerHTML = \"<div class=\\\"preview-dialog\\\" role=\\\"dialog\\\" aria-modal=\\\"true\\\" aria-label=\\\"Prompt preview\\\"><div class=\\\"preview-head\\\"><div><div class=\\\"preview-title\\\">Preview</div><div class=\\\"preview-meta\\\">Plain text fallback</div></div><div class=\\\"preview-actions\\\"><button class=\\\"preview-copy\\\" data-copy-index=\\\"0\\\" data-icon=\\\"□\\\" title=\\\"Copy the full preview text\\\">Copy</button><button data-preview-close=\\\"true\\\" data-icon=\\\"×\\\" title=\\\"Close the preview\\\">Close</button></div></div><div class=\\\"preview-body\\\"><pre class=\\\"preview-text\\\">\" + escapeHtml(data.text || \"\") + \"</pre></div></div>\";\n\t\t\t\tpane.classList.add(\"open\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst sections = [preview.system, ...preview.messages || []];\n\t\t\tpreviewCopyTexts = [data.text || \"\", ...sections.map((section) => section.content || \"\")];\n\t\t\tconst sectionHtml = sections.map((section, index) => {\n\t\t\t\tconst open = index === 0 ? \" open\" : \"\";\n\t\t\t\tconst label = section.role ? section.role + \" · \" : \"\";\n\t\t\t\treturn \"<details class=\\\"preview-section\\\"\" + open + \"><summary><span class=\\\"preview-title\\\">\" + escapeHtml(section.title || section.id) + \"</span><span class=\\\"preview-meta\\\">\" + escapeHtml(label + formatCount(section.chars) + \" chars · ~\" + formatCount(section.approxTokens) + \" tokens\") + \"</span><button class=\\\"preview-copy\\\" data-copy-index=\\\"\" + attr(index + 1) + \"\\\" data-icon=\\\"□\\\" title=\\\"Copy this preview section\\\" onclick=\\\"event.preventDefault()\\\">Copy</button></summary><pre class=\\\"preview-text\\\">\" + escapeHtml(section.content || \"\") + \"</pre></details>\";\n\t\t\t}).join(\"\");\n\t\t\tpane.innerHTML = \"<div class=\\\"preview-dialog\\\" role=\\\"dialog\\\" aria-modal=\\\"true\\\" aria-label=\\\"Prompt preview\\\"><div class=\\\"preview-head\\\"><div><div class=\\\"preview-title\\\">Prompt preview: \" + escapeHtml(preview.stackId || selectedId()) + \"</div><div class=\\\"preview-meta\\\">\" + escapeHtml(formatCount(preview.totalChars) + \" chars · ~\" + formatCount(preview.approxTokens) + \" tokens · \" + (preview.messages || []).length + \" messages\") + \"</div></div><div class=\\\"preview-actions\\\"><button class=\\\"preview-copy\\\" data-copy-index=\\\"0\\\" data-icon=\\\"□\\\" title=\\\"Copy the full prompt preview\\\">Copy full</button><button data-preview-close=\\\"true\\\" data-icon=\\\"×\\\" title=\\\"Close the preview\\\">Close</button></div></div><div class=\\\"preview-body\\\">\" + sectionHtml + \"</div></div>\";\n\t\t\tpane.classList.add(\"open\");\n\t\t}\n\t\tfunction renderPayloadInspector(snapshot) {\n\t\t\tconst pane = el(\"preview\");\n\t\t\tif (snapshot.status === \"idle\") {\n\t\t\t\tpreviewCopyTexts = [];\n\t\t\t\tpane.innerHTML = \"<div class=\\\"preview-dialog\\\" role=\\\"dialog\\\" aria-modal=\\\"true\\\" aria-label=\\\"Provider payload capture\\\"><div class=\\\"preview-head\\\"><div><div class=\\\"preview-title\\\">Provider payload</div><div class=\\\"preview-meta\\\">No payload captured.</div></div><div class=\\\"preview-actions\\\"><button data-payload-arm=\\\"true\\\" data-icon=\\\"◆\\\" title=\\\"Capture the next provider payload\\\">Arm next</button><button data-preview-close=\\\"true\\\" data-icon=\\\"×\\\" title=\\\"Close the payload inspector\\\">Close</button></div></div><div class=\\\"preview-body\\\"><div class=\\\"empty\\\">Arm capture, then send the next prompt in Pi. The provider payload will appear here before it is sent.</div></div></div>\";\n\t\t\t\tpane.classList.add(\"open\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (snapshot.status === \"armed\") {\n\t\t\t\tconst meta = snapshot.armedAt ? \"Armed at \" + snapshot.armedAt : \"Waiting for next provider request\";\n\t\t\t\tpreviewCopyTexts = [];\n\t\t\t\tpane.innerHTML = \"<div class=\\\"preview-dialog\\\" role=\\\"dialog\\\" aria-modal=\\\"true\\\" aria-label=\\\"Provider payload capture\\\"><div class=\\\"preview-head\\\"><div><div class=\\\"preview-title\\\">Payload capture armed</div><div class=\\\"preview-meta\\\">\" + escapeHtml(meta) + \"</div></div><div class=\\\"preview-actions\\\"><button class=\\\"danger\\\" data-payload-clear=\\\"true\\\" data-icon=\\\"×\\\" title=\\\"Clear the armed payload capture\\\">Clear</button><button data-preview-close=\\\"true\\\" data-icon=\\\"×\\\" title=\\\"Close the payload inspector\\\">Close</button></div></div><div class=\\\"preview-body\\\"><div class=\\\"empty\\\">Send the next prompt in Pi. The exact provider payload will be captured here and redacted before display.</div></div></div>\";\n\t\t\t\tpane.classList.add(\"open\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst capture = snapshot.capture || {};\n\t\t\tconst sections = payloadSections(capture);\n\t\t\tpreviewCopyTexts = [capture.text || \"\", ...sections.map((section) => section.content || \"\")];\n\t\t\tconst sectionHtml = sections.map((section, index) => {\n\t\t\t\treturn \"<details class=\\\"preview-section\\\"\" + (index === 0 ? \" open\" : \"\") + \"><summary><span class=\\\"preview-title\\\">\" + escapeHtml(section.title) + \"</span><span class=\\\"preview-meta\\\">\" + escapeHtml(section.meta) + \"</span><button class=\\\"preview-copy\\\" data-copy-index=\\\"\" + attr(index + 1) + \"\\\" data-icon=\\\"□\\\" title=\\\"Copy this payload section\\\" onclick=\\\"event.preventDefault()\\\">Copy</button></summary><pre class=\\\"preview-text\\\">\" + escapeHtml(section.content || \"\") + \"</pre></details>\";\n\t\t\t}).join(\"\");\n\t\t\tpane.innerHTML = \"<div class=\\\"preview-dialog\\\" role=\\\"dialog\\\" aria-modal=\\\"true\\\" aria-label=\\\"Provider payload capture\\\"><div class=\\\"preview-head\\\"><div><div class=\\\"preview-title\\\">Provider payload</div><div class=\\\"preview-meta\\\">\" + escapeHtml([\n\t\t\t\tformatCount(capture.chars) + \" chars\",\n\t\t\t\t\"~\" + formatCount(capture.approxTokens) + \" tokens\",\n\t\t\t\tcapture.stackId ? \"stack \" + capture.stackId : void 0,\n\t\t\t\tcapture.truncated ? \"truncated\" : void 0\n\t\t\t].filter(Boolean).join(\" · \") + (capture.capturedAt ? \" · \" + capture.capturedAt : \"\")) + \"</div></div><div class=\\\"preview-actions\\\"><button class=\\\"preview-copy\\\" data-copy-index=\\\"0\\\" data-icon=\\\"□\\\" title=\\\"Copy the full redacted payload\\\">Copy full</button><button data-payload-arm=\\\"true\\\" data-icon=\\\"◆\\\" title=\\\"Capture the next provider payload\\\">Arm again</button><button class=\\\"danger\\\" data-payload-clear=\\\"true\\\" data-icon=\\\"×\\\" title=\\\"Clear the captured payload\\\">Clear</button><button data-preview-close=\\\"true\\\" data-icon=\\\"×\\\" title=\\\"Close the payload inspector\\\">Close</button></div></div><div class=\\\"preview-body\\\">\" + sectionHtml + \"</div></div>\";\n\t\t\tpane.classList.add(\"open\");\n\t\t}\n\t\tfunction payloadSections(capture) {\n\t\t\tconst value = capture.payload;\n\t\t\tif (value && typeof value === \"object\") {\n\t\t\t\tif (Array.isArray(value)) return value.map((item, index) => payloadSection(String(index), item));\n\t\t\t\tconst entries = Object.entries(value);\n\t\t\t\tif (entries.length) return entries.map(([key, item]) => payloadSection(key, item));\n\t\t\t}\n\t\t\treturn [{\n\t\t\t\ttitle: capture.error ? \"Stringify error\" : capture.truncated ? \"Raw truncated payload\" : \"Raw payload\",\n\t\t\t\tmeta: formatCount((capture.text || \"\").length) + \" chars\",\n\t\t\t\tcontent: capture.text || \"\"\n\t\t\t}];\n\t\t}\n\t\tfunction payloadSection(title, value) {\n\t\t\tconst rendered = JSON.stringify(value, null, 2);\n\t\t\tconst content = rendered === void 0 ? String(value) : rendered;\n\t\t\treturn {\n\t\t\t\ttitle,\n\t\t\t\tmeta: describePayloadValue(value) + \" · \" + formatCount(content.length) + \" chars\",\n\t\t\t\tcontent\n\t\t\t};\n\t\t}\n\t\tfunction describePayloadValue(value) {\n\t\t\tif (Array.isArray(value)) return \"array[\" + value.length + \"]\";\n\t\t\tif (value && typeof value === \"object\") return \"object{\" + Object.keys(value).length + \"}\";\n\t\t\tif (value === null) return \"null\";\n\t\t\treturn typeof value;\n\t\t}\n\t\tfunction formatCount(value) {\n\t\t\treturn Number(value || 0).toLocaleString();\n\t\t}\n\t\tasync function copyPreviewText(index) {\n\t\t\tconst text = previewCopyTexts[index] || \"\";\n\t\t\tif (!text) return;\n\t\t\tawait copyTextToClipboard(text);\n\t\t\tsetStatus(\"Copied text\", \"success\");\n\t\t}\n\t\tasync function copyTextToClipboard(text) {\n\t\t\tif (navigator.clipboard && window.isSecureContext) await navigator.clipboard.writeText(text);\n\t\t\telse {\n\t\t\t\tconst area = document.createElement(\"textarea\");\n\t\t\t\tarea.value = text;\n\t\t\t\tarea.style.position = \"fixed\";\n\t\t\t\tarea.style.left = \"-9999px\";\n\t\t\t\tdocument.body.appendChild(area);\n\t\t\t\tarea.select();\n\t\t\t\tdocument.execCommand(\"copy\");\n\t\t\t\tarea.remove();\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tvalidateStack,\n\t\t\tpreviewStack,\n\t\t\trefreshPayloadCapture,\n\t\t\tarmPayloadCapture,\n\t\t\tclearPayloadCapture,\n\t\t\topenPayloadCapture,\n\t\t\thidePreview,\n\t\t\tcopyPreviewText,\n\t\t\tcopyTextToClipboard\n\t\t};\n\t}\n\tvar init_inspector = __esmMin((() => {\n\t\tinit_dom();\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/components/StackItemEditor.vue?vue&type=script&setup=true&lang.ts\n\tvar _hoisted_1$5, _hoisted_2$5, _hoisted_3$5, _hoisted_4$5, _hoisted_5$5, _hoisted_6$4, _hoisted_7$4, _hoisted_8$4, _hoisted_9$4, _hoisted_10$4, _hoisted_11$4, _hoisted_12$3, _hoisted_13$3, _hoisted_14$3, _hoisted_15$3, _hoisted_16$3, _hoisted_17$3, _hoisted_18$2, _hoisted_19$2, _hoisted_20$2, _hoisted_21$2, _hoisted_22$2, _hoisted_23$2, _hoisted_24$1, _hoisted_25$1, _hoisted_26$1, _hoisted_27$1, _hoisted_28$1, _hoisted_29$1, _hoisted_30$1, _hoisted_31$1, _hoisted_32$1, _hoisted_33$1, _hoisted_34$1, _hoisted_35$1, _hoisted_36$1, _hoisted_37$1, _hoisted_38$1, _hoisted_39$1, _hoisted_40$1, _hoisted_41$1, _hoisted_42$1, _hoisted_43$1, _hoisted_44, _hoisted_45, _hoisted_46, _hoisted_47, _hoisted_48, StackItemEditor_vue_vue_type_script_setup_true_lang_default;\n\tvar init_StackItemEditor_vue_vue_type_script_setup_true_lang = __esmMin((() => {\n\t\tinit_vue_runtime_esm_bundler();\n\t\t_hoisted_1$5 = { class: \"item-form\" };\n\t\t_hoisted_2$5 = { class: \"item-fields\" };\n\t\t_hoisted_3$5 = { class: \"field\" };\n\t\t_hoisted_4$5 = [\"value\"];\n\t\t_hoisted_5$5 = { class: \"field\" };\n\t\t_hoisted_6$4 = [\"value\"];\n\t\t_hoisted_7$4 = { class: \"field\" };\n\t\t_hoisted_8$4 = [\"value\"];\n\t\t_hoisted_9$4 = { class: \"field\" };\n\t\t_hoisted_10$4 = [\"value\"];\n\t\t_hoisted_11$4 = [\"value\"];\n\t\t_hoisted_12$3 = {\n\t\t\tkey: 0,\n\t\t\tclass: \"field\"\n\t\t};\n\t\t_hoisted_13$3 = [\"value\"];\n\t\t_hoisted_14$3 = [\"value\"];\n\t\t_hoisted_15$3 = { class: \"item-body\" };\n\t\t_hoisted_16$3 = {\n\t\t\tkey: 0,\n\t\t\tclass: \"field content-field\"\n\t\t};\n\t\t_hoisted_17$3 = [\"value\"];\n\t\t_hoisted_18$2 = {\n\t\t\tkey: 1,\n\t\t\tclass: \"field wide slot-options\"\n\t\t};\n\t\t_hoisted_19$2 = { class: \"segmented\" };\n\t\t_hoisted_20$2 = [\"value\"];\n\t\t_hoisted_21$2 = {\n\t\t\tkey: 1,\n\t\t\tclass: \"options-grid\"\n\t\t};\n\t\t_hoisted_22$2 = [\"title\"];\n\t\t_hoisted_23$2 = [\"checked\"];\n\t\t_hoisted_24$1 = [\"title\"];\n\t\t_hoisted_25$1 = [\"checked\"];\n\t\t_hoisted_26$1 = [\"title\"];\n\t\t_hoisted_27$1 = [\"checked\"];\n\t\t_hoisted_28$1 = [\"title\"];\n\t\t_hoisted_29$1 = [\"value\"];\n\t\t_hoisted_30$1 = [\"title\"];\n\t\t_hoisted_31$1 = [\"value\"];\n\t\t_hoisted_32$1 = [\"title\"];\n\t\t_hoisted_33$1 = [\"value\"];\n\t\t_hoisted_34$1 = [\"title\"];\n\t\t_hoisted_35$1 = [\"value\"];\n\t\t_hoisted_36$1 = [\"title\"];\n\t\t_hoisted_37$1 = [\"checked\"];\n\t\t_hoisted_38$1 = [\"title\"];\n\t\t_hoisted_39$1 = [\"checked\"];\n\t\t_hoisted_40$1 = [\"title\"];\n\t\t_hoisted_41$1 = [\"checked\"];\n\t\t_hoisted_42$1 = [\"title\"];\n\t\t_hoisted_43$1 = [\"value\"];\n\t\t_hoisted_44 = [\"title\"];\n\t\t_hoisted_45 = [\"value\"];\n\t\t_hoisted_46 = [\"title\"];\n\t\t_hoisted_47 = [\"checked\"];\n\t\t_hoisted_48 = {\n\t\t\tkey: 4,\n\t\t\tclass: \"wide option-note\"\n\t\t};\n\t\tStackItemEditor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({\n\t\t\t__name: \"StackItemEditor\",\n\t\t\tprops: {\n\t\t\t\titem: {},\n\t\t\t\tmode: {},\n\t\t\t\tslotNames: {},\n\t\t\t\troles: {}\n\t\t\t},\n\t\t\temits: [\n\t\t\t\t\"change\",\n\t\t\t\t\"error\",\n\t\t\t\t\"mode\",\n\t\t\t\t\"replace\"\n\t\t\t],\n\t\t\tsetup(__props, { emit: __emit }) {\n\t\t\t\tconst props = __props;\n\t\t\t\tconst emit = __emit;\n\t\t\t\tconst item = /* @__PURE__ */ reactive(props.item);\n\t\t\t\tconst mode = /* @__PURE__ */ ref(props.mode);\n\t\t\t\tconst optionsText = /* @__PURE__ */ ref(JSON.stringify(item.options || {}, null, 2));\n\t\t\t\tconst optionsError = /* @__PURE__ */ ref(false);\n\t\t\t\tconst options = computed(() => item.options || {});\n\t\t\t\tconst structuredOptionCount = computed(() => {\n\t\t\t\t\tif (item.slot === \"chat-history\") return 7;\n\t\t\t\t\tif (item.slot === \"variables\") return 4;\n\t\t\t\t\tif ([\n\t\t\t\t\t\t\"tools\",\n\t\t\t\t\t\t\"tool-guidelines\",\n\t\t\t\t\t\t\"skills\",\n\t\t\t\t\t\t\"project-context\"\n\t\t\t\t\t].includes(item.slot || \"\")) return 1;\n\t\t\t\t\tif ([\"date\", \"date-cwd\"].includes(item.slot || \"\")) return 1;\n\t\t\t\t\treturn 0;\n\t\t\t\t});\n\t\t\t\tfunction setKind(kind) {\n\t\t\t\t\tif (kind === item.kind) return;\n\t\t\t\t\tconst base = {\n\t\t\t\t\t\tid: item.id,\n\t\t\t\t\t\tname: item.name,\n\t\t\t\t\t\tenabled: item.enabled,\n\t\t\t\t\t\trole: item.role,\n\t\t\t\t\t\ttags: item.tags,\n\t\t\t\t\t\tsource: item.source\n\t\t\t\t\t};\n\t\t\t\t\temit(\"replace\", kind === \"slot\" ? {\n\t\t\t\t\t\t...base,\n\t\t\t\t\t\tkind: \"slot\",\n\t\t\t\t\t\tslot: \"chat-history\"\n\t\t\t\t\t} : {\n\t\t\t\t\t\t...base,\n\t\t\t\t\t\tkind: \"block\",\n\t\t\t\t\t\tcontent: \"\"\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tfunction setString(key, value, optional = false, refreshList = false) {\n\t\t\t\t\tif (optional && !value.trim()) delete item[key];\n\t\t\t\t\telse item[key] = value;\n\t\t\t\t\temit(\"change\", refreshList);\n\t\t\t\t}\n\t\t\t\tfunction switchMode(next) {\n\t\t\t\t\tmode.value = next;\n\t\t\t\t\tif (next === \"form\" && optionsError.value) {\n\t\t\t\t\t\toptionsError.value = false;\n\t\t\t\t\t\temit(\"error\", \"\");\n\t\t\t\t\t}\n\t\t\t\t\toptionsText.value = JSON.stringify(item.options || {}, null, 2);\n\t\t\t\t\temit(\"mode\", next);\n\t\t\t\t}\n\t\t\t\tfunction setJsonOptions(value) {\n\t\t\t\t\toptionsText.value = value;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst parsed = value.trim() ? JSON.parse(value) : {};\n\t\t\t\t\t\titem.options = Object.keys(parsed).length ? parsed : void 0;\n\t\t\t\t\t\toptionsError.value = false;\n\t\t\t\t\t\temit(\"error\", \"\");\n\t\t\t\t\t\temit(\"change\", false);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\toptionsError.value = true;\n\t\t\t\t\t\temit(\"error\", error instanceof Error ? error.message : String(error));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfunction setOption(key, value, defaultValue = void 0) {\n\t\t\t\t\tconst next = { ...item.options || {} };\n\t\t\t\t\tif (value === void 0 || value === defaultValue) delete next[key];\n\t\t\t\t\telse next[key] = value;\n\t\t\t\t\titem.options = Object.keys(next).length ? next : void 0;\n\t\t\t\t\temit(\"change\", false);\n\t\t\t\t}\n\t\t\t\tfunction setNumberOption(key, value) {\n\t\t\t\t\tsetOption(key, value.trim() ? Number(value) : void 0);\n\t\t\t\t}\n\t\t\t\tfunction setArrayOption(key, value) {\n\t\t\t\t\tconst values = value.split(\",\").map((part) => part.trim()).filter(Boolean);\n\t\t\t\t\tsetOption(key, values.length ? values : void 0);\n\t\t\t\t}\n\t\t\t\tfunction optionHelp(key) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tincludeLastUserMessage: \"Keep the latest user message inside the inserted chat history.\",\n\t\t\t\t\t\tstripAssistantThinking: \"Remove prior assistant thinking blocks from inserted chat history while keeping visible text, tool calls, and tool results.\",\n\t\t\t\t\t\tincludeSummaries: \"Keep Pi branch and compaction summary messages inside inserted chat history.\",\n\t\t\t\t\t\ttoolMode: \"Keep tool calls/results or drop prior tool history from inserted chat history.\",\n\t\t\t\t\t\troles: \"Optional comma-separated message roles to keep, such as user, assistant, toolResult, compactionSummary.\",\n\t\t\t\t\t\tmaxMessages: \"Keep only the most recent N chat-history messages after filtering.\",\n\t\t\t\t\t\tmaxChars: \"Keep only the most recent chat-history messages within an approximate character budget.\",\n\t\t\t\t\t\tincludeStatic: \"Include static stack variables in this variables slot.\",\n\t\t\t\t\t\tincludeSession: \"Include session variables created by template macros.\",\n\t\t\t\t\t\tincludeTurn: \"Include temporary turn variables created during prompt compilation.\",\n\t\t\t\t\t\tincludeTime: \"Render the current time in HH:MM:SS after the current date.\",\n\t\t\t\t\t\tformat: \"Choose XML or compact plain text rendering.\"\n\t\t\t\t\t}[key] || \"Advanced slot option.\";\n\t\t\t\t}\n\t\t\t\treturn (_ctx, _cache) => {\n\t\t\t\t\treturn openBlock(), createElementBlock(\"div\", _hoisted_1$5, [createBaseVNode(\"div\", _hoisted_2$5, [\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_3$5, [_cache[23] || (_cache[23] = createBaseVNode(\"label\", null, \"Kind\", -1)), createBaseVNode(\"select\", {\n\t\t\t\t\t\t\tid: \"itemKind\",\n\t\t\t\t\t\t\tvalue: item.kind,\n\t\t\t\t\t\t\tonChange: _cache[0] || (_cache[0] = ($event) => setKind($event.target.value))\n\t\t\t\t\t\t}, [..._cache[22] || (_cache[22] = [createBaseVNode(\"option\", { value: \"block\" }, \"block\", -1), createBaseVNode(\"option\", { value: \"slot\" }, \"slot\", -1)])], 40, _hoisted_4$5)]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_5$5, [_cache[24] || (_cache[24] = createBaseVNode(\"label\", null, \"ID\", -1)), createBaseVNode(\"input\", {\n\t\t\t\t\t\t\tid: \"itemId\",\n\t\t\t\t\t\t\tvalue: item.id,\n\t\t\t\t\t\t\tonInput: _cache[1] || (_cache[1] = ($event) => setString(\"id\", $event.target.value, false, true))\n\t\t\t\t\t\t}, null, 40, _hoisted_6$4)]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_7$4, [_cache[25] || (_cache[25] = createBaseVNode(\"label\", null, \"Name\", -1)), createBaseVNode(\"input\", {\n\t\t\t\t\t\t\tid: \"itemName\",\n\t\t\t\t\t\t\tvalue: item.name || \"\",\n\t\t\t\t\t\t\tonInput: _cache[2] || (_cache[2] = ($event) => setString(\"name\", $event.target.value, true, true))\n\t\t\t\t\t\t}, null, 40, _hoisted_8$4)]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_9$4, [_cache[26] || (_cache[26] = createBaseVNode(\"label\", null, \"Role\", -1)), createBaseVNode(\"select\", {\n\t\t\t\t\t\t\tid: \"itemRole\",\n\t\t\t\t\t\t\tvalue: item.role || \"\",\n\t\t\t\t\t\t\tonChange: _cache[3] || (_cache[3] = ($event) => setString(\"role\", $event.target.value, true, true))\n\t\t\t\t\t\t}, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.roles, (role) => {\n\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"option\", {\n\t\t\t\t\t\t\t\tkey: role,\n\t\t\t\t\t\t\t\tvalue: role\n\t\t\t\t\t\t\t}, toDisplayString(role || \"(none)\"), 9, _hoisted_11$4);\n\t\t\t\t\t\t}), 128))], 40, _hoisted_10$4)]),\n\t\t\t\t\t\titem.kind === \"slot\" ? (openBlock(), createElementBlock(\"div\", _hoisted_12$3, [_cache[27] || (_cache[27] = createBaseVNode(\"label\", null, \"Slot\", -1)), createBaseVNode(\"select\", {\n\t\t\t\t\t\t\tid: \"itemSlot\",\n\t\t\t\t\t\t\tvalue: item.slot || \"chat-history\",\n\t\t\t\t\t\t\tonChange: _cache[4] || (_cache[4] = ($event) => setString(\"slot\", $event.target.value, false, true))\n\t\t\t\t\t\t}, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.slotNames, (slot) => {\n\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"option\", {\n\t\t\t\t\t\t\t\tkey: slot,\n\t\t\t\t\t\t\t\tvalue: slot\n\t\t\t\t\t\t\t}, toDisplayString(slot), 9, _hoisted_14$3);\n\t\t\t\t\t\t}), 128))], 40, _hoisted_13$3)])) : createCommentVNode(\"v-if\", true)\n\t\t\t\t\t]), createBaseVNode(\"div\", _hoisted_15$3, [item.kind === \"block\" ? (openBlock(), createElementBlock(\"div\", _hoisted_16$3, [_cache[28] || (_cache[28] = createBaseVNode(\"label\", null, \"Content\", -1)), createBaseVNode(\"textarea\", {\n\t\t\t\t\t\tid: \"itemContent\",\n\t\t\t\t\t\tvalue: item.content || \"\",\n\t\t\t\t\t\tonInput: _cache[5] || (_cache[5] = ($event) => setString(\"content\", $event.target.value))\n\t\t\t\t\t}, null, 40, _hoisted_17$3)])) : (openBlock(), createElementBlock(\"div\", _hoisted_18$2, [\n\t\t\t\t\t\t_cache[46] || (_cache[46] = createBaseVNode(\"label\", null, \"Slot options\", -1)),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_19$2, [createBaseVNode(\"button\", {\n\t\t\t\t\t\t\tid: \"slotOptionsFormBtn\",\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\tclass: normalizeClass({ active: mode.value === \"form\" }),\n\t\t\t\t\t\t\tonClick: _cache[6] || (_cache[6] = ($event) => switchMode(\"form\"))\n\t\t\t\t\t\t}, \"Form\", 2), createBaseVNode(\"button\", {\n\t\t\t\t\t\t\tid: \"slotOptionsJsonBtn\",\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\tclass: normalizeClass({ active: mode.value === \"json\" }),\n\t\t\t\t\t\t\tonClick: _cache[7] || (_cache[7] = ($event) => switchMode(\"json\"))\n\t\t\t\t\t\t}, \"JSON\", 2)]),\n\t\t\t\t\t\tmode.value === \"json\" ? (openBlock(), createElementBlock(\"textarea\", {\n\t\t\t\t\t\t\tkey: 0,\n\t\t\t\t\t\t\tid: \"itemOptions\",\n\t\t\t\t\t\t\tclass: \"json-options\",\n\t\t\t\t\t\t\tvalue: optionsText.value,\n\t\t\t\t\t\t\tonInput: _cache[8] || (_cache[8] = ($event) => setJsonOptions($event.target.value))\n\t\t\t\t\t\t}, null, 40, _hoisted_20$2)) : (openBlock(), createElementBlock(\"div\", _hoisted_21$2, [\n\t\t\t\t\t\t\titem.slot === \"chat-history\" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"label\", {\n\t\t\t\t\t\t\t\t\tclass: \"checkline\",\n\t\t\t\t\t\t\t\t\ttitle: optionHelp(\"includeLastUserMessage\")\n\t\t\t\t\t\t\t\t}, [createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\ttype: \"checkbox\",\n\t\t\t\t\t\t\t\t\t\"data-option\": \"includeLastUserMessage\",\n\t\t\t\t\t\t\t\t\tchecked: options.value.includeLastUserMessage !== false,\n\t\t\t\t\t\t\t\t\tonChange: _cache[9] || (_cache[9] = ($event) => setOption(\"includeLastUserMessage\", $event.target.checked, true))\n\t\t\t\t\t\t\t\t}, null, 40, _hoisted_23$2), _cache[29] || (_cache[29] = createTextVNode(\" Include last user message \", -1))], 8, _hoisted_22$2),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"label\", {\n\t\t\t\t\t\t\t\t\tclass: \"checkline\",\n\t\t\t\t\t\t\t\t\ttitle: optionHelp(\"stripAssistantThinking\")\n\t\t\t\t\t\t\t\t}, [createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\ttype: \"checkbox\",\n\t\t\t\t\t\t\t\t\t\"data-option\": \"stripAssistantThinking\",\n\t\t\t\t\t\t\t\t\tchecked: options.value.stripAssistantThinking === true,\n\t\t\t\t\t\t\t\t\tonChange: _cache[10] || (_cache[10] = ($event) => setOption(\"stripAssistantThinking\", $event.target.checked, false))\n\t\t\t\t\t\t\t\t}, null, 40, _hoisted_25$1), _cache[30] || (_cache[30] = createTextVNode(\" Strip assistant thinking \", -1))], 8, _hoisted_24$1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"label\", {\n\t\t\t\t\t\t\t\t\tclass: \"checkline\",\n\t\t\t\t\t\t\t\t\ttitle: optionHelp(\"includeSummaries\")\n\t\t\t\t\t\t\t\t}, [createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\ttype: \"checkbox\",\n\t\t\t\t\t\t\t\t\t\"data-option\": \"includeSummaries\",\n\t\t\t\t\t\t\t\t\tchecked: options.value.includeSummaries !== false,\n\t\t\t\t\t\t\t\t\tonChange: _cache[11] || (_cache[11] = ($event) => setOption(\"includeSummaries\", $event.target.checked, true))\n\t\t\t\t\t\t\t\t}, null, 40, _hoisted_27$1), _cache[31] || (_cache[31] = createTextVNode(\" Include summaries \", -1))], 8, _hoisted_26$1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", {\n\t\t\t\t\t\t\t\t\tclass: \"field\",\n\t\t\t\t\t\t\t\t\ttitle: optionHelp(\"toolMode\")\n\t\t\t\t\t\t\t\t}, [_cache[33] || (_cache[33] = createBaseVNode(\"label\", null, \"Tool history\", -1)), createBaseVNode(\"select\", {\n\t\t\t\t\t\t\t\t\t\"data-option\": \"toolMode\",\n\t\t\t\t\t\t\t\t\tvalue: options.value.toolMode || \"keep\",\n\t\t\t\t\t\t\t\t\tonChange: _cache[12] || (_cache[12] = ($event) => setOption(\"toolMode\", $event.target.value, \"keep\"))\n\t\t\t\t\t\t\t\t}, [..._cache[32] || (_cache[32] = [createBaseVNode(\"option\", { value: \"keep\" }, \"keep\", -1), createBaseVNode(\"option\", { value: \"drop\" }, \"drop\", -1)])], 40, _hoisted_29$1)], 8, _hoisted_28$1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", {\n\t\t\t\t\t\t\t\t\tclass: \"field\",\n\t\t\t\t\t\t\t\t\ttitle: optionHelp(\"roles\")\n\t\t\t\t\t\t\t\t}, [_cache[34] || (_cache[34] = createBaseVNode(\"label\", null, \"Roles\", -1)), createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\t\"data-option\": \"roles\",\n\t\t\t\t\t\t\t\t\t\"data-array\": \"true\",\n\t\t\t\t\t\t\t\t\tvalue: Array.isArray(options.value.roles) ? options.value.roles.join(\", \") : \"\",\n\t\t\t\t\t\t\t\t\tplaceholder: \"comma,separated\",\n\t\t\t\t\t\t\t\t\tonChange: _cache[13] || (_cache[13] = ($event) => setArrayOption(\"roles\", $event.target.value))\n\t\t\t\t\t\t\t\t}, null, 40, _hoisted_31$1)], 8, _hoisted_30$1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", {\n\t\t\t\t\t\t\t\t\tclass: \"field\",\n\t\t\t\t\t\t\t\t\ttitle: optionHelp(\"maxMessages\")\n\t\t\t\t\t\t\t\t}, [_cache[35] || (_cache[35] = createBaseVNode(\"label\", null, \"Max messages\", -1)), createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t\t\t\tmin: \"1\",\n\t\t\t\t\t\t\t\t\t\"data-option\": \"maxMessages\",\n\t\t\t\t\t\t\t\t\tvalue: options.value.maxMessages ?? \"\",\n\t\t\t\t\t\t\t\t\tonChange: _cache[14] || (_cache[14] = ($event) => setNumberOption(\"maxMessages\", $event.target.value))\n\t\t\t\t\t\t\t\t}, null, 40, _hoisted_33$1)], 8, _hoisted_32$1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", {\n\t\t\t\t\t\t\t\t\tclass: \"field\",\n\t\t\t\t\t\t\t\t\ttitle: optionHelp(\"maxChars\")\n\t\t\t\t\t\t\t\t}, [_cache[36] || (_cache[36] = createBaseVNode(\"label\", null, \"Max chars\", -1)), createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t\t\t\tmin: \"1\",\n\t\t\t\t\t\t\t\t\t\"data-option\": \"maxChars\",\n\t\t\t\t\t\t\t\t\tvalue: options.value.maxChars ?? \"\",\n\t\t\t\t\t\t\t\t\tonChange: _cache[15] || (_cache[15] = ($event) => setNumberOption(\"maxChars\", $event.target.value))\n\t\t\t\t\t\t\t\t}, null, 40, _hoisted_35$1)], 8, _hoisted_34$1)\n\t\t\t\t\t\t\t], 64)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\titem.slot === \"variables\" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"label\", {\n\t\t\t\t\t\t\t\t\tclass: \"checkline\",\n\t\t\t\t\t\t\t\t\ttitle: optionHelp(\"includeStatic\")\n\t\t\t\t\t\t\t\t}, [createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\ttype: \"checkbox\",\n\t\t\t\t\t\t\t\t\t\"data-option\": \"includeStatic\",\n\t\t\t\t\t\t\t\t\tchecked: options.value.includeStatic !== false,\n\t\t\t\t\t\t\t\t\tonChange: _cache[16] || (_cache[16] = ($event) => setOption(\"includeStatic\", $event.target.checked, true))\n\t\t\t\t\t\t\t\t}, null, 40, _hoisted_37$1), _cache[37] || (_cache[37] = createTextVNode(\" Include static variables \", -1))], 8, _hoisted_36$1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"label\", {\n\t\t\t\t\t\t\t\t\tclass: \"checkline\",\n\t\t\t\t\t\t\t\t\ttitle: optionHelp(\"includeSession\")\n\t\t\t\t\t\t\t\t}, [createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\ttype: \"checkbox\",\n\t\t\t\t\t\t\t\t\t\"data-option\": \"includeSession\",\n\t\t\t\t\t\t\t\t\tchecked: options.value.includeSession !== false,\n\t\t\t\t\t\t\t\t\tonChange: _cache[17] || (_cache[17] = ($event) => setOption(\"includeSession\", $event.target.checked, true))\n\t\t\t\t\t\t\t\t}, null, 40, _hoisted_39$1), _cache[38] || (_cache[38] = createTextVNode(\" Include session variables \", -1))], 8, _hoisted_38$1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"label\", {\n\t\t\t\t\t\t\t\t\tclass: \"checkline\",\n\t\t\t\t\t\t\t\t\ttitle: optionHelp(\"includeTurn\")\n\t\t\t\t\t\t\t\t}, [createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\ttype: \"checkbox\",\n\t\t\t\t\t\t\t\t\t\"data-option\": \"includeTurn\",\n\t\t\t\t\t\t\t\t\tchecked: options.value.includeTurn !== false,\n\t\t\t\t\t\t\t\t\tonChange: _cache[18] || (_cache[18] = ($event) => setOption(\"includeTurn\", $event.target.checked, true))\n\t\t\t\t\t\t\t\t}, null, 40, _hoisted_41$1), _cache[39] || (_cache[39] = createTextVNode(\" Include turn variables \", -1))], 8, _hoisted_40$1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", {\n\t\t\t\t\t\t\t\t\tclass: \"field\",\n\t\t\t\t\t\t\t\t\ttitle: optionHelp(\"format\")\n\t\t\t\t\t\t\t\t}, [_cache[41] || (_cache[41] = createBaseVNode(\"label\", null, \"Format\", -1)), createBaseVNode(\"select\", {\n\t\t\t\t\t\t\t\t\t\"data-option\": \"format\",\n\t\t\t\t\t\t\t\t\tvalue: options.value.format || \"xml\",\n\t\t\t\t\t\t\t\t\tonChange: _cache[19] || (_cache[19] = ($event) => setOption(\"format\", $event.target.value, \"xml\"))\n\t\t\t\t\t\t\t\t}, [..._cache[40] || (_cache[40] = [createBaseVNode(\"option\", { value: \"xml\" }, \"xml\", -1), createBaseVNode(\"option\", { value: \"plain\" }, \"plain\", -1)])], 40, _hoisted_43$1)], 8, _hoisted_42$1)\n\t\t\t\t\t\t\t], 64)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\"tools\",\n\t\t\t\t\t\t\t\t\"tool-guidelines\",\n\t\t\t\t\t\t\t\t\"skills\",\n\t\t\t\t\t\t\t\t\"project-context\"\n\t\t\t\t\t\t\t].includes(item.slot || \"\") ? (openBlock(), createElementBlock(\"div\", {\n\t\t\t\t\t\t\t\tkey: 2,\n\t\t\t\t\t\t\t\tclass: \"field\",\n\t\t\t\t\t\t\t\ttitle: optionHelp(\"format\")\n\t\t\t\t\t\t\t}, [_cache[43] || (_cache[43] = createBaseVNode(\"label\", null, \"Format\", -1)), createBaseVNode(\"select\", {\n\t\t\t\t\t\t\t\t\"data-option\": \"format\",\n\t\t\t\t\t\t\t\tvalue: options.value.format || \"xml\",\n\t\t\t\t\t\t\t\tonChange: _cache[20] || (_cache[20] = ($event) => setOption(\"format\", $event.target.value, \"xml\"))\n\t\t\t\t\t\t\t}, [..._cache[42] || (_cache[42] = [createBaseVNode(\"option\", { value: \"xml\" }, \"xml\", -1), createBaseVNode(\"option\", { value: \"plain\" }, \"plain\", -1)])], 40, _hoisted_45)], 8, _hoisted_44)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\t[\"date\", \"date-cwd\"].includes(item.slot || \"\") ? (openBlock(), createElementBlock(\"label\", {\n\t\t\t\t\t\t\t\tkey: 3,\n\t\t\t\t\t\t\t\tclass: \"checkline\",\n\t\t\t\t\t\t\t\ttitle: optionHelp(\"includeTime\")\n\t\t\t\t\t\t\t}, [createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\ttype: \"checkbox\",\n\t\t\t\t\t\t\t\t\"data-option\": \"includeTime\",\n\t\t\t\t\t\t\t\tchecked: options.value.includeTime === true,\n\t\t\t\t\t\t\t\tonChange: _cache[21] || (_cache[21] = ($event) => setOption(\"includeTime\", $event.target.checked, false))\n\t\t\t\t\t\t\t}, null, 40, _hoisted_47), _cache[44] || (_cache[44] = createTextVNode(\" Include current time \", -1))], 8, _hoisted_46)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\tstructuredOptionCount.value === 0 ? (openBlock(), createElementBlock(\"div\", _hoisted_48, \" This slot has no structured options yet. Use JSON mode for advanced settings. \")) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\t_cache[45] || (_cache[45] = createBaseVNode(\"div\", { class: \"wide option-note\" }, \"Unknown option keys are preserved. Use JSON mode for advanced settings.\", -1))\n\t\t\t\t\t\t]))\n\t\t\t\t\t]))])]);\n\t\t\t\t};\n\t\t\t}\n\t\t});\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/components/StackItemEditor.vue\n\tvar StackItemEditor_default;\n\tvar init_StackItemEditor = __esmMin((() => {\n\t\tinit_StackItemEditor_vue_vue_type_script_setup_true_lang();\n\t\tinit_StackItemEditor_vue_vue_type_script_setup_true_lang();\n\t\tStackItemEditor_default = StackItemEditor_vue_vue_type_script_setup_true_lang_default;\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/vue-item-host.ts\n\tfunction createVueItemHost(deps) {\n\t\tlet app;\n\t\tlet mode = \"form\";\n\t\tlet error = \"\";\n\t\tfunction mount(root) {\n\t\t\tunmount();\n\t\t\terror = \"\";\n\t\t\tconst stack = deps.getStack();\n\t\t\tconst index = deps.getSelectedIndex();\n\t\t\tconst item = stack?.items[index];\n\t\t\tif (!stack || !item) return false;\n\t\t\tapp = createApp(StackItemEditor_default, {\n\t\t\t\titem,\n\t\t\t\tmode,\n\t\t\t\tslotNames: deps.slotNames,\n\t\t\t\troles: deps.roles,\n\t\t\t\tonChange: (refreshList) => {\n\t\t\t\t\terror = \"\";\n\t\t\t\t\tdeps.markDirty();\n\t\t\t\t\tif (refreshList) deps.renderItemList();\n\t\t\t\t},\n\t\t\t\tonError: (message) => {\n\t\t\t\t\terror = message;\n\t\t\t\t\tif (message) deps.setStatus(\"Invalid item options JSON\", \"error\");\n\t\t\t\t},\n\t\t\t\tonMode: (next) => {\n\t\t\t\t\tmode = next;\n\t\t\t\t},\n\t\t\t\tonReplace: (replacement) => {\n\t\t\t\t\tstack.items[index] = replacement;\n\t\t\t\t\terror = \"\";\n\t\t\t\t\tdeps.markDirty();\n\t\t\t\t\tdeps.renderItemList();\n\t\t\t\t\tmount(root);\n\t\t\t\t}\n\t\t\t});\n\t\t\tapp.mount(root);\n\t\t\treturn true;\n\t\t}\n\t\tfunction unmount() {\n\t\t\tapp?.unmount();\n\t\t\tapp = void 0;\n\t\t}\n\t\tfunction reset() {\n\t\t\tmode = \"form\";\n\t\t\terror = \"\";\n\t\t}\n\t\treturn {\n\t\t\tmount,\n\t\t\tunmount,\n\t\t\treset,\n\t\t\tgetError: () => error\n\t\t};\n\t}\n\tvar init_vue_item_host = __esmMin((() => {\n\t\tinit_vue_runtime_esm_bundler();\n\t\tinit_StackItemEditor();\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/components/StackMetadataEditor.vue?vue&type=script&setup=true&lang.ts\n\tvar _hoisted_1$4, _hoisted_2$4, _hoisted_3$4, _hoisted_4$4, _hoisted_5$4, _hoisted_6$3, _hoisted_7$3, _hoisted_8$3, _hoisted_9$3, _hoisted_10$3, _hoisted_11$3, _hoisted_12$2, _hoisted_13$2, _hoisted_14$2, _hoisted_15$2, _hoisted_16$2, _hoisted_17$2, StackMetadataEditor_vue_vue_type_script_setup_true_lang_default;\n\tvar init_StackMetadataEditor_vue_vue_type_script_setup_true_lang = __esmMin((() => {\n\t\tinit_vue_runtime_esm_bundler();\n\t\t_hoisted_1$4 = { class: \"metadata-head\" };\n\t\t_hoisted_2$4 = [\"data-icon\"];\n\t\t_hoisted_3$4 = {\n\t\t\tid: \"metadataSummary\",\n\t\t\tclass: \"metadata-summary\"\n\t\t};\n\t\t_hoisted_4$4 = {\n\t\t\tid: \"settings\",\n\t\t\tclass: \"settings\"\n\t\t};\n\t\t_hoisted_5$4 = { class: \"field\" };\n\t\t_hoisted_6$3 = [\"value\"];\n\t\t_hoisted_7$3 = { class: \"field\" };\n\t\t_hoisted_8$3 = [\"value\"];\n\t\t_hoisted_9$3 = { class: \"field\" };\n\t\t_hoisted_10$3 = [\"value\"];\n\t\t_hoisted_11$3 = { class: \"field\" };\n\t\t_hoisted_12$2 = { class: \"checkline\" };\n\t\t_hoisted_13$2 = [\"checked\"];\n\t\t_hoisted_14$2 = { class: \"field wide\" };\n\t\t_hoisted_15$2 = [\"value\"];\n\t\t_hoisted_16$2 = { class: \"field wide\" };\n\t\t_hoisted_17$2 = [\"value\"];\n\t\tStackMetadataEditor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({\n\t\t\t__name: \"StackMetadataEditor\",\n\t\t\tprops: {\n\t\t\t\tstack: {},\n\t\t\t\tfilePath: {},\n\t\t\t\tcollapsed: { type: Boolean }\n\t\t\t},\n\t\t\temits: [\"change\", \"toggle\"],\n\t\t\tsetup(__props, { emit: __emit }) {\n\t\t\t\tconst props = __props;\n\t\t\t\tconst emit = __emit;\n\t\t\t\tconst collapsed = /* @__PURE__ */ ref(props.collapsed);\n\t\t\t\tconst summary = computed(() => [\n\t\t\t\t\tprops.stack.id || \"(no id)\",\n\t\t\t\t\tprops.stack.name || \"(unnamed)\",\n\t\t\t\t\tprops.stack.mode || \"replace\",\n\t\t\t\t\tprops.filePath\n\t\t\t\t].filter(Boolean).join(\" | \"));\n\t\t\t\tfunction setOptionalString(key, value) {\n\t\t\t\t\tif (value.trim()) props.stack[key] = value;\n\t\t\t\t\telse delete props.stack[key];\n\t\t\t\t\temit(\"change\");\n\t\t\t\t}\n\t\t\t\tfunction setMode(value) {\n\t\t\t\t\tprops.stack.mode = value;\n\t\t\t\t\temit(\"change\");\n\t\t\t\t}\n\t\t\t\tfunction setAutoActivate(value) {\n\t\t\t\t\tprops.stack.autoActivate = value;\n\t\t\t\t\temit(\"change\");\n\t\t\t\t}\n\t\t\t\tfunction toggleMetadata() {\n\t\t\t\t\tcollapsed.value = !collapsed.value;\n\t\t\t\t\temit(\"toggle\", collapsed.value);\n\t\t\t\t}\n\t\t\t\treturn (_ctx, _cache) => {\n\t\t\t\t\treturn openBlock(), createElementBlock(Fragment, null, [createBaseVNode(\"div\", _hoisted_1$4, [\n\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\tid: \"metadataToggleBtn\",\n\t\t\t\t\t\t\t\"data-icon\": collapsed.value ? \"▸\" : \"▾\",\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\ttitle: \"Show or hide stack metadata\",\n\t\t\t\t\t\t\tonClick: toggleMetadata\n\t\t\t\t\t\t}, toDisplayString(collapsed.value ? \"Show metadata\" : \"Hide metadata\"), 9, _hoisted_2$4),\n\t\t\t\t\t\t_cache[4] || (_cache[4] = createBaseVNode(\"div\", { class: \"metadata-title\" }, \"Stack metadata\", -1)),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_3$4, toDisplayString(summary.value), 1)\n\t\t\t\t\t]), withDirectives(createBaseVNode(\"div\", _hoisted_4$4, [\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_5$4, [_cache[5] || (_cache[5] = createBaseVNode(\"label\", null, \"Stack ID\", -1)), createBaseVNode(\"input\", {\n\t\t\t\t\t\t\tid: \"stackId\",\n\t\t\t\t\t\t\tvalue: __props.stack.id,\n\t\t\t\t\t\t\treadonly: \"\",\n\t\t\t\t\t\t\ttitle: \"Stack IDs are immutable; use Fork to create a new ID.\"\n\t\t\t\t\t\t}, null, 8, _hoisted_6$3)]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_7$3, [_cache[6] || (_cache[6] = createBaseVNode(\"label\", null, \"Name\", -1)), createBaseVNode(\"input\", {\n\t\t\t\t\t\t\tid: \"stackName\",\n\t\t\t\t\t\t\tvalue: __props.stack.name || \"\",\n\t\t\t\t\t\t\tonInput: _cache[0] || (_cache[0] = ($event) => setOptionalString(\"name\", $event.target.value))\n\t\t\t\t\t\t}, null, 40, _hoisted_8$3)]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_9$3, [_cache[8] || (_cache[8] = createBaseVNode(\"label\", null, \"Mode\", -1)), createBaseVNode(\"select\", {\n\t\t\t\t\t\t\tid: \"stackMode\",\n\t\t\t\t\t\t\tvalue: __props.stack.mode || \"replace\",\n\t\t\t\t\t\t\tonChange: _cache[1] || (_cache[1] = ($event) => setMode($event.target.value))\n\t\t\t\t\t\t}, [..._cache[7] || (_cache[7] = [\n\t\t\t\t\t\t\tcreateBaseVNode(\"option\", { value: \"replace\" }, \"replace\", -1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"option\", { value: \"append\" }, \"append\", -1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"option\", { value: \"prepend\" }, \"prepend\", -1)\n\t\t\t\t\t\t])], 40, _hoisted_10$3)]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_11$3, [_cache[10] || (_cache[10] = createBaseVNode(\"label\", null, \"Auto activate\", -1)), createBaseVNode(\"label\", _hoisted_12$2, [createBaseVNode(\"input\", {\n\t\t\t\t\t\t\tid: \"stackAuto\",\n\t\t\t\t\t\t\ttype: \"checkbox\",\n\t\t\t\t\t\t\tchecked: __props.stack.autoActivate === true,\n\t\t\t\t\t\t\tonChange: _cache[2] || (_cache[2] = ($event) => setAutoActivate($event.target.checked))\n\t\t\t\t\t\t}, null, 40, _hoisted_13$2), _cache[9] || (_cache[9] = createTextVNode(\" enabled \", -1))])]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_14$2, [_cache[11] || (_cache[11] = createBaseVNode(\"label\", null, \"Description\", -1)), createBaseVNode(\"textarea\", {\n\t\t\t\t\t\t\tid: \"stackDescription\",\n\t\t\t\t\t\t\tclass: \"wide\",\n\t\t\t\t\t\t\tvalue: __props.stack.description || \"\",\n\t\t\t\t\t\t\tonInput: _cache[3] || (_cache[3] = ($event) => setOptionalString(\"description\", $event.target.value))\n\t\t\t\t\t\t}, null, 40, _hoisted_15$2)]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_16$2, [_cache[12] || (_cache[12] = createBaseVNode(\"label\", null, \"File\", -1)), createBaseVNode(\"input\", {\n\t\t\t\t\t\t\tvalue: __props.filePath,\n\t\t\t\t\t\t\tdisabled: \"\"\n\t\t\t\t\t\t}, null, 8, _hoisted_17$2)])\n\t\t\t\t\t], 512), [[vShow, !collapsed.value]])], 64);\n\t\t\t\t};\n\t\t\t}\n\t\t});\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/components/StackMetadataEditor.vue\n\tvar StackMetadataEditor_default;\n\tvar init_StackMetadataEditor = __esmMin((() => {\n\t\tinit_StackMetadataEditor_vue_vue_type_script_setup_true_lang();\n\t\tinit_StackMetadataEditor_vue_vue_type_script_setup_true_lang();\n\t\tStackMetadataEditor_default = StackMetadataEditor_vue_vue_type_script_setup_true_lang_default;\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/vue-metadata-host.ts\n\tfunction createVueMetadataHost(deps) {\n\t\tlet app;\n\t\tfunction mount(root) {\n\t\t\tunmount();\n\t\t\tconst stack = deps.getStack();\n\t\t\tif (!stack) return;\n\t\t\tapp = createApp(StackMetadataEditor_default, {\n\t\t\t\tstack,\n\t\t\t\tfilePath: deps.getFilePath(),\n\t\t\t\tcollapsed: deps.getCollapsed(),\n\t\t\t\tonChange: deps.markDirty,\n\t\t\t\tonToggle: (collapsed) => {\n\t\t\t\t\tdeps.setCollapsed(collapsed);\n\t\t\t\t\tdeps.setStatus(collapsed ? \"Stack metadata hidden\" : \"Stack metadata shown\");\n\t\t\t\t}\n\t\t\t});\n\t\t\tapp.mount(root);\n\t\t}\n\t\tfunction unmount() {\n\t\t\tapp?.unmount();\n\t\t\tapp = void 0;\n\t\t}\n\t\treturn {\n\t\t\tmount,\n\t\t\tunmount\n\t\t};\n\t}\n\tvar init_vue_metadata_host = __esmMin((() => {\n\t\tinit_vue_runtime_esm_bundler();\n\t\tinit_StackMetadataEditor();\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/components/PolicyEditor.vue?vue&type=script&setup=true&lang.ts\n\tvar _hoisted_1$3, _hoisted_2$3, _hoisted_3$3, _hoisted_4$3, _hoisted_5$3, _hoisted_6$2, _hoisted_7$2, _hoisted_8$2, _hoisted_9$2, _hoisted_10$2, _hoisted_11$2, _hoisted_12$1, _hoisted_13$1, _hoisted_14$1, _hoisted_15$1, _hoisted_16$1, _hoisted_17$1, _hoisted_18$1, _hoisted_19$1, _hoisted_20$1, _hoisted_21$1, _hoisted_22$1, _hoisted_23$1, PolicyEditor_vue_vue_type_script_setup_true_lang_default;\n\tvar init_PolicyEditor_vue_vue_type_script_setup_true_lang = __esmMin((() => {\n\t\tinit_vue_runtime_esm_bundler();\n\t\t_hoisted_1$3 = { class: \"tab-section\" };\n\t\t_hoisted_2$3 = {\n\t\t\tid: \"policyRows\",\n\t\t\tclass: \"data-table\"\n\t\t};\n\t\t_hoisted_3$3 = [\"data-policy-kind\", \"data-policy-mode\"];\n\t\t_hoisted_4$3 = { class: \"policy-title\" };\n\t\t_hoisted_5$3 = { class: \"modal-meta\" };\n\t\t_hoisted_6$2 = { class: \"field\" };\n\t\t_hoisted_7$2 = { class: \"segmented policy-mode\" };\n\t\t_hoisted_8$2 = [\"data-policy-mode-option\", \"onClick\"];\n\t\t_hoisted_9$2 = { class: \"field\" };\n\t\t_hoisted_10$2 = {\n\t\t\tclass: \"selected-patterns\",\n\t\t\t\"data-selected-patterns\": \"\"\n\t\t};\n\t\t_hoisted_11$2 = {\n\t\t\tkey: 0,\n\t\t\tclass: \"selected-pattern-empty\"\n\t\t};\n\t\t_hoisted_12$1 = [\"data-remove-policy-pattern\", \"onClick\"];\n\t\t_hoisted_13$1 = [\n\t\t\t\"placeholder\",\n\t\t\t\"disabled\",\n\t\t\t\"value\",\n\t\t\t\"onInput\"\n\t\t];\n\t\t_hoisted_14$1 = { class: \"resource-picker\" };\n\t\t_hoisted_15$1 = { key: 0 };\n\t\t_hoisted_16$1 = [\n\t\t\t\"list\",\n\t\t\t\"value\",\n\t\t\t\"onInput\",\n\t\t\t\"onKeydown\"\n\t\t];\n\t\t_hoisted_17$1 = [\"id\"];\n\t\t_hoisted_18$1 = [\"value\"];\n\t\t_hoisted_19$1 = {\n\t\t\tclass: \"resource-list\",\n\t\t\t\"data-resource-list\": \"\"\n\t\t};\n\t\t_hoisted_20$1 = {\n\t\t\tkey: 0,\n\t\t\tclass: \"resource-empty\"\n\t\t};\n\t\t_hoisted_21$1 = [\n\t\t\t\"data-resource-name\",\n\t\t\t\"title\",\n\t\t\t\"onClick\"\n\t\t];\n\t\t_hoisted_22$1 = {\n\t\t\tkey: 1,\n\t\t\tclass: \"resource-empty\"\n\t\t};\n\t\t_hoisted_23$1 = {\n\t\t\tclass: \"policy-summary\",\n\t\t\t\"data-policy-summary\": \"\"\n\t\t};\n\t\tPolicyEditor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({\n\t\t\t__name: \"PolicyEditor\",\n\t\t\tprops: {\n\t\t\t\tstack: {},\n\t\t\t\tresources: {}\n\t\t\t},\n\t\t\temits: [\"change\", \"status\"],\n\t\t\tsetup(__props, { expose: __expose, emit: __emit }) {\n\t\t\t\tconst props = __props;\n\t\t\t\tconst emit = __emit;\n\t\t\t\tconst policyKinds = [{\n\t\t\t\t\tkind: \"tools\",\n\t\t\t\t\tlabel: \"Tools\"\n\t\t\t\t}, {\n\t\t\t\t\tkind: \"skills\",\n\t\t\t\t\tlabel: \"Skills\"\n\t\t\t\t}];\n\t\t\t\tconst rows = /* @__PURE__ */ reactive({\n\t\t\t\t\ttools: createRowState(\"tools\"),\n\t\t\t\t\tskills: createRowState(\"skills\")\n\t\t\t\t});\n\t\t\t\tconst policyError = /* @__PURE__ */ ref(\"\");\n\t\t\t\twatch(() => props.stack, () => reset());\n\t\t\t\tfunction createRowState(kind) {\n\t\t\t\t\tconst policy = stackPolicyObject(kind);\n\t\t\t\t\tconst mode = policyMode(policy);\n\t\t\t\t\treturn {\n\t\t\t\t\t\tmode,\n\t\t\t\t\t\tpatternsText: policyPatternsToText(mode === \"deny\" ? policy.deny : mode === \"allow\" ? policy.allow : []),\n\t\t\t\t\t\tfilter: \"\"\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tfunction reset() {\n\t\t\t\t\tfor (const { kind } of policyKinds) Object.assign(rows[kind], createRowState(kind));\n\t\t\t\t\tpolicyError.value = \"\";\n\t\t\t\t}\n\t\t\t\tfunction stackPolicyObject(kind) {\n\t\t\t\t\tconst policy = props.stack[kind];\n\t\t\t\t\treturn policy && typeof policy === \"object\" && !Array.isArray(policy) ? policy : {};\n\t\t\t\t}\n\t\t\t\tfunction policyMode(policy) {\n\t\t\t\t\tconst allow = Array.isArray(policy.allow) ? policy.allow : [];\n\t\t\t\t\tif ((Array.isArray(policy.deny) ? policy.deny : []).length && !allow.length) return \"deny\";\n\t\t\t\t\tif (allow.length) return \"allow\";\n\t\t\t\t\treturn \"none\";\n\t\t\t\t}\n\t\t\t\tfunction policyPatternsToText(patterns) {\n\t\t\t\t\treturn Array.isArray(patterns) ? patterns.join(\"\\n\") : \"\";\n\t\t\t\t}\n\t\t\t\tfunction parsePolicyPatterns(value) {\n\t\t\t\t\treturn String(value || \"\").split(/[\\n,]/).map((pattern) => pattern.trim()).filter(Boolean);\n\t\t\t\t}\n\t\t\t\tfunction selectedPatterns(kind) {\n\t\t\t\t\tconst row = rows[kind];\n\t\t\t\t\treturn row.mode === \"none\" ? [] : parsePolicyPatterns(row.patternsText);\n\t\t\t\t}\n\t\t\t\tfunction duplicatePolicyPattern(patterns) {\n\t\t\t\t\tconst seen = /* @__PURE__ */ new Set();\n\t\t\t\t\tfor (const pattern of patterns) {\n\t\t\t\t\t\tif (seen.has(pattern)) return pattern;\n\t\t\t\t\t\tseen.add(pattern);\n\t\t\t\t\t}\n\t\t\t\t\treturn \"\";\n\t\t\t\t}\n\t\t\t\tfunction setMode(kind, mode) {\n\t\t\t\t\tconst row = rows[kind];\n\t\t\t\t\trow.mode = mode;\n\t\t\t\t\tif (mode === \"none\") row.patternsText = \"\";\n\t\t\t\t\tsyncPolicies();\n\t\t\t\t}\n\t\t\t\tfunction onPatternsInput(kind, event) {\n\t\t\t\t\trows[kind].patternsText = event.target.value;\n\t\t\t\t\tsyncPolicies();\n\t\t\t\t}\n\t\t\t\tfunction onFilterInput(kind, event) {\n\t\t\t\t\trows[kind].filter = event.target.value;\n\t\t\t\t}\n\t\t\t\tfunction addPolicyPattern(kind, name) {\n\t\t\t\t\tif (!name) return;\n\t\t\t\t\tconst row = rows[kind];\n\t\t\t\t\tif (row.mode === \"none\") row.mode = \"allow\";\n\t\t\t\t\tconst patterns = parsePolicyPatterns(row.patternsText);\n\t\t\t\t\tif (!patterns.includes(name)) patterns.push(name);\n\t\t\t\t\trow.patternsText = patterns.join(\"\\n\");\n\t\t\t\t\trow.filter = \"\";\n\t\t\t\t\tsyncPolicies();\n\t\t\t\t}\n\t\t\t\tfunction removePolicyPattern(kind, pattern) {\n\t\t\t\t\tif (!pattern) return;\n\t\t\t\t\trows[kind].patternsText = parsePolicyPatterns(rows[kind].patternsText).filter((candidate) => candidate !== pattern).join(\"\\n\");\n\t\t\t\t\tsyncPolicies();\n\t\t\t\t}\n\t\t\t\tfunction addAutocompletePattern(kind) {\n\t\t\t\t\tconst typed = rows[kind].filter.trim();\n\t\t\t\t\tif (!typed) return;\n\t\t\t\t\tconst resources = availableResources(kind, typed);\n\t\t\t\t\taddPolicyPattern(kind, resources.find((resource) => resource.name.toLowerCase() === typed.toLowerCase())?.name || resources[0]?.name || typed);\n\t\t\t\t}\n\t\t\t\tfunction syncPolicies() {\n\t\t\t\t\tconst errors = [];\n\t\t\t\t\tfor (const { kind } of policyKinds) {\n\t\t\t\t\t\tconst row = rows[kind];\n\t\t\t\t\t\tconst patterns = row.mode === \"none\" ? [] : parsePolicyPatterns(row.patternsText);\n\t\t\t\t\t\tconst duplicate = duplicatePolicyPattern(patterns);\n\t\t\t\t\t\tif (duplicate) errors.push(`${kind}.${row.mode} has duplicate pattern: ${duplicate}`);\n\t\t\t\t\t\tconst policy = { ...stackPolicyObject(kind) };\n\t\t\t\t\t\tdelete policy.allow;\n\t\t\t\t\t\tdelete policy.deny;\n\t\t\t\t\t\tif (row.mode === \"allow\" && patterns.length) policy.allow = patterns;\n\t\t\t\t\t\tif (row.mode === \"deny\" && patterns.length) policy.deny = patterns;\n\t\t\t\t\t\tif (Object.keys(policy).length) props.stack[kind] = policy;\n\t\t\t\t\t\telse delete props.stack[kind];\n\t\t\t\t\t}\n\t\t\t\t\tpolicyError.value = errors[0] || \"\";\n\t\t\t\t\temit(\"change\", policyError.value);\n\t\t\t\t\tif (policyError.value) emit(\"status\", policyError.value, \"error\");\n\t\t\t\t}\n\t\t\t\tfunction policyPatternPlaceholder(mode) {\n\t\t\t\t\tif (mode === \"allow\") return \"read\\nbrowser-*\";\n\t\t\t\t\tif (mode === \"deny\") return \"browser-danger\\nlegacy-*\";\n\t\t\t\t\treturn \"\";\n\t\t\t\t}\n\t\t\t\tfunction policySummary(kind) {\n\t\t\t\t\tconst mode = rows[kind].mode;\n\t\t\t\t\tconst patterns = mode === \"none\" ? [] : parsePolicyPatterns(rows[kind].patternsText);\n\t\t\t\t\tif (mode === \"allow\" && patterns.some((pattern) => pattern !== \"*\")) return `Allow list active: ${patterns.length} pattern${patterns.length === 1 ? \"\" : \"s\"}.`;\n\t\t\t\t\tif (mode === \"allow\" && patterns.length) return `Unrestricted ${kind}.`;\n\t\t\t\t\tif (mode === \"deny\" && patterns.length) return `Deny list active: ${patterns.length} pattern${patterns.length === 1 ? \"\" : \"s\"}.`;\n\t\t\t\t\treturn `Unrestricted ${kind}.`;\n\t\t\t\t}\n\t\t\t\tfunction policyResourceMatchesFilter(resource, needle) {\n\t\t\t\t\treturn [\n\t\t\t\t\t\tresource.name,\n\t\t\t\t\t\tresource.description,\n\t\t\t\t\t\tresource.source\n\t\t\t\t\t].filter(Boolean).some((value) => String(value).toLowerCase().includes(needle));\n\t\t\t\t}\n\t\t\t\tfunction availableResources(kind, filter = rows[kind].filter) {\n\t\t\t\t\tconst selected = new Set(selectedPatterns(kind));\n\t\t\t\t\tconst needle = filter.trim().toLowerCase();\n\t\t\t\t\treturn (props.resources[kind] || []).filter((resource) => !selected.has(resource.name)).filter((resource) => !needle || policyResourceMatchesFilter(resource, needle));\n\t\t\t\t}\n\t\t\t\tfunction resourceTitle(resource) {\n\t\t\t\t\treturn [\n\t\t\t\t\t\tresource.description,\n\t\t\t\t\t\tresource.source ? `Source: ${resource.source}` : \"\",\n\t\t\t\t\t\tresource.active ? \"Active tool\" : \"\",\n\t\t\t\t\t\tresource.hidden ? \"Hidden from model invocation\" : \"\"\n\t\t\t\t\t].filter(Boolean).join(\"\\n\") || resource.name;\n\t\t\t\t}\n\t\t\t\tfunction resourceLabel(resource) {\n\t\t\t\t\tconst suffix = resource.active ? \" *\" : resource.hidden ? \" hidden\" : \"\";\n\t\t\t\t\treturn resource.name + suffix;\n\t\t\t\t}\n\t\t\t\t__expose({\n\t\t\t\t\tgetError: () => policyError.value,\n\t\t\t\t\treset\n\t\t\t\t});\n\t\t\t\treturn (_ctx, _cache) => {\n\t\t\t\t\treturn openBlock(), createElementBlock(\"div\", _hoisted_1$3, [\n\t\t\t\t\t\t_cache[4] || (_cache[4] = createBaseVNode(\"div\", { class: \"tab-section-title\" }, \"Tool policy and skill visibility\", -1)),\n\t\t\t\t\t\t_cache[5] || (_cache[5] = createBaseVNode(\"div\", { class: \"tab-section-meta\" }, \" Tool rules constrain active tools. Skill rules only filter model-visible skills rendered by pi-forge; they do not block explicit skill invocation. Patterns support exact names and * wildcards. \", -1)),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_2$3, [_cache[3] || (_cache[3] = createBaseVNode(\"div\", { class: \"data-row header policy-row\" }, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, \"Resource\"),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, \"Mode\"),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, \"Patterns\"),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, \"Available\"),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, \"Status\")\n\t\t\t\t\t\t], -1)), (openBlock(), createElementBlock(Fragment, null, renderList(policyKinds, ({ kind, label }) => {\n\t\t\t\t\t\t\treturn createBaseVNode(\"div\", {\n\t\t\t\t\t\t\t\tkey: kind,\n\t\t\t\t\t\t\t\tclass: \"data-row policy-row\",\n\t\t\t\t\t\t\t\t\"data-policy-row\": \"\",\n\t\t\t\t\t\t\t\t\"data-policy-kind\": kind,\n\t\t\t\t\t\t\t\t\"data-policy-mode\": rows[kind].mode\n\t\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, [createBaseVNode(\"div\", _hoisted_4$3, toDisplayString(label), 1), createBaseVNode(\"div\", _hoisted_5$3, toDisplayString(kind), 1)]),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_6$2, [_cache[0] || (_cache[0] = createBaseVNode(\"label\", null, \"Mode\", -1)), createBaseVNode(\"div\", _hoisted_7$2, [(openBlock(), createElementBlock(Fragment, null, renderList([\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tvalue: \"none\",\n\t\t\t\t\t\t\t\t\t\tlabel: \"Unrestricted\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tvalue: \"allow\",\n\t\t\t\t\t\t\t\t\t\tlabel: \"Allow\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tvalue: \"deny\",\n\t\t\t\t\t\t\t\t\t\tlabel: \"Deny\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t], (option) => {\n\t\t\t\t\t\t\t\t\treturn createBaseVNode(\"button\", {\n\t\t\t\t\t\t\t\t\t\tkey: option.value,\n\t\t\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\t\t\t\"data-policy-mode-option\": option.value,\n\t\t\t\t\t\t\t\t\t\tclass: normalizeClass({ active: rows[kind].mode === option.value }),\n\t\t\t\t\t\t\t\t\t\tonClick: ($event) => setMode(kind, option.value)\n\t\t\t\t\t\t\t\t\t}, toDisplayString(option.label), 11, _hoisted_8$2);\n\t\t\t\t\t\t\t\t}), 64))])]),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_9$2, [\n\t\t\t\t\t\t\t\t\t_cache[2] || (_cache[2] = createBaseVNode(\"label\", null, \"Patterns\", -1)),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_10$2, [!selectedPatterns(kind).length ? (openBlock(), createElementBlock(\"span\", _hoisted_11$2, \"No selected patterns.\")) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(selectedPatterns(kind), (pattern, index) => {\n\t\t\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"button\", {\n\t\t\t\t\t\t\t\t\t\t\tkey: `${pattern}-${index}`,\n\t\t\t\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\t\t\t\tclass: \"selected-pattern-chip\",\n\t\t\t\t\t\t\t\t\t\t\t\"data-remove-policy-pattern\": pattern,\n\t\t\t\t\t\t\t\t\t\t\ttitle: \"Remove selected pattern\",\n\t\t\t\t\t\t\t\t\t\t\tonClick: ($event) => removePolicyPattern(kind, pattern)\n\t\t\t\t\t\t\t\t\t\t}, [createTextVNode(toDisplayString(pattern), 1), _cache[1] || (_cache[1] = createBaseVNode(\"span\", { \"aria-hidden\": \"true\" }, \"x\", -1))], 8, _hoisted_12$1);\n\t\t\t\t\t\t\t\t\t}), 128))]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"textarea\", {\n\t\t\t\t\t\t\t\t\t\tclass: \"policy-patterns\",\n\t\t\t\t\t\t\t\t\t\t\"data-policy-patterns\": \"\",\n\t\t\t\t\t\t\t\t\t\tspellcheck: \"false\",\n\t\t\t\t\t\t\t\t\t\tplaceholder: policyPatternPlaceholder(rows[kind].mode),\n\t\t\t\t\t\t\t\t\t\tdisabled: rows[kind].mode === \"none\",\n\t\t\t\t\t\t\t\t\t\tvalue: rows[kind].patternsText,\n\t\t\t\t\t\t\t\t\t\tonInput: ($event) => onPatternsInput(kind, $event)\n\t\t\t\t\t\t\t\t\t}, null, 40, _hoisted_13$1)\n\t\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_14$1, [createBaseVNode(\"label\", null, \"Available \" + toDisplayString(kind), 1), props.resources[kind]?.length ? (openBlock(), createElementBlock(\"div\", _hoisted_15$1, [\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\t\tclass: \"resource-filter\",\n\t\t\t\t\t\t\t\t\t\t\"data-resource-filter\": \"\",\n\t\t\t\t\t\t\t\t\t\tlist: `resource-options-${kind}`,\n\t\t\t\t\t\t\t\t\t\tplaceholder: \"Type to filter or add\",\n\t\t\t\t\t\t\t\t\t\tvalue: rows[kind].filter,\n\t\t\t\t\t\t\t\t\t\tonInput: ($event) => onFilterInput(kind, $event),\n\t\t\t\t\t\t\t\t\t\tonKeydown: withKeys(withModifiers(($event) => addAutocompletePattern(kind), [\"prevent\"]), [\"enter\"])\n\t\t\t\t\t\t\t\t\t}, null, 40, _hoisted_16$1),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"datalist\", {\n\t\t\t\t\t\t\t\t\t\tid: `resource-options-${kind}`,\n\t\t\t\t\t\t\t\t\t\t\"data-resource-options\": \"\"\n\t\t\t\t\t\t\t\t\t}, [(openBlock(true), createElementBlock(Fragment, null, renderList(availableResources(kind, \"\"), (resource) => {\n\t\t\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"option\", {\n\t\t\t\t\t\t\t\t\t\t\tkey: resource.name,\n\t\t\t\t\t\t\t\t\t\t\tvalue: resource.name\n\t\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_18$1);\n\t\t\t\t\t\t\t\t\t}), 128))], 8, _hoisted_17$1),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_19$1, [!availableResources(kind).length ? (openBlock(), createElementBlock(\"div\", _hoisted_20$1, \" No matching unselected \" + toDisplayString(kind) + \". \", 1)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(availableResources(kind), (resource) => {\n\t\t\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"button\", {\n\t\t\t\t\t\t\t\t\t\t\tkey: resource.name,\n\t\t\t\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\t\t\t\tclass: normalizeClass([\"resource-chip\", {\n\t\t\t\t\t\t\t\t\t\t\t\tactive: resource.active,\n\t\t\t\t\t\t\t\t\t\t\t\thidden: resource.hidden\n\t\t\t\t\t\t\t\t\t\t\t}]),\n\t\t\t\t\t\t\t\t\t\t\t\"data-resource-name\": resource.name,\n\t\t\t\t\t\t\t\t\t\t\ttitle: resourceTitle(resource),\n\t\t\t\t\t\t\t\t\t\t\tonClick: ($event) => addPolicyPattern(kind, resource.name)\n\t\t\t\t\t\t\t\t\t\t}, toDisplayString(resourceLabel(resource)), 11, _hoisted_21$1);\n\t\t\t\t\t\t\t\t\t}), 128))])\n\t\t\t\t\t\t\t\t])) : (openBlock(), createElementBlock(\"div\", _hoisted_22$1, \"No registered \" + toDisplayString(kind) + \" reported.\", 1))]),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_23$1, toDisplayString(policySummary(kind)), 1)\n\t\t\t\t\t\t\t], 8, _hoisted_3$3);\n\t\t\t\t\t\t}), 64))])\n\t\t\t\t\t]);\n\t\t\t\t};\n\t\t\t}\n\t\t});\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/components/PolicyEditor.vue\n\tvar PolicyEditor_default;\n\tvar init_PolicyEditor = __esmMin((() => {\n\t\tinit_PolicyEditor_vue_vue_type_script_setup_true_lang();\n\t\tinit_PolicyEditor_vue_vue_type_script_setup_true_lang();\n\t\tPolicyEditor_default = PolicyEditor_vue_vue_type_script_setup_true_lang_default;\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/components/RegexEditor.vue?vue&type=script&setup=true&lang.ts\n\tvar _hoisted_1$2, _hoisted_2$2, _hoisted_3$2, _hoisted_4$2, _hoisted_5$2, _hoisted_6$1, _hoisted_7$1, _hoisted_8$1, _hoisted_9$1, _hoisted_10$1, _hoisted_11$1, _hoisted_12, _hoisted_13, _hoisted_14, _hoisted_15, _hoisted_16, _hoisted_17, _hoisted_18, _hoisted_19, _hoisted_20, _hoisted_21, _hoisted_22, _hoisted_23, _hoisted_24, _hoisted_25, _hoisted_26, _hoisted_27, _hoisted_28, _hoisted_29, _hoisted_30, _hoisted_31, _hoisted_32, _hoisted_33, _hoisted_34, _hoisted_35, _hoisted_36, _hoisted_37, _hoisted_38, _hoisted_39, _hoisted_40, _hoisted_41, _hoisted_42, _hoisted_43, RegexEditor_vue_vue_type_script_setup_true_lang_default;\n\tvar init_RegexEditor_vue_vue_type_script_setup_true_lang = __esmMin((() => {\n\t\tinit_vue_runtime_esm_bundler();\n\t\t_hoisted_1$2 = { class: \"tab-section\" };\n\t\t_hoisted_2$2 = { class: \"modal-toolbar\" };\n\t\t_hoisted_3$2 = {\n\t\t\tid: \"regexRows\",\n\t\t\tclass: \"data-table\"\n\t\t};\n\t\t_hoisted_4$2 = { class: \"regex-controls\" };\n\t\t_hoisted_5$2 = [\"onClick\"];\n\t\t_hoisted_6$1 = [\"onClick\"];\n\t\t_hoisted_7$1 = { class: \"regex-fields\" };\n\t\t_hoisted_8$1 = [\"value\"];\n\t\t_hoisted_9$1 = { class: \"checkline\" };\n\t\t_hoisted_10$1 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_11$1 = { class: \"field\" };\n\t\t_hoisted_12 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_13 = { class: \"field\" };\n\t\t_hoisted_14 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_15 = { class: \"field\" };\n\t\t_hoisted_16 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_17 = [\"value\"];\n\t\t_hoisted_18 = { class: \"field\" };\n\t\t_hoisted_19 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_20 = [\"value\"];\n\t\t_hoisted_21 = { class: \"field\" };\n\t\t_hoisted_22 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_23 = { class: \"field span-2\" };\n\t\t_hoisted_24 = {\n\t\t\tclass: \"regex-checks\",\n\t\t\ttitle: \"compiled only; empty means default\"\n\t\t};\n\t\t_hoisted_25 = [\"onUpdate:modelValue\", \"value\"];\n\t\t_hoisted_26 = { class: \"field span-2\" };\n\t\t_hoisted_27 = {\n\t\t\tclass: \"regex-checks\",\n\t\t\ttitle: \"message rules only; empty means all roles\"\n\t\t};\n\t\t_hoisted_28 = [\"onUpdate:modelValue\", \"value\"];\n\t\t_hoisted_29 = { class: \"field\" };\n\t\t_hoisted_30 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_31 = { class: \"field\" };\n\t\t_hoisted_32 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_33 = { class: \"field\" };\n\t\t_hoisted_34 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_35 = { class: \"field\" };\n\t\t_hoisted_36 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_37 = { class: \"field span-2\" };\n\t\t_hoisted_38 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_39 = { class: \"field span-3\" };\n\t\t_hoisted_40 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_41 = { class: \"field span-3\" };\n\t\t_hoisted_42 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_43 = [\"onClick\"];\n\t\tRegexEditor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({\n\t\t\t__name: \"RegexEditor\",\n\t\t\tprops: { stack: {} },\n\t\t\temits: [\"change\", \"validate\"],\n\t\t\tsetup(__props, { expose: __expose, emit: __emit }) {\n\t\t\t\tconst props = __props;\n\t\t\t\tconst emit = __emit;\n\t\t\t\tconst regexStages = [\"history\", \"compiled\"];\n\t\t\t\tconst regexEffects = [\n\t\t\t\t\t\"outgoing\",\n\t\t\t\t\t\"finalize\",\n\t\t\t\t\t\"display\",\n\t\t\t\t\t\"both\"\n\t\t\t\t];\n\t\t\t\tconst regexTargets = [\"system\", \"messages\"];\n\t\t\t\tconst regexRoles = [\n\t\t\t\t\t\"system\",\n\t\t\t\t\t\"user\",\n\t\t\t\t\t\"assistant\",\n\t\t\t\t\t\"custom\"\n\t\t\t\t];\n\t\t\t\tlet nextRowKey = 1;\n\t\t\t\tconst rows = /* @__PURE__ */ ref(readStackRules());\n\t\t\t\tconst regexError = /* @__PURE__ */ ref(\"\");\n\t\t\t\tlet resettingFromStack = false;\n\t\t\t\twatch(() => props.stack, () => {\n\t\t\t\t\tresettingFromStack = true;\n\t\t\t\t\trows.value = readStackRules();\n\t\t\t\t\tregexError.value = \"\";\n\t\t\t\t\tresettingFromStack = false;\n\t\t\t\t}, { flush: \"sync\" });\n\t\t\t\twatch(rows, () => {\n\t\t\t\t\tif (!resettingFromStack) syncRules();\n\t\t\t\t}, {\n\t\t\t\t\tdeep: true,\n\t\t\t\t\tflush: \"sync\"\n\t\t\t\t});\n\t\t\t\tfunction readStackRules() {\n\t\t\t\t\tconst candidate = props.stack.regex?.rules;\n\t\t\t\t\tif (!Array.isArray(candidate)) return [];\n\t\t\t\t\treturn candidate.map((rule) => formFromRule(rule));\n\t\t\t\t}\n\t\t\t\tfunction formFromRule(rule) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tkey: nextRowKey++,\n\t\t\t\t\t\toriginal: { ...rule },\n\t\t\t\t\t\tid: textValue(rule.id),\n\t\t\t\t\t\tname: textValue(rule.name),\n\t\t\t\t\t\tenabled: rule.enabled !== false,\n\t\t\t\t\t\tstage: selectedChoice(rule.stage, regexStages, \"compiled\"),\n\t\t\t\t\t\teffect: selectedChoice(rule.effect, regexEffects, \"outgoing\"),\n\t\t\t\t\t\tflags: textValue(rule.flags),\n\t\t\t\t\t\ttargets: selectedValues(rule.targets, regexTargets),\n\t\t\t\t\t\troles: selectedValues(rule.roles, regexRoles),\n\t\t\t\t\t\tmaxMessages: inputValue(rule.maxMessages),\n\t\t\t\t\t\tmaxChars: inputValue(rule.maxChars),\n\t\t\t\t\t\tminDepth: inputValue(rule.minDepth),\n\t\t\t\t\t\tmaxDepth: inputValue(rule.maxDepth),\n\t\t\t\t\t\ttrimStrings: Array.isArray(rule.trimStrings) ? rule.trimStrings.join(\"\\n\") : \"\",\n\t\t\t\t\t\tpattern: textValue(rule.pattern),\n\t\t\t\t\t\treplace: textValue(rule.replace)\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tfunction selectedChoice(value, choices, fallback) {\n\t\t\t\t\treturn typeof value === \"string\" && choices.some((choice) => choice === value) ? value : fallback;\n\t\t\t\t}\n\t\t\t\tfunction selectedValues(value, choices) {\n\t\t\t\t\tif (!Array.isArray(value)) return [];\n\t\t\t\t\treturn choices.filter((choice) => value.includes(choice));\n\t\t\t\t}\n\t\t\t\tfunction textValue(value) {\n\t\t\t\t\treturn typeof value === \"string\" ? value : \"\";\n\t\t\t\t}\n\t\t\t\tfunction inputValue(value) {\n\t\t\t\t\treturn value === void 0 || value === null ? \"\" : String(value);\n\t\t\t\t}\n\t\t\t\tfunction addRule() {\n\t\t\t\t\trows.value = [...rows.value, formFromRule(defaultRegexRule())];\n\t\t\t\t}\n\t\t\t\tfunction deleteRule(index) {\n\t\t\t\t\trows.value = rows.value.filter((_, rowIndex) => rowIndex !== index);\n\t\t\t\t}\n\t\t\t\tfunction moveRule(index, offset) {\n\t\t\t\t\tconst destination = index + offset;\n\t\t\t\t\tif (destination < 0 || destination >= rows.value.length) return;\n\t\t\t\t\tconst reordered = [...rows.value];\n\t\t\t\t\t[reordered[index], reordered[destination]] = [reordered[destination], reordered[index]];\n\t\t\t\t\trows.value = reordered;\n\t\t\t\t}\n\t\t\t\tfunction defaultRegexRule() {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tid: uniqueRegexRuleId(),\n\t\t\t\t\t\tenabled: true,\n\t\t\t\t\t\tstage: \"compiled\",\n\t\t\t\t\t\teffect: \"outgoing\",\n\t\t\t\t\t\ttargets: [\"messages\"],\n\t\t\t\t\t\tpattern: \"\",\n\t\t\t\t\t\treplace: \"\"\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tfunction uniqueRegexRuleId() {\n\t\t\t\t\tconst existing = new Set(rows.value.map((row) => row.id).filter(Boolean));\n\t\t\t\t\tlet index = existing.size + 1;\n\t\t\t\t\tlet id = `regex-${index}`;\n\t\t\t\t\twhile (existing.has(id)) id = `regex-${++index}`;\n\t\t\t\t\treturn id;\n\t\t\t\t}\n\t\t\t\tfunction syncRules() {\n\t\t\t\t\tconst rules = [];\n\t\t\t\t\tconst seen = /* @__PURE__ */ new Set();\n\t\t\t\t\tconst errors = [];\n\t\t\t\t\trows.value.forEach((row, index) => {\n\t\t\t\t\t\tconst rule = ruleFromForm(row);\n\t\t\t\t\t\tconst label = rule.id || `rule ${index + 1}`;\n\t\t\t\t\t\tif (!rule.id) errors.push(`Regex rule ${index + 1} needs an id.`);\n\t\t\t\t\t\telse if (seen.has(rule.id)) errors.push(`Duplicate regex rule id: ${rule.id}`);\n\t\t\t\t\t\tseen.add(rule.id);\n\t\t\t\t\t\tif (!rule.pattern) errors.push(`Regex rule ${label} needs a pattern.`);\n\t\t\t\t\t\tif (hasInputValue(row.maxMessages) && !rule.maxMessages) errors.push(`Regex rule ${label} maxMessages must be a positive integer.`);\n\t\t\t\t\t\tif (hasInputValue(row.maxChars) && !rule.maxChars) errors.push(`Regex rule ${label} maxChars must be a positive integer.`);\n\t\t\t\t\t\tif (hasInputValue(row.minDepth) && rule.minDepth === void 0) errors.push(`Regex rule ${label} minDepth must be a non-negative integer.`);\n\t\t\t\t\t\tif (hasInputValue(row.maxDepth) && rule.maxDepth === void 0) errors.push(`Regex rule ${label} maxDepth must be a non-negative integer.`);\n\t\t\t\t\t\tif (rule.minDepth !== void 0 && rule.maxDepth !== void 0 && rule.maxDepth < rule.minDepth) errors.push(`Regex rule ${label} maxDepth must be greater than or equal to minDepth.`);\n\t\t\t\t\t\trules.push(rule);\n\t\t\t\t\t});\n\t\t\t\t\tif (rules.length > 0) props.stack.regex = {\n\t\t\t\t\t\t...props.stack.regex || {},\n\t\t\t\t\t\tschemaVersion: props.stack.regex?.schemaVersion || 1,\n\t\t\t\t\t\trules\n\t\t\t\t\t};\n\t\t\t\t\telse delete props.stack.regex;\n\t\t\t\t\tregexError.value = errors[0] || \"\";\n\t\t\t\t\temit(\"change\", regexError.value);\n\t\t\t\t}\n\t\t\t\tfunction ruleFromForm(form) {\n\t\t\t\t\tconst rule = { ...form.original };\n\t\t\t\t\tfor (const key of [\n\t\t\t\t\t\t\"id\",\n\t\t\t\t\t\t\"name\",\n\t\t\t\t\t\t\"enabled\",\n\t\t\t\t\t\t\"stage\",\n\t\t\t\t\t\t\"effect\",\n\t\t\t\t\t\t\"pattern\",\n\t\t\t\t\t\t\"flags\",\n\t\t\t\t\t\t\"replace\",\n\t\t\t\t\t\t\"trimStrings\",\n\t\t\t\t\t\t\"roles\",\n\t\t\t\t\t\t\"targets\",\n\t\t\t\t\t\t\"maxMessages\",\n\t\t\t\t\t\t\"maxChars\",\n\t\t\t\t\t\t\"minDepth\",\n\t\t\t\t\t\t\"maxDepth\"\n\t\t\t\t\t]) delete rule[key];\n\t\t\t\t\trule.id = form.id.trim();\n\t\t\t\t\tsetOptionalString(rule, \"name\", form.name);\n\t\t\t\t\trule.enabled = form.enabled;\n\t\t\t\t\trule.stage = form.stage || \"compiled\";\n\t\t\t\t\trule.effect = form.effect || \"outgoing\";\n\t\t\t\t\trule.pattern = form.pattern;\n\t\t\t\t\tconst flags = form.flags.trim();\n\t\t\t\t\tif (flags) rule.flags = flags;\n\t\t\t\t\tif (form.replace) rule.replace = form.replace;\n\t\t\t\t\tconst trimStrings = form.trimStrings.split(/\\r?\\n/).filter((line) => line.length > 0);\n\t\t\t\t\tif (trimStrings.length > 0) rule.trimStrings = trimStrings;\n\t\t\t\t\tif (form.roles.length > 0) rule.roles = [...form.roles];\n\t\t\t\t\tif (form.targets.length > 0) rule.targets = [...form.targets];\n\t\t\t\t\tconst maxMessages = positiveIntegerFromInput(form.maxMessages);\n\t\t\t\t\tconst maxChars = positiveIntegerFromInput(form.maxChars);\n\t\t\t\t\tconst minDepth = nonNegativeIntegerFromInput(form.minDepth);\n\t\t\t\t\tconst maxDepth = nonNegativeIntegerFromInput(form.maxDepth);\n\t\t\t\t\tif (maxMessages) rule.maxMessages = maxMessages;\n\t\t\t\t\tif (maxChars) rule.maxChars = maxChars;\n\t\t\t\t\tif (minDepth !== void 0) rule.minDepth = minDepth;\n\t\t\t\t\tif (maxDepth !== void 0) rule.maxDepth = maxDepth;\n\t\t\t\t\treturn rule;\n\t\t\t\t}\n\t\t\t\tfunction positiveIntegerFromInput(value) {\n\t\t\t\t\tif (!hasInputValue(value)) return void 0;\n\t\t\t\t\tconst number = Number(value);\n\t\t\t\t\treturn Number.isInteger(number) && number > 0 ? number : void 0;\n\t\t\t\t}\n\t\t\t\tfunction nonNegativeIntegerFromInput(value) {\n\t\t\t\t\tif (!hasInputValue(value)) return void 0;\n\t\t\t\t\tconst number = Number(value);\n\t\t\t\t\treturn Number.isInteger(number) && number >= 0 ? number : void 0;\n\t\t\t\t}\n\t\t\t\tfunction hasInputValue(value) {\n\t\t\t\t\treturn String(value ?? \"\").trim().length > 0;\n\t\t\t\t}\n\t\t\t\tfunction setOptionalString(target, key, value) {\n\t\t\t\t\tconst trimmed = value.trim();\n\t\t\t\t\tif (trimmed) target[key] = trimmed;\n\t\t\t\t}\n\t\t\t\tfunction warningForForm(form) {\n\t\t\t\t\treturn regexRuleWarning(ruleFromForm(form));\n\t\t\t\t}\n\t\t\t\tfunction regexRuleWarning(rule) {\n\t\t\t\t\tif (rule.effect === \"finalize\") return \"Warning: finalize runs after streaming and replaces the stored assistant transcript. Use stage \\\"compiled\\\" with target \\\"messages\\\".\";\n\t\t\t\t\tif (rule.effect === \"display\") return \"Warning: display rules validate but are ignored at runtime until true display transforms exist.\";\n\t\t\t\t\tif (rule.effect === \"both\") return \"Warning: both is ignored at runtime; create separate outgoing and finalize rules instead.\";\n\t\t\t\t\tif (typeof rule.replace === \"string\" && /\\{\\{\\s*match\\s*\\}\\}/i.test(rule.replace)) return \"Warning: {{match}} is SillyTavern syntax. Use $& or $0 for the full match in pi-forge rules.\";\n\t\t\t\t\treturn \"\";\n\t\t\t\t}\n\t\t\t\tfunction serializeOriginal(rule) {\n\t\t\t\t\treturn JSON.stringify(rule || {});\n\t\t\t\t}\n\t\t\t\t__expose({ getError: () => regexError.value });\n\t\t\t\treturn (_ctx, _cache) => {\n\t\t\t\t\treturn openBlock(), createElementBlock(\"div\", _hoisted_1$2, [\n\t\t\t\t\t\t_cache[18] || (_cache[18] = createBaseVNode(\"div\", { class: \"tab-section-title\" }, \"Regex rules\", -1)),\n\t\t\t\t\t\t_cache[19] || (_cache[19] = createBaseVNode(\"div\", { class: \"tab-section-meta\" }, \" Ordered JavaScript RegExp replacements for outgoing prompt text and finalized assistant messages. \", -1)),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_2$2, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\t\tid: \"addRegexRuleBtn\",\n\t\t\t\t\t\t\t\t\"data-icon\": \"+\",\n\t\t\t\t\t\t\t\ttitle: \"Add a regex rule\",\n\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\tonClick: addRule\n\t\t\t\t\t\t\t}, \" Add rule \"),\n\t\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\t\tid: \"validateRegexRulesBtn\",\n\t\t\t\t\t\t\t\t\"data-icon\": \"!\",\n\t\t\t\t\t\t\t\ttitle: \"Validate the edited stack\",\n\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\tonClick: _cache[0] || (_cache[0] = ($event) => emit(\"validate\"))\n\t\t\t\t\t\t\t}, \" Validate \"),\n\t\t\t\t\t\t\t_cache[1] || (_cache[1] = createBaseVNode(\"span\", { class: \"modal-spacer\" }, null, -1)),\n\t\t\t\t\t\t\t_cache[2] || (_cache[2] = createBaseVNode(\"span\", { class: \"modal-meta\" }, \"Save writes these rules to stack.regex.rules.\", -1))\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_3$2, [(openBlock(true), createElementBlock(Fragment, null, renderList(rows.value, (row, index) => {\n\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"div\", {\n\t\t\t\t\t\t\t\tkey: row.key,\n\t\t\t\t\t\t\t\tclass: \"data-row regex-row\",\n\t\t\t\t\t\t\t\t\"data-regex-row\": \"\"\n\t\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_4$2, [createBaseVNode(\"button\", {\n\t\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\t\t\"data-regex-up\": \"true\",\n\t\t\t\t\t\t\t\t\t\"data-icon\": \"↑\",\n\t\t\t\t\t\t\t\t\ttitle: \"Move this rule up\",\n\t\t\t\t\t\t\t\t\tonClick: ($event) => moveRule(index, -1)\n\t\t\t\t\t\t\t\t}, \" Up \", 8, _hoisted_5$2), createBaseVNode(\"button\", {\n\t\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\t\t\"data-regex-down\": \"true\",\n\t\t\t\t\t\t\t\t\t\"data-icon\": \"↓\",\n\t\t\t\t\t\t\t\t\ttitle: \"Move this rule down\",\n\t\t\t\t\t\t\t\t\tonClick: ($event) => moveRule(index, 1)\n\t\t\t\t\t\t\t\t}, \" Down \", 8, _hoisted_6$1)]),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_7$1, [\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"textarea\", {\n\t\t\t\t\t\t\t\t\t\t\"data-regex-original\": \"\",\n\t\t\t\t\t\t\t\t\t\thidden: \"\",\n\t\t\t\t\t\t\t\t\t\tvalue: serializeOriginal(row.original)\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_8$1),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_9$1, [withDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.enabled = $event,\n\t\t\t\t\t\t\t\t\t\ttype: \"checkbox\",\n\t\t\t\t\t\t\t\t\t\t\"data-regex-enabled\": \"\"\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_10$1), [[vModelCheckbox, row.enabled]]), _cache[3] || (_cache[3] = createTextVNode(\" Enabled \", -1))]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_11$1, [_cache[4] || (_cache[4] = createBaseVNode(\"label\", null, \"ID\", -1)), withDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.id = $event,\n\t\t\t\t\t\t\t\t\t\t\"data-regex-id\": \"\",\n\t\t\t\t\t\t\t\t\t\tplaceholder: \"trim-ooc\"\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_12), [[vModelText, row.id]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_13, [_cache[5] || (_cache[5] = createBaseVNode(\"label\", null, \"Name\", -1)), withDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.name = $event,\n\t\t\t\t\t\t\t\t\t\t\"data-regex-name\": \"\",\n\t\t\t\t\t\t\t\t\t\tplaceholder: \"Readable label\"\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_14), [[vModelText, row.name]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_15, [_cache[6] || (_cache[6] = createBaseVNode(\"label\", null, \"Stage\", -1)), withDirectives(createBaseVNode(\"select\", {\n\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.stage = $event,\n\t\t\t\t\t\t\t\t\t\t\"data-regex-stage\": \"\"\n\t\t\t\t\t\t\t\t\t}, [(openBlock(), createElementBlock(Fragment, null, renderList(regexStages, (stage) => {\n\t\t\t\t\t\t\t\t\t\treturn createBaseVNode(\"option\", {\n\t\t\t\t\t\t\t\t\t\t\tkey: stage,\n\t\t\t\t\t\t\t\t\t\t\tvalue: stage\n\t\t\t\t\t\t\t\t\t\t}, toDisplayString(stage), 9, _hoisted_17);\n\t\t\t\t\t\t\t\t\t}), 64))], 8, _hoisted_16), [[vModelSelect, row.stage]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_18, [_cache[7] || (_cache[7] = createBaseVNode(\"label\", null, \"Effect\", -1)), withDirectives(createBaseVNode(\"select\", {\n\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.effect = $event,\n\t\t\t\t\t\t\t\t\t\t\"data-regex-effect\": \"\"\n\t\t\t\t\t\t\t\t\t}, [(openBlock(), createElementBlock(Fragment, null, renderList(regexEffects, (effect) => {\n\t\t\t\t\t\t\t\t\t\treturn createBaseVNode(\"option\", {\n\t\t\t\t\t\t\t\t\t\t\tkey: effect,\n\t\t\t\t\t\t\t\t\t\t\tvalue: effect\n\t\t\t\t\t\t\t\t\t\t}, toDisplayString(effect), 9, _hoisted_20);\n\t\t\t\t\t\t\t\t\t}), 64))], 8, _hoisted_19), [[vModelSelect, row.effect]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_21, [_cache[8] || (_cache[8] = createBaseVNode(\"label\", null, \"Flags\", -1)), withDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.flags = $event,\n\t\t\t\t\t\t\t\t\t\t\"data-regex-flags\": \"\",\n\t\t\t\t\t\t\t\t\t\tplaceholder: \"gimsu\"\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_22), [[vModelText, row.flags]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_23, [_cache[9] || (_cache[9] = createBaseVNode(\"label\", null, \"Targets\", -1)), createBaseVNode(\"div\", _hoisted_24, [(openBlock(), createElementBlock(Fragment, null, renderList(regexTargets, (target) => {\n\t\t\t\t\t\t\t\t\t\treturn createBaseVNode(\"label\", { key: target }, [withDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.targets = $event,\n\t\t\t\t\t\t\t\t\t\t\ttype: \"checkbox\",\n\t\t\t\t\t\t\t\t\t\t\t\"data-regex-target\": \"\",\n\t\t\t\t\t\t\t\t\t\t\tvalue: target\n\t\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_25), [[vModelCheckbox, row.targets]]), createTextVNode(\" \" + toDisplayString(target), 1)]);\n\t\t\t\t\t\t\t\t\t}), 64))])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_26, [_cache[10] || (_cache[10] = createBaseVNode(\"label\", null, \"Roles\", -1)), createBaseVNode(\"div\", _hoisted_27, [(openBlock(), createElementBlock(Fragment, null, renderList(regexRoles, (role) => {\n\t\t\t\t\t\t\t\t\t\treturn createBaseVNode(\"label\", { key: role }, [withDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.roles = $event,\n\t\t\t\t\t\t\t\t\t\t\ttype: \"checkbox\",\n\t\t\t\t\t\t\t\t\t\t\t\"data-regex-role\": \"\",\n\t\t\t\t\t\t\t\t\t\t\tvalue: role\n\t\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_28), [[vModelCheckbox, row.roles]]), createTextVNode(\" \" + toDisplayString(role), 1)]);\n\t\t\t\t\t\t\t\t\t}), 64))])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_29, [_cache[11] || (_cache[11] = createBaseVNode(\"label\", null, \"Max messages\", -1)), withDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.maxMessages = $event,\n\t\t\t\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t\t\t\t\tmin: \"1\",\n\t\t\t\t\t\t\t\t\t\t\"data-regex-max-messages\": \"\"\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_30), [[vModelText, row.maxMessages]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_31, [_cache[12] || (_cache[12] = createBaseVNode(\"label\", null, \"Max chars\", -1)), withDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.maxChars = $event,\n\t\t\t\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t\t\t\t\tmin: \"1\",\n\t\t\t\t\t\t\t\t\t\t\"data-regex-max-chars\": \"\"\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_32), [[vModelText, row.maxChars]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_33, [_cache[13] || (_cache[13] = createBaseVNode(\"label\", null, \"Min depth\", -1)), withDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.minDepth = $event,\n\t\t\t\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t\t\t\t\tmin: \"0\",\n\t\t\t\t\t\t\t\t\t\t\"data-regex-min-depth\": \"\"\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_34), [[vModelText, row.minDepth]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_35, [_cache[14] || (_cache[14] = createBaseVNode(\"label\", null, \"Max depth\", -1)), withDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.maxDepth = $event,\n\t\t\t\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t\t\t\t\tmin: \"0\",\n\t\t\t\t\t\t\t\t\t\t\"data-regex-max-depth\": \"\"\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_36), [[vModelText, row.maxDepth]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_37, [_cache[15] || (_cache[15] = createBaseVNode(\"label\", null, \"Trim strings\", -1)), withDirectives(createBaseVNode(\"textarea\", {\n\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.trimStrings = $event,\n\t\t\t\t\t\t\t\t\t\t\"data-regex-trim-strings\": \"\",\n\t\t\t\t\t\t\t\t\t\tspellcheck: \"false\",\n\t\t\t\t\t\t\t\t\t\tplaceholder: \"one per line\"\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_38), [[vModelText, row.trimStrings]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_39, [_cache[16] || (_cache[16] = createBaseVNode(\"label\", null, \"Pattern\", -1)), withDirectives(createBaseVNode(\"textarea\", {\n\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.pattern = $event,\n\t\t\t\t\t\t\t\t\t\t\"data-regex-pattern\": \"\",\n\t\t\t\t\t\t\t\t\t\tspellcheck: \"false\",\n\t\t\t\t\t\t\t\t\t\tplaceholder: \"\\\\\\\\(OOC:[^)]+\\\\\\\\)\"\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_40), [[vModelText, row.pattern]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_41, [_cache[17] || (_cache[17] = createBaseVNode(\"label\", null, \"Replace\", -1)), withDirectives(createBaseVNode(\"textarea\", {\n\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.replace = $event,\n\t\t\t\t\t\t\t\t\t\t\"data-regex-replace\": \"\",\n\t\t\t\t\t\t\t\t\t\tspellcheck: \"false\"\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_42), [[vModelText, row.replace]])]),\n\t\t\t\t\t\t\t\t\twithDirectives(createBaseVNode(\"div\", {\n\t\t\t\t\t\t\t\t\t\tclass: \"regex-warning wide\",\n\t\t\t\t\t\t\t\t\t\t\"data-regex-warning\": \"\"\n\t\t\t\t\t\t\t\t\t}, toDisplayString(warningForForm(row)), 513), [[vShow, warningForForm(row)]])\n\t\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\t\tclass: \"danger\",\n\t\t\t\t\t\t\t\t\t\"data-delete-row\": \"true\",\n\t\t\t\t\t\t\t\t\t\"data-icon\": \"×\",\n\t\t\t\t\t\t\t\t\ttitle: \"Delete this regex rule\",\n\t\t\t\t\t\t\t\t\tonClick: ($event) => deleteRule(index)\n\t\t\t\t\t\t\t\t}, \" Delete \", 8, _hoisted_43)\n\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t}), 128))])\n\t\t\t\t\t]);\n\t\t\t\t};\n\t\t\t}\n\t\t});\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/components/RegexEditor.vue\n\tvar RegexEditor_default;\n\tvar init_RegexEditor = __esmMin((() => {\n\t\tinit_RegexEditor_vue_vue_type_script_setup_true_lang();\n\t\tinit_RegexEditor_vue_vue_type_script_setup_true_lang();\n\t\tRegexEditor_default = RegexEditor_vue_vue_type_script_setup_true_lang_default;\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/components/StackEditor.vue?vue&type=script&setup=true&lang.ts\n\tvar _hoisted_1$1, _hoisted_2$1, _hoisted_3$1, _hoisted_4$1, _hoisted_5$1, _hoisted_6, _hoisted_7, _hoisted_8, _hoisted_9, _hoisted_10, _hoisted_11, StackEditor_vue_vue_type_script_setup_true_lang_default;\n\tvar init_StackEditor_vue_vue_type_script_setup_true_lang = __esmMin((() => {\n\t\tinit_vue_runtime_esm_bundler();\n\t\t_hoisted_1$1 = { class: \"tab-section\" };\n\t\t_hoisted_2$1 = {\n\t\t\tclass: \"checkline\",\n\t\t\ttitle: \"Allow multiple enabled chat-history slots. When off, only the first enabled chat-history slot is expanded.\"\n\t\t};\n\t\t_hoisted_3$1 = [\"checked\"];\n\t\t_hoisted_4$1 = { class: \"tab-section\" };\n\t\t_hoisted_5$1 = {\n\t\t\tid: \"variablesRows\",\n\t\t\tclass: \"data-table\"\n\t\t};\n\t\t_hoisted_6 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_7 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_8 = [\"onClick\"];\n\t\t_hoisted_9 = { class: \"tab-section\" };\n\t\t_hoisted_10 = { class: \"modal-toolbar\" };\n\t\t_hoisted_11 = {\n\t\t\tid: \"stackJsonStatus\",\n\t\t\tclass: \"modal-meta\"\n\t\t};\n\t\tStackEditor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({\n\t\t\t__name: \"StackEditor\",\n\t\t\tprops: {\n\t\t\t\tstack: {},\n\t\t\t\tcopyText: { type: Function }\n\t\t\t},\n\t\t\temits: [\n\t\t\t\t\"apply\",\n\t\t\t\t\"change\",\n\t\t\t\t\"status\"\n\t\t\t],\n\t\t\tsetup(__props, { expose: __expose, emit: __emit }) {\n\t\t\t\tconst props = __props;\n\t\t\t\tconst emit = __emit;\n\t\t\t\tlet nextVariableKey = 1;\n\t\t\t\tconst variableRows = /* @__PURE__ */ ref(readVariableRows());\n\t\t\t\tconst stackError = /* @__PURE__ */ ref(\"\");\n\t\t\t\tconst rawJsonText = /* @__PURE__ */ ref(displayStackJson());\n\t\t\t\tconst rawJsonStatus = /* @__PURE__ */ ref(\"Unsaved stack JSON draft.\");\n\t\t\t\twatch(() => props.stack, () => reset());\n\t\t\t\tfunction reset() {\n\t\t\t\t\tvariableRows.value = readVariableRows();\n\t\t\t\t\tstackError.value = \"\";\n\t\t\t\t\trawJsonText.value = displayStackJson();\n\t\t\t\t\trawJsonStatus.value = \"Unsaved stack JSON draft.\";\n\t\t\t\t}\n\t\t\t\tfunction readVariableRows() {\n\t\t\t\t\treturn Object.entries(props.stack.variables || {}).sort(([a], [b]) => a.localeCompare(b)).map(([name, value]) => ({\n\t\t\t\t\t\tkey: nextVariableKey++,\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tvalue: String(value ?? \"\")\n\t\t\t\t\t}));\n\t\t\t\t}\n\t\t\t\tfunction setAllowDuplicateChatHistory(event) {\n\t\t\t\t\tconst checked = event.target.checked;\n\t\t\t\t\tconst context = { ...props.stack.context && typeof props.stack.context === \"object\" ? props.stack.context : {} };\n\t\t\t\t\tif (checked) context.allowDuplicateChatHistory = true;\n\t\t\t\t\telse delete context.allowDuplicateChatHistory;\n\t\t\t\t\tif (Object.keys(context).length > 0) props.stack.context = context;\n\t\t\t\t\telse delete props.stack.context;\n\t\t\t\t\temit(\"change\", stackError.value);\n\t\t\t\t}\n\t\t\t\tfunction addVariable() {\n\t\t\t\t\tvariableRows.value.push({\n\t\t\t\t\t\tkey: nextVariableKey++,\n\t\t\t\t\t\tname: uniqueVariableName(),\n\t\t\t\t\t\tvalue: \"\"\n\t\t\t\t\t});\n\t\t\t\t\tsyncVariables();\n\t\t\t\t}\n\t\t\t\tfunction deleteVariable(index) {\n\t\t\t\t\tvariableRows.value.splice(index, 1);\n\t\t\t\t\tsyncVariables();\n\t\t\t\t}\n\t\t\t\tfunction uniqueVariableName() {\n\t\t\t\t\tconst existing = new Set(variableRows.value.map((row) => row.name.trim()).filter(Boolean));\n\t\t\t\t\tlet index = existing.size + 1;\n\t\t\t\t\tlet name = `var${index}`;\n\t\t\t\t\twhile (existing.has(name)) name = `var${++index}`;\n\t\t\t\t\treturn name;\n\t\t\t\t}\n\t\t\t\tfunction syncVariables() {\n\t\t\t\t\tconst variables = {};\n\t\t\t\t\tconst seen = /* @__PURE__ */ new Set();\n\t\t\t\t\tlet duplicate = false;\n\t\t\t\t\tfor (const row of variableRows.value) {\n\t\t\t\t\t\tconst name = row.name.trim();\n\t\t\t\t\t\tif (!name) continue;\n\t\t\t\t\t\tif (seen.has(name)) duplicate = true;\n\t\t\t\t\t\tseen.add(name);\n\t\t\t\t\t\tvariables[name] = row.value;\n\t\t\t\t\t}\n\t\t\t\t\tif (Object.keys(variables).length > 0) props.stack.variables = variables;\n\t\t\t\t\telse delete props.stack.variables;\n\t\t\t\t\tstackError.value = duplicate ? \"Duplicate stack variable names.\" : \"\";\n\t\t\t\t\temit(\"change\", stackError.value);\n\t\t\t\t}\n\t\t\t\tfunction displayStackJson() {\n\t\t\t\t\tconst stack = cloneJson(props.stack);\n\t\t\t\t\tif (!stack.type) stack.type = \"pi-forge.prompt-stack\";\n\t\t\t\t\tif (!stack.schemaVersion) stack.schemaVersion = 1;\n\t\t\t\t\treturn JSON.stringify(stack, null, 2);\n\t\t\t\t}\n\t\t\t\tasync function copyRawJson() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait props.copyText(rawJsonText.value);\n\t\t\t\t\t\trawJsonStatus.value = \"Copied JSON.\";\n\t\t\t\t\t\temit(\"status\", \"Copied stack JSON\", \"success\");\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tconst message = errorMessage(error);\n\t\t\t\t\t\trawJsonStatus.value = message;\n\t\t\t\t\t\temit(\"status\", message, \"error\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfunction applyRawJson() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst parsed = JSON.parse(rawJsonText.value);\n\t\t\t\t\t\tvalidateRawStackJson(parsed);\n\t\t\t\t\t\tconst stack = parsed;\n\t\t\t\t\t\tif (!stack.schemaVersion) stack.schemaVersion = 1;\n\t\t\t\t\t\tif (!stack.type) stack.type = \"pi-forge.prompt-stack\";\n\t\t\t\t\t\treplaceObject(props.stack, stack);\n\t\t\t\t\t\trawJsonStatus.value = \"Applied stack JSON to editor.\";\n\t\t\t\t\t\temit(\"apply\");\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tconst message = errorMessage(error);\n\t\t\t\t\t\trawJsonStatus.value = message;\n\t\t\t\t\t\temit(\"status\", message, \"error\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfunction validateRawStackJson(stack) {\n\t\t\t\t\tif (!stack || typeof stack !== \"object\" || Array.isArray(stack)) throw new Error(\"Stack JSON must be an object.\");\n\t\t\t\t\tconst candidate = stack;\n\t\t\t\t\tif (typeof candidate.id !== \"string\" || !candidate.id.trim()) throw new Error(\"Stack JSON needs a non-empty string id.\");\n\t\t\t\t\tif (!Array.isArray(candidate.items)) throw new Error(\"Stack JSON needs an items array.\");\n\t\t\t\t\tcandidate.items.forEach((item, index) => {\n\t\t\t\t\t\tconst label = `Item ${index + 1}`;\n\t\t\t\t\t\tif (!item || typeof item !== \"object\" || Array.isArray(item)) throw new Error(`${label} must be an object.`);\n\t\t\t\t\t\tconst candidateItem = item;\n\t\t\t\t\t\tif (candidateItem.kind !== \"block\" && candidateItem.kind !== \"slot\") throw new Error(`${label} kind must be block or slot.`);\n\t\t\t\t\t\tif (typeof candidateItem.id !== \"string\" || !candidateItem.id.trim()) throw new Error(`${label} needs a non-empty string id.`);\n\t\t\t\t\t\tif (candidateItem.kind === \"block\" && typeof candidateItem.content !== \"string\") throw new Error(`${label} block content must be a string.`);\n\t\t\t\t\t\tif (candidateItem.kind === \"slot\" && typeof candidateItem.slot !== \"string\") throw new Error(`${label} slot must be a string.`);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tfunction replaceObject(target, source) {\n\t\t\t\t\tfor (const key of Object.keys(target)) delete target[key];\n\t\t\t\t\tObject.assign(target, source);\n\t\t\t\t}\n\t\t\t\tfunction cloneJson(value) {\n\t\t\t\t\treturn JSON.parse(JSON.stringify(value));\n\t\t\t\t}\n\t\t\t\tfunction errorMessage(error) {\n\t\t\t\t\treturn error instanceof Error ? error.message : String(error);\n\t\t\t\t}\n\t\t\t\t__expose({\n\t\t\t\t\tgetError: () => stackError.value,\n\t\t\t\t\treset\n\t\t\t\t});\n\t\t\t\treturn (_ctx, _cache) => {\n\t\t\t\t\treturn openBlock(), createElementBlock(Fragment, null, [\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_1$1, [\n\t\t\t\t\t\t\t_cache[2] || (_cache[2] = createBaseVNode(\"div\", { class: \"tab-section-title\" }, \"Context options\", -1)),\n\t\t\t\t\t\t\t_cache[3] || (_cache[3] = createBaseVNode(\"div\", { class: \"tab-section-meta\" }, \" Stack-level behavior for how pi-forge rewrites Pi conversation context. \", -1)),\n\t\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_2$1, [createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\tid: \"allowDuplicateChatHistoryInput\",\n\t\t\t\t\t\t\t\ttype: \"checkbox\",\n\t\t\t\t\t\t\t\tchecked: props.stack.context?.allowDuplicateChatHistory === true,\n\t\t\t\t\t\t\t\tonChange: setAllowDuplicateChatHistory\n\t\t\t\t\t\t\t}, null, 40, _hoisted_3$1), _cache[1] || (_cache[1] = createTextVNode(\" Allow duplicate chat-history slots \", -1))]),\n\t\t\t\t\t\t\t_cache[4] || (_cache[4] = createBaseVNode(\"div\", { class: \"option-note\" }, \" Keep this off unless you intentionally want the same conversation history injected more than once. \", -1))\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_4$1, [\n\t\t\t\t\t\t\t_cache[8] || (_cache[8] = createBaseVNode(\"div\", { class: \"tab-section-title\" }, \"Stack variables\", -1)),\n\t\t\t\t\t\t\t_cache[9] || (_cache[9] = createBaseVNode(\"div\", { class: \"tab-section-meta\" }, \" Static string variables available to template macros and variables slots. \", -1)),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", { class: \"modal-toolbar\" }, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\t\t\tid: \"addVariableBtn\",\n\t\t\t\t\t\t\t\t\t\"data-icon\": \"+\",\n\t\t\t\t\t\t\t\t\ttitle: \"Add a static stack variable\",\n\t\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\t\tonClick: addVariable\n\t\t\t\t\t\t\t\t}, \" Add variable \"),\n\t\t\t\t\t\t\t\t_cache[5] || (_cache[5] = createBaseVNode(\"span\", { class: \"modal-spacer\" }, null, -1)),\n\t\t\t\t\t\t\t\t_cache[6] || (_cache[6] = createBaseVNode(\"span\", { class: \"modal-meta\" }, \"Saved in stack.variables.\", -1))\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_5$1, [_cache[7] || (_cache[7] = createBaseVNode(\"div\", { class: \"data-row header variable-row\" }, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, \"Name\"),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, \"Value\"),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\")\n\t\t\t\t\t\t\t], -1)), (openBlock(true), createElementBlock(Fragment, null, renderList(variableRows.value, (row, index) => {\n\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"div\", {\n\t\t\t\t\t\t\t\t\tkey: row.key,\n\t\t\t\t\t\t\t\t\tclass: \"data-row variable-row\",\n\t\t\t\t\t\t\t\t\t\"data-var-row\": \"\"\n\t\t\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\t\t\twithDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.name = $event,\n\t\t\t\t\t\t\t\t\t\t\"data-var-name\": \"\",\n\t\t\t\t\t\t\t\t\t\tplaceholder: \"char\",\n\t\t\t\t\t\t\t\t\t\tonInput: syncVariables\n\t\t\t\t\t\t\t\t\t}, null, 40, _hoisted_6), [[vModelText, row.name]]),\n\t\t\t\t\t\t\t\t\twithDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.value = $event,\n\t\t\t\t\t\t\t\t\t\t\"data-var-value\": \"\",\n\t\t\t\t\t\t\t\t\t\tplaceholder: \"泉此方\",\n\t\t\t\t\t\t\t\t\t\tonInput: syncVariables\n\t\t\t\t\t\t\t\t\t}, null, 40, _hoisted_7), [[vModelText, row.value]]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\t\t\tclass: \"danger\",\n\t\t\t\t\t\t\t\t\t\t\"data-delete-row\": \"true\",\n\t\t\t\t\t\t\t\t\t\t\"data-icon\": \"×\",\n\t\t\t\t\t\t\t\t\t\ttitle: \"Delete this stack variable\",\n\t\t\t\t\t\t\t\t\t\tonClick: ($event) => deleteVariable(index)\n\t\t\t\t\t\t\t\t\t}, \" Delete \", 8, _hoisted_8)\n\t\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t\t}), 128))])\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_9, [\n\t\t\t\t\t\t\t_cache[11] || (_cache[11] = createBaseVNode(\"div\", { class: \"tab-section-title\" }, \"Stack JSON\", -1)),\n\t\t\t\t\t\t\t_cache[12] || (_cache[12] = createBaseVNode(\"div\", { class: \"tab-section-meta\" }, \" Raw recovery view for advanced fields. Apply updates the editor; Save writes to disk. \", -1)),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_10, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\t\t\tid: \"copyStackJsonBtn\",\n\t\t\t\t\t\t\t\t\t\"data-icon\": \"□\",\n\t\t\t\t\t\t\t\t\ttitle: \"Copy this JSON to the clipboard\",\n\t\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\t\tonClick: copyRawJson\n\t\t\t\t\t\t\t\t}, \" Copy \"),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\t\t\tid: \"applyStackJsonBtn\",\n\t\t\t\t\t\t\t\t\tclass: \"primary\",\n\t\t\t\t\t\t\t\t\t\"data-icon\": \"✓\",\n\t\t\t\t\t\t\t\t\ttitle: \"Apply this JSON to the editor without saving\",\n\t\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\t\tonClick: applyRawJson\n\t\t\t\t\t\t\t\t}, \" Apply to editor \"),\n\t\t\t\t\t\t\t\t_cache[10] || (_cache[10] = createBaseVNode(\"span\", { class: \"modal-spacer\" }, null, -1)),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_11, toDisplayString(rawJsonStatus.value), 1)\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\twithDirectives(createBaseVNode(\"textarea\", {\n\t\t\t\t\t\t\t\tid: \"stackJsonText\",\n\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event) => rawJsonText.value = $event),\n\t\t\t\t\t\t\t\tclass: \"raw-json-editor\",\n\t\t\t\t\t\t\t\tspellcheck: \"false\"\n\t\t\t\t\t\t\t}, null, 512), [[vModelText, rawJsonText.value]])\n\t\t\t\t\t\t])\n\t\t\t\t\t], 64);\n\t\t\t\t};\n\t\t\t}\n\t\t});\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/components/StackEditor.vue\n\tvar StackEditor_default;\n\tvar init_StackEditor = __esmMin((() => {\n\t\tinit_StackEditor_vue_vue_type_script_setup_true_lang();\n\t\tinit_StackEditor_vue_vue_type_script_setup_true_lang();\n\t\tStackEditor_default = StackEditor_vue_vue_type_script_setup_true_lang_default;\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/vue-tab-host.ts\n\tfunction createVueTabHost(deps) {\n\t\tlet app;\n\t\tlet draft;\n\t\tconst errors = {\n\t\t\tpolicy: \"\",\n\t\t\tregex: \"\",\n\t\t\tstack: \"\"\n\t\t};\n\t\tfunction mount(kind, root) {\n\t\t\tunmount();\n\t\t\tconst stack = deps.getStack();\n\t\t\tif (!stack) return;\n\t\t\tdraft = cloneJson(stack);\n\t\t\tconst onChange = (error) => {\n\t\t\t\tsyncDraft(kind);\n\t\t\t\terrors[kind] = error;\n\t\t\t\tdeps.markDirty();\n\t\t\t\tif (errors[kind]) deps.setStatus(errors[kind], \"error\");\n\t\t\t};\n\t\t\tif (kind === \"policy\") app = createApp(PolicyEditor_default, {\n\t\t\t\tstack: draft,\n\t\t\t\tresources: deps.getResources(),\n\t\t\t\tonChange,\n\t\t\t\tonStatus: deps.setStatus\n\t\t\t});\n\t\t\telse if (kind === \"regex\") app = createApp(RegexEditor_default, {\n\t\t\t\tstack: draft,\n\t\t\t\tonChange,\n\t\t\t\tonValidate: deps.validateStack\n\t\t\t});\n\t\t\telse app = createApp(StackEditor_default, {\n\t\t\t\tstack: draft,\n\t\t\t\tcopyText: deps.copyText,\n\t\t\t\tonApply: () => {\n\t\t\t\t\tif (draft) deps.applyStack(cloneJson(draft));\n\t\t\t\t},\n\t\t\t\tonChange,\n\t\t\t\tonStatus: deps.setStatus\n\t\t\t});\n\t\t\tapp.mount(root);\n\t\t}\n\t\tfunction unmount() {\n\t\t\tapp?.unmount();\n\t\t\tapp = void 0;\n\t\t\tdraft = void 0;\n\t\t}\n\t\tfunction resetErrors() {\n\t\t\terrors.policy = \"\";\n\t\t\terrors.regex = \"\";\n\t\t\terrors.stack = \"\";\n\t\t}\n\t\tfunction getError(kind) {\n\t\t\treturn errors[kind];\n\t\t}\n\t\tfunction syncDraft(kind) {\n\t\t\tconst stack = deps.getStack();\n\t\t\tif (!stack || !draft) return;\n\t\t\tconst plainDraft = cloneJson(draft);\n\t\t\tif (kind === \"policy\") {\n\t\t\t\tcopyOptionalField(stack, plainDraft, \"tools\");\n\t\t\t\tcopyOptionalField(stack, plainDraft, \"skills\");\n\t\t\t} else if (kind === \"regex\") copyOptionalField(stack, plainDraft, \"regex\");\n\t\t\telse {\n\t\t\t\tcopyOptionalField(stack, plainDraft, \"context\");\n\t\t\t\tcopyOptionalField(stack, plainDraft, \"variables\");\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tmountPolicy: (root) => mount(\"policy\", root),\n\t\t\tmountRegex: (root) => mount(\"regex\", root),\n\t\t\tmountStack: (root) => mount(\"stack\", root),\n\t\t\tunmount,\n\t\t\tresetErrors,\n\t\t\tgetError\n\t\t};\n\t}\n\tfunction cloneJson(value) {\n\t\treturn JSON.parse(JSON.stringify(value));\n\t}\n\tfunction copyOptionalField(target, source, key) {\n\t\tif (key in source) target[key] = source[key];\n\t\telse delete target[key];\n\t}\n\tvar init_vue_tab_host = __esmMin((() => {\n\t\tinit_vue_runtime_esm_bundler();\n\t\tinit_PolicyEditor();\n\t\tinit_RegexEditor();\n\t\tinit_StackEditor();\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/legacy-editor.ts\n\tvar legacy_editor_exports = /* @__PURE__ */ __exportAll({ startLegacyEditor: () => startLegacyEditor });\n\tfunction applyTheme(theme) {\n\t\tcurrentTheme = theme === \"dark\" ? \"dark\" : \"light\";\n\t\tdocument.body.dataset.theme = currentTheme;\n\t\tconst button = el(\"themeBtn\");\n\t\tif (button) {\n\t\t\tbutton.textContent = currentTheme === \"dark\" ? \"Light\" : \"Dark\";\n\t\t\tbutton.title = currentTheme === \"dark\" ? \"Switch to light theme\" : \"Switch to dark theme\";\n\t\t}\n\t}\n\tfunction toggleTheme() {\n\t\tconst next = currentTheme === \"dark\" ? \"light\" : \"dark\";\n\t\twriteStoredTheme(next);\n\t\tapplyTheme(next);\n\t\tsetStatus(next === \"dark\" ? \"Dark theme enabled\" : \"Light theme enabled\", \"success\");\n\t}\n\tfunction readStoredTheme() {\n\t\ttry {\n\t\t\tconst theme = localStorage.getItem(\"pi-forge-theme\");\n\t\t\treturn theme === \"light\" || theme === \"dark\" ? theme : \"\";\n\t\t} catch {\n\t\t\treturn \"\";\n\t\t}\n\t}\n\tfunction writeStoredTheme(theme) {\n\t\ttry {\n\t\t\tlocalStorage.setItem(\"pi-forge-theme\", theme);\n\t\t} catch {}\n\t}\n\tfunction setStatus(text, tone = \"\") {\n\t\tel(\"status\").textContent = text;\n\t\tel(\"status\").style.color = tone === \"error\" ? \"var(--error)\" : tone === \"success\" ? \"var(--success)\" : \"var(--muted)\";\n\t}\n\tfunction markDirty() {\n\t\tdirty = true;\n\t\trenderDirtyState();\n\t\tsetStatus(\"Unsaved changes\");\n\t}\n\tfunction renderDirtyState() {\n\t\tconst badge = el(\"dirtyBadge\");\n\t\tif (!badge) return;\n\t\tbadge.classList.toggle(\"visible\", dirty);\n\t\tupdateActionState();\n\t}\n\tfunction updateActionState() {\n\t\tconst hasStack = !!currentStack;\n\t\tfor (const id of [\n\t\t\t\"activateBtn\",\n\t\t\t\"saveBtn\",\n\t\t\t\"validateBtn\",\n\t\t\t\"previewBtn\",\n\t\t\t\"forkBtn\",\n\t\t\t\"exportBtn\",\n\t\t\t\"deleteStackBtn\",\n\t\t\t\"addItemBtn\",\n\t\t\t\"addSlotBtn\"\n\t\t]) {\n\t\t\tconst button = el(id);\n\t\t\tif (button) button.disabled = !hasStack;\n\t\t}\n\t\tconst deleteItemButton = el(\"deleteItemBtn\");\n\t\tif (deleteItemButton) deleteItemButton.disabled = !hasStack || selectedItemIndex < 0;\n\t\tdocument.querySelectorAll(\"[data-tab]\").forEach((button) => {\n\t\t\tbutton.disabled = !hasStack;\n\t\t});\n\t}\n\tasync function loadStacks(preferId = selectedId) {\n\t\tconst [data, resources] = await Promise.all([api(\"/api/stacks\"), api(\"/api/resources\")]);\n\t\tif (!editorStarted) return;\n\t\tstacks = data.stacks || [];\n\t\tpolicyResources = normalizePolicyResources(resources);\n\t\tcwd = data.cwd || \"\";\n\t\tel(\"cwd\").textContent = cwd;\n\t\trenderStackList();\n\t\tconst next = stacks.find((stack) => stack.id === preferId) || stacks.find((stack) => stack.active) || stacks[0];\n\t\tif (next) await selectStack(next.id, { keepDirty: false });\n\t\telse renderEmpty();\n\t}\n\tasync function refreshStackRuntimeState() {\n\t\tconst [data, resources] = await Promise.all([api(\"/api/stacks\"), api(\"/api/resources\")]);\n\t\tif (!editorStarted) return;\n\t\tstacks = data.stacks || [];\n\t\tpolicyResources = normalizePolicyResources(resources);\n\t\tcwd = data.cwd || \"\";\n\t\tel(\"cwd\").textContent = cwd;\n\t\trenderStackList();\n\t\tupdateActionState();\n\t\tif (activeTab === \"policy\") renderActiveTab();\n\t}\n\tfunction handleProfileApplied() {\n\t\trun(refreshStackRuntimeState);\n\t}\n\tasync function selectStack(id, options = {}) {\n\t\tif (dirty && !options.keepDirty && !confirm(\"Discard unsaved changes?\")) return;\n\t\tconst data = await api(\"/api/stacks/\" + encodeURIComponent(id));\n\t\tif (!editorStarted) return;\n\t\tselectedId = id;\n\t\tconst loadedStack = structuredClone(data.stack);\n\t\tcurrentStack = loadedStack;\n\t\tcurrentFilePath = data.filePath || \"\";\n\t\tselectedItemIndex = loadedStack.items.length ? 0 : -1;\n\t\tdirty = false;\n\t\tvueTabHost.resetErrors();\n\t\tvueItemHost.reset();\n\t\trenderDirtyState();\n\t\trenderAll(data.diagnostics || []);\n\t\tsetStatus(\"Loaded \" + loadedStack.id);\n\t}\n\tfunction renderAll(diagnostics = []) {\n\t\tlatestDiagnostics = diagnostics;\n\t\trenderStackList();\n\t\trenderSettings();\n\t\trenderActiveTab();\n\t\trenderDiagnostics(diagnostics);\n\t\thidePreview();\n\t\tupdateActionState();\n\t}\n\tfunction renderActiveTab() {\n\t\tvueTabHost.unmount();\n\t\tdocument.querySelectorAll(\"[data-tab]\").forEach((button) => {\n\t\t\tbutton.classList.toggle(\"active\", button.dataset.tab === activeTab);\n\t\t});\n\t\tconst workspace = el(\"workspace\");\n\t\tconst panel = el(\"tabPanel\");\n\t\tif (activeTab === \"items\") {\n\t\t\tworkspace.style.display = \"\";\n\t\t\tpanel.classList.remove(\"open\");\n\t\t\tpanel.innerHTML = \"\";\n\t\t\trenderItemList();\n\t\t\trenderItemEditor();\n\t\t\treturn;\n\t\t}\n\t\tworkspace.style.display = \"none\";\n\t\tpanel.classList.add(\"open\");\n\t\tif (activeTab === \"regex\") vueTabHost.mountRegex(panel);\n\t\telse if (activeTab === \"policy\") vueTabHost.mountPolicy(panel);\n\t\telse if (activeTab === \"stack\") vueTabHost.mountStack(panel);\n\t}\n\tfunction renderStackList() {\n\t\tconst list = el(\"stackList\");\n\t\tlist.innerHTML = \"\";\n\t\tif (!stacks.length) {\n\t\t\tlist.innerHTML = \"<div class=\\\"side-empty\\\">No prompt stacks in this project.</div>\";\n\t\t\treturn;\n\t\t}\n\t\tfor (const stack of stacks) {\n\t\t\tconst row = document.createElement(\"button\");\n\t\t\trow.className = \"stack-row\" + (stack.active ? \" active\" : \"\") + (stack.id === selectedId ? \" selected\" : \"\");\n\t\t\tconst diag = stack.errors ? \"<span class=\\\"badge error\\\">\" + stack.errors + \" error</span>\" : stack.warnings ? \"<span class=\\\"badge warning\\\">\" + stack.warnings + \" warning</span>\" : \"\";\n\t\t\trow.innerHTML = \"<div class=\\\"stack-name\\\">\" + escapeHtml(stack.id) + (stack.active ? \"<span class=\\\"badge\\\">active</span>\" : \"\") + diag + \"</div><div class=\\\"stack-meta\\\">\" + escapeHtml(stack.name || \"(unnamed)\") + \"</div><div class=\\\"stack-meta\\\">\" + stack.itemCount + \" items | \" + escapeHtml(stack.mode || \"replace\") + \"</div>\";\n\t\t\trow.onclick = () => selectStack(stack.id);\n\t\t\tlist.appendChild(row);\n\t\t}\n\t}\n\tfunction normalizePolicyResources(value) {\n\t\treturn {\n\t\t\ttools: normalizeResourceList(value?.tools),\n\t\t\tskills: normalizeResourceList(value?.skills)\n\t\t};\n\t}\n\tfunction normalizeResourceList(value) {\n\t\tif (!Array.isArray(value)) return [];\n\t\treturn value.filter((resource) => resource && typeof resource === \"object\" && typeof resource.name === \"string\" && resource.name.trim()).map((resource) => ({\n\t\t\tname: resource.name.trim(),\n\t\t\tdescription: typeof resource.description === \"string\" ? resource.description : \"\",\n\t\t\tsource: typeof resource.source === \"string\" ? resource.source : \"\",\n\t\t\tactive: resource.active === true,\n\t\t\thidden: resource.hidden === true\n\t\t}));\n\t}\n\tfunction renderSettings() {\n\t\tif (!currentStack) {\n\t\t\tvueMetadataHost.unmount();\n\t\t\treturn;\n\t\t}\n\t\tel(\"metadataPanel\").style.display = \"\";\n\t\tvueMetadataHost.mount(el(\"metadataHost\"));\n\t}\n\tfunction renderItemList() {\n\t\tconst list = el(\"itemList\");\n\t\tlist.innerHTML = \"\";\n\t\tlist.classList.toggle(\"drag-active\", dragIndex !== -1);\n\t\tif (!currentStack) return;\n\t\tel(\"itemCount\").textContent = currentStack.items.length + \" total\";\n\t\tlist.ondragover = handleItemListDragOver;\n\t\tlist.ondrop = handleItemListDrop;\n\t\tconst diagnosticsByItem = diagnosticsForItems();\n\t\tcurrentStack.items.forEach((item, index) => {\n\t\t\tconst row = document.createElement(\"div\");\n\t\t\trow.className = \"item-row\" + (index === selectedItemIndex ? \" selected\" : \"\") + (item.enabled === false ? \" disabled\" : \"\");\n\t\t\trow.dataset.itemIndex = String(index);\n\t\t\trow.draggable = true;\n\t\t\tconst enabled = item.enabled !== false;\n\t\t\tconst itemDiagnostics = diagnosticsByItem[item.id] || [];\n\t\t\tconst errors = itemDiagnostics.filter((diag) => diag.level === \"error\").length;\n\t\t\tconst warnings = itemDiagnostics.filter((diag) => diag.level === \"warning\").length;\n\t\t\tconst diagBadge = errors ? \"<span class=\\\"item-badge error\\\" title=\\\"\" + attr(diagnosticTitle(itemDiagnostics)) + \"\\\">\" + errors + \"E</span>\" : warnings ? \"<span class=\\\"item-badge warning\\\" title=\\\"\" + attr(diagnosticTitle(itemDiagnostics)) + \"\\\">\" + warnings + \"W</span>\" : \"\";\n\t\t\trow.innerHTML = \"<div class=\\\"drag-handle\\\" title=\\\"Drag to reorder\\\">≡</div><div><div class=\\\"item-title\\\">\" + escapeHtml(displayItemName(item)) + diagBadge + \"</div><div class=\\\"item-meta\\\">\" + escapeHtml(item.kind) + \" | id: \" + escapeHtml(item.id) + (item.role ? \" | \" + escapeHtml(item.role) : \"\") + (item.kind === \"slot\" ? \" | \" + escapeHtml(item.slot || \"\") : \"\") + \"</div></div><button type=\\\"button\\\" class=\\\"item-toggle \" + (enabled ? \"enabled\" : \"disabled\") + \"\\\" title=\\\"Toggle item\\\">\" + (enabled ? \"On\" : \"Off\") + \"</button>\";\n\t\t\trow.onclick = (event) => {\n\t\t\t\tif (event.target?.classList?.contains(\"item-toggle\")) return;\n\t\t\t\tselectedItemIndex = index;\n\t\t\t\trenderItemList();\n\t\t\t\trenderItemEditor();\n\t\t\t};\n\t\t\tquery(row, \".item-toggle\").onclick = (event) => {\n\t\t\t\tevent.stopPropagation();\n\t\t\t\titem.enabled = item.enabled === false;\n\t\t\t\tselectedItemIndex = index;\n\t\t\t\tmarkDirty();\n\t\t\t\trenderItemList();\n\t\t\t\trenderItemEditor();\n\t\t\t};\n\t\t\trow.ondragstart = (event) => {\n\t\t\t\tdragIndex = index;\n\t\t\t\tdragDropIndex = index;\n\t\t\t\trow.classList.add(\"dragging\");\n\t\t\t\tlist.classList.add(\"drag-active\");\n\t\t\t\tif (event.dataTransfer) {\n\t\t\t\t\tevent.dataTransfer.effectAllowed = \"move\";\n\t\t\t\t\tevent.dataTransfer.setData(\"text/plain\", item.id || String(index));\n\t\t\t\t}\n\t\t\t\tupdateItemDropIndicator();\n\t\t\t};\n\t\t\trow.ondragend = finishItemDrag;\n\t\t\trow.ondragover = handleItemListDragOver;\n\t\t\trow.ondrop = handleItemListDrop;\n\t\t\tlist.appendChild(row);\n\t\t});\n\t\tupdateItemDropIndicator();\n\t}\n\tfunction handleItemListDragOver(event) {\n\t\tif (dragIndex === -1 || !currentStack) return;\n\t\tevent.preventDefault();\n\t\tdragClientY = event.clientY;\n\t\tupdateItemDragAutoScroll(event.clientY);\n\t\tsetItemDropIndex(dropIndexFromClientY(event.clientY));\n\t}\n\tfunction handleItemListDrop(event) {\n\t\tif (dragIndex === -1 || !currentStack) return;\n\t\tevent.preventDefault();\n\t\tdropDraggedItem();\n\t}\n\tfunction dropDraggedItem() {\n\t\tif (!currentStack || dragIndex < 0 || dragIndex >= currentStack.items.length) {\n\t\t\tfinishItemDrag();\n\t\t\treturn;\n\t\t}\n\t\tlet insertIndex = dragDropIndex;\n\t\tif (insertIndex < 0) insertIndex = dragIndex;\n\t\tinsertIndex = Math.max(0, Math.min(insertIndex, currentStack.items.length));\n\t\tconst [moved] = currentStack.items.splice(dragIndex, 1);\n\t\tif (!moved) {\n\t\t\tfinishItemDrag();\n\t\t\treturn;\n\t\t}\n\t\tif (dragIndex < insertIndex) insertIndex--;\n\t\tinsertIndex = Math.max(0, Math.min(insertIndex, currentStack.items.length));\n\t\tcurrentStack.items.splice(insertIndex, 0, moved);\n\t\tselectedItemIndex = insertIndex;\n\t\tconst changed = dragIndex !== insertIndex;\n\t\tfinishItemDrag(false);\n\t\tif (changed) markDirty();\n\t\trenderItemList();\n\t\trenderItemEditor();\n\t}\n\tfunction setItemDropIndex(index) {\n\t\tif (!currentStack) return;\n\t\tconst next = Math.max(0, Math.min(index, currentStack.items.length));\n\t\tif (dragDropIndex === next) return;\n\t\tdragDropIndex = next;\n\t\tupdateItemDropIndicator();\n\t}\n\tfunction dropIndexFromClientY(clientY) {\n\t\tconst list = el(\"itemList\");\n\t\tconst rows = [...queryAll(list, \".item-row\")];\n\t\tif (!rows.length) return 0;\n\t\tconst listRect = list.getBoundingClientRect();\n\t\tif (clientY <= listRect.top) return 0;\n\t\tif (clientY >= listRect.bottom) return rows.length;\n\t\tfor (const row of rows) {\n\t\t\tconst rect = row.getBoundingClientRect();\n\t\t\tconst index = Number(row.dataset.itemIndex);\n\t\t\tif (clientY < rect.top + rect.height / 2) return index;\n\t\t}\n\t\treturn rows.length;\n\t}\n\tfunction updateItemDropIndicator() {\n\t\tconst list = el(\"itemList\");\n\t\tconst rows = [...list.querySelectorAll(\".item-row\")];\n\t\tfor (const row of rows) row.classList.remove(\"drop-before\", \"drop-after\");\n\t\tlist.classList.toggle(\"drag-active\", dragIndex !== -1);\n\t\tif (dragIndex === -1 || dragDropIndex === -1 || !rows.length) return;\n\t\tif (dragDropIndex <= 0) rows[0].classList.add(\"drop-before\");\n\t\telse if (dragDropIndex >= rows.length) rows[rows.length - 1].classList.add(\"drop-after\");\n\t\telse rows[dragDropIndex].classList.add(\"drop-before\");\n\t}\n\tfunction updateItemDragAutoScroll(clientY) {\n\t\tconst rect = el(\"itemList\").getBoundingClientRect();\n\t\tconst edge = Math.min(72, Math.max(36, rect.height / 5));\n\t\tlet speed = 0;\n\t\tif (clientY < rect.top) speed = -Math.min(30, 8 + (rect.top - clientY) / 3);\n\t\telse if (clientY < rect.top + edge) speed = -Math.min(22, (rect.top + edge - clientY) / 3);\n\t\telse if (clientY > rect.bottom) speed = Math.min(30, 8 + (clientY - rect.bottom) / 3);\n\t\telse if (clientY > rect.bottom - edge) speed = Math.min(22, (clientY - (rect.bottom - edge)) / 3);\n\t\tdragScrollSpeed = speed;\n\t\tif (speed !== 0 && !dragScrollFrame) dragScrollFrame = requestAnimationFrame(runItemDragAutoScroll);\n\t}\n\tfunction runItemDragAutoScroll() {\n\t\tdragScrollFrame = 0;\n\t\tif (dragIndex === -1 || dragScrollSpeed === 0) return;\n\t\tconst list = el(\"itemList\");\n\t\tlist.scrollTop += dragScrollSpeed;\n\t\tsetItemDropIndex(dropIndexFromClientY(dragClientY));\n\t\tdragScrollFrame = requestAnimationFrame(runItemDragAutoScroll);\n\t}\n\tfunction finishItemDrag(clearIndicator = true) {\n\t\tdragIndex = -1;\n\t\tdragDropIndex = -1;\n\t\tdragScrollSpeed = 0;\n\t\tdragClientY = 0;\n\t\tif (dragScrollFrame) {\n\t\t\tcancelAnimationFrame(dragScrollFrame);\n\t\t\tdragScrollFrame = 0;\n\t\t}\n\t\tif (clearIndicator) updateItemDropIndicator();\n\t}\n\tfunction handleDocumentItemDragOver(event) {\n\t\tif (dragIndex === -1 || !currentStack) return;\n\t\tevent.preventDefault();\n\t\tdragClientY = event.clientY;\n\t\tupdateItemDragAutoScroll(event.clientY);\n\t\tsetItemDropIndex(dropIndexFromClientY(event.clientY));\n\t}\n\tfunction handleDocumentItemDrop(event) {\n\t\tif (dragIndex === -1 || !currentStack) return;\n\t\tevent.preventDefault();\n\t\tdropDraggedItem();\n\t}\n\tfunction diagnosticsForItems() {\n\t\tconst grouped = {};\n\t\tfor (const diagnostic of latestDiagnostics || []) {\n\t\t\tif (!diagnostic.itemId) continue;\n\t\t\tif (!grouped[diagnostic.itemId]) grouped[diagnostic.itemId] = [];\n\t\t\tgrouped[diagnostic.itemId].push(diagnostic);\n\t\t}\n\t\treturn grouped;\n\t}\n\tfunction diagnosticTitle(diagnostics) {\n\t\treturn diagnostics.map((diag) => (diag.level || \"info\").toUpperCase() + \": \" + (diag.message || \"\")).join(\"\\n\");\n\t}\n\tfunction renderItemEditor() {\n\t\tconst editor = el(\"itemEditor\");\n\t\tif (!vueItemHost.mount(editor)) {\n\t\t\teditor.innerHTML = \"<div class=\\\"empty\\\">No item selected.</div>\";\n\t\t\tel(\"deleteItemBtn\").disabled = true;\n\t\t\treturn;\n\t\t}\n\t\tel(\"deleteItemBtn\").disabled = false;\n\t}\n\tfunction showStackModal(title, meta, body, options = {}) {\n\t\tconst pane = el(\"stackModal\");\n\t\tpane.innerHTML = \"<div class=\\\"modal-dialog\\\" role=\\\"dialog\\\" aria-modal=\\\"true\\\" aria-label=\\\"\" + attr(title) + \"\\\"><div class=\\\"modal-head\\\"><div><div class=\\\"modal-title\\\">\" + escapeHtml(title) + \"</div><div class=\\\"modal-meta\\\">\" + escapeHtml(meta || \"\") + \"</div></div><div class=\\\"modal-actions\\\"><button data-modal-close=\\\"true\\\" data-icon=\\\"×\\\" title=\\\"Close this dialog\\\">Close</button></div></div><div class=\\\"modal-body \" + attr(options.bodyClass || \"\") + \"\\\">\" + body + \"</div></div>\";\n\t\tpane.classList.add(\"open\");\n\t}\n\tfunction closeStackModal() {\n\t\tconst pane = el(\"stackModal\");\n\t\tpane.classList.remove(\"open\");\n\t\tpane.innerHTML = \"\";\n\t}\n\tfunction applyStackFromVue(stack) {\n\t\tcurrentStack = stack;\n\t\tif (!stack.schemaVersion) stack.schemaVersion = 1;\n\t\tif (!stack.type) stack.type = \"pi-forge.prompt-stack\";\n\t\tselectedItemIndex = stack.items.length ? Math.min(Math.max(selectedItemIndex, 0), stack.items.length - 1) : -1;\n\t\tvueItemHost.reset();\n\t\tvueTabHost.resetErrors();\n\t\tmarkDirty();\n\t\trenderAll(latestDiagnostics);\n\t\tsetStatus(\"Applied stack JSON to editor\", \"success\");\n\t}\n\tfunction addItem(kind) {\n\t\tif (!currentStack) return;\n\t\tconst id = nextNumericItemId();\n\t\tconst insertIndex = selectedItemIndex >= 0 && selectedItemIndex < currentStack.items.length ? selectedItemIndex + 1 : currentStack.items.length;\n\t\tcurrentStack.items.splice(insertIndex, 0, kind === \"slot\" ? {\n\t\t\tkind: \"slot\",\n\t\t\tid,\n\t\t\tenabled: true,\n\t\t\tslot: \"chat-history\"\n\t\t} : {\n\t\t\tkind: \"block\",\n\t\t\tid,\n\t\t\tenabled: true,\n\t\t\trole: \"user\",\n\t\t\tcontent: \"\"\n\t\t});\n\t\tselectedItemIndex = insertIndex;\n\t\tmarkDirty();\n\t\trenderItemList();\n\t\trenderItemEditor();\n\t}\n\tfunction nextNumericItemId() {\n\t\tconst existing = new Set((currentStack?.items || []).map((item) => String(item.id)));\n\t\tlet index = 1;\n\t\twhile (existing.has(String(index))) index++;\n\t\treturn String(index);\n\t}\n\tfunction deleteSelectedItem() {\n\t\tif (!currentStack || selectedItemIndex < 0) return;\n\t\tconst item = currentStack.items[selectedItemIndex];\n\t\tif (!confirm(\"Delete item \" + item.id + \"?\")) return;\n\t\tcurrentStack.items.splice(selectedItemIndex, 1);\n\t\tselectedItemIndex = Math.min(selectedItemIndex, currentStack.items.length - 1);\n\t\tmarkDirty();\n\t\trenderItemList();\n\t\trenderItemEditor();\n\t}\n\tasync function saveStack() {\n\t\tconst stack = stackForSubmit();\n\t\tconst data = await api(\"/api/stacks/\" + encodeURIComponent(selectedId), {\n\t\t\tmethod: \"PUT\",\n\t\t\tbody: { stack }\n\t\t});\n\t\tstacks = data.stacks || stacks;\n\t\tselectedId = data.stack?.id || stack.id;\n\t\tcurrentStack = structuredClone(stack);\n\t\tdirty = false;\n\t\trenderDirtyState();\n\t\trenderAll(data.stack?.diagnostics || []);\n\t\tsetStatus(\"Saved \" + selectedId, \"success\");\n\t\tawait selectStack(selectedId, { keepDirty: true });\n\t}\n\tasync function createStackRemote(stack, options = {}) {\n\t\ttry {\n\t\t\treturn await api(\"/api/stacks\", {\n\t\t\t\tmethod: \"POST\",\n\t\t\t\tbody: {\n\t\t\t\t\tstack,\n\t\t\t\t\t...options\n\t\t\t\t}\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tif (error instanceof EditorApiError && error.status === 409 && !options.overwrite && confirm((error.message || \"Stack already exists.\") + \"\\n\\nOverwrite it?\")) return await api(\"/api/stacks\", {\n\t\t\t\tmethod: \"POST\",\n\t\t\t\tbody: {\n\t\t\t\t\tstack,\n\t\t\t\t\t...options,\n\t\t\t\t\toverwrite: true\n\t\t\t\t}\n\t\t\t});\n\t\t\tthrow error;\n\t\t}\n\t}\n\tasync function createAndOpenStack(stack, activate, actionLabel, extraOptions = {}) {\n\t\tconst data = await createStackRemote(stack, {\n\t\t\t...extraOptions,\n\t\t\tactivate\n\t\t});\n\t\tstacks = data.stacks || stacks;\n\t\tselectedId = data.stack?.id || stack.id;\n\t\tdirty = false;\n\t\trenderDirtyState();\n\t\tawait selectStack(selectedId, { keepDirty: true });\n\t\tsetStatus(actionLabel + (data.importFormat === \"sillytavern\" ? \" from SillyTavern\" : \"\") + \" \" + selectedId, \"success\");\n\t\tif (data.importReport) showImportReport(data.importReport, selectedId);\n\t}\n\tasync function createNewStack() {\n\t\tif (dirty && !confirm(\"Discard unsaved changes?\")) return;\n\t\tconst promptedId = prompt(\"New stack id\", uniqueStackId(\"new-stack\"));\n\t\tif (promptedId === null) return;\n\t\tconst id = sanitizeStackId(promptedId);\n\t\tif (!id) throw new Error(\"Stack id must not be empty.\");\n\t\tif (id !== promptedId.trim() && !confirm(\"Use stack id '\" + id + \"'?\")) return;\n\t\tconst promptedName = prompt(\"Stack display name\", \"Default Pi Prompt Mirror\");\n\t\tif (promptedName === null) return;\n\t\tawait createAndOpenStack(defaultNewStack(id, promptedName.trim() || id), stacks.length === 0 || confirm(\"Activate new stack now?\"), \"Created\");\n\t}\n\tfunction defaultNewStack(id, name) {\n\t\treturn {\n\t\t\tschemaVersion: 1,\n\t\t\ttype: \"pi-forge.prompt-stack\",\n\t\t\tid,\n\t\t\tname,\n\t\t\tdescription: \"Recreates Pi's built-in prompt layout with pi-forge slots, exposing tools, guidelines, docs, append-system-prompt, project context, skills, date/cwd, and chat history as movable pieces.\",\n\t\t\tautoActivate: stacks.length === 0,\n\t\t\tmode: \"replace\",\n\t\t\tdefaults: {\n\t\t\t\tsyntheticMessagesVisible: false,\n\t\t\t\tunresolvedMacroPolicy: \"warn\"\n\t\t\t},\n\t\t\tcontext: { allowDuplicateChatHistory: false },\n\t\t\ttools: { allow: [\"*\"] },\n\t\t\tskills: { allow: [\"*\"] },\n\t\t\titems: [\n\t\t\t\t{\n\t\t\t\t\tkind: \"block\",\n\t\t\t\t\tid: \"main-role\",\n\t\t\t\t\tname: \"Pi Default Role\",\n\t\t\t\t\tenabled: true,\n\t\t\t\t\trole: \"system\",\n\t\t\t\t\tsource: {\n\t\t\t\t\t\tpackage: \"@earendil-works/pi-coding-agent\",\n\t\t\t\t\t\tfile: \"dist/core/system-prompt.js\"\n\t\t\t\t\t},\n\t\t\t\t\tcontent: \"You are an expert coding assistant operating inside pi, a coding agent harness. You help users by reading files, executing commands, editing code, and writing new files.\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tkind: \"slot\",\n\t\t\t\t\tid: \"tools\",\n\t\t\t\t\tname: \"Available Tools\",\n\t\t\t\t\tenabled: true,\n\t\t\t\t\trole: \"system\",\n\t\t\t\t\tslot: \"tools\",\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tformat: \"plain\",\n\t\t\t\t\t\tonlyWithSnippets: true\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tkind: \"block\",\n\t\t\t\t\tid: \"custom-tools-note\",\n\t\t\t\t\tname: \"Custom Tools Note\",\n\t\t\t\t\tenabled: true,\n\t\t\t\t\trole: \"system\",\n\t\t\t\t\tcontent: \"In addition to the tools above, you may have access to other custom tools depending on the project.\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tkind: \"slot\",\n\t\t\t\t\tid: \"tool-guidelines\",\n\t\t\t\t\tname: \"Guidelines\",\n\t\t\t\t\tenabled: true,\n\t\t\t\t\trole: \"system\",\n\t\t\t\t\tslot: \"tool-guidelines\",\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tformat: \"plain\",\n\t\t\t\t\t\theading: \"Guidelines:\",\n\t\t\t\t\t\tincludePiDefaultGuidelines: true,\n\t\t\t\t\t\tpiStyle: true\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tkind: \"slot\",\n\t\t\t\t\tid: \"pi-docs\",\n\t\t\t\t\tname: \"Pi Documentation Guidance\",\n\t\t\t\t\tenabled: true,\n\t\t\t\t\trole: \"system\",\n\t\t\t\t\tslot: \"pi-docs\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tkind: \"slot\",\n\t\t\t\t\tid: \"append-system-prompt\",\n\t\t\t\t\tname: \"User Append System Prompt\",\n\t\t\t\t\tenabled: true,\n\t\t\t\t\trole: \"system\",\n\t\t\t\t\tslot: \"append-system-prompt\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tkind: \"slot\",\n\t\t\t\t\tid: \"project-context\",\n\t\t\t\t\tname: \"Project Context\",\n\t\t\t\t\tenabled: true,\n\t\t\t\t\trole: \"system\",\n\t\t\t\t\tslot: \"project-context\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tkind: \"slot\",\n\t\t\t\t\tid: \"skills\",\n\t\t\t\t\tname: \"Available Skills\",\n\t\t\t\t\tenabled: true,\n\t\t\t\t\trole: \"system\",\n\t\t\t\t\tslot: \"skills\",\n\t\t\t\t\toptions: { requireReadTool: true }\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tkind: \"slot\",\n\t\t\t\t\tid: \"date-cwd\",\n\t\t\t\t\tname: \"Date and Working Directory\",\n\t\t\t\t\tenabled: true,\n\t\t\t\t\trole: \"system\",\n\t\t\t\t\tslot: \"date-cwd\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tkind: \"slot\",\n\t\t\t\t\tid: \"chat-history\",\n\t\t\t\t\tname: \"Chat History\",\n\t\t\t\t\tenabled: true,\n\t\t\t\t\tslot: \"chat-history\"\n\t\t\t\t}\n\t\t\t]\n\t\t};\n\t}\n\tfunction showImportReport(report, stackId) {\n\t\tshowStackModal(\"SillyTavern import report\", stackId || \"\", \"<div class=\\\"modal-toolbar\\\"><button id=\\\"copyImportReportBtn\\\" data-icon=\\\"□\\\" title=\\\"Copy this import report\\\">Copy report</button><span class=\\\"modal-spacer\\\"></span><span class=\\\"modal-meta\\\">Report-only notes; stack changes are already saved.</span></div><pre class=\\\"preview-text\\\">\" + escapeHtml(report) + \"</pre>\");\n\t\tel(\"copyImportReportBtn\").onclick = () => run(async () => {\n\t\t\tawait copyTextToClipboard(report);\n\t\t\tsetStatus(\"Copied import report\", \"success\");\n\t\t});\n\t}\n\tasync function importStackJson() {\n\t\tel(\"importFileInput\").value = \"\";\n\t\tel(\"importFileInput\").click();\n\t}\n\tasync function handleImportFile(event) {\n\t\tconst file = event.target.files?.[0];\n\t\tif (!file) return;\n\t\tconst text = await file.text();\n\t\tconst imported = JSON.parse(text);\n\t\tif (!imported || typeof imported !== \"object\" || Array.isArray(imported)) throw new Error(\"Imported JSON must be an object.\");\n\t\tif (isSillyTavernImport(imported)) {\n\t\t\tconst characterId = promptSillyTavernCharacterId(imported);\n\t\t\tif (characterId === null) return;\n\t\t\tawait createAndOpenStack(imported, confirm(\"Convert and activate imported SillyTavern stack now?\"), \"Imported\", {\n\t\t\t\tsourceName: file.name,\n\t\t\t\tcharacterId\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tconst stack = imported;\n\t\tif (!stack.id || typeof stack.id !== \"string\") {\n\t\t\tconst promptedId = prompt(\"Stack id\", sanitizeStackId(file.name.replace(/\\.json$/i, \"\")));\n\t\t\tif (!promptedId) return;\n\t\t\tstack.id = promptedId.trim();\n\t\t}\n\t\tif (!Array.isArray(stack.items)) throw new Error(\"Imported stack must contain an items array.\");\n\t\tif (!stack.schemaVersion) stack.schemaVersion = 1;\n\t\tif (!stack.type) stack.type = \"pi-forge.prompt-stack\";\n\t\tawait createAndOpenStack(stack, confirm(\"Activate imported stack now?\"), \"Imported\");\n\t}\n\tfunction isSillyTavernImport(value) {\n\t\treturn value && typeof value === \"object\" && !Array.isArray(value) && Array.isArray(value.prompts) && !Array.isArray(value.items);\n\t}\n\tfunction promptSillyTavernCharacterId(value) {\n\t\tconst ids = Array.isArray(value.prompt_order) ? value.prompt_order.map((entry) => entry && entry.character_id).filter((id) => Number.isInteger(id)) : [];\n\t\tconst uniqueIds = [...new Set(ids)];\n\t\tif (uniqueIds.length <= 1) return void 0;\n\t\tconst answer = prompt(\"SillyTavern character_id (\" + uniqueIds.join(\", \") + \")\", String(uniqueIds[0]));\n\t\tif (answer === null) return null;\n\t\tconst parsed = Number(answer.trim());\n\t\tif (!Number.isInteger(parsed) || !uniqueIds.includes(parsed)) throw new Error(\"Choose one of these character_id values: \" + uniqueIds.join(\", \"));\n\t\treturn parsed;\n\t}\n\tasync function forkStack() {\n\t\tconst source = stackForSubmit();\n\t\tconst forkId = prompt(\"New fork stack id\", uniqueForkId(source.id || \"stack\"));\n\t\tif (!forkId) return;\n\t\tconst forkName = prompt(\"Fork display name\", (source.name || source.id || \"Prompt stack\") + \" fork\");\n\t\tconst fork = structuredClone(source);\n\t\tfork.id = forkId.trim();\n\t\tif (forkName && forkName.trim()) fork.name = forkName;\n\t\tfork.autoActivate = false;\n\t\tawait createAndOpenStack(fork, confirm(\"Activate fork now?\"), \"Forked\");\n\t}\n\tasync function exportStackJson() {\n\t\tconst stack = stackForSubmit();\n\t\tconst json = JSON.stringify(stack, null, 2) + \"\\n\";\n\t\tif (downloadTextFile(sanitizeStackId(stack.id || \"prompt-stack\") + \".json\", json, \"application/json\")) {\n\t\t\tsetStatus(\"Exported \" + (stack.id || \"prompt stack\"), \"success\");\n\t\t\treturn;\n\t\t}\n\t\tawait copyTextToClipboard(json);\n\t\tsetStatus(\"Copied \" + (stack.id || \"prompt stack\") + \" JSON\", \"success\");\n\t}\n\tfunction downloadTextFile(filename, text, type) {\n\t\tif (typeof Blob === \"undefined\" || typeof URL === \"undefined\" || !URL.createObjectURL) return false;\n\t\tconst blob = new Blob([text], { type });\n\t\tconst url = URL.createObjectURL(blob);\n\t\tconst link = document.createElement(\"a\");\n\t\tif (!(\"download\" in link)) {\n\t\t\tURL.revokeObjectURL(url);\n\t\t\treturn false;\n\t\t}\n\t\tlink.href = url;\n\t\tlink.download = filename;\n\t\tdocument.body.appendChild(link);\n\t\tlink.click();\n\t\tlink.remove();\n\t\tURL.revokeObjectURL(url);\n\t\treturn true;\n\t}\n\tfunction uniqueForkId(baseId) {\n\t\tconst base = sanitizeStackId(baseId || \"stack\") || \"stack\";\n\t\tconst existing = new Set(stacks.map((stack) => stack.id));\n\t\tlet candidate = base + \"-fork\";\n\t\tlet index = 2;\n\t\twhile (existing.has(candidate)) candidate = base + \"-fork-\" + index++;\n\t\treturn candidate;\n\t}\n\tfunction uniqueStackId(baseId) {\n\t\tconst base = sanitizeStackId(baseId || \"stack\") || \"stack\";\n\t\tconst existing = new Set(stacks.map((stack) => stack.id));\n\t\tlet candidate = base;\n\t\tlet index = 2;\n\t\twhile (existing.has(candidate)) candidate = base + \"-\" + index++;\n\t\treturn candidate;\n\t}\n\tfunction sanitizeStackId(value) {\n\t\treturn String(value || \"\").trim().replace(/[^A-Za-z0-9_-]+/g, \"-\").replace(/-+/g, \"-\").replace(/^-|-$/g, \"\").toLowerCase();\n\t}\n\tasync function activateStack() {\n\t\tif (!currentStack) return;\n\t\tstacks = (await api(\"/api/stacks/\" + encodeURIComponent(selectedId) + \"/activate\", { method: \"POST\" })).stacks || stacks;\n\t\trenderStackList();\n\t\tsetStatus(\"Activated \" + selectedId, \"success\");\n\t}\n\tasync function disableStacks() {\n\t\tstacks = (await api(\"/api/disable\", { method: \"POST\" })).stacks || stacks;\n\t\trenderStackList();\n\t\tsetStatus(\"Prompt stack disabled\", \"success\");\n\t}\n\tasync function deleteCurrentStack() {\n\t\tif (!currentStack) return;\n\t\tconst id = selectedId;\n\t\tconst message = \"Delete prompt stack '\" + id + \"'?\\n\\nThis removes its JSON file from prompt-stack storage.\";\n\t\tif (!confirm(message)) return;\n\t\tstacks = (await api(\"/api/stacks/\" + encodeURIComponent(id), { method: \"DELETE\" })).stacks || [];\n\t\tdirty = false;\n\t\trenderDirtyState();\n\t\tconst next = stacks.find((stack) => stack.active) || stacks[0];\n\t\tif (next) {\n\t\t\tawait selectStack(next.id, { keepDirty: true });\n\t\t\tsetStatus(\"Deleted \" + id, \"success\");\n\t\t} else {\n\t\t\trenderStackList();\n\t\t\trenderEmpty();\n\t\t\tsetStatus(\"Deleted \" + id + \"; no stacks remain\", \"success\");\n\t\t}\n\t}\n\tasync function reloadFromDisk() {\n\t\tif (dirty && !confirm(\"Discard unsaved changes?\")) return;\n\t\tstacks = (await api(\"/api/reload\", { method: \"POST\" })).stacks || [];\n\t\trenderStackList();\n\t\tawait loadStacks(selectedId);\n\t\tsetStatus(\"Reloaded from disk\", \"success\");\n\t}\n\tfunction stackForSubmit() {\n\t\tif (!currentStack) throw new Error(\"No stack selected.\");\n\t\tconst itemOptionsError = vueItemHost.getError();\n\t\tif (itemOptionsError) throw new Error(\"Invalid item options JSON: \" + itemOptionsError);\n\t\tconst stackError = vueTabHost.getError(\"stack\");\n\t\tif (stackError) throw new Error(stackError);\n\t\tconst regexError = vueTabHost.getError(\"regex\");\n\t\tif (regexError) throw new Error(regexError);\n\t\tconst policyError = vueTabHost.getError(\"policy\");\n\t\tif (policyError) throw new Error(policyError);\n\t\tconst clone = structuredClone(currentStack);\n\t\tif (!clone.type) clone.type = \"pi-forge.prompt-stack\";\n\t\tif (!clone.schemaVersion) clone.schemaVersion = 1;\n\t\treturn clone;\n\t}\n\tfunction renderDiagnostics(diagnostics) {\n\t\tlatestDiagnostics = diagnostics || [];\n\t\tconst errors = latestDiagnostics.filter((diag) => (diag.level || \"info\") === \"error\").length;\n\t\tconst warnings = latestDiagnostics.filter((diag) => diag.level === \"warning\").length;\n\t\tconst collapsed = diagnosticsCollapsed ?? (errors === 0 && warnings === 0);\n\t\tconst summary = !latestDiagnostics.length ? \"none\" : [errors ? errors + \" error\" + (errors === 1 ? \"\" : \"s\") : \"\", warnings ? warnings + \" warning\" + (warnings === 1 ? \"\" : \"s\") : \"\"].filter(Boolean).join(\" · \") || latestDiagnostics.length + \" note\" + (latestDiagnostics.length === 1 ? \"\" : \"s\");\n\t\tconst body = !latestDiagnostics.length ? \"<div class=\\\"diagnostic info\\\">No diagnostics.</div>\" : latestDiagnostics.map((diag) => {\n\t\t\tconst level = diag.level || \"info\";\n\t\t\tconst item = diag.itemId ? \" [\" + escapeHtml(diag.itemId) + \"]\" : \"\";\n\t\t\treturn \"<div class=\\\"diagnostic \" + attr(level) + \"\\\"><strong>\" + escapeHtml(level.toUpperCase()) + item + \"</strong>: \" + escapeHtml(diag.message || \"\") + \"</div>\";\n\t\t}).join(\"\");\n\t\tconst pane = el(\"diagnostics\");\n\t\tpane.classList.toggle(\"collapsed\", collapsed);\n\t\tpane.innerHTML = \"<button type=\\\"button\\\" id=\\\"diagnosticsToggleBtn\\\" class=\\\"diagnostics-head\\\" aria-expanded=\\\"\" + String(!collapsed) + \"\\\" title=\\\"Toggle the diagnostics panel\\\"><span class=\\\"diagnostics-title\\\">Diagnostics · \" + escapeHtml(summary) + \"</span><span class=\\\"diagnostics-chevron\\\">▾</span></button><div class=\\\"diagnostics-body\\\">\" + body + \"</div>\";\n\t\tel(\"diagnosticsToggleBtn\").onclick = () => {\n\t\t\tdiagnosticsCollapsed = !collapsed;\n\t\t\trenderDiagnostics(latestDiagnostics);\n\t\t};\n\t}\n\tfunction renderEmpty() {\n\t\tvueTabHost.unmount();\n\t\tcurrentStack = null;\n\t\tselectedId = \"\";\n\t\tdirty = false;\n\t\tactiveTab = \"items\";\n\t\tvueTabHost.resetErrors();\n\t\trenderDirtyState();\n\t\tdocument.querySelectorAll(\"[data-tab]\").forEach((button) => {\n\t\t\tbutton.classList.toggle(\"active\", button.dataset.tab === activeTab);\n\t\t});\n\t\tel(\"workspace\").style.display = \"\";\n\t\tel(\"metadataPanel\").style.display = \"none\";\n\t\tvueMetadataHost.unmount();\n\t\tel(\"itemCount\").textContent = \"\";\n\t\tel(\"itemList\").innerHTML = \"\";\n\t\tel(\"itemEditor\").innerHTML = \"<div class=\\\"empty\\\"><div class=\\\"empty-title\\\">No prompt stacks found.</div><div>Create a stack in this project, or import an existing pi-forge/SillyTavern JSON file.</div><div class=\\\"empty-actions\\\"><button id=\\\"emptyNewStackBtn\\\" class=\\\"primary\\\" data-icon=\\\"+\\\" title=\\\"Create a new prompt stack\\\">New stack</button><button id=\\\"emptyImportBtn\\\" data-icon=\\\"⇪\\\" title=\\\"Import pi-forge stack JSON or SillyTavern preset JSON\\\">Import JSON</button></div></div>\";\n\t\tel(\"tabPanel\").classList.remove(\"open\");\n\t\tel(\"tabPanel\").innerHTML = \"\";\n\t\trenderDiagnostics([]);\n\t\tel(\"emptyNewStackBtn\").onclick = () => run(createNewStack);\n\t\tel(\"emptyImportBtn\").onclick = () => run(importStackJson);\n\t\tsetStatus(\"No prompt stacks found\");\n\t\tupdateActionState();\n\t}\n\tfunction displayItemName(item) {\n\t\tif (item.name) return item.name;\n\t\tif (item.source && typeof item.source.previousName === \"string\" && item.source.previousName.trim()) return item.source.previousName;\n\t\tif (item.kind === \"slot\" && item.slot) return item.slot;\n\t\tif (item.kind === \"block\" && item.content) {\n\t\t\tconst firstLine = item.content.trim().split(/\\n/)[0]?.trim();\n\t\t\tif (firstLine) return firstLine.length > 46 ? firstLine.slice(0, 43) + \"...\" : firstLine;\n\t\t}\n\t\treturn item.id || \"(unnamed)\";\n\t}\n\tasync function run(action) {\n\t\ttry {\n\t\t\tawait action();\n\t\t} catch (error) {\n\t\t\tsetStatus(error instanceof Error ? error.message : String(error), \"error\");\n\t\t}\n\t}\n\tfunction toggleSidebar() {\n\t\tsidebarCollapsed = !sidebarCollapsed;\n\t\tel(\"shell\").classList.toggle(\"sidebar-collapsed\", sidebarCollapsed);\n\t\tel(\"sidebarToggleBtn\").title = sidebarCollapsed ? \"Show prompt stacks sidebar\" : \"Hide prompt stacks sidebar\";\n\t\tsetStatus(sidebarCollapsed ? \"Prompt stacks sidebar hidden\" : \"Prompt stacks sidebar shown\");\n\t}\n\tfunction handleStackModalClick(event) {\n\t\tif (event.target === el(\"stackModal\") || event.target.closest?.(\"[data-modal-close]\")) closeStackModal();\n\t}\n\tfunction handlePreviewClick(event) {\n\t\tif (event.target === el(\"preview\") || event.target.closest?.(\"[data-preview-close]\")) {\n\t\t\thidePreview();\n\t\t\treturn;\n\t\t}\n\t\tif (event.target.closest?.(\"[data-payload-arm]\")) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\trun(() => armPayloadCapture(true));\n\t\t\treturn;\n\t\t}\n\t\tif (event.target.closest?.(\"[data-payload-clear]\")) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\trun(clearPayloadCapture);\n\t\t\treturn;\n\t\t}\n\t\tconst button = event.target.closest?.(\"[data-copy-index]\");\n\t\tif (!button) return;\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\trun(() => copyPreviewText(Number(button.dataset.copyIndex)));\n\t}\n\tfunction handleEditorShortcut(event) {\n\t\tif (!editorIsActive()) return;\n\t\tif (event.key === \"Escape\") {\n\t\t\tif (el(\"preview\").classList.contains(\"open\")) hidePreview();\n\t\t\telse if (el(\"stackModal\").classList.contains(\"open\")) closeStackModal();\n\t\t\treturn;\n\t\t}\n\t\tif (!(event.ctrlKey || event.metaKey) || event.altKey) return;\n\t\tconst key = event.key.toLowerCase();\n\t\tif (key === \"n\") {\n\t\t\tevent.preventDefault();\n\t\t\trun(createNewStack);\n\t\t\treturn;\n\t\t}\n\t\tif (key === \"s\") {\n\t\t\tevent.preventDefault();\n\t\t\tif (currentStack) run(saveStack);\n\t\t\treturn;\n\t\t}\n\t\tif (key === \"enter\" && event.shiftKey) {\n\t\t\tevent.preventDefault();\n\t\t\tif (currentStack) run(validateStack);\n\t\t\treturn;\n\t\t}\n\t\tif (key === \"enter\") {\n\t\t\tevent.preventDefault();\n\t\t\tif (currentStack) run(previewStack);\n\t\t}\n\t}\n\tfunction startLegacyEditor(options = {}) {\n\t\tresetEditorState();\n\t\teditorIsActive = options.isActive ?? (() => true);\n\t\teditorStarted = true;\n\t\tapplyTheme(currentTheme);\n\t\tel(\"sidebarToggleBtn\").onclick = toggleSidebar;\n\t\tel(\"themeBtn\").onclick = toggleTheme;\n\t\tel(\"newStackBtn\").onclick = () => run(createNewStack);\n\t\tel(\"reloadBtn\").onclick = () => run(reloadFromDisk);\n\t\tel(\"disableBtn\").onclick = () => run(disableStacks);\n\t\tel(\"activateBtn\").onclick = () => run(activateStack);\n\t\tel(\"saveBtn\").onclick = () => run(saveStack);\n\t\tel(\"validateBtn\").onclick = () => run(validateStack);\n\t\tel(\"previewBtn\").onclick = () => run(previewStack);\n\t\tel(\"payloadBtn\").onclick = () => run(openPayloadCapture);\n\t\tdocument.querySelectorAll(\"[data-tab]\").forEach((button) => {\n\t\t\tbutton.onclick = () => {\n\t\t\t\tactiveTab = button.dataset.tab || \"items\";\n\t\t\t\trenderActiveTab();\n\t\t\t\thidePreview();\n\t\t\t};\n\t\t});\n\t\tel(\"forkBtn\").onclick = () => run(forkStack);\n\t\tel(\"importBtn\").onclick = () => run(importStackJson);\n\t\tel(\"exportBtn\").onclick = () => run(exportStackJson);\n\t\tel(\"importFileInput\").onchange = (event) => run(() => handleImportFile(event));\n\t\tel(\"deleteStackBtn\").onclick = () => run(deleteCurrentStack);\n\t\tel(\"stackModal\").onclick = handleStackModalClick;\n\t\tel(\"preview\").onclick = handlePreviewClick;\n\t\tel(\"addItemBtn\").onclick = () => addItem(\"block\");\n\t\tel(\"addSlotBtn\").onclick = () => addItem(\"slot\");\n\t\tel(\"deleteItemBtn\").onclick = deleteSelectedItem;\n\t\tdocument.addEventListener(\"dragover\", handleDocumentItemDragOver);\n\t\tdocument.addEventListener(\"drop\", handleDocumentItemDrop);\n\t\twindow.addEventListener(\"keydown\", handleEditorShortcut);\n\t\twindow.addEventListener(\"pi-forge:profile-applied\", handleProfileApplied);\n\t\tconst previousBeforeUnload = window.onbeforeunload;\n\t\tconst beforeUnload = () => dirty ? \"Unsaved changes\" : void 0;\n\t\twindow.onbeforeunload = beforeUnload;\n\t\tlet payloadPoll;\n\t\trun(async () => {\n\t\t\tawait loadStacks();\n\t\t\tif (!editorStarted) return;\n\t\t\tawait refreshPayloadCapture();\n\t\t\tif (!editorStarted) return;\n\t\t\tpayloadPoll = window.setInterval(() => run(() => refreshPayloadCapture({ autoOpen: true })), 2e3);\n\t\t});\n\t\treturn () => {\n\t\t\tif (!editorStarted) return;\n\t\t\teditorStarted = false;\n\t\t\tif (payloadPoll !== void 0) window.clearInterval(payloadPoll);\n\t\t\tfinishItemDrag();\n\t\t\tdocument.removeEventListener(\"dragover\", handleDocumentItemDragOver);\n\t\t\tdocument.removeEventListener(\"drop\", handleDocumentItemDrop);\n\t\t\twindow.removeEventListener(\"keydown\", handleEditorShortcut);\n\t\t\twindow.removeEventListener(\"pi-forge:profile-applied\", handleProfileApplied);\n\t\t\tif (window.onbeforeunload === beforeUnload) window.onbeforeunload = previousBeforeUnload;\n\t\t\tvueTabHost.unmount();\n\t\t\tvueMetadataHost.unmount();\n\t\t\tvueItemHost.unmount();\n\t\t\teditorIsActive = () => true;\n\t\t};\n\t}\n\tfunction resetEditorState() {\n\t\tif (dragScrollFrame) cancelAnimationFrame(dragScrollFrame);\n\t\tstacks = [];\n\t\tcwd = \"\";\n\t\tselectedId = \"\";\n\t\tcurrentStack = null;\n\t\tcurrentFilePath = \"\";\n\t\tselectedItemIndex = -1;\n\t\tdirty = false;\n\t\tdragIndex = -1;\n\t\tdragDropIndex = -1;\n\t\tdragScrollFrame = 0;\n\t\tdragScrollSpeed = 0;\n\t\tdragClientY = 0;\n\t\tsidebarCollapsed = false;\n\t\tvueItemHost.reset();\n\t\tpolicyResources = {\n\t\t\ttools: [],\n\t\t\tskills: []\n\t\t};\n\t\tlatestDiagnostics = [];\n\t\tactiveTab = \"items\";\n\t\tmetadataCollapsed = true;\n\t\tcurrentTheme = readStoredTheme() || (window.matchMedia?.(\"(prefers-color-scheme: dark)\")?.matches ? \"dark\" : \"light\");\n\t\tvueTabHost.resetErrors();\n\t}\n\tvar api, stacks, cwd, selectedId, currentStack, currentFilePath, selectedItemIndex, dirty, dragIndex, dragDropIndex, dragScrollFrame, dragScrollSpeed, dragClientY, sidebarCollapsed, policyResources, latestDiagnostics, diagnosticsCollapsed, activeTab, metadataCollapsed, currentTheme, editorStarted, editorIsActive, slotNames, roles, validateStack, previewStack, refreshPayloadCapture, armPayloadCapture, clearPayloadCapture, openPayloadCapture, hidePreview, copyPreviewText, copyTextToClipboard, vueTabHost, vueMetadataHost, vueItemHost;\n\tvar init_legacy_editor = __esmMin((() => {\n\t\tinit_api();\n\t\tinit_dom();\n\t\tinit_inspector();\n\t\tinit_vue_item_host();\n\t\tinit_vue_metadata_host();\n\t\tinit_vue_tab_host();\n\t\tapi = createEditorApi(new URLSearchParams(location.search).get(\"token\") || \"\");\n\t\tstacks = [];\n\t\tcwd = \"\";\n\t\tselectedId = \"\";\n\t\tcurrentStack = null;\n\t\tcurrentFilePath = \"\";\n\t\tselectedItemIndex = -1;\n\t\tdirty = false;\n\t\tdragIndex = -1;\n\t\tdragDropIndex = -1;\n\t\tdragScrollFrame = 0;\n\t\tdragScrollSpeed = 0;\n\t\tdragClientY = 0;\n\t\tsidebarCollapsed = false;\n\t\tpolicyResources = {\n\t\t\ttools: [],\n\t\t\tskills: []\n\t\t};\n\t\tlatestDiagnostics = [];\n\t\tdiagnosticsCollapsed = null;\n\t\tactiveTab = \"items\";\n\t\tmetadataCollapsed = true;\n\t\tcurrentTheme = readStoredTheme() || (window.matchMedia?.(\"(prefers-color-scheme: dark)\")?.matches ? \"dark\" : \"light\");\n\t\teditorStarted = false;\n\t\teditorIsActive = () => true;\n\t\tslotNames = [\n\t\t\t\"chat-history\",\n\t\t\t\"tools\",\n\t\t\t\"tool-guidelines\",\n\t\t\t\"skills\",\n\t\t\t\"project-context\",\n\t\t\t\"append-system-prompt\",\n\t\t\t\"variables\",\n\t\t\t\"date\",\n\t\t\t\"cwd\",\n\t\t\t\"date-cwd\",\n\t\t\t\"active-model\",\n\t\t\t\"pi-docs\"\n\t\t];\n\t\troles = [\n\t\t\t\"\",\n\t\t\t\"system\",\n\t\t\t\"user\",\n\t\t\t\"assistant\",\n\t\t\t\"custom\"\n\t\t];\n\t\t({validateStack, previewStack, refreshPayloadCapture, armPayloadCapture, clearPayloadCapture, openPayloadCapture, hidePreview, copyPreviewText, copyTextToClipboard} = createInspector({\n\t\t\tapi,\n\t\t\tgetSelectedId: () => selectedId,\n\t\t\tstackForSubmit,\n\t\t\trenderDiagnostics,\n\t\t\trenderItemList,\n\t\t\tsetStatus\n\t\t}));\n\t\tvueTabHost = createVueTabHost({\n\t\t\tgetStack: () => currentStack,\n\t\t\tgetResources: () => policyResources,\n\t\t\tmarkDirty,\n\t\t\tsetStatus,\n\t\t\tvalidateStack: () => run(validateStack),\n\t\t\tapplyStack: applyStackFromVue,\n\t\t\tcopyText: copyTextToClipboard\n\t\t});\n\t\tvueMetadataHost = createVueMetadataHost({\n\t\t\tgetStack: () => currentStack,\n\t\t\tgetFilePath: () => currentFilePath,\n\t\t\tgetCollapsed: () => metadataCollapsed,\n\t\t\tsetCollapsed: (collapsed) => {\n\t\t\t\tmetadataCollapsed = collapsed;\n\t\t\t},\n\t\t\tmarkDirty,\n\t\t\tsetStatus\n\t\t});\n\t\tvueItemHost = createVueItemHost({\n\t\t\tgetStack: () => currentStack,\n\t\t\tgetSelectedIndex: () => selectedItemIndex,\n\t\t\tslotNames,\n\t\t\troles,\n\t\t\tmarkDirty,\n\t\t\trenderItemList,\n\t\t\tsetStatus\n\t\t});\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/App.vue?vue&type=script&setup=true&lang.ts\n\tinit_vue_runtime_esm_bundler();\n\tvar _hoisted_1 = { class: \"app-root\" };\n\tvar _hoisted_2 = {\n\t\tclass: \"surface-nav\",\n\t\t\"aria-label\": \"Pi Forge editor sections\"\n\t};\n\tvar _hoisted_3 = [\"aria-current\"];\n\tvar _hoisted_4 = [\"aria-current\"];\n\tvar _hoisted_5 = { class: \"editor-surface\" };\n\t//#endregion\n\t//#region src/web-editor/client/App.vue\n\tvar App_default = /* @__PURE__ */ defineComponent({\n\t\t__name: \"App\",\n\t\tsetup(__props) {\n\t\t\tlet stopLegacyEditor;\n\t\t\tconst activeSurface = /* @__PURE__ */ ref(\"stacks\");\n\t\t\tonMounted(async () => {\n\t\t\t\ttry {\n\t\t\t\t\tconst { startLegacyEditor } = await Promise.resolve().then(() => (init_legacy_editor(), legacy_editor_exports));\n\t\t\t\t\tstopLegacyEditor = startLegacyEditor({ isActive: () => activeSurface.value === \"stacks\" });\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconst status = document.getElementById(\"status\");\n\t\t\t\t\tif (status) {\n\t\t\t\t\t\tstatus.textContent = error instanceof Error ? error.message : String(error);\n\t\t\t\t\t\tstatus.style.color = \"var(--error)\";\n\t\t\t\t\t}\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t});\n\t\t\tonUnmounted(() => {\n\t\t\t\tstopLegacyEditor?.();\n\t\t\t});\n\t\t\treturn (_ctx, _cache) => {\n\t\t\t\treturn openBlock(), createElementBlock(\"div\", _hoisted_1, [\n\t\t\t\t\tcreateBaseVNode(\"nav\", _hoisted_2, [\n\t\t\t\t\t\t_cache[3] || (_cache[3] = createBaseVNode(\"div\", { class: \"surface-brand\" }, \"Pi Forge\", -1)),\n\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\tid: \"stacksSurfaceBtn\",\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\tclass: normalizeClass({ active: activeSurface.value === \"stacks\" }),\n\t\t\t\t\t\t\t\"aria-current\": activeSurface.value === \"stacks\" ? \"page\" : void 0,\n\t\t\t\t\t\t\tonClick: _cache[0] || (_cache[0] = ($event) => activeSurface.value = \"stacks\")\n\t\t\t\t\t\t}, \" Prompt stacks \", 10, _hoisted_3),\n\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\tid: \"profilesSurfaceBtn\",\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\tclass: normalizeClass({ active: activeSurface.value === \"profiles\" }),\n\t\t\t\t\t\t\t\"aria-current\": activeSurface.value === \"profiles\" ? \"page\" : void 0,\n\t\t\t\t\t\t\tonClick: _cache[1] || (_cache[1] = ($event) => activeSurface.value = \"profiles\")\n\t\t\t\t\t\t}, \" Agent profiles \", 10, _hoisted_4)\n\t\t\t\t\t]),\n\t\t\t\t\twithDirectives(createBaseVNode(\"section\", _hoisted_5, [_cache[2] || (setBlockTracking(-1, true), (_cache[2] = createBaseVNode(\"div\", { class: \"legacy-editor-root\" }, [_cache[4] || (_cache[4] = createStaticVNode(\"<header class=\\\"topbar\\\"><button id=\\\"sidebarToggleBtn\\\" class=\\\"icon\\\" data-icon=\\\"☰\\\" title=\\\"Toggle prompt stacks sidebar\\\" aria-label=\\\"Toggle prompt stacks sidebar\\\"></button><div class=\\\"brand\\\">pi-forge stack editor</div><div id=\\\"status\\\" class=\\\"status\\\">Loading</div><span id=\\\"dirtyBadge\\\" class=\\\"dirty-badge\\\" title=\\\"The current stack has unsaved edits\\\">Unsaved</span><button id=\\\"themeBtn\\\" data-icon=\\\"◐\\\" title=\\\"Toggle light or dark theme\\\">Theme</button><button id=\\\"reloadBtn\\\" data-icon=\\\"↻\\\" title=\\\"Reload prompt stacks from disk\\\">Reload</button><button id=\\\"disableBtn\\\" data-icon=\\\"■\\\" title=\\\"Disable the active prompt stack\\\">Disable stack</button></header><div id=\\\"shell\\\" class=\\\"shell\\\"><aside class=\\\"sidebar\\\"><div class=\\\"side-head\\\"><div class=\\\"side-title\\\">Prompt stacks</div><div id=\\\"cwd\\\" class=\\\"cwd\\\"></div></div><div id=\\\"stackList\\\" class=\\\"stack-list\\\"></div></aside><main class=\\\"main\\\"><div class=\\\"main-actions\\\"><button id=\\\"newStackBtn\\\" data-icon=\\\"+\\\" title=\\\"Create a new prompt stack (Ctrl/Cmd+N)\\\">New stack</button><button id=\\\"activateBtn\\\" class=\\\"primary\\\" data-icon=\\\"▶\\\" title=\\\"Make this stack active for the current Pi session\\\">Activate</button><button id=\\\"saveBtn\\\" class=\\\"primary\\\" data-icon=\\\"✓\\\" title=\\\"Save the edited stack JSON to disk (Ctrl/Cmd+S)\\\">Save</button><button id=\\\"validateBtn\\\" data-icon=\\\"!\\\" title=\\\"Validate the edited stack without saving (Ctrl/Cmd+Shift+Enter)\\\">Validate</button><button id=\\\"previewBtn\\\" data-icon=\\\"◱\\\" title=\\\"Preview the compiled prompt without sending it (Ctrl/Cmd+Enter)\\\">Preview</button><button id=\\\"payloadBtn\\\" data-icon=\\\"◆\\\" title=\\\"Capture the next provider payload in the browser\\\">Arm payload</button><button id=\\\"forkBtn\\\" data-icon=\\\"⑂\\\" title=\\\"Create a new stack from the current edits\\\">Fork</button><button id=\\\"importBtn\\\" data-icon=\\\"⇪\\\" title=\\\"Import pi-forge stack JSON or SillyTavern preset JSON\\\">Import JSON</button><button id=\\\"exportBtn\\\" data-icon=\\\"⇩\\\" title=\\\"Download the current stack JSON, or copy it if download is unavailable\\\">Export JSON</button><span class=\\\"action-spacer\\\"></span><button id=\\\"deleteStackBtn\\\" class=\\\"danger\\\" data-icon=\\\"×\\\" title=\\\"Delete the selected stack JSON file\\\">Delete stack</button><input id=\\\"importFileInput\\\" type=\\\"file\\\" accept=\\\"application/json,.json\\\" hidden></div><section id=\\\"metadataPanel\\\" class=\\\"metadata-panel\\\"><div id=\\\"metadataHost\\\"></div></section><nav class=\\\"view-tabs\\\" aria-label=\\\"Stack editor sections\\\"><button id=\\\"itemsTabBtn\\\" data-tab=\\\"items\\\" class=\\\"active\\\" data-icon=\\\"☰\\\" title=\\\"Edit prompt stack items\\\">Items</button><button id=\\\"regexTabBtn\\\" data-tab=\\\"regex\\\" data-icon=\\\".*\\\" title=\\\"Edit regex transform rules\\\">Regex</button><button id=\\\"policyTabBtn\\\" data-tab=\\\"policy\\\" data-icon=\\\"⊕\\\" title=\\\"Edit active-tool policy and model-visible skill filtering\\\">Policy</button><button id=\\\"stackTabBtn\\\" data-tab=\\\"stack\\\" data-icon=\\\"{}\\\" title=\\\"Edit context options and raw stack JSON\\\">Stack</button></nav><section id=\\\"workspace\\\" class=\\\"workspace\\\"><div class=\\\"items-pane\\\"><div class=\\\"pane-head\\\"><span>Items</span><span id=\\\"itemCount\\\" class=\\\"stack-meta\\\"></span></div><div class=\\\"item-tools\\\"><button id=\\\"addItemBtn\\\" data-icon=\\\"+\\\" title=\\\"Add a prompt block item\\\">Add block</button><button id=\\\"addSlotBtn\\\" data-icon=\\\"+\\\" title=\\\"Add a runtime slot item\\\">Add slot</button><span class=\\\"item-tools-spacer\\\"></span><button id=\\\"deleteItemBtn\\\" class=\\\"danger\\\" data-icon=\\\"×\\\" title=\\\"Delete the selected stack item\\\">Delete item</button></div><div id=\\\"itemList\\\" class=\\\"item-list\\\"></div></div><div class=\\\"editor-pane\\\"><div id=\\\"itemEditor\\\" class=\\\"item-editor\\\"></div><div id=\\\"diagnostics\\\" class=\\\"diagnostics\\\"></div></div></section><section id=\\\"tabPanel\\\" class=\\\"tab-panel\\\"></section></main></div><div id=\\\"preview\\\" class=\\\"preview\\\"></div><div id=\\\"stackModal\\\" class=\\\"modal\\\"></div>\", 4))])).cacheIndex = 2, setBlockTracking(1), _cache[2])], 512), [[vShow, activeSurface.value === \"stacks\"]]),\n\t\t\t\t\twithDirectives(createVNode(ProfileBrowser_default, { active: activeSurface.value === \"profiles\" }, null, 8, [\"active\"]), [[vShow, activeSurface.value === \"profiles\"]])\n\t\t\t\t]);\n\t\t\t};\n\t\t}\n\t});\n\t//#endregion\n\t//#region src/web-editor/client/main.ts\n\tinit_vue_runtime_esm_bundler();\n\tcreateApp(App_default).mount(\"#app\");\n\t//#endregion\n})();\n";
|
|
2
|
+
export const EDITOR_CLIENT_SCRIPT = "(function() {\n\t//#region \\0rolldown/runtime.js\n\tvar __defProp = Object.defineProperty;\n\tvar __esmMin = (fn, res, err) => () => {\n\t\tif (err) throw err[0];\n\t\ttry {\n\t\t\treturn fn && (res = fn(fn = 0)), res;\n\t\t} catch (e) {\n\t\t\tthrow err = [e], e;\n\t\t}\n\t};\n\tvar __exportAll = (all, no_symbols) => {\n\t\tlet target = {};\n\t\tfor (var name in all) __defProp(target, name, {\n\t\t\tget: all[name],\n\t\t\tenumerable: true\n\t\t});\n\t\tif (!no_symbols) __defProp(target, Symbol.toStringTag, { value: \"Module\" });\n\t\treturn target;\n\t};\n\t//#endregion\n\t//#region node_modules/@vue/shared/dist/shared.esm-bundler.js\n\t/**\n\t* @vue/shared v3.5.40\n\t* (c) 2018-present Yuxi (Evan) You and Vue contributors\n\t* @license MIT\n\t**/\n\t// @__NO_SIDE_EFFECTS__\n\tfunction makeMap(str) {\n\t\tconst map = /* @__PURE__ */ Object.create(null);\n\t\tfor (const key of str.split(\",\")) map[key] = 1;\n\t\treturn (val) => val in map;\n\t}\n\tfunction normalizeStyle(value) {\n\t\tif (isArray(value)) {\n\t\t\tconst res = {};\n\t\t\tfor (let i = 0; i < value.length; i++) {\n\t\t\t\tconst item = value[i];\n\t\t\t\tconst normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);\n\t\t\t\tif (normalized) for (const key in normalized) res[key] = normalized[key];\n\t\t\t}\n\t\t\treturn res;\n\t\t} else if (isString(value) || isObject(value)) return value;\n\t}\n\tfunction parseStringStyle(cssText) {\n\t\tconst ret = {};\n\t\tcssText.replace(styleCommentRE, \"\").split(listDelimiterRE).forEach((item) => {\n\t\t\tif (item) {\n\t\t\t\tconst tmp = item.split(propertyDelimiterRE);\n\t\t\t\ttmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());\n\t\t\t}\n\t\t});\n\t\treturn ret;\n\t}\n\tfunction normalizeClass(value) {\n\t\tlet res = \"\";\n\t\tif (isString(value)) res = value;\n\t\telse if (isArray(value)) for (let i = 0; i < value.length; i++) {\n\t\t\tconst normalized = normalizeClass(value[i]);\n\t\t\tif (normalized) res += normalized + \" \";\n\t\t}\n\t\telse if (isObject(value)) {\n\t\t\tfor (const name in value) if (value[name]) res += name + \" \";\n\t\t}\n\t\treturn res.trim();\n\t}\n\tfunction includeBooleanAttr(value) {\n\t\treturn !!value || value === \"\";\n\t}\n\tfunction looseCompareArrays(a, b) {\n\t\tif (a.length !== b.length) return false;\n\t\tlet equal = true;\n\t\tfor (let i = 0; equal && i < a.length; i++) equal = looseEqual(a[i], b[i]);\n\t\treturn equal;\n\t}\n\tfunction looseEqual(a, b) {\n\t\tif (a === b) return true;\n\t\tlet aValidType = isDate(a);\n\t\tlet bValidType = isDate(b);\n\t\tif (aValidType || bValidType) return aValidType && bValidType ? a.getTime() === b.getTime() : false;\n\t\taValidType = isSymbol(a);\n\t\tbValidType = isSymbol(b);\n\t\tif (aValidType || bValidType) return a === b;\n\t\taValidType = isArray(a);\n\t\tbValidType = isArray(b);\n\t\tif (aValidType || bValidType) return aValidType && bValidType ? looseCompareArrays(a, b) : false;\n\t\taValidType = isObject(a);\n\t\tbValidType = isObject(b);\n\t\tif (aValidType || bValidType) {\n\t\t\tif (!aValidType || !bValidType) return false;\n\t\t\tif (Object.keys(a).length !== Object.keys(b).length) return false;\n\t\t\tfor (const key in a) {\n\t\t\t\tconst aHasKey = a.hasOwnProperty(key);\n\t\t\t\tconst bHasKey = b.hasOwnProperty(key);\n\t\t\t\tif (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) return false;\n\t\t\t}\n\t\t}\n\t\treturn String(a) === String(b);\n\t}\n\tfunction looseIndexOf(arr, val) {\n\t\treturn arr.findIndex((item) => looseEqual(item, val));\n\t}\n\tvar EMPTY_OBJ, EMPTY_ARR, NOOP, NO, isOn, isModelListener, extend, remove, hasOwnProperty$1, hasOwn, isArray, isMap, isSet, isDate, isFunction, isString, isSymbol, isObject, isPromise, objectToString, toTypeString, toRawType, isPlainObject, isIntegerKey, isReservedProp, cacheStringFunction, camelizeRE, camelize, hyphenateRE, hyphenate, capitalize, toHandlerKey, hasChanged, invokeArrayFns, def, looseToNumber, _globalThis, getGlobalThis, listDelimiterRE, propertyDelimiterRE, styleCommentRE, specialBooleanAttrs, isSpecialBooleanAttr, isRef$1, toDisplayString, replacer, stringifySymbol;\n\tvar init_shared_esm_bundler = __esmMin((() => {\n\t\tEMPTY_OBJ = {};\n\t\tEMPTY_ARR = [];\n\t\tNOOP = () => {};\n\t\tNO = () => false;\n\t\tisOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);\n\t\tisModelListener = (key) => key.startsWith(\"onUpdate:\");\n\t\textend = Object.assign;\n\t\tremove = (arr, el) => {\n\t\t\tconst i = arr.indexOf(el);\n\t\t\tif (i > -1) arr.splice(i, 1);\n\t\t};\n\t\thasOwnProperty$1 = Object.prototype.hasOwnProperty;\n\t\thasOwn = (val, key) => hasOwnProperty$1.call(val, key);\n\t\tisArray = Array.isArray;\n\t\tisMap = (val) => toTypeString(val) === \"[object Map]\";\n\t\tisSet = (val) => toTypeString(val) === \"[object Set]\";\n\t\tisDate = (val) => toTypeString(val) === \"[object Date]\";\n\t\tisFunction = (val) => typeof val === \"function\";\n\t\tisString = (val) => typeof val === \"string\";\n\t\tisSymbol = (val) => typeof val === \"symbol\";\n\t\tisObject = (val) => val !== null && typeof val === \"object\";\n\t\tisPromise = (val) => {\n\t\t\treturn (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);\n\t\t};\n\t\tobjectToString = Object.prototype.toString;\n\t\ttoTypeString = (value) => objectToString.call(value);\n\t\ttoRawType = (value) => {\n\t\t\treturn toTypeString(value).slice(8, -1);\n\t\t};\n\t\tisPlainObject = (val) => toTypeString(val) === \"[object Object]\";\n\t\tisIntegerKey = (key) => isString(key) && key !== \"NaN\" && key[0] !== \"-\" && \"\" + parseInt(key, 10) === key;\n\t\tisReservedProp = /* @__PURE__ */ makeMap(\",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted\");\n\t\tcacheStringFunction = (fn) => {\n\t\t\tconst cache = /* @__PURE__ */ Object.create(null);\n\t\t\treturn ((str) => {\n\t\t\t\treturn cache[str] || (cache[str] = fn(str));\n\t\t\t});\n\t\t};\n\t\tcamelizeRE = /-\\w/g;\n\t\tcamelize = cacheStringFunction((str) => {\n\t\t\treturn str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());\n\t\t});\n\t\thyphenateRE = /\\B([A-Z])/g;\n\t\thyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, \"-$1\").toLowerCase());\n\t\tcapitalize = cacheStringFunction((str) => {\n\t\t\treturn str.charAt(0).toUpperCase() + str.slice(1);\n\t\t});\n\t\ttoHandlerKey = cacheStringFunction((str) => {\n\t\t\treturn str ? `on${capitalize(str)}` : ``;\n\t\t});\n\t\thasChanged = (value, oldValue) => !Object.is(value, oldValue);\n\t\tinvokeArrayFns = (fns, ...arg) => {\n\t\t\tfor (let i = 0; i < fns.length; i++) fns[i](...arg);\n\t\t};\n\t\tdef = (obj, key, value, writable = false) => {\n\t\t\tObject.defineProperty(obj, key, {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\twritable,\n\t\t\t\tvalue\n\t\t\t});\n\t\t};\n\t\tlooseToNumber = (val) => {\n\t\t\tconst n = parseFloat(val);\n\t\t\treturn isNaN(n) ? val : n;\n\t\t};\n\t\tgetGlobalThis = () => {\n\t\t\treturn _globalThis || (_globalThis = typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {});\n\t\t};\n\t\tlistDelimiterRE = /;(?![^(]*\\))/g;\n\t\tpropertyDelimiterRE = /:([^]+)/;\n\t\tstyleCommentRE = /\\/\\*[^]*?\\*\\//g;\n\t\tspecialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;\n\t\tisSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);\n\t\tspecialBooleanAttrs + \"\";\n\t\tisRef$1 = (val) => {\n\t\t\treturn !!(val && val[\"__v_isRef\"] === true);\n\t\t};\n\t\ttoDisplayString = (val) => {\n\t\t\treturn isString(val) ? val : val == null ? \"\" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef$1(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val);\n\t\t};\n\t\treplacer = (_key, val) => {\n\t\t\tif (isRef$1(val)) return replacer(_key, val.value);\n\t\t\telse if (isMap(val)) return { [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val2], i) => {\n\t\t\t\tentries[stringifySymbol(key, i) + \" =>\"] = val2;\n\t\t\t\treturn entries;\n\t\t\t}, {}) };\n\t\t\telse if (isSet(val)) return { [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) };\n\t\t\telse if (isSymbol(val)) return stringifySymbol(val);\n\t\t\telse if (isObject(val) && !isArray(val) && !isPlainObject(val)) return String(val);\n\t\t\treturn val;\n\t\t};\n\t\tstringifySymbol = (v, i = \"\") => {\n\t\t\tvar _a;\n\t\t\treturn isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v;\n\t\t};\n\t}));\n\t//#endregion\n\t//#region node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js\n\t/**\n\t* @vue/reactivity v3.5.40\n\t* (c) 2018-present Yuxi (Evan) You and Vue contributors\n\t* @license MIT\n\t**/\n\tfunction getCurrentScope() {\n\t\treturn activeEffectScope;\n\t}\n\tfunction batch(sub, isComputed = false) {\n\t\tsub.flags |= 8;\n\t\tif (isComputed) {\n\t\t\tsub.next = batchedComputed;\n\t\t\tbatchedComputed = sub;\n\t\t\treturn;\n\t\t}\n\t\tsub.next = batchedSub;\n\t\tbatchedSub = sub;\n\t}\n\tfunction startBatch() {\n\t\tbatchDepth++;\n\t}\n\tfunction endBatch() {\n\t\tif (--batchDepth > 0) return;\n\t\tif (batchedComputed) {\n\t\t\tlet e = batchedComputed;\n\t\t\tbatchedComputed = void 0;\n\t\t\twhile (e) {\n\t\t\t\tconst next = e.next;\n\t\t\t\te.next = void 0;\n\t\t\t\te.flags &= -9;\n\t\t\t\te = next;\n\t\t\t}\n\t\t}\n\t\tlet error;\n\t\twhile (batchedSub) {\n\t\t\tlet e = batchedSub;\n\t\t\tbatchedSub = void 0;\n\t\t\twhile (e) {\n\t\t\t\tconst next = e.next;\n\t\t\t\te.next = void 0;\n\t\t\t\te.flags &= -9;\n\t\t\t\tif (e.flags & 1) try {\n\t\t\t\t\te.trigger();\n\t\t\t\t} catch (err) {\n\t\t\t\t\tif (!error) error = err;\n\t\t\t\t}\n\t\t\t\te = next;\n\t\t\t}\n\t\t}\n\t\tif (error) throw error;\n\t}\n\tfunction prepareDeps(sub) {\n\t\tfor (let link = sub.deps; link; link = link.nextDep) {\n\t\t\tlink.version = -1;\n\t\t\tlink.prevActiveLink = link.dep.activeLink;\n\t\t\tlink.dep.activeLink = link;\n\t\t}\n\t}\n\tfunction cleanupDeps(sub) {\n\t\tlet head;\n\t\tlet tail = sub.depsTail;\n\t\tlet link = tail;\n\t\twhile (link) {\n\t\t\tconst prev = link.prevDep;\n\t\t\tif (link.version === -1) {\n\t\t\t\tif (link === tail) tail = prev;\n\t\t\t\tremoveSub(link);\n\t\t\t\tremoveDep(link);\n\t\t\t} else head = link;\n\t\t\tlink.dep.activeLink = link.prevActiveLink;\n\t\t\tlink.prevActiveLink = void 0;\n\t\t\tlink = prev;\n\t\t}\n\t\tsub.deps = head;\n\t\tsub.depsTail = tail;\n\t}\n\tfunction isDirty(sub) {\n\t\tfor (let link = sub.deps; link; link = link.nextDep) if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) return true;\n\t\tif (sub._dirty) return true;\n\t\treturn false;\n\t}\n\tfunction refreshComputed(computed) {\n\t\tif (computed.flags & 4 && !(computed.flags & 16)) return;\n\t\tcomputed.flags &= -17;\n\t\tif (computed.globalVersion === globalVersion) return;\n\t\tcomputed.globalVersion = globalVersion;\n\t\tif (!computed.isSSR && computed.flags & 128 && (!computed.deps && !computed._dirty || !isDirty(computed))) return;\n\t\tcomputed.flags |= 2;\n\t\tconst dep = computed.dep;\n\t\tconst prevSub = activeSub;\n\t\tconst prevShouldTrack = shouldTrack;\n\t\tactiveSub = computed;\n\t\tshouldTrack = true;\n\t\ttry {\n\t\t\tprepareDeps(computed);\n\t\t\tconst value = computed.fn(computed._value);\n\t\t\tif (dep.version === 0 || hasChanged(value, computed._value)) {\n\t\t\t\tcomputed.flags |= 128;\n\t\t\t\tcomputed._value = value;\n\t\t\t\tdep.version++;\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tdep.version++;\n\t\t\tthrow err;\n\t\t} finally {\n\t\t\tactiveSub = prevSub;\n\t\t\tshouldTrack = prevShouldTrack;\n\t\t\tcleanupDeps(computed);\n\t\t\tcomputed.flags &= -3;\n\t\t}\n\t}\n\tfunction removeSub(link, soft = false) {\n\t\tconst { dep, prevSub, nextSub } = link;\n\t\tif (prevSub) {\n\t\t\tprevSub.nextSub = nextSub;\n\t\t\tlink.prevSub = void 0;\n\t\t}\n\t\tif (nextSub) {\n\t\t\tnextSub.prevSub = prevSub;\n\t\t\tlink.nextSub = void 0;\n\t\t}\n\t\tif (dep.subs === link) {\n\t\t\tdep.subs = prevSub;\n\t\t\tif (!prevSub && dep.computed) {\n\t\t\t\tdep.computed.flags &= -5;\n\t\t\t\tfor (let l = dep.computed.deps; l; l = l.nextDep) removeSub(l, true);\n\t\t\t}\n\t\t}\n\t\tif (!soft && !--dep.sc && dep.map) dep.map.delete(dep.key);\n\t}\n\tfunction removeDep(link) {\n\t\tconst { prevDep, nextDep } = link;\n\t\tif (prevDep) {\n\t\t\tprevDep.nextDep = nextDep;\n\t\t\tlink.prevDep = void 0;\n\t\t}\n\t\tif (nextDep) {\n\t\t\tnextDep.prevDep = prevDep;\n\t\t\tlink.nextDep = void 0;\n\t\t}\n\t}\n\tfunction pauseTracking() {\n\t\ttrackStack.push(shouldTrack);\n\t\tshouldTrack = false;\n\t}\n\tfunction resetTracking() {\n\t\tconst last = trackStack.pop();\n\t\tshouldTrack = last === void 0 ? true : last;\n\t}\n\tfunction cleanupEffect(e) {\n\t\tconst { cleanup } = e;\n\t\te.cleanup = void 0;\n\t\tif (cleanup) {\n\t\t\tconst prevSub = activeSub;\n\t\t\tactiveSub = void 0;\n\t\t\ttry {\n\t\t\t\tcleanup();\n\t\t\t} finally {\n\t\t\t\tactiveSub = prevSub;\n\t\t\t}\n\t\t}\n\t}\n\tfunction addSub(link) {\n\t\tlink.dep.sc++;\n\t\tif (link.sub.flags & 4) {\n\t\t\tconst computed = link.dep.computed;\n\t\t\tif (computed && !link.dep.subs) {\n\t\t\t\tcomputed.flags |= 20;\n\t\t\t\tfor (let l = computed.deps; l; l = l.nextDep) addSub(l);\n\t\t\t}\n\t\t\tconst currentTail = link.dep.subs;\n\t\t\tif (currentTail !== link) {\n\t\t\t\tlink.prevSub = currentTail;\n\t\t\t\tif (currentTail) currentTail.nextSub = link;\n\t\t\t}\n\t\t\tlink.dep.subs = link;\n\t\t}\n\t}\n\tfunction track(target, type, key) {\n\t\tif (shouldTrack && activeSub) {\n\t\t\tlet depsMap = targetMap.get(target);\n\t\t\tif (!depsMap) targetMap.set(target, depsMap = /* @__PURE__ */ new Map());\n\t\t\tlet dep = depsMap.get(key);\n\t\t\tif (!dep) {\n\t\t\t\tdepsMap.set(key, dep = new Dep());\n\t\t\t\tdep.map = depsMap;\n\t\t\t\tdep.key = key;\n\t\t\t}\n\t\t\tdep.track();\n\t\t}\n\t}\n\tfunction trigger(target, type, key, newValue, oldValue, oldTarget) {\n\t\tconst depsMap = targetMap.get(target);\n\t\tif (!depsMap) {\n\t\t\tglobalVersion++;\n\t\t\treturn;\n\t\t}\n\t\tconst run = (dep) => {\n\t\t\tif (dep) dep.trigger();\n\t\t};\n\t\tstartBatch();\n\t\tif (type === \"clear\") depsMap.forEach(run);\n\t\telse {\n\t\t\tconst targetIsArray = isArray(target);\n\t\t\tconst isArrayIndex = targetIsArray && isIntegerKey(key);\n\t\t\tif (targetIsArray && key === \"length\") {\n\t\t\t\tconst newLength = Number(newValue);\n\t\t\t\tdepsMap.forEach((dep, key2) => {\n\t\t\t\t\tif (key2 === \"length\" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) run(dep);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tif (key !== void 0 || depsMap.has(void 0)) run(depsMap.get(key));\n\t\t\t\tif (isArrayIndex) run(depsMap.get(ARRAY_ITERATE_KEY));\n\t\t\t\tswitch (type) {\n\t\t\t\t\tcase \"add\":\n\t\t\t\t\t\tif (!targetIsArray) {\n\t\t\t\t\t\t\trun(depsMap.get(ITERATE_KEY));\n\t\t\t\t\t\t\tif (isMap(target)) run(depsMap.get(MAP_KEY_ITERATE_KEY));\n\t\t\t\t\t\t} else if (isArrayIndex) run(depsMap.get(\"length\"));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"delete\":\n\t\t\t\t\t\tif (!targetIsArray) {\n\t\t\t\t\t\t\trun(depsMap.get(ITERATE_KEY));\n\t\t\t\t\t\t\tif (isMap(target)) run(depsMap.get(MAP_KEY_ITERATE_KEY));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"set\":\n\t\t\t\t\t\tif (isMap(target)) run(depsMap.get(ITERATE_KEY));\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tendBatch();\n\t}\n\tfunction reactiveReadArray(array) {\n\t\tconst raw = /* @__PURE__ */ toRaw(array);\n\t\tif (raw === array) return raw;\n\t\ttrack(raw, \"iterate\", ARRAY_ITERATE_KEY);\n\t\treturn /* @__PURE__ */ isShallow(array) ? raw : raw.map(toReactive);\n\t}\n\tfunction shallowReadArray(arr) {\n\t\ttrack(arr = /* @__PURE__ */ toRaw(arr), \"iterate\", ARRAY_ITERATE_KEY);\n\t\treturn arr;\n\t}\n\tfunction toWrapped(target, item) {\n\t\tif (/* @__PURE__ */ isReadonly(target)) return /* @__PURE__ */ isReactive(target) ? toReadonly(toReactive(item)) : toReadonly(item);\n\t\treturn toReactive(item);\n\t}\n\tfunction iterator(self, method, wrapValue) {\n\t\tconst arr = shallowReadArray(self);\n\t\tconst iter = arr[method]();\n\t\tif (arr !== self && !/* @__PURE__ */ isShallow(self)) {\n\t\t\titer._next = iter.next;\n\t\t\titer.next = () => {\n\t\t\t\tconst result = iter._next();\n\t\t\t\tif (!result.done) result.value = wrapValue(result.value);\n\t\t\t\treturn result;\n\t\t\t};\n\t\t}\n\t\treturn iter;\n\t}\n\tfunction apply(self, method, fn, thisArg, wrappedRetFn, args) {\n\t\tconst arr = shallowReadArray(self);\n\t\tconst needsWrap = arr !== self && !/* @__PURE__ */ isShallow(self);\n\t\tconst methodFn = arr[method];\n\t\tif (methodFn !== arrayProto[method]) {\n\t\t\tconst result2 = methodFn.apply(self, args);\n\t\t\treturn needsWrap ? toReactive(result2) : result2;\n\t\t}\n\t\tlet wrappedFn = fn;\n\t\tif (arr !== self) {\n\t\t\tif (needsWrap) wrappedFn = function(item, index) {\n\t\t\t\treturn fn.call(this, toWrapped(self, item), index, self);\n\t\t\t};\n\t\t\telse if (fn.length > 2) wrappedFn = function(item, index) {\n\t\t\t\treturn fn.call(this, item, index, self);\n\t\t\t};\n\t\t}\n\t\tconst result = methodFn.call(arr, wrappedFn, thisArg);\n\t\treturn needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;\n\t}\n\tfunction reduce(self, method, fn, args) {\n\t\tconst arr = shallowReadArray(self);\n\t\tconst needsWrap = arr !== self && !/* @__PURE__ */ isShallow(self);\n\t\tlet wrappedFn = fn;\n\t\tlet wrapInitialAccumulator = false;\n\t\tif (arr !== self) {\n\t\t\tif (needsWrap) {\n\t\t\t\twrapInitialAccumulator = args.length === 0;\n\t\t\t\twrappedFn = function(acc, item, index) {\n\t\t\t\t\tif (wrapInitialAccumulator) {\n\t\t\t\t\t\twrapInitialAccumulator = false;\n\t\t\t\t\t\tacc = toWrapped(self, acc);\n\t\t\t\t\t}\n\t\t\t\t\treturn fn.call(this, acc, toWrapped(self, item), index, self);\n\t\t\t\t};\n\t\t\t} else if (fn.length > 3) wrappedFn = function(acc, item, index) {\n\t\t\t\treturn fn.call(this, acc, item, index, self);\n\t\t\t};\n\t\t}\n\t\tconst result = arr[method](wrappedFn, ...args);\n\t\treturn wrapInitialAccumulator ? toWrapped(self, result) : result;\n\t}\n\tfunction searchProxy(self, method, args) {\n\t\tconst arr = /* @__PURE__ */ toRaw(self);\n\t\ttrack(arr, \"iterate\", ARRAY_ITERATE_KEY);\n\t\tconst res = arr[method](...args);\n\t\tif ((res === -1 || res === false) && /* @__PURE__ */ isProxy(args[0])) {\n\t\t\targs[0] = /* @__PURE__ */ toRaw(args[0]);\n\t\t\treturn arr[method](...args);\n\t\t}\n\t\treturn res;\n\t}\n\tfunction noTracking(self, method, args = []) {\n\t\tpauseTracking();\n\t\tstartBatch();\n\t\tconst res = (/* @__PURE__ */ toRaw(self))[method].apply(self, args);\n\t\tendBatch();\n\t\tresetTracking();\n\t\treturn res;\n\t}\n\tfunction hasOwnProperty(key) {\n\t\tif (!isSymbol(key)) key = String(key);\n\t\tconst obj = /* @__PURE__ */ toRaw(this);\n\t\ttrack(obj, \"has\", key);\n\t\treturn obj.hasOwnProperty(key);\n\t}\n\tfunction createIterableMethod(method, isReadonly2, isShallow2) {\n\t\treturn function(...args) {\n\t\t\tconst target = this[\"__v_raw\"];\n\t\t\tconst rawTarget = /* @__PURE__ */ toRaw(target);\n\t\t\tconst targetIsMap = isMap(rawTarget);\n\t\t\tconst isPair = method === \"entries\" || method === Symbol.iterator && targetIsMap;\n\t\t\tconst isKeyOnly = method === \"keys\" && targetIsMap;\n\t\t\tconst innerIterator = target[method](...args);\n\t\t\tconst wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;\n\t\t\t!isReadonly2 && track(rawTarget, \"iterate\", isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY);\n\t\t\treturn extend(Object.create(innerIterator), { next() {\n\t\t\t\tconst { value, done } = innerIterator.next();\n\t\t\t\treturn done ? {\n\t\t\t\t\tvalue,\n\t\t\t\t\tdone\n\t\t\t\t} : {\n\t\t\t\t\tvalue: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),\n\t\t\t\t\tdone\n\t\t\t\t};\n\t\t\t} });\n\t\t};\n\t}\n\tfunction createReadonlyMethod(type) {\n\t\treturn function(...args) {\n\t\t\treturn type === \"delete\" ? false : type === \"clear\" ? void 0 : this;\n\t\t};\n\t}\n\tfunction createInstrumentations(readonly, shallow) {\n\t\tconst instrumentations = {\n\t\t\tget(key) {\n\t\t\t\tconst target = this[\"__v_raw\"];\n\t\t\t\tconst rawTarget = /* @__PURE__ */ toRaw(target);\n\t\t\t\tconst rawKey = /* @__PURE__ */ toRaw(key);\n\t\t\t\tif (!readonly) {\n\t\t\t\t\tif (hasChanged(key, rawKey)) track(rawTarget, \"get\", key);\n\t\t\t\t\ttrack(rawTarget, \"get\", rawKey);\n\t\t\t\t}\n\t\t\t\tconst { has } = getProto(rawTarget);\n\t\t\t\tconst wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;\n\t\t\t\tif (has.call(rawTarget, key)) return wrap(target.get(key));\n\t\t\t\telse if (has.call(rawTarget, rawKey)) return wrap(target.get(rawKey));\n\t\t\t\telse if (target !== rawTarget) target.get(key);\n\t\t\t},\n\t\t\tget size() {\n\t\t\t\tconst target = this[\"__v_raw\"];\n\t\t\t\t!readonly && track(/* @__PURE__ */ toRaw(target), \"iterate\", ITERATE_KEY);\n\t\t\t\treturn target.size;\n\t\t\t},\n\t\t\thas(key) {\n\t\t\t\tconst target = this[\"__v_raw\"];\n\t\t\t\tconst rawTarget = /* @__PURE__ */ toRaw(target);\n\t\t\t\tconst rawKey = /* @__PURE__ */ toRaw(key);\n\t\t\t\tif (!readonly) {\n\t\t\t\t\tif (hasChanged(key, rawKey)) track(rawTarget, \"has\", key);\n\t\t\t\t\ttrack(rawTarget, \"has\", rawKey);\n\t\t\t\t}\n\t\t\t\treturn key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);\n\t\t\t},\n\t\t\tforEach(callback, thisArg) {\n\t\t\t\tconst observed = this;\n\t\t\t\tconst target = observed[\"__v_raw\"];\n\t\t\t\tconst rawTarget = /* @__PURE__ */ toRaw(target);\n\t\t\t\tconst wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;\n\t\t\t\t!readonly && track(rawTarget, \"iterate\", ITERATE_KEY);\n\t\t\t\treturn target.forEach((value, key) => {\n\t\t\t\t\treturn callback.call(thisArg, wrap(value), wrap(key), observed);\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t\textend(instrumentations, readonly ? {\n\t\t\tadd: createReadonlyMethod(\"add\"),\n\t\t\tset: createReadonlyMethod(\"set\"),\n\t\t\tdelete: createReadonlyMethod(\"delete\"),\n\t\t\tclear: createReadonlyMethod(\"clear\")\n\t\t} : {\n\t\t\tadd(value) {\n\t\t\t\tconst target = /* @__PURE__ */ toRaw(this);\n\t\t\t\tconst proto = getProto(target);\n\t\t\t\tconst rawValue = /* @__PURE__ */ toRaw(value);\n\t\t\t\tconst valueToAdd = !shallow && !/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value) ? rawValue : value;\n\t\t\t\tif (!(proto.has.call(target, valueToAdd) || hasChanged(value, valueToAdd) && proto.has.call(target, value) || hasChanged(rawValue, valueToAdd) && proto.has.call(target, rawValue))) {\n\t\t\t\t\ttarget.add(valueToAdd);\n\t\t\t\t\ttrigger(target, \"add\", valueToAdd, valueToAdd);\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tset(key, value) {\n\t\t\t\tif (!shallow && !/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value)) value = /* @__PURE__ */ toRaw(value);\n\t\t\t\tconst target = /* @__PURE__ */ toRaw(this);\n\t\t\t\tconst { has, get } = getProto(target);\n\t\t\t\tlet hadKey = has.call(target, key);\n\t\t\t\tif (!hadKey) {\n\t\t\t\t\tkey = /* @__PURE__ */ toRaw(key);\n\t\t\t\t\thadKey = has.call(target, key);\n\t\t\t\t}\n\t\t\t\tconst oldValue = get.call(target, key);\n\t\t\t\ttarget.set(key, value);\n\t\t\t\tif (!hadKey) trigger(target, \"add\", key, value);\n\t\t\t\telse if (hasChanged(value, oldValue)) trigger(target, \"set\", key, value, oldValue);\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdelete(key) {\n\t\t\t\tconst target = /* @__PURE__ */ toRaw(this);\n\t\t\t\tconst { has, get } = getProto(target);\n\t\t\t\tlet hadKey = has.call(target, key);\n\t\t\t\tif (!hadKey) {\n\t\t\t\t\tkey = /* @__PURE__ */ toRaw(key);\n\t\t\t\t\thadKey = has.call(target, key);\n\t\t\t\t}\n\t\t\t\tconst oldValue = get ? get.call(target, key) : void 0;\n\t\t\t\tconst result = target.delete(key);\n\t\t\t\tif (hadKey) trigger(target, \"delete\", key, void 0, oldValue);\n\t\t\t\treturn result;\n\t\t\t},\n\t\t\tclear() {\n\t\t\t\tconst target = /* @__PURE__ */ toRaw(this);\n\t\t\t\tconst hadItems = target.size !== 0;\n\t\t\t\tconst oldTarget = void 0;\n\t\t\t\tconst result = target.clear();\n\t\t\t\tif (hadItems) trigger(target, \"clear\", void 0, void 0, oldTarget);\n\t\t\t\treturn result;\n\t\t\t}\n\t\t});\n\t\t[\n\t\t\t\"keys\",\n\t\t\t\"values\",\n\t\t\t\"entries\",\n\t\t\tSymbol.iterator\n\t\t].forEach((method) => {\n\t\t\tinstrumentations[method] = createIterableMethod(method, readonly, shallow);\n\t\t});\n\t\treturn instrumentations;\n\t}\n\tfunction createInstrumentationGetter(isReadonly2, shallow) {\n\t\tconst instrumentations = createInstrumentations(isReadonly2, shallow);\n\t\treturn (target, key, receiver) => {\n\t\t\tif (key === \"__v_isReactive\") return !isReadonly2;\n\t\t\telse if (key === \"__v_isReadonly\") return isReadonly2;\n\t\t\telse if (key === \"__v_raw\") return target;\n\t\t\treturn Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver);\n\t\t};\n\t}\n\tfunction targetTypeMap(rawType) {\n\t\tswitch (rawType) {\n\t\t\tcase \"Object\":\n\t\t\tcase \"Array\": return 1;\n\t\t\tcase \"Map\":\n\t\t\tcase \"Set\":\n\t\t\tcase \"WeakMap\":\n\t\t\tcase \"WeakSet\": return 2;\n\t\t\tdefault: return 0;\n\t\t}\n\t}\n\t// @__NO_SIDE_EFFECTS__\n\tfunction reactive(target) {\n\t\tif (/* @__PURE__ */ isReadonly(target)) return target;\n\t\treturn createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);\n\t}\n\t// @__NO_SIDE_EFFECTS__\n\tfunction shallowReactive(target) {\n\t\treturn createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap);\n\t}\n\t// @__NO_SIDE_EFFECTS__\n\tfunction readonly(target) {\n\t\treturn createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);\n\t}\n\tfunction createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {\n\t\tif (!isObject(target)) return target;\n\t\tif (target[\"__v_raw\"] && !(isReadonly2 && target[\"__v_isReactive\"])) return target;\n\t\tif (target[\"__v_skip\"] || !Object.isExtensible(target)) return target;\n\t\tconst existingProxy = proxyMap.get(target);\n\t\tif (existingProxy) return existingProxy;\n\t\tconst targetType = targetTypeMap(toRawType(target));\n\t\tif (targetType === 0) return target;\n\t\tconst proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers);\n\t\tproxyMap.set(target, proxy);\n\t\treturn proxy;\n\t}\n\t// @__NO_SIDE_EFFECTS__\n\tfunction isReactive(value) {\n\t\tif (/* @__PURE__ */ isReadonly(value)) return /* @__PURE__ */ isReactive(value[\"__v_raw\"]);\n\t\treturn !!(value && value[\"__v_isReactive\"]);\n\t}\n\t// @__NO_SIDE_EFFECTS__\n\tfunction isReadonly(value) {\n\t\treturn !!(value && value[\"__v_isReadonly\"]);\n\t}\n\t// @__NO_SIDE_EFFECTS__\n\tfunction isShallow(value) {\n\t\treturn !!(value && value[\"__v_isShallow\"]);\n\t}\n\t// @__NO_SIDE_EFFECTS__\n\tfunction isProxy(value) {\n\t\treturn value ? !!value[\"__v_raw\"] : false;\n\t}\n\t// @__NO_SIDE_EFFECTS__\n\tfunction toRaw(observed) {\n\t\tconst raw = observed && observed[\"__v_raw\"];\n\t\treturn raw ? /* @__PURE__ */ toRaw(raw) : observed;\n\t}\n\tfunction markRaw(value) {\n\t\tif (!hasOwn(value, \"__v_skip\") && Object.isExtensible(value)) def(value, \"__v_skip\", true);\n\t\treturn value;\n\t}\n\t// @__NO_SIDE_EFFECTS__\n\tfunction isRef(r) {\n\t\treturn r ? r[\"__v_isRef\"] === true : false;\n\t}\n\t// @__NO_SIDE_EFFECTS__\n\tfunction ref(value) {\n\t\treturn createRef(value, false);\n\t}\n\tfunction createRef(rawValue, shallow) {\n\t\tif (/* @__PURE__ */ isRef(rawValue)) return rawValue;\n\t\treturn new RefImpl(rawValue, shallow);\n\t}\n\tfunction unref(ref2) {\n\t\treturn /* @__PURE__ */ isRef(ref2) ? ref2.value : ref2;\n\t}\n\tfunction proxyRefs(objectWithRefs) {\n\t\treturn /* @__PURE__ */ isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);\n\t}\n\t// @__NO_SIDE_EFFECTS__\n\tfunction computed$1(getterOrOptions, debugOptions, isSSR = false) {\n\t\tlet getter;\n\t\tlet setter;\n\t\tif (isFunction(getterOrOptions)) getter = getterOrOptions;\n\t\telse {\n\t\t\tgetter = getterOrOptions.get;\n\t\t\tsetter = getterOrOptions.set;\n\t\t}\n\t\treturn new ComputedRefImpl(getter, setter, isSSR);\n\t}\n\tfunction onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) {\n\t\tif (owner) {\n\t\t\tlet cleanups = cleanupMap.get(owner);\n\t\t\tif (!cleanups) cleanupMap.set(owner, cleanups = []);\n\t\t\tcleanups.push(cleanupFn);\n\t\t}\n\t}\n\tfunction watch$1(source, cb, options = EMPTY_OBJ) {\n\t\tconst { immediate, deep, once, scheduler, augmentJob, call } = options;\n\t\tconst reactiveGetter = (source2) => {\n\t\t\tif (deep) return source2;\n\t\t\tif (/* @__PURE__ */ isShallow(source2) || deep === false || deep === 0) return traverse(source2, 1);\n\t\t\treturn traverse(source2);\n\t\t};\n\t\tlet effect;\n\t\tlet getter;\n\t\tlet cleanup;\n\t\tlet boundCleanup;\n\t\tlet forceTrigger = false;\n\t\tlet isMultiSource = false;\n\t\tif (/* @__PURE__ */ isRef(source)) {\n\t\t\tgetter = () => source.value;\n\t\t\tforceTrigger = /* @__PURE__ */ isShallow(source);\n\t\t} else if (/* @__PURE__ */ isReactive(source)) {\n\t\t\tgetter = () => reactiveGetter(source);\n\t\t\tforceTrigger = true;\n\t\t} else if (isArray(source)) {\n\t\t\tisMultiSource = true;\n\t\t\tforceTrigger = source.some((s) => /* @__PURE__ */ isReactive(s) || /* @__PURE__ */ isShallow(s));\n\t\t\tgetter = () => source.map((s) => {\n\t\t\t\tif (/* @__PURE__ */ isRef(s)) return s.value;\n\t\t\t\telse if (/* @__PURE__ */ isReactive(s)) return reactiveGetter(s);\n\t\t\t\telse if (isFunction(s)) return call ? call(s, 2) : s();\n\t\t\t});\n\t\t} else if (isFunction(source)) if (cb) getter = call ? () => call(source, 2) : source;\n\t\telse getter = () => {\n\t\t\tif (cleanup) {\n\t\t\t\tpauseTracking();\n\t\t\t\ttry {\n\t\t\t\t\tcleanup();\n\t\t\t\t} finally {\n\t\t\t\t\tresetTracking();\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst currentEffect = activeWatcher;\n\t\t\tactiveWatcher = effect;\n\t\t\ttry {\n\t\t\t\treturn call ? call(source, 3, [boundCleanup]) : source(boundCleanup);\n\t\t\t} finally {\n\t\t\t\tactiveWatcher = currentEffect;\n\t\t\t}\n\t\t};\n\t\telse getter = NOOP;\n\t\tif (cb && deep) {\n\t\t\tconst baseGetter = getter;\n\t\t\tconst depth = deep === true ? Infinity : deep;\n\t\t\tgetter = () => traverse(baseGetter(), depth);\n\t\t}\n\t\tconst scope = getCurrentScope();\n\t\tconst watchHandle = () => {\n\t\t\teffect.stop();\n\t\t\tif (scope && scope.active) remove(scope.effects, effect);\n\t\t};\n\t\tif (once && cb) {\n\t\t\tconst _cb = cb;\n\t\t\tcb = (...args) => {\n\t\t\t\tconst res = _cb(...args);\n\t\t\t\twatchHandle();\n\t\t\t\treturn res;\n\t\t\t};\n\t\t}\n\t\tlet oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;\n\t\tconst job = (immediateFirstRun) => {\n\t\t\tif (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) return;\n\t\t\tif (cb) {\n\t\t\t\tconst newValue = effect.run();\n\t\t\t\tif (immediateFirstRun || deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {\n\t\t\t\t\tif (cleanup) cleanup();\n\t\t\t\t\tconst currentWatcher = activeWatcher;\n\t\t\t\t\tactiveWatcher = effect;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst args = [\n\t\t\t\t\t\t\tnewValue,\n\t\t\t\t\t\t\toldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,\n\t\t\t\t\t\t\tboundCleanup\n\t\t\t\t\t\t];\n\t\t\t\t\t\toldValue = newValue;\n\t\t\t\t\t\tcall ? call(cb, 3, args) : cb(...args);\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tactiveWatcher = currentWatcher;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else effect.run();\n\t\t};\n\t\tif (augmentJob) augmentJob(job);\n\t\teffect = new ReactiveEffect(getter);\n\t\teffect.scheduler = scheduler ? () => scheduler(job, false) : job;\n\t\tboundCleanup = (fn) => onWatcherCleanup(fn, false, effect);\n\t\tcleanup = effect.onStop = () => {\n\t\t\tconst cleanups = cleanupMap.get(effect);\n\t\t\tif (cleanups) {\n\t\t\t\tif (call) call(cleanups, 4);\n\t\t\t\telse for (const cleanup2 of cleanups) cleanup2();\n\t\t\t\tcleanupMap.delete(effect);\n\t\t\t}\n\t\t};\n\t\tif (cb) if (immediate) job(true);\n\t\telse oldValue = effect.run();\n\t\telse if (scheduler) scheduler(job.bind(null, true), true);\n\t\telse effect.run();\n\t\twatchHandle.pause = effect.pause.bind(effect);\n\t\twatchHandle.resume = effect.resume.bind(effect);\n\t\twatchHandle.stop = watchHandle;\n\t\treturn watchHandle;\n\t}\n\tfunction traverse(value, depth = Infinity, seen) {\n\t\tif (depth <= 0 || !isObject(value) || value[\"__v_skip\"]) return value;\n\t\tseen = seen || /* @__PURE__ */ new Map();\n\t\tif ((seen.get(value) || 0) >= depth) return value;\n\t\tseen.set(value, depth);\n\t\tdepth--;\n\t\tif (/* @__PURE__ */ isRef(value)) traverse(value.value, depth, seen);\n\t\telse if (isArray(value)) for (let i = 0; i < value.length; i++) traverse(value[i], depth, seen);\n\t\telse if (isSet(value) || isMap(value)) value.forEach((v) => {\n\t\t\ttraverse(v, depth, seen);\n\t\t});\n\t\telse if (isPlainObject(value)) {\n\t\t\tfor (const key in value) traverse(value[key], depth, seen);\n\t\t\tfor (const key of Object.getOwnPropertySymbols(value)) if (Object.prototype.propertyIsEnumerable.call(value, key)) traverse(value[key], depth, seen);\n\t\t}\n\t\treturn value;\n\t}\n\tvar activeEffectScope, EffectScope, activeSub, pausedQueueEffects, ReactiveEffect, batchDepth, batchedSub, batchedComputed, shouldTrack, trackStack, globalVersion, Link, Dep, targetMap, ITERATE_KEY, MAP_KEY_ITERATE_KEY, ARRAY_ITERATE_KEY, arrayInstrumentations, arrayProto, isNonTrackableKeys, builtInSymbols, BaseReactiveHandler, MutableReactiveHandler, ReadonlyReactiveHandler, mutableHandlers, readonlyHandlers, shallowReactiveHandlers, toShallow, getProto, mutableCollectionHandlers, shallowCollectionHandlers, readonlyCollectionHandlers, reactiveMap, shallowReactiveMap, readonlyMap, shallowReadonlyMap, toReactive, toReadonly, RefImpl, shallowUnwrapHandlers, ComputedRefImpl, INITIAL_WATCHER_VALUE, cleanupMap, activeWatcher;\n\tvar init_reactivity_esm_bundler = __esmMin((() => {\n\t\tinit_shared_esm_bundler();\n\t\tEffectScope = class {\n\t\t\tconstructor(detached = false) {\n\t\t\t\tthis.detached = detached;\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis._active = true;\n\t\t\t\t/**\n\t\t\t\t* @internal track `on` calls, allow `on` call multiple times\n\t\t\t\t*/\n\t\t\t\tthis._on = 0;\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis.effects = [];\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis.cleanups = [];\n\t\t\t\tthis._isPaused = false;\n\t\t\t\tthis._warnOnRun = true;\n\t\t\t\tthis.__v_skip = true;\n\t\t\t\tif (!detached && activeEffectScope) if (activeEffectScope.active) {\n\t\t\t\t\tthis.parent = activeEffectScope;\n\t\t\t\t\tthis.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;\n\t\t\t\t} else {\n\t\t\t\t\tthis._active = false;\n\t\t\t\t\tthis._warnOnRun = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tget active() {\n\t\t\t\treturn this._active;\n\t\t\t}\n\t\t\tpause() {\n\t\t\t\tif (this._active) {\n\t\t\t\t\tthis._isPaused = true;\n\t\t\t\t\tlet i, l;\n\t\t\t\t\tif (this.scopes) {\n\t\t\t\t\t\tconst scopes = this.scopes.slice();\n\t\t\t\t\t\tfor (i = 0, l = scopes.length; i < l; i++) scopes[i].pause();\n\t\t\t\t\t}\n\t\t\t\t\tfor (i = 0, l = this.effects.length; i < l; i++) this.effects[i].pause();\n\t\t\t\t}\n\t\t\t}\n\t\t\t/**\n\t\t\t* Resumes the effect scope, including all child scopes and effects.\n\t\t\t*/\n\t\t\tresume() {\n\t\t\t\tif (this._active) {\n\t\t\t\t\tif (this._isPaused) {\n\t\t\t\t\t\tthis._isPaused = false;\n\t\t\t\t\t\tlet i, l;\n\t\t\t\t\t\tif (this.scopes) {\n\t\t\t\t\t\t\tconst scopes = this.scopes.slice();\n\t\t\t\t\t\t\tfor (i = 0, l = scopes.length; i < l; i++) scopes[i].resume();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst effects = this.effects.slice();\n\t\t\t\t\t\tfor (i = 0, l = effects.length; i < l; i++) effects[i].resume();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\trun(fn) {\n\t\t\t\tif (this._active) {\n\t\t\t\t\tconst currentEffectScope = activeEffectScope;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tactiveEffectScope = this;\n\t\t\t\t\t\treturn fn();\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tactiveEffectScope = currentEffectScope;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t/**\n\t\t\t* This should only be called on non-detached scopes\n\t\t\t* @internal\n\t\t\t*/\n\t\t\ton() {\n\t\t\t\tif (++this._on === 1) {\n\t\t\t\t\tthis.prevScope = activeEffectScope;\n\t\t\t\t\tactiveEffectScope = this;\n\t\t\t\t}\n\t\t\t}\n\t\t\t/**\n\t\t\t* This should only be called on non-detached scopes\n\t\t\t* @internal\n\t\t\t*/\n\t\t\toff() {\n\t\t\t\tif (this._on > 0 && --this._on === 0) {\n\t\t\t\t\tif (activeEffectScope === this) activeEffectScope = this.prevScope;\n\t\t\t\t\telse {\n\t\t\t\t\t\tlet current = activeEffectScope;\n\t\t\t\t\t\twhile (current) {\n\t\t\t\t\t\t\tif (current.prevScope === this) {\n\t\t\t\t\t\t\t\tcurrent.prevScope = this.prevScope;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcurrent = current.prevScope;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.prevScope = void 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tstop(fromParent) {\n\t\t\t\tif (this._active) {\n\t\t\t\t\tthis._active = false;\n\t\t\t\t\tlet i, l;\n\t\t\t\t\tfor (i = 0, l = this.effects.length; i < l; i++) this.effects[i].stop();\n\t\t\t\t\tthis.effects.length = 0;\n\t\t\t\t\tfor (i = 0, l = this.cleanups.length; i < l; i++) this.cleanups[i]();\n\t\t\t\t\tthis.cleanups.length = 0;\n\t\t\t\t\tif (this.scopes) {\n\t\t\t\t\t\tconst scopes = this.scopes.slice();\n\t\t\t\t\t\tfor (i = 0, l = scopes.length; i < l; i++) scopes[i].stop(true);\n\t\t\t\t\t\tthis.scopes.length = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif (!this.detached && this.parent && !fromParent) {\n\t\t\t\t\t\tconst last = this.parent.scopes.pop();\n\t\t\t\t\t\tif (last && last !== this) {\n\t\t\t\t\t\t\tthis.parent.scopes[this.index] = last;\n\t\t\t\t\t\t\tlast.index = this.index;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.parent = void 0;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tpausedQueueEffects = /* @__PURE__ */ new WeakSet();\n\t\tReactiveEffect = class {\n\t\t\tconstructor(fn) {\n\t\t\t\tthis.fn = fn;\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis.deps = void 0;\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis.depsTail = void 0;\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis.flags = 5;\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis.next = void 0;\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis.cleanup = void 0;\n\t\t\t\tthis.scheduler = void 0;\n\t\t\t\tif (activeEffectScope) if (activeEffectScope.active) activeEffectScope.effects.push(this);\n\t\t\t\telse this.flags &= -2;\n\t\t\t}\n\t\t\tpause() {\n\t\t\t\tthis.flags |= 64;\n\t\t\t}\n\t\t\tresume() {\n\t\t\t\tif (this.flags & 64) {\n\t\t\t\t\tthis.flags &= -65;\n\t\t\t\t\tif (pausedQueueEffects.has(this)) {\n\t\t\t\t\t\tpausedQueueEffects.delete(this);\n\t\t\t\t\t\tthis.trigger();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t/**\n\t\t\t* @internal\n\t\t\t*/\n\t\t\tnotify() {\n\t\t\t\tif (this.flags & 2 && !(this.flags & 32)) return;\n\t\t\t\tif (!(this.flags & 8)) batch(this);\n\t\t\t}\n\t\t\trun() {\n\t\t\t\tif (!(this.flags & 1)) return this.fn();\n\t\t\t\tthis.flags |= 2;\n\t\t\t\tcleanupEffect(this);\n\t\t\t\tprepareDeps(this);\n\t\t\t\tconst prevEffect = activeSub;\n\t\t\t\tconst prevShouldTrack = shouldTrack;\n\t\t\t\tactiveSub = this;\n\t\t\t\tshouldTrack = true;\n\t\t\t\ttry {\n\t\t\t\t\treturn this.fn();\n\t\t\t\t} finally {\n\t\t\t\t\tcleanupDeps(this);\n\t\t\t\t\tactiveSub = prevEffect;\n\t\t\t\t\tshouldTrack = prevShouldTrack;\n\t\t\t\t\tthis.flags &= -3;\n\t\t\t\t}\n\t\t\t}\n\t\t\tstop() {\n\t\t\t\tif (this.flags & 1) {\n\t\t\t\t\tfor (let link = this.deps; link; link = link.nextDep) removeSub(link);\n\t\t\t\t\tthis.deps = this.depsTail = void 0;\n\t\t\t\t\tcleanupEffect(this);\n\t\t\t\t\tthis.onStop && this.onStop();\n\t\t\t\t\tthis.flags &= -2;\n\t\t\t\t}\n\t\t\t}\n\t\t\ttrigger() {\n\t\t\t\tif (this.flags & 64) pausedQueueEffects.add(this);\n\t\t\t\telse if (this.scheduler) this.scheduler();\n\t\t\t\telse this.runIfDirty();\n\t\t\t}\n\t\t\t/**\n\t\t\t* @internal\n\t\t\t*/\n\t\t\trunIfDirty() {\n\t\t\t\tif (isDirty(this)) this.run();\n\t\t\t}\n\t\t\tget dirty() {\n\t\t\t\treturn isDirty(this);\n\t\t\t}\n\t\t};\n\t\tbatchDepth = 0;\n\t\tshouldTrack = true;\n\t\ttrackStack = [];\n\t\tglobalVersion = 0;\n\t\tLink = class {\n\t\t\tconstructor(sub, dep) {\n\t\t\t\tthis.sub = sub;\n\t\t\t\tthis.dep = dep;\n\t\t\t\tthis.version = dep.version;\n\t\t\t\tthis.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0;\n\t\t\t}\n\t\t};\n\t\tDep = class {\n\t\t\tconstructor(computed) {\n\t\t\t\tthis.computed = computed;\n\t\t\t\tthis.version = 0;\n\t\t\t\t/**\n\t\t\t\t* Link between this dep and the current active effect\n\t\t\t\t*/\n\t\t\t\tthis.activeLink = void 0;\n\t\t\t\t/**\n\t\t\t\t* Doubly linked list representing the subscribing effects (tail)\n\t\t\t\t*/\n\t\t\t\tthis.subs = void 0;\n\t\t\t\t/**\n\t\t\t\t* For object property deps cleanup\n\t\t\t\t*/\n\t\t\t\tthis.map = void 0;\n\t\t\t\tthis.key = void 0;\n\t\t\t\t/**\n\t\t\t\t* Subscriber counter\n\t\t\t\t*/\n\t\t\t\tthis.sc = 0;\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis.__v_skip = true;\n\t\t\t}\n\t\t\ttrack(debugInfo) {\n\t\t\t\tif (!activeSub || !shouldTrack || activeSub === this.computed) return;\n\t\t\t\tlet link = this.activeLink;\n\t\t\t\tif (link === void 0 || link.sub !== activeSub) {\n\t\t\t\t\tlink = this.activeLink = new Link(activeSub, this);\n\t\t\t\t\tif (!activeSub.deps) activeSub.deps = activeSub.depsTail = link;\n\t\t\t\t\telse {\n\t\t\t\t\t\tlink.prevDep = activeSub.depsTail;\n\t\t\t\t\t\tactiveSub.depsTail.nextDep = link;\n\t\t\t\t\t\tactiveSub.depsTail = link;\n\t\t\t\t\t}\n\t\t\t\t\taddSub(link);\n\t\t\t\t} else if (link.version === -1) {\n\t\t\t\t\tlink.version = this.version;\n\t\t\t\t\tif (link.nextDep) {\n\t\t\t\t\t\tconst next = link.nextDep;\n\t\t\t\t\t\tnext.prevDep = link.prevDep;\n\t\t\t\t\t\tif (link.prevDep) link.prevDep.nextDep = next;\n\t\t\t\t\t\tlink.prevDep = activeSub.depsTail;\n\t\t\t\t\t\tlink.nextDep = void 0;\n\t\t\t\t\t\tactiveSub.depsTail.nextDep = link;\n\t\t\t\t\t\tactiveSub.depsTail = link;\n\t\t\t\t\t\tif (activeSub.deps === link) activeSub.deps = next;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn link;\n\t\t\t}\n\t\t\ttrigger(debugInfo) {\n\t\t\t\tthis.version++;\n\t\t\t\tglobalVersion++;\n\t\t\t\tthis.notify(debugInfo);\n\t\t\t}\n\t\t\tnotify(debugInfo) {\n\t\t\t\tstartBatch();\n\t\t\t\ttry {\n\t\t\t\t\tfor (let link = this.subs; link; link = link.prevSub) if (link.sub.notify()) link.sub.dep.notify();\n\t\t\t\t} finally {\n\t\t\t\t\tendBatch();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\ttargetMap = /* @__PURE__ */ new WeakMap();\n\t\tITERATE_KEY = /* @__PURE__ */ Symbol(\"\");\n\t\tMAP_KEY_ITERATE_KEY = /* @__PURE__ */ Symbol(\"\");\n\t\tARRAY_ITERATE_KEY = /* @__PURE__ */ Symbol(\"\");\n\t\tarrayInstrumentations = {\n\t\t\t__proto__: null,\n\t\t\t[Symbol.iterator]() {\n\t\t\t\treturn iterator(this, Symbol.iterator, (item) => toWrapped(this, item));\n\t\t\t},\n\t\t\tconcat(...args) {\n\t\t\t\treturn reactiveReadArray(this).concat(...args.map((x) => isArray(x) ? reactiveReadArray(x) : x));\n\t\t\t},\n\t\t\tentries() {\n\t\t\t\treturn iterator(this, \"entries\", (value) => {\n\t\t\t\t\tvalue[1] = toWrapped(this, value[1]);\n\t\t\t\t\treturn value;\n\t\t\t\t});\n\t\t\t},\n\t\t\tevery(fn, thisArg) {\n\t\t\t\treturn apply(this, \"every\", fn, thisArg, void 0, arguments);\n\t\t\t},\n\t\t\tfilter(fn, thisArg) {\n\t\t\t\treturn apply(this, \"filter\", fn, thisArg, (v) => v.map((item) => toWrapped(this, item)), arguments);\n\t\t\t},\n\t\t\tfind(fn, thisArg) {\n\t\t\t\treturn apply(this, \"find\", fn, thisArg, (item) => toWrapped(this, item), arguments);\n\t\t\t},\n\t\t\tfindIndex(fn, thisArg) {\n\t\t\t\treturn apply(this, \"findIndex\", fn, thisArg, void 0, arguments);\n\t\t\t},\n\t\t\tfindLast(fn, thisArg) {\n\t\t\t\treturn apply(this, \"findLast\", fn, thisArg, (item) => toWrapped(this, item), arguments);\n\t\t\t},\n\t\t\tfindLastIndex(fn, thisArg) {\n\t\t\t\treturn apply(this, \"findLastIndex\", fn, thisArg, void 0, arguments);\n\t\t\t},\n\t\t\tforEach(fn, thisArg) {\n\t\t\t\treturn apply(this, \"forEach\", fn, thisArg, void 0, arguments);\n\t\t\t},\n\t\t\tincludes(...args) {\n\t\t\t\treturn searchProxy(this, \"includes\", args);\n\t\t\t},\n\t\t\tindexOf(...args) {\n\t\t\t\treturn searchProxy(this, \"indexOf\", args);\n\t\t\t},\n\t\t\tjoin(separator) {\n\t\t\t\treturn reactiveReadArray(this).join(separator);\n\t\t\t},\n\t\t\tlastIndexOf(...args) {\n\t\t\t\treturn searchProxy(this, \"lastIndexOf\", args);\n\t\t\t},\n\t\t\tmap(fn, thisArg) {\n\t\t\t\treturn apply(this, \"map\", fn, thisArg, void 0, arguments);\n\t\t\t},\n\t\t\tpop() {\n\t\t\t\treturn noTracking(this, \"pop\");\n\t\t\t},\n\t\t\tpush(...args) {\n\t\t\t\treturn noTracking(this, \"push\", args);\n\t\t\t},\n\t\t\treduce(fn, ...args) {\n\t\t\t\treturn reduce(this, \"reduce\", fn, args);\n\t\t\t},\n\t\t\treduceRight(fn, ...args) {\n\t\t\t\treturn reduce(this, \"reduceRight\", fn, args);\n\t\t\t},\n\t\t\tshift() {\n\t\t\t\treturn noTracking(this, \"shift\");\n\t\t\t},\n\t\t\tsome(fn, thisArg) {\n\t\t\t\treturn apply(this, \"some\", fn, thisArg, void 0, arguments);\n\t\t\t},\n\t\t\tsplice(...args) {\n\t\t\t\treturn noTracking(this, \"splice\", args);\n\t\t\t},\n\t\t\ttoReversed() {\n\t\t\t\treturn reactiveReadArray(this).toReversed();\n\t\t\t},\n\t\t\ttoSorted(comparer) {\n\t\t\t\treturn reactiveReadArray(this).toSorted(comparer);\n\t\t\t},\n\t\t\ttoSpliced(...args) {\n\t\t\t\treturn reactiveReadArray(this).toSpliced(...args);\n\t\t\t},\n\t\t\tunshift(...args) {\n\t\t\t\treturn noTracking(this, \"unshift\", args);\n\t\t\t},\n\t\t\tvalues() {\n\t\t\t\treturn iterator(this, \"values\", (item) => toWrapped(this, item));\n\t\t\t}\n\t\t};\n\t\tarrayProto = Array.prototype;\n\t\tisNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);\n\t\tbuiltInSymbols = new Set(/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== \"arguments\" && key !== \"caller\").map((key) => Symbol[key]).filter(isSymbol));\n\t\tBaseReactiveHandler = class {\n\t\t\tconstructor(_isReadonly = false, _isShallow = false) {\n\t\t\t\tthis._isReadonly = _isReadonly;\n\t\t\t\tthis._isShallow = _isShallow;\n\t\t\t}\n\t\t\tget(target, key, receiver) {\n\t\t\t\tif (key === \"__v_skip\") return target[\"__v_skip\"];\n\t\t\t\tconst isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;\n\t\t\t\tif (key === \"__v_isReactive\") return !isReadonly2;\n\t\t\t\telse if (key === \"__v_isReadonly\") return isReadonly2;\n\t\t\t\telse if (key === \"__v_isShallow\") return isShallow2;\n\t\t\t\telse if (key === \"__v_raw\") {\n\t\t\t\t\tif (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) return target;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst targetIsArray = isArray(target);\n\t\t\t\tif (!isReadonly2) {\n\t\t\t\t\tlet fn;\n\t\t\t\t\tif (targetIsArray && (fn = arrayInstrumentations[key])) return fn;\n\t\t\t\t\tif (key === \"hasOwnProperty\") return hasOwnProperty;\n\t\t\t\t}\n\t\t\t\tconst res = Reflect.get(target, key, /* @__PURE__ */ isRef(target) ? target : receiver);\n\t\t\t\tif (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) return res;\n\t\t\t\tif (!isReadonly2) track(target, \"get\", key);\n\t\t\t\tif (isShallow2) return res;\n\t\t\t\tif (/* @__PURE__ */ isRef(res)) {\n\t\t\t\t\tconst value = targetIsArray && isIntegerKey(key) ? res : res.value;\n\t\t\t\t\treturn isReadonly2 && isObject(value) ? /* @__PURE__ */ readonly(value) : value;\n\t\t\t\t}\n\t\t\t\tif (isObject(res)) return isReadonly2 ? /* @__PURE__ */ readonly(res) : /* @__PURE__ */ reactive(res);\n\t\t\t\treturn res;\n\t\t\t}\n\t\t};\n\t\tMutableReactiveHandler = class extends BaseReactiveHandler {\n\t\t\tconstructor(isShallow2 = false) {\n\t\t\t\tsuper(false, isShallow2);\n\t\t\t}\n\t\t\tset(target, key, value, receiver) {\n\t\t\t\tlet oldValue = target[key];\n\t\t\t\tconst isArrayWithIntegerKey = isArray(target) && isIntegerKey(key);\n\t\t\t\tif (!this._isShallow) {\n\t\t\t\t\tconst isOldValueReadonly = /* @__PURE__ */ isReadonly(oldValue);\n\t\t\t\t\tif (!/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value)) {\n\t\t\t\t\t\toldValue = /* @__PURE__ */ toRaw(oldValue);\n\t\t\t\t\t\tvalue = /* @__PURE__ */ toRaw(value);\n\t\t\t\t\t}\n\t\t\t\t\tif (!isArrayWithIntegerKey && /* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) if (isOldValueReadonly) return true;\n\t\t\t\t\telse {\n\t\t\t\t\t\toldValue.value = value;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst hadKey = isArrayWithIntegerKey ? Number(key) < target.length : hasOwn(target, key);\n\t\t\t\tconst result = Reflect.set(target, key, value, /* @__PURE__ */ isRef(target) ? target : receiver);\n\t\t\t\tif (target === /* @__PURE__ */ toRaw(receiver) && result) {\n\t\t\t\t\tif (!hadKey) trigger(target, \"add\", key, value);\n\t\t\t\t\telse if (hasChanged(value, oldValue)) trigger(target, \"set\", key, value, oldValue);\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tdeleteProperty(target, key) {\n\t\t\t\tconst hadKey = hasOwn(target, key);\n\t\t\t\tconst oldValue = target[key];\n\t\t\t\tconst result = Reflect.deleteProperty(target, key);\n\t\t\t\tif (result && hadKey) trigger(target, \"delete\", key, void 0, oldValue);\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\thas(target, key) {\n\t\t\t\tconst result = Reflect.has(target, key);\n\t\t\t\tif (!isSymbol(key) || !builtInSymbols.has(key)) track(target, \"has\", key);\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\townKeys(target) {\n\t\t\t\ttrack(target, \"iterate\", isArray(target) ? \"length\" : ITERATE_KEY);\n\t\t\t\treturn Reflect.ownKeys(target);\n\t\t\t}\n\t\t};\n\t\tReadonlyReactiveHandler = class extends BaseReactiveHandler {\n\t\t\tconstructor(isShallow2 = false) {\n\t\t\t\tsuper(true, isShallow2);\n\t\t\t}\n\t\t\tset(target, key) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tdeleteProperty(target, key) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\tmutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();\n\t\treadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();\n\t\tshallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true);\n\t\ttoShallow = (value) => value;\n\t\tgetProto = (v) => Reflect.getPrototypeOf(v);\n\t\tmutableCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(false, false) };\n\t\tshallowCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(false, true) };\n\t\treadonlyCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(true, false) };\n\t\treactiveMap = /* @__PURE__ */ new WeakMap();\n\t\tshallowReactiveMap = /* @__PURE__ */ new WeakMap();\n\t\treadonlyMap = /* @__PURE__ */ new WeakMap();\n\t\tshallowReadonlyMap = /* @__PURE__ */ new WeakMap();\n\t\ttoReactive = (value) => isObject(value) ? /* @__PURE__ */ reactive(value) : value;\n\t\ttoReadonly = (value) => isObject(value) ? /* @__PURE__ */ readonly(value) : value;\n\t\tRefImpl = class {\n\t\t\tconstructor(value, isShallow2) {\n\t\t\t\tthis.dep = new Dep();\n\t\t\t\tthis[\"__v_isRef\"] = true;\n\t\t\t\tthis[\"__v_isShallow\"] = false;\n\t\t\t\tthis._rawValue = isShallow2 ? value : /* @__PURE__ */ toRaw(value);\n\t\t\t\tthis._value = isShallow2 ? value : toReactive(value);\n\t\t\t\tthis[\"__v_isShallow\"] = isShallow2;\n\t\t\t}\n\t\t\tget value() {\n\t\t\t\tthis.dep.track();\n\t\t\t\treturn this._value;\n\t\t\t}\n\t\t\tset value(newValue) {\n\t\t\t\tconst oldValue = this._rawValue;\n\t\t\t\tconst useDirectValue = this[\"__v_isShallow\"] || /* @__PURE__ */ isShallow(newValue) || /* @__PURE__ */ isReadonly(newValue);\n\t\t\t\tnewValue = useDirectValue ? newValue : /* @__PURE__ */ toRaw(newValue);\n\t\t\t\tif (hasChanged(newValue, oldValue)) {\n\t\t\t\t\tthis._rawValue = newValue;\n\t\t\t\t\tthis._value = useDirectValue ? newValue : toReactive(newValue);\n\t\t\t\t\tthis.dep.trigger();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tshallowUnwrapHandlers = {\n\t\t\tget: (target, key, receiver) => key === \"__v_raw\" ? target : unref(Reflect.get(target, key, receiver)),\n\t\t\tset: (target, key, value, receiver) => {\n\t\t\t\tconst oldValue = target[key];\n\t\t\t\tif (/* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) {\n\t\t\t\t\toldValue.value = value;\n\t\t\t\t\treturn true;\n\t\t\t\t} else return Reflect.set(target, key, value, receiver);\n\t\t\t}\n\t\t};\n\t\tComputedRefImpl = class {\n\t\t\tconstructor(fn, setter, isSSR) {\n\t\t\t\tthis.fn = fn;\n\t\t\t\tthis.setter = setter;\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis._value = void 0;\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis.dep = new Dep(this);\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis.__v_isRef = true;\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis.deps = void 0;\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis.depsTail = void 0;\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis.flags = 16;\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis.globalVersion = globalVersion - 1;\n\t\t\t\t/**\n\t\t\t\t* @internal\n\t\t\t\t*/\n\t\t\t\tthis.next = void 0;\n\t\t\t\tthis.effect = this;\n\t\t\t\tthis[\"__v_isReadonly\"] = !setter;\n\t\t\t\tthis.isSSR = isSSR;\n\t\t\t}\n\t\t\t/**\n\t\t\t* @internal\n\t\t\t*/\n\t\t\tnotify() {\n\t\t\t\tthis.flags |= 16;\n\t\t\t\tif (!(this.flags & 8) && activeSub !== this) {\n\t\t\t\t\tbatch(this, true);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tget value() {\n\t\t\t\tconst link = this.dep.track();\n\t\t\t\trefreshComputed(this);\n\t\t\t\tif (link) link.version = this.dep.version;\n\t\t\t\treturn this._value;\n\t\t\t}\n\t\t\tset value(newValue) {\n\t\t\t\tif (this.setter) this.setter(newValue);\n\t\t\t}\n\t\t};\n\t\tINITIAL_WATCHER_VALUE = {};\n\t\tcleanupMap = /* @__PURE__ */ new WeakMap();\n\t\tactiveWatcher = void 0;\n\t}));\n\t//#endregion\n\t//#region node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js\n\t/**\n\t* @vue/runtime-core v3.5.40\n\t* (c) 2018-present Yuxi (Evan) You and Vue contributors\n\t* @license MIT\n\t**/\n\tfunction callWithErrorHandling(fn, instance, type, args) {\n\t\ttry {\n\t\t\treturn args ? fn(...args) : fn();\n\t\t} catch (err) {\n\t\t\thandleError(err, instance, type);\n\t\t}\n\t}\n\tfunction callWithAsyncErrorHandling(fn, instance, type, args) {\n\t\tif (isFunction(fn)) {\n\t\t\tconst res = callWithErrorHandling(fn, instance, type, args);\n\t\t\tif (res && isPromise(res)) res.catch((err) => {\n\t\t\t\thandleError(err, instance, type);\n\t\t\t});\n\t\t\treturn res;\n\t\t}\n\t\tif (isArray(fn)) {\n\t\t\tconst values = [];\n\t\t\tfor (let i = 0; i < fn.length; i++) values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));\n\t\t\treturn values;\n\t\t}\n\t}\n\tfunction handleError(err, instance, type, throwInDev = true) {\n\t\tconst contextVNode = instance ? instance.vnode : null;\n\t\tconst { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ;\n\t\tif (instance) {\n\t\t\tlet cur = instance.parent;\n\t\t\tconst exposedInstance = instance.proxy;\n\t\t\tconst errorInfo = `https://vuejs.org/error-reference/#runtime-${type}`;\n\t\t\twhile (cur) {\n\t\t\t\tconst errorCapturedHooks = cur.ec;\n\t\t\t\tif (errorCapturedHooks) {\n\t\t\t\t\tfor (let i = 0; i < errorCapturedHooks.length; i++) if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) return;\n\t\t\t\t}\n\t\t\t\tcur = cur.parent;\n\t\t\t}\n\t\t\tif (errorHandler) {\n\t\t\t\tpauseTracking();\n\t\t\t\tcallWithErrorHandling(errorHandler, null, 10, [\n\t\t\t\t\terr,\n\t\t\t\t\texposedInstance,\n\t\t\t\t\terrorInfo\n\t\t\t\t]);\n\t\t\t\tresetTracking();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tlogError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction);\n\t}\n\tfunction logError(err, type, contextVNode, throwInDev = true, throwInProd = false) {\n\t\tif (throwInProd) throw err;\n\t\telse console.error(err);\n\t}\n\tfunction nextTick(fn) {\n\t\tconst p = currentFlushPromise || resolvedPromise;\n\t\treturn fn ? p.then(this ? fn.bind(this) : fn) : p;\n\t}\n\tfunction findInsertionIndex(id) {\n\t\tlet start = flushIndex + 1;\n\t\tlet end = queue.length;\n\t\twhile (start < end) {\n\t\t\tconst middle = start + end >>> 1;\n\t\t\tconst middleJob = queue[middle];\n\t\t\tconst middleJobId = getId(middleJob);\n\t\t\tif (middleJobId < id || middleJobId === id && middleJob.flags & 2) start = middle + 1;\n\t\t\telse end = middle;\n\t\t}\n\t\treturn start;\n\t}\n\tfunction queueJob(job) {\n\t\tif (!(job.flags & 1)) {\n\t\t\tconst jobId = getId(job);\n\t\t\tconst lastJob = queue[queue.length - 1];\n\t\t\tif (!lastJob || !(job.flags & 2) && jobId >= getId(lastJob)) queue.push(job);\n\t\t\telse queue.splice(findInsertionIndex(jobId), 0, job);\n\t\t\tjob.flags |= 1;\n\t\t\tqueueFlush();\n\t\t}\n\t}\n\tfunction queueFlush() {\n\t\tif (!currentFlushPromise) currentFlushPromise = resolvedPromise.then(flushJobs);\n\t}\n\tfunction queuePostFlushCb(cb) {\n\t\tif (!isArray(cb)) {\n\t\t\tif (activePostFlushCbs && cb.id === -1) activePostFlushCbs.splice(postFlushIndex + 1, 0, cb);\n\t\t\telse if (!(cb.flags & 1)) {\n\t\t\t\tpendingPostFlushCbs.push(cb);\n\t\t\t\tcb.flags |= 1;\n\t\t\t}\n\t\t} else pendingPostFlushCbs.push(...cb);\n\t\tqueueFlush();\n\t}\n\tfunction flushPreFlushCbs(instance, seen, i = flushIndex + 1) {\n\t\tfor (; i < queue.length; i++) {\n\t\t\tconst cb = queue[i];\n\t\t\tif (cb && cb.flags & 2) {\n\t\t\t\tif (instance && cb.id !== instance.uid) continue;\n\t\t\t\tqueue.splice(i, 1);\n\t\t\t\ti--;\n\t\t\t\tif (cb.flags & 4) cb.flags &= -2;\n\t\t\t\tcb();\n\t\t\t\tif (!(cb.flags & 4)) cb.flags &= -2;\n\t\t\t}\n\t\t}\n\t}\n\tfunction flushPostFlushCbs(seen) {\n\t\tif (pendingPostFlushCbs.length) {\n\t\t\tconst deduped = [...new Set(pendingPostFlushCbs)].sort((a, b) => getId(a) - getId(b));\n\t\t\tpendingPostFlushCbs.length = 0;\n\t\t\tif (activePostFlushCbs) {\n\t\t\t\tactivePostFlushCbs.push(...deduped);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tactivePostFlushCbs = deduped;\n\t\t\tfor (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {\n\t\t\t\tconst cb = activePostFlushCbs[postFlushIndex];\n\t\t\t\tif (cb.flags & 4) cb.flags &= -2;\n\t\t\t\tif (!(cb.flags & 8)) cb();\n\t\t\t\tcb.flags &= -2;\n\t\t\t}\n\t\t\tactivePostFlushCbs = null;\n\t\t\tpostFlushIndex = 0;\n\t\t}\n\t}\n\tfunction flushJobs(seen) {\n\t\ttry {\n\t\t\tfor (flushIndex = 0; flushIndex < queue.length; flushIndex++) {\n\t\t\t\tconst job = queue[flushIndex];\n\t\t\t\tif (job && !(job.flags & 8)) {\n\t\t\t\t\tif (job.flags & 4) job.flags &= -2;\n\t\t\t\t\tcallWithErrorHandling(job, job.i, job.i ? 15 : 14);\n\t\t\t\t\tif (!(job.flags & 4)) job.flags &= -2;\n\t\t\t\t}\n\t\t\t}\n\t\t} finally {\n\t\t\tfor (; flushIndex < queue.length; flushIndex++) {\n\t\t\t\tconst job = queue[flushIndex];\n\t\t\t\tif (job) job.flags &= -2;\n\t\t\t}\n\t\t\tflushIndex = -1;\n\t\t\tqueue.length = 0;\n\t\t\tflushPostFlushCbs(seen);\n\t\t\tcurrentFlushPromise = null;\n\t\t\tif (queue.length || pendingPostFlushCbs.length) flushJobs(seen);\n\t\t}\n\t}\n\tfunction setCurrentRenderingInstance(instance) {\n\t\tconst prev = currentRenderingInstance;\n\t\tcurrentRenderingInstance = instance;\n\t\tcurrentScopeId = instance && instance.type.__scopeId || null;\n\t\treturn prev;\n\t}\n\tfunction withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {\n\t\tif (!ctx) return fn;\n\t\tif (fn._n) return fn;\n\t\tconst renderFnWithContext = (...args) => {\n\t\t\tif (renderFnWithContext._d) setBlockTracking(-1);\n\t\t\tconst prevInstance = setCurrentRenderingInstance(ctx);\n\t\t\tconst prevStackSize = blockStack.length;\n\t\t\tlet res;\n\t\t\ttry {\n\t\t\t\tres = fn(...args);\n\t\t\t} finally {\n\t\t\t\tfor (let i = blockStack.length; i > prevStackSize; i--) closeBlock();\n\t\t\t\tsetCurrentRenderingInstance(prevInstance);\n\t\t\t\tif (renderFnWithContext._d) setBlockTracking(1);\n\t\t\t}\n\t\t\treturn res;\n\t\t};\n\t\trenderFnWithContext._n = true;\n\t\trenderFnWithContext._c = true;\n\t\trenderFnWithContext._d = true;\n\t\treturn renderFnWithContext;\n\t}\n\tfunction withDirectives(vnode, directives) {\n\t\tif (currentRenderingInstance === null) return vnode;\n\t\tconst instance = getComponentPublicInstance(currentRenderingInstance);\n\t\tconst bindings = vnode.dirs || (vnode.dirs = []);\n\t\tfor (let i = 0; i < directives.length; i++) {\n\t\t\tlet [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];\n\t\t\tif (dir) {\n\t\t\t\tif (isFunction(dir)) dir = {\n\t\t\t\t\tmounted: dir,\n\t\t\t\t\tupdated: dir\n\t\t\t\t};\n\t\t\t\tif (dir.deep) traverse(value);\n\t\t\t\tbindings.push({\n\t\t\t\t\tdir,\n\t\t\t\t\tinstance,\n\t\t\t\t\tvalue,\n\t\t\t\t\toldValue: void 0,\n\t\t\t\t\targ,\n\t\t\t\t\tmodifiers\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn vnode;\n\t}\n\tfunction invokeDirectiveHook(vnode, prevVNode, instance, name) {\n\t\tconst bindings = vnode.dirs;\n\t\tconst oldBindings = prevVNode && prevVNode.dirs;\n\t\tfor (let i = 0; i < bindings.length; i++) {\n\t\t\tconst binding = bindings[i];\n\t\t\tif (oldBindings) binding.oldValue = oldBindings[i].value;\n\t\t\tlet hook = binding.dir[name];\n\t\t\tif (hook) {\n\t\t\t\tpauseTracking();\n\t\t\t\tcallWithAsyncErrorHandling(hook, instance, 8, [\n\t\t\t\t\tvnode.el,\n\t\t\t\t\tbinding,\n\t\t\t\t\tvnode,\n\t\t\t\t\tprevVNode\n\t\t\t\t]);\n\t\t\t\tresetTracking();\n\t\t\t}\n\t\t}\n\t}\n\tfunction inject(key, defaultValue, treatDefaultAsFactory = false) {\n\t\tconst instance = getCurrentInstance();\n\t\tif (instance || currentApp) {\n\t\t\tlet provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;\n\t\t\tif (provides && key in provides) return provides[key];\n\t\t\telse if (arguments.length > 1) return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;\n\t\t}\n\t}\n\tfunction watch(source, cb, options) {\n\t\treturn doWatch(source, cb, options);\n\t}\n\tfunction doWatch(source, cb, options = EMPTY_OBJ) {\n\t\tconst { immediate, deep, flush, once } = options;\n\t\tconst baseWatchOptions = extend({}, options);\n\t\tconst runsImmediately = cb && immediate || !cb && flush !== \"post\";\n\t\tlet ssrCleanup;\n\t\tif (isInSSRComponentSetup) {\n\t\t\tif (flush === \"sync\") {\n\t\t\t\tconst ctx = useSSRContext();\n\t\t\t\tssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);\n\t\t\t} else if (!runsImmediately) {\n\t\t\t\tconst watchStopHandle = () => {};\n\t\t\t\twatchStopHandle.stop = NOOP;\n\t\t\t\twatchStopHandle.resume = NOOP;\n\t\t\t\twatchStopHandle.pause = NOOP;\n\t\t\t\treturn watchStopHandle;\n\t\t\t}\n\t\t}\n\t\tconst instance = currentInstance;\n\t\tbaseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);\n\t\tlet isPre = false;\n\t\tif (flush === \"post\") baseWatchOptions.scheduler = (job) => {\n\t\t\tqueuePostRenderEffect(job, instance && instance.suspense);\n\t\t};\n\t\telse if (flush !== \"sync\") {\n\t\t\tisPre = true;\n\t\t\tbaseWatchOptions.scheduler = (job, isFirstRun) => {\n\t\t\t\tif (isFirstRun) job();\n\t\t\t\telse queueJob(job);\n\t\t\t};\n\t\t}\n\t\tbaseWatchOptions.augmentJob = (job) => {\n\t\t\tif (cb) job.flags |= 4;\n\t\t\tif (isPre) {\n\t\t\t\tjob.flags |= 2;\n\t\t\t\tif (instance) {\n\t\t\t\t\tjob.id = instance.uid;\n\t\t\t\t\tjob.i = instance;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tconst watchHandle = watch$1(source, cb, baseWatchOptions);\n\t\tif (isInSSRComponentSetup) {\n\t\t\tif (ssrCleanup) ssrCleanup.push(watchHandle);\n\t\t\telse if (runsImmediately) watchHandle();\n\t\t}\n\t\treturn watchHandle;\n\t}\n\tfunction setTransitionHooks(vnode, hooks) {\n\t\tif (vnode.shapeFlag & 6 && vnode.component) {\n\t\t\tvnode.transition = hooks;\n\t\t\tsetTransitionHooks(vnode.component.subTree, hooks);\n\t\t} else if (vnode.shapeFlag & 128) {\n\t\t\tvnode.ssContent.transition = hooks.clone(vnode.ssContent);\n\t\t\tvnode.ssFallback.transition = hooks.clone(vnode.ssFallback);\n\t\t} else vnode.transition = hooks;\n\t}\n\t// @__NO_SIDE_EFFECTS__\n\tfunction defineComponent(options, extraOptions) {\n\t\treturn isFunction(options) ? /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))() : options;\n\t}\n\tfunction markAsyncBoundary(instance) {\n\t\tinstance.ids = [\n\t\t\tinstance.ids[0] + instance.ids[2]++ + \"-\",\n\t\t\t0,\n\t\t\t0\n\t\t];\n\t}\n\tfunction isTemplateRefKey(refs, key) {\n\t\tlet desc;\n\t\treturn !!((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable);\n\t}\n\tfunction setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {\n\t\tif (isArray(rawRef)) {\n\t\t\trawRef.forEach((r, i) => setRef(r, oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount));\n\t\t\treturn;\n\t\t}\n\t\tif (isAsyncWrapper(vnode) && !isUnmount) {\n\t\t\tif (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree);\n\t\t\treturn;\n\t\t}\n\t\tconst refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;\n\t\tconst value = isUnmount ? null : refValue;\n\t\tconst { i: owner, r: ref } = rawRef;\n\t\tconst oldRef = oldRawRef && oldRawRef.r;\n\t\tconst refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;\n\t\tconst setupState = owner.setupState;\n\t\tconst rawSetupState = /* @__PURE__ */ toRaw(setupState);\n\t\tconst canSetSetupRef = setupState === EMPTY_OBJ ? NO : (key) => {\n\t\t\tif (isTemplateRefKey(refs, key)) return false;\n\t\t\treturn hasOwn(rawSetupState, key);\n\t\t};\n\t\tconst canSetRef = (ref2, key) => {\n\t\t\tif (key && isTemplateRefKey(refs, key)) return false;\n\t\t\treturn true;\n\t\t};\n\t\tif (oldRef != null && oldRef !== ref) {\n\t\t\tinvalidatePendingSetRef(oldRawRef);\n\t\t\tif (isString(oldRef)) {\n\t\t\t\trefs[oldRef] = null;\n\t\t\t\tif (canSetSetupRef(oldRef)) setupState[oldRef] = null;\n\t\t\t} else if (/* @__PURE__ */ isRef(oldRef)) {\n\t\t\t\tconst oldRawRefAtom = oldRawRef;\n\t\t\t\tif (canSetRef(oldRef, oldRawRefAtom.k)) oldRef.value = null;\n\t\t\t\tif (oldRawRefAtom.k) refs[oldRawRefAtom.k] = null;\n\t\t\t}\n\t\t}\n\t\tif (isFunction(ref)) callWithErrorHandling(ref, owner, 12, [value, refs]);\n\t\telse {\n\t\t\tconst _isString = isString(ref);\n\t\t\tconst _isRef = /* @__PURE__ */ isRef(ref);\n\t\t\tif (_isString || _isRef) {\n\t\t\t\tconst doSet = () => {\n\t\t\t\t\tif (rawRef.f) {\n\t\t\t\t\t\tconst existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : canSetRef(ref) || !rawRef.k ? ref.value : refs[rawRef.k];\n\t\t\t\t\t\tif (isUnmount) isArray(existing) && remove(existing, refValue);\n\t\t\t\t\t\telse if (!isArray(existing)) if (_isString) {\n\t\t\t\t\t\t\trefs[ref] = [refValue];\n\t\t\t\t\t\t\tif (canSetSetupRef(ref)) setupState[ref] = refs[ref];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconst newVal = [refValue];\n\t\t\t\t\t\t\tif (canSetRef(ref, rawRef.k)) ref.value = newVal;\n\t\t\t\t\t\t\tif (rawRef.k) refs[rawRef.k] = newVal;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (!existing.includes(refValue)) existing.push(refValue);\n\t\t\t\t\t} else if (_isString) {\n\t\t\t\t\t\trefs[ref] = value;\n\t\t\t\t\t\tif (canSetSetupRef(ref)) setupState[ref] = value;\n\t\t\t\t\t} else if (_isRef) {\n\t\t\t\t\t\tif (canSetRef(ref, rawRef.k)) ref.value = value;\n\t\t\t\t\t\tif (rawRef.k) refs[rawRef.k] = value;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tif (value) {\n\t\t\t\t\tconst job = () => {\n\t\t\t\t\t\tdoSet();\n\t\t\t\t\t\tpendingSetRefMap.delete(rawRef);\n\t\t\t\t\t};\n\t\t\t\t\tjob.id = -1;\n\t\t\t\t\tpendingSetRefMap.set(rawRef, job);\n\t\t\t\t\tqueuePostRenderEffect(job, parentSuspense);\n\t\t\t\t} else {\n\t\t\t\t\tinvalidatePendingSetRef(rawRef);\n\t\t\t\t\tdoSet();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfunction invalidatePendingSetRef(rawRef) {\n\t\tconst pendingSetRef = pendingSetRefMap.get(rawRef);\n\t\tif (pendingSetRef) {\n\t\t\tpendingSetRef.flags |= 8;\n\t\t\tpendingSetRefMap.delete(rawRef);\n\t\t}\n\t}\n\tfunction injectHook(type, hook, target = currentInstance, prepend = false) {\n\t\tif (target) {\n\t\t\tconst hooks = target[type] || (target[type] = []);\n\t\t\tconst wrappedHook = hook.__weh || (hook.__weh = (...args) => {\n\t\t\t\tpauseTracking();\n\t\t\t\tconst reset = setCurrentInstance(target);\n\t\t\t\tconst res = callWithAsyncErrorHandling(hook, target, type, args);\n\t\t\t\treset();\n\t\t\t\tresetTracking();\n\t\t\t\treturn res;\n\t\t\t});\n\t\t\tif (prepend) hooks.unshift(wrappedHook);\n\t\t\telse hooks.push(wrappedHook);\n\t\t\treturn wrappedHook;\n\t\t}\n\t}\n\tfunction renderList(source, renderItem, cache, index) {\n\t\tlet ret;\n\t\tconst cached = cache && cache[index];\n\t\tconst sourceIsArray = isArray(source);\n\t\tif (sourceIsArray || isString(source)) {\n\t\t\tconst sourceIsReactiveArray = sourceIsArray && /* @__PURE__ */ isReactive(source);\n\t\t\tlet needsWrap = false;\n\t\t\tlet isReadonlySource = false;\n\t\t\tif (sourceIsReactiveArray) {\n\t\t\t\tneedsWrap = !/* @__PURE__ */ isShallow(source);\n\t\t\t\tisReadonlySource = /* @__PURE__ */ isReadonly(source);\n\t\t\t\tsource = shallowReadArray(source);\n\t\t\t}\n\t\t\tret = new Array(source.length);\n\t\t\tfor (let i = 0, l = source.length; i < l; i++) ret[i] = renderItem(needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i])) : toReactive(source[i]) : source[i], i, void 0, cached && cached[i]);\n\t\t} else if (typeof source === \"number\") {\n\t\t\tret = new Array(source);\n\t\t\tfor (let i = 0; i < source; i++) ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);\n\t\t} else if (isObject(source)) if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));\n\t\telse {\n\t\t\tconst keys = Object.keys(source);\n\t\t\tret = new Array(keys.length);\n\t\t\tfor (let i = 0, l = keys.length; i < l; i++) {\n\t\t\t\tconst key = keys[i];\n\t\t\t\tret[i] = renderItem(source[key], key, i, cached && cached[i]);\n\t\t\t}\n\t\t}\n\t\telse ret = [];\n\t\tif (cache) cache[index] = ret;\n\t\treturn ret;\n\t}\n\tfunction createAppContext() {\n\t\treturn {\n\t\t\tapp: null,\n\t\t\tconfig: {\n\t\t\t\tisNativeTag: NO,\n\t\t\t\tperformance: false,\n\t\t\t\tglobalProperties: {},\n\t\t\t\toptionMergeStrategies: {},\n\t\t\t\terrorHandler: void 0,\n\t\t\t\twarnHandler: void 0,\n\t\t\t\tcompilerOptions: {}\n\t\t\t},\n\t\t\tmixins: [],\n\t\t\tcomponents: {},\n\t\t\tdirectives: {},\n\t\t\tprovides: /* @__PURE__ */ Object.create(null),\n\t\t\toptionsCache: /* @__PURE__ */ new WeakMap(),\n\t\t\tpropsCache: /* @__PURE__ */ new WeakMap(),\n\t\t\temitsCache: /* @__PURE__ */ new WeakMap()\n\t\t};\n\t}\n\tfunction createAppAPI(render, hydrate) {\n\t\treturn function createApp(rootComponent, rootProps = null) {\n\t\t\tif (!isFunction(rootComponent)) rootComponent = extend({}, rootComponent);\n\t\t\tif (rootProps != null && !isObject(rootProps)) rootProps = null;\n\t\t\tconst context = createAppContext();\n\t\t\tconst installedPlugins = /* @__PURE__ */ new WeakSet();\n\t\t\tconst pluginCleanupFns = [];\n\t\t\tlet isMounted = false;\n\t\t\tconst app = context.app = {\n\t\t\t\t_uid: uid$1++,\n\t\t\t\t_component: rootComponent,\n\t\t\t\t_props: rootProps,\n\t\t\t\t_container: null,\n\t\t\t\t_context: context,\n\t\t\t\t_instance: null,\n\t\t\t\tversion,\n\t\t\t\tget config() {\n\t\t\t\t\treturn context.config;\n\t\t\t\t},\n\t\t\t\tset config(v) {},\n\t\t\t\tuse(plugin, ...options) {\n\t\t\t\t\tif (installedPlugins.has(plugin)) {} else if (plugin && isFunction(plugin.install)) {\n\t\t\t\t\t\tinstalledPlugins.add(plugin);\n\t\t\t\t\t\tplugin.install(app, ...options);\n\t\t\t\t\t} else if (isFunction(plugin)) {\n\t\t\t\t\t\tinstalledPlugins.add(plugin);\n\t\t\t\t\t\tplugin(app, ...options);\n\t\t\t\t\t}\n\t\t\t\t\treturn app;\n\t\t\t\t},\n\t\t\t\tmixin(mixin) {\n\t\t\t\t\treturn app;\n\t\t\t\t},\n\t\t\t\tcomponent(name, component) {\n\t\t\t\t\tif (!component) return context.components[name];\n\t\t\t\t\tcontext.components[name] = component;\n\t\t\t\t\treturn app;\n\t\t\t\t},\n\t\t\t\tdirective(name, directive) {\n\t\t\t\t\tif (!directive) return context.directives[name];\n\t\t\t\t\tcontext.directives[name] = directive;\n\t\t\t\t\treturn app;\n\t\t\t\t},\n\t\t\t\tmount(rootContainer, isHydrate, namespace) {\n\t\t\t\t\tif (!isMounted) {\n\t\t\t\t\t\tconst vnode = app._ceVNode || createVNode(rootComponent, rootProps);\n\t\t\t\t\t\tvnode.appContext = context;\n\t\t\t\t\t\tif (namespace === true) namespace = \"svg\";\n\t\t\t\t\t\telse if (namespace === false) namespace = void 0;\n\t\t\t\t\t\tif (isHydrate && hydrate) hydrate(vnode, rootContainer);\n\t\t\t\t\t\telse render(vnode, rootContainer, namespace);\n\t\t\t\t\t\tisMounted = true;\n\t\t\t\t\t\tapp._container = rootContainer;\n\t\t\t\t\t\trootContainer.__vue_app__ = app;\n\t\t\t\t\t\treturn getComponentPublicInstance(vnode.component);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tonUnmount(cleanupFn) {\n\t\t\t\t\tpluginCleanupFns.push(cleanupFn);\n\t\t\t\t},\n\t\t\t\tunmount() {\n\t\t\t\t\tif (isMounted) {\n\t\t\t\t\t\tcallWithAsyncErrorHandling(pluginCleanupFns, app._instance, 16);\n\t\t\t\t\t\trender(null, app._container);\n\t\t\t\t\t\tdelete app._container.__vue_app__;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tprovide(key, value) {\n\t\t\t\t\tcontext.provides[key] = value;\n\t\t\t\t\treturn app;\n\t\t\t\t},\n\t\t\t\trunWithContext(fn) {\n\t\t\t\t\tconst lastApp = currentApp;\n\t\t\t\t\tcurrentApp = app;\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn fn();\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tcurrentApp = lastApp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\treturn app;\n\t\t};\n\t}\n\tfunction emit(instance, event, ...rawArgs) {\n\t\tif (instance.isUnmounted) return;\n\t\tconst props = instance.vnode.props || EMPTY_OBJ;\n\t\tlet args = rawArgs;\n\t\tconst isModelListener = event.startsWith(\"update:\");\n\t\tconst modifiers = isModelListener && getModelModifiers(props, event.slice(7));\n\t\tif (modifiers) {\n\t\t\tif (modifiers.trim) args = rawArgs.map((a) => isString(a) ? a.trim() : a);\n\t\t\tif (modifiers.number) args = rawArgs.map(looseToNumber);\n\t\t}\n\t\tlet handlerName;\n\t\tlet handler = props[handlerName = toHandlerKey(event)] || props[handlerName = toHandlerKey(camelize(event))];\n\t\tif (!handler && isModelListener) handler = props[handlerName = toHandlerKey(hyphenate(event))];\n\t\tif (handler) callWithAsyncErrorHandling(handler, instance, 6, args);\n\t\tconst onceHandler = props[handlerName + `Once`];\n\t\tif (onceHandler) {\n\t\t\tif (!instance.emitted) instance.emitted = {};\n\t\t\telse if (instance.emitted[handlerName]) return;\n\t\t\tinstance.emitted[handlerName] = true;\n\t\t\tcallWithAsyncErrorHandling(onceHandler, instance, 6, args);\n\t\t}\n\t}\n\tfunction normalizeEmitsOptions(comp, appContext, asMixin = false) {\n\t\tconst cache = appContext.emitsCache;\n\t\tconst cached = cache.get(comp);\n\t\tif (cached !== void 0) return cached;\n\t\tconst raw = comp.emits;\n\t\tlet normalized = {};\n\t\tif (!raw && true) {\n\t\t\tif (isObject(comp)) cache.set(comp, null);\n\t\t\treturn null;\n\t\t}\n\t\tif (isArray(raw)) raw.forEach((key) => normalized[key] = null);\n\t\telse extend(normalized, raw);\n\t\tif (isObject(comp)) cache.set(comp, normalized);\n\t\treturn normalized;\n\t}\n\tfunction isEmitListener(options, key) {\n\t\tif (!options || !isOn(key)) return false;\n\t\tkey = key.slice(2);\n\t\tkey = key === \"Once\" ? key : key.replace(/Once$/, \"\");\n\t\treturn hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);\n\t}\n\tfunction renderComponentRoot(instance) {\n\t\tconst { type: Component, vnode, proxy, withProxy, propsOptions: [propsOptions], slots, attrs, emit, render, renderCache, props, data, setupState, ctx, inheritAttrs } = instance;\n\t\tconst prev = setCurrentRenderingInstance(instance);\n\t\tlet result;\n\t\tlet fallthroughAttrs;\n\t\ttry {\n\t\t\tif (vnode.shapeFlag & 4) {\n\t\t\t\tconst proxyToUse = withProxy || proxy;\n\t\t\t\tconst thisProxy = proxyToUse;\n\t\t\t\tresult = normalizeVNode(render.call(thisProxy, proxyToUse, renderCache, props, setupState, data, ctx));\n\t\t\t\tfallthroughAttrs = attrs;\n\t\t\t} else {\n\t\t\t\tconst render2 = Component;\n\t\t\t\tresult = normalizeVNode(render2.length > 1 ? render2(props, {\n\t\t\t\t\tattrs,\n\t\t\t\t\tslots,\n\t\t\t\t\temit\n\t\t\t\t}) : render2(props, null));\n\t\t\t\tfallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tblockStack.length = 0;\n\t\t\thandleError(err, instance, 1);\n\t\t\tresult = createVNode(Comment);\n\t\t}\n\t\tlet root = result;\n\t\tif (fallthroughAttrs && inheritAttrs !== false) {\n\t\t\tconst keys = Object.keys(fallthroughAttrs);\n\t\t\tconst { shapeFlag } = root;\n\t\t\tif (keys.length) {\n\t\t\t\tif (shapeFlag & 7) {\n\t\t\t\t\tif (propsOptions && keys.some(isModelListener)) fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions);\n\t\t\t\t\troot = cloneVNode(root, fallthroughAttrs, false, true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (vnode.dirs) {\n\t\t\troot = cloneVNode(root, null, false, true);\n\t\t\troot.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;\n\t\t}\n\t\tif (vnode.transition) setTransitionHooks(root, vnode.transition);\n\t\tresult = root;\n\t\tsetCurrentRenderingInstance(prev);\n\t\treturn result;\n\t}\n\tfunction shouldUpdateComponent(prevVNode, nextVNode, optimized) {\n\t\tconst { props: prevProps, children: prevChildren, component } = prevVNode;\n\t\tconst { props: nextProps, children: nextChildren, patchFlag } = nextVNode;\n\t\tconst emits = component.emitsOptions;\n\t\tif (nextVNode.dirs || nextVNode.transition) return true;\n\t\tif (optimized && patchFlag >= 0) {\n\t\t\tif (patchFlag & 1024) return true;\n\t\t\tif (patchFlag & 16) {\n\t\t\t\tif (!prevProps) return !!nextProps;\n\t\t\t\treturn hasPropsChanged(prevProps, nextProps, emits);\n\t\t\t} else if (patchFlag & 8) {\n\t\t\t\tconst dynamicProps = nextVNode.dynamicProps;\n\t\t\t\tfor (let i = 0; i < dynamicProps.length; i++) {\n\t\t\t\t\tconst key = dynamicProps[i];\n\t\t\t\t\tif (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emits, key)) return true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (prevChildren || nextChildren) {\n\t\t\t\tif (!nextChildren || !nextChildren.$stable) return true;\n\t\t\t}\n\t\t\tif (prevProps === nextProps) return false;\n\t\t\tif (!prevProps) return !!nextProps;\n\t\t\tif (!nextProps) return true;\n\t\t\treturn hasPropsChanged(prevProps, nextProps, emits);\n\t\t}\n\t\treturn false;\n\t}\n\tfunction hasPropsChanged(prevProps, nextProps, emitsOptions) {\n\t\tconst nextKeys = Object.keys(nextProps);\n\t\tif (nextKeys.length !== Object.keys(prevProps).length) return true;\n\t\tfor (let i = 0; i < nextKeys.length; i++) {\n\t\t\tconst key = nextKeys[i];\n\t\t\tif (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) return true;\n\t\t}\n\t\treturn false;\n\t}\n\tfunction hasPropValueChanged(nextProps, prevProps, key) {\n\t\tconst nextProp = nextProps[key];\n\t\tconst prevProp = prevProps[key];\n\t\tif (key === \"style\" && isObject(nextProp) && isObject(prevProp)) return !looseEqual(nextProp, prevProp);\n\t\treturn nextProp !== prevProp;\n\t}\n\tfunction updateHOCHostEl({ vnode, parent, suspense }, el) {\n\t\twhile (parent) {\n\t\t\tconst root = parent.subTree;\n\t\t\tif (root.suspense && root.suspense.activeBranch === vnode) {\n\t\t\t\troot.suspense.vnode.el = root.el = el;\n\t\t\t\tvnode = root;\n\t\t\t}\n\t\t\tif (root === vnode) {\n\t\t\t\t(vnode = parent.vnode).el = el;\n\t\t\t\tparent = parent.parent;\n\t\t\t} else break;\n\t\t}\n\t\tif (suspense && suspense.activeBranch === vnode) suspense.vnode.el = el;\n\t}\n\tfunction initProps(instance, rawProps, isStateful, isSSR = false) {\n\t\tconst props = {};\n\t\tconst attrs = createInternalObject();\n\t\tinstance.propsDefaults = /* @__PURE__ */ Object.create(null);\n\t\tsetFullProps(instance, rawProps, props, attrs);\n\t\tfor (const key in instance.propsOptions[0]) if (!(key in props)) props[key] = void 0;\n\t\tif (isStateful) instance.props = isSSR ? props : /* @__PURE__ */ shallowReactive(props);\n\t\telse if (!instance.type.props) instance.props = attrs;\n\t\telse instance.props = props;\n\t\tinstance.attrs = attrs;\n\t}\n\tfunction updateProps(instance, rawProps, rawPrevProps, optimized) {\n\t\tconst { props, attrs, vnode: { patchFlag } } = instance;\n\t\tconst rawCurrentProps = /* @__PURE__ */ toRaw(props);\n\t\tconst [options] = instance.propsOptions;\n\t\tlet hasAttrsChanged = false;\n\t\tif ((optimized || patchFlag > 0) && !(patchFlag & 16)) {\n\t\t\tif (patchFlag & 8) {\n\t\t\t\tconst propsToUpdate = instance.vnode.dynamicProps;\n\t\t\t\tfor (let i = 0; i < propsToUpdate.length; i++) {\n\t\t\t\t\tlet key = propsToUpdate[i];\n\t\t\t\t\tif (isEmitListener(instance.emitsOptions, key)) continue;\n\t\t\t\t\tconst value = rawProps[key];\n\t\t\t\t\tif (options) if (hasOwn(attrs, key)) {\n\t\t\t\t\t\tif (value !== attrs[key]) {\n\t\t\t\t\t\t\tattrs[key] = value;\n\t\t\t\t\t\t\thasAttrsChanged = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst camelizedKey = camelize(key);\n\t\t\t\t\t\tprops[camelizedKey] = resolvePropValue(options, rawCurrentProps, camelizedKey, value, instance, false);\n\t\t\t\t\t}\n\t\t\t\t\telse if (value !== attrs[key]) {\n\t\t\t\t\t\tattrs[key] = value;\n\t\t\t\t\t\thasAttrsChanged = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (setFullProps(instance, rawProps, props, attrs)) hasAttrsChanged = true;\n\t\t\tlet kebabKey;\n\t\t\tfor (const key in rawCurrentProps) if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) if (options) {\n\t\t\t\tif (rawPrevProps && (rawPrevProps[key] !== void 0 || rawPrevProps[kebabKey] !== void 0)) props[key] = resolvePropValue(options, rawCurrentProps, key, void 0, instance, true);\n\t\t\t} else delete props[key];\n\t\t\tif (attrs !== rawCurrentProps) {\n\t\t\t\tfor (const key in attrs) if (!rawProps || !hasOwn(rawProps, key) && true) {\n\t\t\t\t\tdelete attrs[key];\n\t\t\t\t\thasAttrsChanged = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (hasAttrsChanged) trigger(instance.attrs, \"set\", \"\");\n\t}\n\tfunction setFullProps(instance, rawProps, props, attrs) {\n\t\tconst [options, needCastKeys] = instance.propsOptions;\n\t\tlet hasAttrsChanged = false;\n\t\tlet rawCastValues;\n\t\tif (rawProps) for (let key in rawProps) {\n\t\t\tif (isReservedProp(key)) continue;\n\t\t\tconst value = rawProps[key];\n\t\t\tlet camelKey;\n\t\t\tif (options && hasOwn(options, camelKey = camelize(key))) if (!needCastKeys || !needCastKeys.includes(camelKey)) props[camelKey] = value;\n\t\t\telse (rawCastValues || (rawCastValues = {}))[camelKey] = value;\n\t\t\telse if (!isEmitListener(instance.emitsOptions, key)) {\n\t\t\t\tif (!(key in attrs) || value !== attrs[key]) {\n\t\t\t\t\tattrs[key] = value;\n\t\t\t\t\thasAttrsChanged = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (needCastKeys) {\n\t\t\tconst rawCurrentProps = /* @__PURE__ */ toRaw(props);\n\t\t\tconst castValues = rawCastValues || EMPTY_OBJ;\n\t\t\tfor (let i = 0; i < needCastKeys.length; i++) {\n\t\t\t\tconst key = needCastKeys[i];\n\t\t\t\tprops[key] = resolvePropValue(options, rawCurrentProps, key, castValues[key], instance, !hasOwn(castValues, key));\n\t\t\t}\n\t\t}\n\t\treturn hasAttrsChanged;\n\t}\n\tfunction resolvePropValue(options, props, key, value, instance, isAbsent) {\n\t\tconst opt = options[key];\n\t\tif (opt != null) {\n\t\t\tconst hasDefault = hasOwn(opt, \"default\");\n\t\t\tif (hasDefault && value === void 0) {\n\t\t\t\tconst defaultValue = opt.default;\n\t\t\t\tif (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) {\n\t\t\t\t\tconst { propsDefaults } = instance;\n\t\t\t\t\tif (key in propsDefaults) value = propsDefaults[key];\n\t\t\t\t\telse {\n\t\t\t\t\t\tconst reset = setCurrentInstance(instance);\n\t\t\t\t\t\tvalue = propsDefaults[key] = defaultValue.call(null, props);\n\t\t\t\t\t\treset();\n\t\t\t\t\t}\n\t\t\t\t} else value = defaultValue;\n\t\t\t\tif (instance.ce) instance.ce._setProp(key, value);\n\t\t\t}\n\t\t\tif (opt[0]) {\n\t\t\t\tif (isAbsent && !hasDefault) value = false;\n\t\t\t\telse if (opt[1] && (value === \"\" || value === hyphenate(key))) value = true;\n\t\t\t}\n\t\t}\n\t\treturn value;\n\t}\n\tfunction normalizePropsOptions(comp, appContext, asMixin = false) {\n\t\tconst cache = appContext.propsCache;\n\t\tconst cached = cache.get(comp);\n\t\tif (cached) return cached;\n\t\tconst raw = comp.props;\n\t\tconst normalized = {};\n\t\tconst needCastKeys = [];\n\t\tif (!raw && true) {\n\t\t\tif (isObject(comp)) cache.set(comp, EMPTY_ARR);\n\t\t\treturn EMPTY_ARR;\n\t\t}\n\t\tif (isArray(raw)) for (let i = 0; i < raw.length; i++) {\n\t\t\tconst normalizedKey = camelize(raw[i]);\n\t\t\tif (validatePropName(normalizedKey)) normalized[normalizedKey] = EMPTY_OBJ;\n\t\t}\n\t\telse if (raw) for (const key in raw) {\n\t\t\tconst normalizedKey = camelize(key);\n\t\t\tif (validatePropName(normalizedKey)) {\n\t\t\t\tconst opt = raw[key];\n\t\t\t\tconst prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt);\n\t\t\t\tconst propType = prop.type;\n\t\t\t\tlet shouldCast = false;\n\t\t\t\tlet shouldCastTrue = true;\n\t\t\t\tif (isArray(propType)) for (let index = 0; index < propType.length; ++index) {\n\t\t\t\t\tconst type = propType[index];\n\t\t\t\t\tconst typeName = isFunction(type) && type.name;\n\t\t\t\t\tif (typeName === \"Boolean\") {\n\t\t\t\t\t\tshouldCast = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if (typeName === \"String\") shouldCastTrue = false;\n\t\t\t\t}\n\t\t\t\telse shouldCast = isFunction(propType) && propType.name === \"Boolean\";\n\t\t\t\tprop[0] = shouldCast;\n\t\t\t\tprop[1] = shouldCastTrue;\n\t\t\t\tif (shouldCast || hasOwn(prop, \"default\")) needCastKeys.push(normalizedKey);\n\t\t\t}\n\t\t}\n\t\tconst res = [normalized, needCastKeys];\n\t\tif (isObject(comp)) cache.set(comp, res);\n\t\treturn res;\n\t}\n\tfunction validatePropName(key) {\n\t\tif (key[0] !== \"$\" && !isReservedProp(key)) return true;\n\t\treturn false;\n\t}\n\tfunction createRenderer(options) {\n\t\treturn baseCreateRenderer(options);\n\t}\n\tfunction baseCreateRenderer(options, createHydrationFns) {\n\t\tconst target = getGlobalThis();\n\t\ttarget.__VUE__ = true;\n\t\tconst { insert: hostInsert, remove: hostRemove, patchProp: hostPatchProp, createElement: hostCreateElement, createText: hostCreateText, createComment: hostCreateComment, setText: hostSetText, setElementText: hostSetElementText, parentNode: hostParentNode, nextSibling: hostNextSibling, setScopeId: hostSetScopeId = NOOP, insertStaticContent: hostInsertStaticContent } = options;\n\t\tconst patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = !!n2.dynamicChildren) => {\n\t\t\tif (n1 === n2) return;\n\t\t\tif (n1 && !isSameVNodeType(n1, n2)) {\n\t\t\t\tanchor = getNextHostNode(n1);\n\t\t\t\tunmount(n1, parentComponent, parentSuspense, true);\n\t\t\t\tn1 = null;\n\t\t\t}\n\t\t\tif (n2.patchFlag === -2) {\n\t\t\t\toptimized = false;\n\t\t\t\tn2.dynamicChildren = null;\n\t\t\t}\n\t\t\tconst { type, ref, shapeFlag } = n2;\n\t\t\tswitch (type) {\n\t\t\t\tcase Text:\n\t\t\t\t\tprocessText(n1, n2, container, anchor);\n\t\t\t\t\tbreak;\n\t\t\t\tcase Comment:\n\t\t\t\t\tprocessCommentNode(n1, n2, container, anchor);\n\t\t\t\t\tbreak;\n\t\t\t\tcase Static:\n\t\t\t\t\tif (n1 == null) mountStaticNode(n2, container, anchor, namespace);\n\t\t\t\t\tbreak;\n\t\t\t\tcase Fragment:\n\t\t\t\t\tprocessFragment(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: if (shapeFlag & 1) processElement(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\t\telse if (shapeFlag & 6) processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\t\telse if (shapeFlag & 64) type.process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals);\n\t\t\t\telse if (shapeFlag & 128) type.process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals);\n\t\t\t}\n\t\t\tif (ref != null && parentComponent) setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2);\n\t\t\telse if (ref == null && n1 && n1.ref != null) setRef(n1.ref, null, parentSuspense, n1, true);\n\t\t};\n\t\tconst processText = (n1, n2, container, anchor) => {\n\t\t\tif (n1 == null) hostInsert(n2.el = hostCreateText(n2.children), container, anchor);\n\t\t\telse {\n\t\t\t\tconst el = n2.el = n1.el;\n\t\t\t\tif (n2.children !== n1.children) hostSetText(el, n2.children);\n\t\t\t}\n\t\t};\n\t\tconst processCommentNode = (n1, n2, container, anchor) => {\n\t\t\tif (n1 == null) hostInsert(n2.el = hostCreateComment(n2.children || \"\"), container, anchor);\n\t\t\telse n2.el = n1.el;\n\t\t};\n\t\tconst mountStaticNode = (n2, container, anchor, namespace) => {\n\t\t\t[n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container, anchor, namespace, n2.el, n2.anchor);\n\t\t};\n\t\tconst moveStaticNode = ({ el, anchor }, container, nextSibling) => {\n\t\t\tlet next;\n\t\t\twhile (el && el !== anchor) {\n\t\t\t\tnext = hostNextSibling(el);\n\t\t\t\thostInsert(el, container, nextSibling);\n\t\t\t\tel = next;\n\t\t\t}\n\t\t\thostInsert(anchor, container, nextSibling);\n\t\t};\n\t\tconst removeStaticNode = ({ el, anchor }) => {\n\t\t\tlet next;\n\t\t\twhile (el && el !== anchor) {\n\t\t\t\tnext = hostNextSibling(el);\n\t\t\t\thostRemove(el);\n\t\t\t\tel = next;\n\t\t\t}\n\t\t\thostRemove(anchor);\n\t\t};\n\t\tconst processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n\t\t\tif (n2.type === \"svg\") namespace = \"svg\";\n\t\t\telse if (n2.type === \"math\") namespace = \"mathml\";\n\t\t\tif (n1 == null) mountElement(n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\telse {\n\t\t\t\tconst customElement = n1.el && n1.el._isVueCE ? n1.el : null;\n\t\t\t\ttry {\n\t\t\t\t\tif (customElement) customElement._beginPatch();\n\t\t\t\t\tpatchElement(n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\t\t} finally {\n\t\t\t\t\tif (customElement) customElement._endPatch();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tconst mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n\t\t\tlet el;\n\t\t\tlet vnodeHook;\n\t\t\tconst { props, shapeFlag, transition, dirs } = vnode;\n\t\t\tel = vnode.el = hostCreateElement(vnode.type, namespace, props && props.is, props);\n\t\t\tif (shapeFlag & 8) hostSetElementText(el, vnode.children);\n\t\t\telse if (shapeFlag & 16) mountChildren(vnode.children, el, null, parentComponent, parentSuspense, resolveChildrenNamespace(vnode, namespace), slotScopeIds, optimized);\n\t\t\tif (dirs) invokeDirectiveHook(vnode, null, parentComponent, \"created\");\n\t\t\tsetScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);\n\t\t\tif (props) {\n\t\t\t\tfor (const key in props) if (key !== \"value\" && !isReservedProp(key)) hostPatchProp(el, key, null, props[key], namespace, parentComponent);\n\t\t\t\tif (\"value\" in props) hostPatchProp(el, \"value\", null, props.value, namespace);\n\t\t\t\tif (vnodeHook = props.onVnodeBeforeMount) invokeVNodeHook(vnodeHook, parentComponent, vnode);\n\t\t\t}\n\t\t\tif (dirs) invokeDirectiveHook(vnode, null, parentComponent, \"beforeMount\");\n\t\t\tconst needCallTransitionHooks = needTransition(parentSuspense, transition);\n\t\t\tif (needCallTransitionHooks) transition.beforeEnter(el);\n\t\t\thostInsert(el, container, anchor);\n\t\t\tif ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) queuePostRenderEffect(() => {\n\t\t\t\ttry {\n\t\t\t\t\tvnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);\n\t\t\t\t\tneedCallTransitionHooks && transition.enter(el);\n\t\t\t\t\tdirs && invokeDirectiveHook(vnode, null, parentComponent, \"mounted\");\n\t\t\t\t} finally {}\n\t\t\t}, parentSuspense);\n\t\t};\n\t\tconst setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => {\n\t\t\tif (scopeId) hostSetScopeId(el, scopeId);\n\t\t\tif (slotScopeIds) for (let i = 0; i < slotScopeIds.length; i++) hostSetScopeId(el, slotScopeIds[i]);\n\t\t\tif (parentComponent) {\n\t\t\t\tlet subTree = parentComponent.subTree;\n\t\t\t\tif (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) {\n\t\t\t\t\tconst parentVNode = parentComponent.vnode;\n\t\t\t\t\tsetScopeId(el, parentVNode, parentVNode.scopeId, parentVNode.slotScopeIds, parentComponent.parent);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tconst mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {\n\t\t\tfor (let i = start; i < children.length; i++) {\n\t\t\t\tconst child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);\n\t\t\t\tpatch(null, child, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\t}\n\t\t};\n\t\tconst patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n\t\t\tconst el = n2.el = n1.el;\n\t\t\tlet { patchFlag, dynamicChildren, dirs } = n2;\n\t\t\tpatchFlag |= n1.patchFlag & 16;\n\t\t\tconst oldProps = n1.props || EMPTY_OBJ;\n\t\t\tconst newProps = n2.props || EMPTY_OBJ;\n\t\t\tlet vnodeHook;\n\t\t\tparentComponent && toggleRecurse(parentComponent, false);\n\t\t\tif (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);\n\t\t\tif (dirs) invokeDirectiveHook(n2, n1, parentComponent, \"beforeUpdate\");\n\t\t\tparentComponent && toggleRecurse(parentComponent, true);\n\t\t\tif (dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)) {\n\t\t\t\tpatchFlag = 0;\n\t\t\t\toptimized = false;\n\t\t\t\tdynamicChildren = null;\n\t\t\t}\n\t\t\tif (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) hostSetElementText(el, \"\");\n\t\t\tif (dynamicChildren) patchBlockChildren(n1.dynamicChildren, dynamicChildren, el, parentComponent, parentSuspense, resolveChildrenNamespace(n2, namespace), slotScopeIds);\n\t\t\telse if (!optimized) patchChildren(n1, n2, el, null, parentComponent, parentSuspense, resolveChildrenNamespace(n2, namespace), slotScopeIds, false);\n\t\t\tif (patchFlag > 0) {\n\t\t\t\tif (patchFlag & 16) patchProps(el, oldProps, newProps, parentComponent, namespace);\n\t\t\t\telse {\n\t\t\t\t\tif (patchFlag & 2) {\n\t\t\t\t\t\tif (oldProps.class !== newProps.class) hostPatchProp(el, \"class\", null, newProps.class, namespace);\n\t\t\t\t\t}\n\t\t\t\t\tif (patchFlag & 4) hostPatchProp(el, \"style\", oldProps.style, newProps.style, namespace);\n\t\t\t\t\tif (patchFlag & 8) {\n\t\t\t\t\t\tconst propsToUpdate = n2.dynamicProps;\n\t\t\t\t\t\tfor (let i = 0; i < propsToUpdate.length; i++) {\n\t\t\t\t\t\t\tconst key = propsToUpdate[i];\n\t\t\t\t\t\t\tconst prev = oldProps[key];\n\t\t\t\t\t\t\tconst next = newProps[key];\n\t\t\t\t\t\t\tif (next !== prev || key === \"value\") hostPatchProp(el, key, prev, next, namespace, parentComponent);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (patchFlag & 1) {\n\t\t\t\t\tif (n1.children !== n2.children) hostSetElementText(el, n2.children);\n\t\t\t\t}\n\t\t\t} else if (!optimized && dynamicChildren == null) patchProps(el, oldProps, newProps, parentComponent, namespace);\n\t\t\tif ((vnodeHook = newProps.onVnodeUpdated) || dirs) queuePostRenderEffect(() => {\n\t\t\t\tvnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);\n\t\t\t\tdirs && invokeDirectiveHook(n2, n1, parentComponent, \"updated\");\n\t\t\t}, parentSuspense);\n\t\t};\n\t\tconst patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => {\n\t\t\tfor (let i = 0; i < newChildren.length; i++) {\n\t\t\t\tconst oldVNode = oldChildren[i];\n\t\t\t\tconst newVNode = newChildren[i];\n\t\t\t\tconst container = oldVNode.el && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldVNode.el) : fallbackContainer;\n\t\t\t\tpatch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);\n\t\t\t}\n\t\t};\n\t\tconst patchProps = (el, oldProps, newProps, parentComponent, namespace) => {\n\t\t\tif (oldProps !== newProps) {\n\t\t\t\tif (oldProps !== EMPTY_OBJ) {\n\t\t\t\t\tfor (const key in oldProps) if (!isReservedProp(key) && !(key in newProps)) hostPatchProp(el, key, oldProps[key], null, namespace, parentComponent);\n\t\t\t\t}\n\t\t\t\tfor (const key in newProps) {\n\t\t\t\t\tif (isReservedProp(key)) continue;\n\t\t\t\t\tconst next = newProps[key];\n\t\t\t\t\tconst prev = oldProps[key];\n\t\t\t\t\tif (next !== prev && key !== \"value\") hostPatchProp(el, key, prev, next, namespace, parentComponent);\n\t\t\t\t}\n\t\t\t\tif (\"value\" in newProps) hostPatchProp(el, \"value\", oldProps.value, newProps.value, namespace);\n\t\t\t}\n\t\t};\n\t\tconst processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n\t\t\tconst fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(\"\");\n\t\t\tconst fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(\"\");\n\t\t\tlet { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2;\n\t\t\tif (fragmentSlotScopeIds) slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;\n\t\t\tif (n1 == null) {\n\t\t\t\thostInsert(fragmentStartAnchor, container, anchor);\n\t\t\t\thostInsert(fragmentEndAnchor, container, anchor);\n\t\t\t\tmountChildren(n2.children || [], container, fragmentEndAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\t} else if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && n1.dynamicChildren && n1.dynamicChildren.length === dynamicChildren.length) {\n\t\t\t\tpatchBlockChildren(n1.dynamicChildren, dynamicChildren, container, parentComponent, parentSuspense, namespace, slotScopeIds);\n\t\t\t\tif (n2.key != null || parentComponent && n2 === parentComponent.subTree) traverseStaticChildren(n1, n2, true);\n\t\t\t} else patchChildren(n1, n2, container, fragmentEndAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t};\n\t\tconst processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n\t\t\tn2.slotScopeIds = slotScopeIds;\n\t\t\tif (n1 == null) if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);\n\t\t\telse mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);\n\t\t\telse updateComponent(n1, n2, optimized);\n\t\t};\n\t\tconst mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {\n\t\t\tconst instance = initialVNode.component = createComponentInstance(initialVNode, parentComponent, parentSuspense);\n\t\t\tif (isKeepAlive(initialVNode)) instance.ctx.renderer = internals;\n\t\t\tsetupComponent(instance, false, optimized);\n\t\t\tif (instance.asyncDep) {\n\t\t\t\tparentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);\n\t\t\t\tif (!initialVNode.el) {\n\t\t\t\t\tconst placeholder = instance.subTree = createVNode(Comment);\n\t\t\t\t\tprocessCommentNode(null, placeholder, container, anchor);\n\t\t\t\t\tinitialVNode.placeholder = placeholder.el;\n\t\t\t\t}\n\t\t\t} else setupRenderEffect(instance, initialVNode, container, anchor, parentSuspense, namespace, optimized);\n\t\t};\n\t\tconst updateComponent = (n1, n2, optimized) => {\n\t\t\tconst instance = n2.component = n1.component;\n\t\t\tif (shouldUpdateComponent(n1, n2, optimized)) if (instance.asyncDep && !instance.asyncResolved) {\n\t\t\t\tupdateComponentPreRender(instance, n2, optimized);\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tinstance.next = n2;\n\t\t\t\tinstance.update();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tn2.el = n1.el;\n\t\t\t\tinstance.vnode = n2;\n\t\t\t}\n\t\t};\n\t\tconst setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => {\n\t\t\tconst componentUpdateFn = () => {\n\t\t\t\tif (!instance.isMounted) {\n\t\t\t\t\tlet vnodeHook;\n\t\t\t\t\tconst { el, props } = initialVNode;\n\t\t\t\t\tconst { bm, m, parent, root, type } = instance;\n\t\t\t\t\tconst isAsyncWrapperVNode = isAsyncWrapper(initialVNode);\n\t\t\t\t\ttoggleRecurse(instance, false);\n\t\t\t\t\tif (bm) invokeArrayFns(bm);\n\t\t\t\t\tif (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) invokeVNodeHook(vnodeHook, parent, initialVNode);\n\t\t\t\t\ttoggleRecurse(instance, true);\n\t\t\t\t\tif (el && hydrateNode) {\n\t\t\t\t\t\tconst hydrateSubTree = () => {\n\t\t\t\t\t\t\tinstance.subTree = renderComponentRoot(instance);\n\t\t\t\t\t\t\thydrateNode(el, instance.subTree, instance, parentSuspense, null);\n\t\t\t\t\t\t};\n\t\t\t\t\t\tif (isAsyncWrapperVNode && type.__asyncHydrate) type.__asyncHydrate(el, instance, hydrateSubTree);\n\t\t\t\t\t\telse hydrateSubTree();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (root.ce && root.ce._hasShadowRoot()) root.ce._injectChildStyle(type, instance.parent ? instance.parent.type : void 0);\n\t\t\t\t\t\tconst subTree = instance.subTree = renderComponentRoot(instance);\n\t\t\t\t\t\tpatch(null, subTree, container, anchor, instance, parentSuspense, namespace);\n\t\t\t\t\t\tinitialVNode.el = subTree.el;\n\t\t\t\t\t}\n\t\t\t\t\tif (m) queuePostRenderEffect(m, parentSuspense);\n\t\t\t\t\tif (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) {\n\t\t\t\t\t\tconst scopedInitialVNode = initialVNode;\n\t\t\t\t\t\tqueuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), parentSuspense);\n\t\t\t\t\t}\n\t\t\t\t\tif (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) instance.a && queuePostRenderEffect(instance.a, parentSuspense);\n\t\t\t\t\tinstance.isMounted = true;\n\t\t\t\t\tinitialVNode = container = anchor = null;\n\t\t\t\t} else {\n\t\t\t\t\tlet { next, bu, u, parent, vnode } = instance;\n\t\t\t\t\t{\n\t\t\t\t\t\tconst nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance);\n\t\t\t\t\t\tif (nonHydratedAsyncRoot) {\n\t\t\t\t\t\t\tif (next) {\n\t\t\t\t\t\t\t\tnext.el = vnode.el;\n\t\t\t\t\t\t\t\tupdateComponentPreRender(instance, next, optimized);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tnonHydratedAsyncRoot.asyncDep.then(() => {\n\t\t\t\t\t\t\t\tqueuePostRenderEffect(() => {\n\t\t\t\t\t\t\t\t\tif (!instance.isUnmounted) update();\n\t\t\t\t\t\t\t\t}, parentSuspense);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlet originNext = next;\n\t\t\t\t\tlet vnodeHook;\n\t\t\t\t\ttoggleRecurse(instance, false);\n\t\t\t\t\tif (next) {\n\t\t\t\t\t\tnext.el = vnode.el;\n\t\t\t\t\t\tupdateComponentPreRender(instance, next, optimized);\n\t\t\t\t\t} else next = vnode;\n\t\t\t\t\tif (bu) invokeArrayFns(bu);\n\t\t\t\t\tif (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parent, next, vnode);\n\t\t\t\t\ttoggleRecurse(instance, true);\n\t\t\t\t\tconst nextTree = renderComponentRoot(instance);\n\t\t\t\t\tconst prevTree = instance.subTree;\n\t\t\t\t\tinstance.subTree = nextTree;\n\t\t\t\t\tpatch(prevTree, nextTree, hostParentNode(prevTree.el), getNextHostNode(prevTree), instance, parentSuspense, namespace);\n\t\t\t\t\tnext.el = nextTree.el;\n\t\t\t\t\tif (originNext === null) updateHOCHostEl(instance, nextTree.el);\n\t\t\t\t\tif (u) queuePostRenderEffect(u, parentSuspense);\n\t\t\t\t\tif (vnodeHook = next.props && next.props.onVnodeUpdated) queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), parentSuspense);\n\t\t\t\t}\n\t\t\t};\n\t\t\tinstance.scope.on();\n\t\t\tconst effect = instance.effect = new ReactiveEffect(componentUpdateFn);\n\t\t\tinstance.scope.off();\n\t\t\tconst update = instance.update = effect.run.bind(effect);\n\t\t\tconst job = instance.job = effect.runIfDirty.bind(effect);\n\t\t\tjob.i = instance;\n\t\t\tjob.id = instance.uid;\n\t\t\teffect.scheduler = () => queueJob(job);\n\t\t\ttoggleRecurse(instance, true);\n\t\t\tupdate();\n\t\t};\n\t\tconst updateComponentPreRender = (instance, nextVNode, optimized) => {\n\t\t\tnextVNode.component = instance;\n\t\t\tconst prevProps = instance.vnode.props;\n\t\t\tinstance.vnode = nextVNode;\n\t\t\tinstance.next = null;\n\t\t\tupdateProps(instance, nextVNode.props, prevProps, optimized);\n\t\t\tupdateSlots(instance, nextVNode.children, optimized);\n\t\t\tpauseTracking();\n\t\t\tflushPreFlushCbs(instance);\n\t\t\tresetTracking();\n\t\t};\n\t\tconst patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => {\n\t\t\tconst c1 = n1 && n1.children;\n\t\t\tconst prevShapeFlag = n1 ? n1.shapeFlag : 0;\n\t\t\tconst c2 = n2.children;\n\t\t\tconst { patchFlag, shapeFlag } = n2;\n\t\t\tif (patchFlag > 0) {\n\t\t\t\tif (patchFlag & 128) {\n\t\t\t\t\tpatchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\t\t\treturn;\n\t\t\t\t} else if (patchFlag & 256) {\n\t\t\t\t\tpatchUnkeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (shapeFlag & 8) {\n\t\t\t\tif (prevShapeFlag & 16) unmountChildren(c1, parentComponent, parentSuspense);\n\t\t\t\tif (c2 !== c1) hostSetElementText(container, c2);\n\t\t\t} else if (prevShapeFlag & 16) if (shapeFlag & 16) patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\telse unmountChildren(c1, parentComponent, parentSuspense, true);\n\t\t\telse {\n\t\t\t\tif (prevShapeFlag & 8) hostSetElementText(container, \"\");\n\t\t\t\tif (shapeFlag & 16) mountChildren(c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\t}\n\t\t};\n\t\tconst patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n\t\t\tc1 = c1 || EMPTY_ARR;\n\t\t\tc2 = c2 || EMPTY_ARR;\n\t\t\tconst oldLength = c1.length;\n\t\t\tconst newLength = c2.length;\n\t\t\tconst commonLength = Math.min(oldLength, newLength);\n\t\t\tlet i;\n\t\t\tfor (i = 0; i < commonLength; i++) {\n\t\t\t\tconst nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);\n\t\t\t\tpatch(c1[i], nextChild, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\t}\n\t\t\tif (oldLength > newLength) unmountChildren(c1, parentComponent, parentSuspense, true, false, commonLength);\n\t\t\telse mountChildren(c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, commonLength);\n\t\t};\n\t\tconst patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n\t\t\tlet i = 0;\n\t\t\tconst l2 = c2.length;\n\t\t\tlet e1 = c1.length - 1;\n\t\t\tlet e2 = l2 - 1;\n\t\t\twhile (i <= e1 && i <= e2) {\n\t\t\t\tconst n1 = c1[i];\n\t\t\t\tconst n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);\n\t\t\t\tif (isSameVNodeType(n1, n2)) patch(n1, n2, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\t\telse break;\n\t\t\t\ti++;\n\t\t\t}\n\t\t\twhile (i <= e1 && i <= e2) {\n\t\t\t\tconst n1 = c1[e1];\n\t\t\t\tconst n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]);\n\t\t\t\tif (isSameVNodeType(n1, n2)) patch(n1, n2, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\t\telse break;\n\t\t\t\te1--;\n\t\t\t\te2--;\n\t\t\t}\n\t\t\tif (i > e1) {\n\t\t\t\tif (i <= e2) {\n\t\t\t\t\tconst nextPos = e2 + 1;\n\t\t\t\t\tconst anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor;\n\t\t\t\t\twhile (i <= e2) {\n\t\t\t\t\t\tpatch(null, c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]), container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (i > e2) while (i <= e1) {\n\t\t\t\tunmount(c1[i], parentComponent, parentSuspense, true);\n\t\t\t\ti++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tconst s1 = i;\n\t\t\t\tconst s2 = i;\n\t\t\t\tconst keyToNewIndexMap = /* @__PURE__ */ new Map();\n\t\t\t\tfor (i = s2; i <= e2; i++) {\n\t\t\t\t\tconst nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);\n\t\t\t\t\tif (nextChild.key != null) keyToNewIndexMap.set(nextChild.key, i);\n\t\t\t\t}\n\t\t\t\tlet j;\n\t\t\t\tlet patched = 0;\n\t\t\t\tconst toBePatched = e2 - s2 + 1;\n\t\t\t\tlet moved = false;\n\t\t\t\tlet maxNewIndexSoFar = 0;\n\t\t\t\tconst newIndexToOldIndexMap = new Array(toBePatched);\n\t\t\t\tfor (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0;\n\t\t\t\tfor (i = s1; i <= e1; i++) {\n\t\t\t\t\tconst prevChild = c1[i];\n\t\t\t\t\tif (patched >= toBePatched) {\n\t\t\t\t\t\tunmount(prevChild, parentComponent, parentSuspense, true);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tlet newIndex;\n\t\t\t\t\tif (prevChild.key != null) newIndex = keyToNewIndexMap.get(prevChild.key);\n\t\t\t\t\telse for (j = s2; j <= e2; j++) if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) {\n\t\t\t\t\t\tnewIndex = j;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (newIndex === void 0) unmount(prevChild, parentComponent, parentSuspense, true);\n\t\t\t\t\telse {\n\t\t\t\t\t\tnewIndexToOldIndexMap[newIndex - s2] = i + 1;\n\t\t\t\t\t\tif (newIndex >= maxNewIndexSoFar) maxNewIndexSoFar = newIndex;\n\t\t\t\t\t\telse moved = true;\n\t\t\t\t\t\tpatch(prevChild, c2[newIndex], container, null, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\t\t\t\tpatched++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR;\n\t\t\t\tj = increasingNewIndexSequence.length - 1;\n\t\t\t\tfor (i = toBePatched - 1; i >= 0; i--) {\n\t\t\t\t\tconst nextIndex = s2 + i;\n\t\t\t\t\tconst nextChild = c2[nextIndex];\n\t\t\t\t\tconst anchorVNode = c2[nextIndex + 1];\n\t\t\t\t\tconst anchor = nextIndex + 1 < l2 ? anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode) : parentAnchor;\n\t\t\t\t\tif (newIndexToOldIndexMap[i] === 0) patch(null, nextChild, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);\n\t\t\t\t\telse if (moved) if (j < 0 || i !== increasingNewIndexSequence[j]) move(nextChild, container, anchor, 2);\n\t\t\t\t\telse j--;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tconst move = (vnode, container, anchor, moveType, parentSuspense = null) => {\n\t\t\tconst { el, type, transition, children, shapeFlag } = vnode;\n\t\t\tif (shapeFlag & 6) {\n\t\t\t\tmove(vnode.component.subTree, container, anchor, moveType);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (shapeFlag & 128) {\n\t\t\t\tvnode.suspense.move(container, anchor, moveType);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (shapeFlag & 64) {\n\t\t\t\ttype.move(vnode, container, anchor, internals);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (type === Fragment) {\n\t\t\t\thostInsert(el, container, anchor);\n\t\t\t\tfor (let i = 0; i < children.length; i++) move(children[i], container, anchor, moveType);\n\t\t\t\thostInsert(vnode.anchor, container, anchor);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (type === Static) {\n\t\t\t\tmoveStaticNode(vnode, container, anchor);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (moveType !== 2 && shapeFlag & 1 && transition) if (moveType === 0) if (transition.persisted && !el[leaveCbKey]) hostInsert(el, container, anchor);\n\t\t\telse {\n\t\t\t\ttransition.beforeEnter(el);\n\t\t\t\thostInsert(el, container, anchor);\n\t\t\t\tqueuePostRenderEffect(() => transition.enter(el), parentSuspense);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tconst { leave, delayLeave, afterLeave } = transition;\n\t\t\t\tconst remove2 = () => {\n\t\t\t\t\tif (vnode.ctx.isUnmounted) hostRemove(el);\n\t\t\t\t\telse hostInsert(el, container, anchor);\n\t\t\t\t};\n\t\t\t\tconst performLeave = () => {\n\t\t\t\t\tconst wasLeaving = el._isLeaving || !!el[leaveCbKey];\n\t\t\t\t\tif (el._isLeaving) el[leaveCbKey](true);\n\t\t\t\t\tif (transition.persisted && !wasLeaving) remove2();\n\t\t\t\t\telse leave(el, () => {\n\t\t\t\t\t\tremove2();\n\t\t\t\t\t\tafterLeave && afterLeave();\n\t\t\t\t\t});\n\t\t\t\t};\n\t\t\t\tif (delayLeave) delayLeave(el, remove2, performLeave);\n\t\t\t\telse performLeave();\n\t\t\t}\n\t\t\telse hostInsert(el, container, anchor);\n\t\t};\n\t\tconst unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {\n\t\t\tconst { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs, cacheIndex, memo } = vnode;\n\t\t\tif (patchFlag === -2) optimized = false;\n\t\t\tif (ref != null) {\n\t\t\t\tpauseTracking();\n\t\t\t\tsetRef(ref, null, parentSuspense, vnode, true);\n\t\t\t\tresetTracking();\n\t\t\t}\n\t\t\tif (cacheIndex != null) parentComponent.renderCache[cacheIndex] = void 0;\n\t\t\tif (shapeFlag & 256) {\n\t\t\t\tparentComponent.ctx.deactivate(vnode);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst shouldInvokeDirs = shapeFlag & 1 && dirs;\n\t\t\tconst shouldInvokeVnodeHook = !isAsyncWrapper(vnode);\n\t\t\tlet vnodeHook;\n\t\t\tif (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) invokeVNodeHook(vnodeHook, parentComponent, vnode);\n\t\t\tif (shapeFlag & 6) unmountComponent(vnode.component, parentSuspense, doRemove);\n\t\t\telse {\n\t\t\t\tif (shapeFlag & 128) {\n\t\t\t\t\tvnode.suspense.unmount(parentSuspense, doRemove);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (shouldInvokeDirs) invokeDirectiveHook(vnode, null, parentComponent, \"beforeUnmount\");\n\t\t\t\tif (shapeFlag & 64) vnode.type.remove(vnode, parentComponent, parentSuspense, internals, doRemove);\n\t\t\t\telse if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);\n\t\t\t\telse if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);\n\t\t\t\tif (doRemove) remove(vnode);\n\t\t\t}\n\t\t\tconst shouldInvalidateMemo = memo != null && cacheIndex == null;\n\t\t\tif (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs || shouldInvalidateMemo) queuePostRenderEffect(() => {\n\t\t\t\tvnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);\n\t\t\t\tshouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, \"unmounted\");\n\t\t\t\tif (shouldInvalidateMemo) vnode.el = null;\n\t\t\t}, parentSuspense);\n\t\t};\n\t\tconst remove = (vnode) => {\n\t\t\tconst { type, el, anchor, transition } = vnode;\n\t\t\tif (type === Fragment) {\n\t\t\t\tremoveFragment(el, anchor);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (type === Static) {\n\t\t\t\tremoveStaticNode(vnode);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst performRemove = () => {\n\t\t\t\thostRemove(el);\n\t\t\t\tif (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();\n\t\t\t};\n\t\t\tif (vnode.shapeFlag & 1 && transition && !transition.persisted) {\n\t\t\t\tconst { leave, delayLeave } = transition;\n\t\t\t\tconst performLeave = () => leave(el, performRemove);\n\t\t\t\tif (delayLeave) delayLeave(vnode.el, performRemove, performLeave);\n\t\t\t\telse performLeave();\n\t\t\t} else performRemove();\n\t\t};\n\t\tconst removeFragment = (cur, end) => {\n\t\t\tlet next;\n\t\t\twhile (cur !== end) {\n\t\t\t\tnext = hostNextSibling(cur);\n\t\t\t\thostRemove(cur);\n\t\t\t\tcur = next;\n\t\t\t}\n\t\t\thostRemove(end);\n\t\t};\n\t\tconst unmountComponent = (instance, parentSuspense, doRemove) => {\n\t\t\tconst { bum, scope, job, subTree, um, m, a } = instance;\n\t\t\tinvalidateMount(m);\n\t\t\tinvalidateMount(a);\n\t\t\tif (bum) invokeArrayFns(bum);\n\t\t\tscope.stop();\n\t\t\tif (job) {\n\t\t\t\tjob.flags |= 8;\n\t\t\t\tunmount(subTree, instance, parentSuspense, doRemove);\n\t\t\t}\n\t\t\tif (um) queuePostRenderEffect(um, parentSuspense);\n\t\t\tqueuePostRenderEffect(() => {\n\t\t\t\tinstance.isUnmounted = true;\n\t\t\t}, parentSuspense);\n\t\t};\n\t\tconst unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {\n\t\t\tfor (let i = start; i < children.length; i++) unmount(children[i], parentComponent, parentSuspense, doRemove, optimized);\n\t\t};\n\t\tconst getNextHostNode = (vnode) => {\n\t\t\tif (vnode.shapeFlag & 6) return getNextHostNode(vnode.component.subTree);\n\t\t\tif (vnode.shapeFlag & 128) return vnode.suspense.next();\n\t\t\tconst el = hostNextSibling(vnode.anchor || vnode.el);\n\t\t\tconst teleportEnd = el && el[TeleportEndKey];\n\t\t\treturn teleportEnd ? hostNextSibling(teleportEnd) : el;\n\t\t};\n\t\tlet isFlushing = false;\n\t\tconst render = (vnode, container, namespace) => {\n\t\t\tlet instance;\n\t\t\tif (vnode == null) {\n\t\t\t\tif (container._vnode) {\n\t\t\t\t\tunmount(container._vnode, null, null, true);\n\t\t\t\t\tinstance = container._vnode.component;\n\t\t\t\t}\n\t\t\t} else patch(container._vnode || null, vnode, container, null, null, null, namespace);\n\t\t\tcontainer._vnode = vnode;\n\t\t\tif (!isFlushing) {\n\t\t\t\tisFlushing = true;\n\t\t\t\tflushPreFlushCbs(instance);\n\t\t\t\tflushPostFlushCbs();\n\t\t\t\tisFlushing = false;\n\t\t\t}\n\t\t};\n\t\tconst internals = {\n\t\t\tp: patch,\n\t\t\tum: unmount,\n\t\t\tm: move,\n\t\t\tr: remove,\n\t\t\tmt: mountComponent,\n\t\t\tmc: mountChildren,\n\t\t\tpc: patchChildren,\n\t\t\tpbc: patchBlockChildren,\n\t\t\tn: getNextHostNode,\n\t\t\to: options\n\t\t};\n\t\tlet hydrate;\n\t\tlet hydrateNode;\n\t\tif (createHydrationFns) [hydrate, hydrateNode] = createHydrationFns(internals);\n\t\treturn {\n\t\t\trender,\n\t\t\thydrate,\n\t\t\tcreateApp: createAppAPI(render, hydrate)\n\t\t};\n\t}\n\tfunction resolveChildrenNamespace({ type, props }, currentNamespace) {\n\t\treturn currentNamespace === \"svg\" && type === \"foreignObject\" || currentNamespace === \"mathml\" && type === \"annotation-xml\" && props && props.encoding && props.encoding.includes(\"html\") ? void 0 : currentNamespace;\n\t}\n\tfunction toggleRecurse({ effect, job }, allowed) {\n\t\tif (allowed) {\n\t\t\teffect.flags |= 32;\n\t\t\tjob.flags |= 4;\n\t\t} else {\n\t\t\teffect.flags &= -33;\n\t\t\tjob.flags &= -5;\n\t\t}\n\t}\n\tfunction needTransition(parentSuspense, transition) {\n\t\treturn (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;\n\t}\n\tfunction traverseStaticChildren(n1, n2, shallow = false) {\n\t\tconst ch1 = n1.children;\n\t\tconst ch2 = n2.children;\n\t\tif (isArray(ch1) && isArray(ch2)) for (let i = 0; i < ch1.length; i++) {\n\t\t\tconst c1 = ch1[i];\n\t\t\tlet c2 = ch2[i];\n\t\t\tif (c2.shapeFlag & 1 && !c2.dynamicChildren) {\n\t\t\t\tif (c2.patchFlag <= 0 || c2.patchFlag === 32) {\n\t\t\t\t\tc2 = ch2[i] = cloneIfMounted(ch2[i]);\n\t\t\t\t\tc2.el = c1.el;\n\t\t\t\t}\n\t\t\t\tif (!shallow && c2.patchFlag !== -2) traverseStaticChildren(c1, c2);\n\t\t\t}\n\t\t\tif (c2.type === Text) {\n\t\t\t\tif (c2.patchFlag === -1) c2 = ch2[i] = cloneIfMounted(c2);\n\t\t\t\tc2.el = c1.el;\n\t\t\t}\n\t\t\tif (c2.type === Comment && !c2.el) c2.el = c1.el;\n\t\t}\n\t}\n\tfunction getSequence(arr) {\n\t\tconst p = arr.slice();\n\t\tconst result = [0];\n\t\tlet i, j, u, v, c;\n\t\tconst len = arr.length;\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tconst arrI = arr[i];\n\t\t\tif (arrI !== 0) {\n\t\t\t\tj = result[result.length - 1];\n\t\t\t\tif (arr[j] < arrI) {\n\t\t\t\t\tp[i] = j;\n\t\t\t\t\tresult.push(i);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tu = 0;\n\t\t\t\tv = result.length - 1;\n\t\t\t\twhile (u < v) {\n\t\t\t\t\tc = u + v >> 1;\n\t\t\t\t\tif (arr[result[c]] < arrI) u = c + 1;\n\t\t\t\t\telse v = c;\n\t\t\t\t}\n\t\t\t\tif (arrI < arr[result[u]]) {\n\t\t\t\t\tif (u > 0) p[i] = result[u - 1];\n\t\t\t\t\tresult[u] = i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tu = result.length;\n\t\tv = result[u - 1];\n\t\twhile (u-- > 0) {\n\t\t\tresult[u] = v;\n\t\t\tv = p[v];\n\t\t}\n\t\treturn result;\n\t}\n\tfunction locateNonHydratedAsyncRoot(instance) {\n\t\tconst subComponent = instance.subTree.component;\n\t\tif (subComponent) if (subComponent.asyncDep && !subComponent.asyncResolved) return subComponent;\n\t\telse return locateNonHydratedAsyncRoot(subComponent);\n\t}\n\tfunction invalidateMount(hooks) {\n\t\tif (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 8;\n\t}\n\tfunction resolveAsyncComponentPlaceholder(anchorVnode) {\n\t\tif (anchorVnode.placeholder) return anchorVnode.placeholder;\n\t\tconst instance = anchorVnode.component;\n\t\tif (instance) return resolveAsyncComponentPlaceholder(instance.subTree);\n\t\treturn null;\n\t}\n\tfunction queueEffectWithSuspense(fn, suspense) {\n\t\tif (suspense && suspense.pendingBranch) if (isArray(fn)) suspense.effects.push(...fn);\n\t\telse suspense.effects.push(fn);\n\t\telse queuePostFlushCb(fn);\n\t}\n\tfunction openBlock(disableTracking = false) {\n\t\tblockStack.push(currentBlock = disableTracking ? null : []);\n\t}\n\tfunction closeBlock() {\n\t\tblockStack.pop();\n\t\tcurrentBlock = blockStack[blockStack.length - 1] || null;\n\t}\n\tfunction setBlockTracking(value, inVOnce = false) {\n\t\tisBlockTreeEnabled += value;\n\t\tif (value < 0 && currentBlock && inVOnce) currentBlock.hasOnce = true;\n\t}\n\tfunction setupBlock(vnode) {\n\t\tvnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null;\n\t\tcloseBlock();\n\t\tif (isBlockTreeEnabled > 0 && currentBlock) currentBlock.push(vnode);\n\t\treturn vnode;\n\t}\n\tfunction createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) {\n\t\treturn setupBlock(createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, true));\n\t}\n\tfunction createBlock(type, props, children, patchFlag, dynamicProps) {\n\t\treturn setupBlock(createVNode(type, props, children, patchFlag, dynamicProps, true));\n\t}\n\tfunction isVNode(value) {\n\t\treturn value ? value.__v_isVNode === true : false;\n\t}\n\tfunction isSameVNodeType(n1, n2) {\n\t\treturn n1.type === n2.type && n1.key === n2.key;\n\t}\n\tfunction createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) {\n\t\tconst vnode = {\n\t\t\t__v_isVNode: true,\n\t\t\t__v_skip: true,\n\t\t\ttype,\n\t\t\tprops,\n\t\t\tkey: props && normalizeKey(props),\n\t\t\tref: props && normalizeRef(props),\n\t\t\tscopeId: currentScopeId,\n\t\t\tslotScopeIds: null,\n\t\t\tchildren,\n\t\t\tcomponent: null,\n\t\t\tsuspense: null,\n\t\t\tssContent: null,\n\t\t\tssFallback: null,\n\t\t\tdirs: null,\n\t\t\ttransition: null,\n\t\t\tel: null,\n\t\t\tanchor: null,\n\t\t\ttarget: null,\n\t\t\ttargetStart: null,\n\t\t\ttargetAnchor: null,\n\t\t\tstaticCount: 0,\n\t\t\tshapeFlag,\n\t\t\tpatchFlag,\n\t\t\tdynamicProps,\n\t\t\tdynamicChildren: null,\n\t\t\tappContext: null,\n\t\t\tctx: currentRenderingInstance\n\t\t};\n\t\tif (needFullChildrenNormalization) {\n\t\t\tnormalizeChildren(vnode, children);\n\t\t\tif (shapeFlag & 128) type.normalize(vnode);\n\t\t} else if (children) vnode.shapeFlag |= isString(children) ? 8 : 16;\n\t\tif (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock && (vnode.patchFlag > 0 || shapeFlag & 6) && vnode.patchFlag !== 32) currentBlock.push(vnode);\n\t\treturn vnode;\n\t}\n\tfunction _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {\n\t\tif (!type || type === NULL_DYNAMIC_COMPONENT) type = Comment;\n\t\tif (isVNode(type)) {\n\t\t\tconst cloned = cloneVNode(type, props, true);\n\t\t\tif (children) normalizeChildren(cloned, children);\n\t\t\tif (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) if (cloned.shapeFlag & 6) currentBlock[currentBlock.indexOf(type)] = cloned;\n\t\t\telse currentBlock.push(cloned);\n\t\t\tcloned.patchFlag = -2;\n\t\t\treturn cloned;\n\t\t}\n\t\tif (isClassComponent(type)) type = type.__vccOpts;\n\t\tif (props) {\n\t\t\tprops = guardReactiveProps(props);\n\t\t\tlet { class: klass, style } = props;\n\t\t\tif (klass && !isString(klass)) props.class = normalizeClass(klass);\n\t\t\tif (isObject(style)) {\n\t\t\t\tif (/* @__PURE__ */ isProxy(style) && !isArray(style)) style = extend({}, style);\n\t\t\t\tprops.style = normalizeStyle(style);\n\t\t\t}\n\t\t}\n\t\tconst shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0;\n\t\treturn createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, isBlockNode, true);\n\t}\n\tfunction guardReactiveProps(props) {\n\t\tif (!props) return null;\n\t\treturn /* @__PURE__ */ isProxy(props) || isInternalObject(props) ? extend({}, props) : props;\n\t}\n\tfunction cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {\n\t\tconst { props, ref, patchFlag, children, transition } = vnode;\n\t\tconst mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;\n\t\tconst cloned = {\n\t\t\t__v_isVNode: true,\n\t\t\t__v_skip: true,\n\t\t\ttype: vnode.type,\n\t\t\tprops: mergedProps,\n\t\t\tkey: mergedProps && normalizeKey(mergedProps),\n\t\t\tref: extraProps && extraProps.ref ? mergeRef && ref ? isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) : ref,\n\t\t\tscopeId: vnode.scopeId,\n\t\t\tslotScopeIds: vnode.slotScopeIds,\n\t\t\tchildren,\n\t\t\ttarget: vnode.target,\n\t\t\ttargetStart: vnode.targetStart,\n\t\t\ttargetAnchor: vnode.targetAnchor,\n\t\t\tstaticCount: vnode.staticCount,\n\t\t\tshapeFlag: vnode.shapeFlag,\n\t\t\tpatchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag,\n\t\t\tdynamicProps: vnode.dynamicProps,\n\t\t\tdynamicChildren: vnode.dynamicChildren,\n\t\t\tappContext: vnode.appContext,\n\t\t\tdirs: vnode.dirs,\n\t\t\ttransition,\n\t\t\tcomponent: vnode.component,\n\t\t\tsuspense: vnode.suspense,\n\t\t\tssContent: vnode.ssContent && cloneVNode(vnode.ssContent),\n\t\t\tssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),\n\t\t\tplaceholder: vnode.placeholder,\n\t\t\tel: vnode.el,\n\t\t\tanchor: vnode.anchor,\n\t\t\tctx: vnode.ctx,\n\t\t\tce: vnode.ce\n\t\t};\n\t\tif (transition && cloneTransition) setTransitionHooks(cloned, transition.clone(cloned));\n\t\treturn cloned;\n\t}\n\tfunction createTextVNode(text = \" \", flag = 0) {\n\t\treturn createVNode(Text, null, text, flag);\n\t}\n\tfunction createStaticVNode(content, numberOfNodes) {\n\t\tconst vnode = createVNode(Static, null, content);\n\t\tvnode.staticCount = numberOfNodes;\n\t\treturn vnode;\n\t}\n\tfunction createCommentVNode(text = \"\", asBlock = false) {\n\t\treturn asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text);\n\t}\n\tfunction normalizeVNode(child) {\n\t\tif (child == null || typeof child === \"boolean\") return createVNode(Comment);\n\t\telse if (isArray(child)) return createVNode(Fragment, null, child.slice());\n\t\telse if (isVNode(child)) return cloneIfMounted(child);\n\t\telse return createVNode(Text, null, String(child));\n\t}\n\tfunction cloneIfMounted(child) {\n\t\treturn child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child);\n\t}\n\tfunction normalizeChildren(vnode, children) {\n\t\tlet type = 0;\n\t\tconst { shapeFlag } = vnode;\n\t\tif (children == null) children = null;\n\t\telse if (isArray(children)) type = 16;\n\t\telse if (typeof children === \"object\") if (shapeFlag & 65) {\n\t\t\tconst slot = children.default;\n\t\t\tif (slot) {\n\t\t\t\tslot._c && (slot._d = false);\n\t\t\t\tnormalizeChildren(vnode, slot());\n\t\t\t\tslot._c && (slot._d = true);\n\t\t\t}\n\t\t\treturn;\n\t\t} else {\n\t\t\ttype = 32;\n\t\t\tconst slotFlag = children._;\n\t\t\tif (!slotFlag && !isInternalObject(children)) children._ctx = currentRenderingInstance;\n\t\t\telse if (slotFlag === 3 && currentRenderingInstance) if (currentRenderingInstance.slots._ === 1) children._ = 1;\n\t\t\telse {\n\t\t\t\tchildren._ = 2;\n\t\t\t\tvnode.patchFlag |= 1024;\n\t\t\t}\n\t\t}\n\t\telse if (isFunction(children)) {\n\t\t\tif (shapeFlag & 65) {\n\t\t\t\tnormalizeChildren(vnode, { default: children });\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tchildren = {\n\t\t\t\tdefault: children,\n\t\t\t\t_ctx: currentRenderingInstance\n\t\t\t};\n\t\t\ttype = 32;\n\t\t} else {\n\t\t\tchildren = String(children);\n\t\t\tif (shapeFlag & 64) {\n\t\t\t\ttype = 16;\n\t\t\t\tchildren = [createTextVNode(children)];\n\t\t\t} else type = 8;\n\t\t}\n\t\tvnode.children = children;\n\t\tvnode.shapeFlag |= type;\n\t}\n\tfunction mergeProps(...args) {\n\t\tconst ret = {};\n\t\tfor (let i = 0; i < args.length; i++) {\n\t\t\tconst toMerge = args[i];\n\t\t\tfor (const key in toMerge) if (key === \"class\") {\n\t\t\t\tif (ret.class !== toMerge.class) ret.class = normalizeClass([ret.class, toMerge.class]);\n\t\t\t} else if (key === \"style\") ret.style = normalizeStyle([ret.style, toMerge.style]);\n\t\t\telse if (isOn(key)) {\n\t\t\t\tconst existing = ret[key];\n\t\t\t\tconst incoming = toMerge[key];\n\t\t\t\tif (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) ret[key] = existing ? [].concat(existing, incoming) : incoming;\n\t\t\t\telse if (incoming == null && existing == null && !isModelListener(key)) ret[key] = incoming;\n\t\t\t} else if (key !== \"\") ret[key] = toMerge[key];\n\t\t}\n\t\treturn ret;\n\t}\n\tfunction invokeVNodeHook(hook, instance, vnode, prevVNode = null) {\n\t\tcallWithAsyncErrorHandling(hook, instance, 7, [vnode, prevVNode]);\n\t}\n\tfunction createComponentInstance(vnode, parent, suspense) {\n\t\tconst type = vnode.type;\n\t\tconst appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;\n\t\tconst instance = {\n\t\t\tuid: uid++,\n\t\t\tvnode,\n\t\t\ttype,\n\t\t\tparent,\n\t\t\tappContext,\n\t\t\troot: null,\n\t\t\tnext: null,\n\t\t\tsubTree: null,\n\t\t\teffect: null,\n\t\t\tupdate: null,\n\t\t\tjob: null,\n\t\t\tscope: new EffectScope(true),\n\t\t\trender: null,\n\t\t\tproxy: null,\n\t\t\texposed: null,\n\t\t\texposeProxy: null,\n\t\t\twithProxy: null,\n\t\t\tprovides: parent ? parent.provides : Object.create(appContext.provides),\n\t\t\tids: parent ? parent.ids : [\n\t\t\t\t\"\",\n\t\t\t\t0,\n\t\t\t\t0\n\t\t\t],\n\t\t\taccessCache: null,\n\t\t\trenderCache: [],\n\t\t\tcomponents: null,\n\t\t\tdirectives: null,\n\t\t\tpropsOptions: normalizePropsOptions(type, appContext),\n\t\t\temitsOptions: normalizeEmitsOptions(type, appContext),\n\t\t\temit: null,\n\t\t\temitted: null,\n\t\t\tpropsDefaults: EMPTY_OBJ,\n\t\t\tinheritAttrs: type.inheritAttrs,\n\t\t\tctx: EMPTY_OBJ,\n\t\t\tdata: EMPTY_OBJ,\n\t\t\tprops: EMPTY_OBJ,\n\t\t\tattrs: EMPTY_OBJ,\n\t\t\tslots: EMPTY_OBJ,\n\t\t\trefs: EMPTY_OBJ,\n\t\t\tsetupState: EMPTY_OBJ,\n\t\t\tsetupContext: null,\n\t\t\tsuspense,\n\t\t\tsuspenseId: suspense ? suspense.pendingId : 0,\n\t\t\tasyncDep: null,\n\t\t\tasyncResolved: false,\n\t\t\tisMounted: false,\n\t\t\tisUnmounted: false,\n\t\t\tisDeactivated: false,\n\t\t\tbc: null,\n\t\t\tc: null,\n\t\t\tbm: null,\n\t\t\tm: null,\n\t\t\tbu: null,\n\t\t\tu: null,\n\t\t\tum: null,\n\t\t\tbum: null,\n\t\t\tda: null,\n\t\t\ta: null,\n\t\t\trtg: null,\n\t\t\trtc: null,\n\t\t\tec: null,\n\t\t\tsp: null\n\t\t};\n\t\tinstance.ctx = { _: instance };\n\t\tinstance.root = parent ? parent.root : instance;\n\t\tinstance.emit = emit.bind(null, instance);\n\t\tif (vnode.ce) vnode.ce(instance);\n\t\treturn instance;\n\t}\n\tfunction isStatefulComponent(instance) {\n\t\treturn instance.vnode.shapeFlag & 4;\n\t}\n\tfunction setupComponent(instance, isSSR = false, optimized = false) {\n\t\tisSSR && setInSSRSetupState(isSSR);\n\t\tconst { props, children } = instance.vnode;\n\t\tconst isStateful = isStatefulComponent(instance);\n\t\tinitProps(instance, props, isStateful, isSSR);\n\t\tinitSlots(instance, children, optimized || isSSR);\n\t\tconst setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;\n\t\tisSSR && setInSSRSetupState(false);\n\t\treturn setupResult;\n\t}\n\tfunction setupStatefulComponent(instance, isSSR) {\n\t\tconst Component = instance.type;\n\t\tinstance.accessCache = /* @__PURE__ */ Object.create(null);\n\t\tinstance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);\n\t\tconst { setup } = Component;\n\t\tif (setup) {\n\t\t\tpauseTracking();\n\t\t\tconst setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;\n\t\t\tconst reset = setCurrentInstance(instance);\n\t\t\tconst setupResult = callWithErrorHandling(setup, instance, 0, [instance.props, setupContext]);\n\t\t\tconst isAsyncSetup = isPromise(setupResult);\n\t\t\tresetTracking();\n\t\t\treset();\n\t\t\tif ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) markAsyncBoundary(instance);\n\t\t\tif (isAsyncSetup) {\n\t\t\t\tsetupResult.then(unsetCurrentInstance, unsetCurrentInstance);\n\t\t\t\tif (isSSR) return setupResult.then((resolvedResult) => {\n\t\t\t\t\thandleSetupResult(instance, resolvedResult, isSSR);\n\t\t\t\t}).catch((e) => {\n\t\t\t\t\thandleError(e, instance, 0);\n\t\t\t\t});\n\t\t\t\telse instance.asyncDep = setupResult;\n\t\t\t} else handleSetupResult(instance, setupResult, isSSR);\n\t\t} else finishComponentSetup(instance, isSSR);\n\t}\n\tfunction handleSetupResult(instance, setupResult, isSSR) {\n\t\tif (isFunction(setupResult)) if (instance.type.__ssrInlineRender) instance.ssrRender = setupResult;\n\t\telse instance.render = setupResult;\n\t\telse if (isObject(setupResult)) instance.setupState = proxyRefs(setupResult);\n\t\tfinishComponentSetup(instance, isSSR);\n\t}\n\tfunction finishComponentSetup(instance, isSSR, skipOptions) {\n\t\tconst Component = instance.type;\n\t\tif (!instance.render) {\n\t\t\tif (!isSSR && compile && !Component.render) {\n\t\t\t\tconst template = Component.template || false;\n\t\t\t\tif (template) {\n\t\t\t\t\tconst { isCustomElement, compilerOptions } = instance.appContext.config;\n\t\t\t\t\tconst { delimiters, compilerOptions: componentCompilerOptions } = Component;\n\t\t\t\t\tComponent.render = compile(template, extend(extend({\n\t\t\t\t\t\tisCustomElement,\n\t\t\t\t\t\tdelimiters\n\t\t\t\t\t}, compilerOptions), componentCompilerOptions));\n\t\t\t\t}\n\t\t\t}\n\t\t\tinstance.render = Component.render || NOOP;\n\t\t\tif (installWithProxy) installWithProxy(instance);\n\t\t}\n\t}\n\tfunction createSetupContext(instance) {\n\t\tconst expose = (exposed) => {\n\t\t\tinstance.exposed = exposed || {};\n\t\t};\n\t\treturn {\n\t\t\tattrs: new Proxy(instance.attrs, attrsProxyHandlers),\n\t\t\tslots: instance.slots,\n\t\t\temit: instance.emit,\n\t\t\texpose\n\t\t};\n\t}\n\tfunction getComponentPublicInstance(instance) {\n\t\tif (instance.exposed) return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {\n\t\t\tget(target, key) {\n\t\t\t\tif (key in target) return target[key];\n\t\t\t\telse if (key in publicPropertiesMap) return publicPropertiesMap[key](instance);\n\t\t\t},\n\t\t\thas(target, key) {\n\t\t\t\treturn key in target || key in publicPropertiesMap;\n\t\t\t}\n\t\t}));\n\t\telse return instance.proxy;\n\t}\n\tfunction isClassComponent(value) {\n\t\treturn isFunction(value) && \"__vccOpts\" in value;\n\t}\n\tvar queue, flushIndex, pendingPostFlushCbs, activePostFlushCbs, postFlushIndex, resolvedPromise, currentFlushPromise, getId, currentRenderingInstance, currentScopeId, ssrContextKey, useSSRContext, TeleportEndKey, isTeleport, leaveCbKey, pendingSetRefMap, isAsyncWrapper, isKeepAlive, createHook, onMounted, onBeforeUnmount, onUnmounted, NULL_DYNAMIC_COMPONENT, getPublicInstance, publicPropertiesMap, hasSetupBinding, PublicInstanceProxyHandlers, uid$1, currentApp, getModelModifiers, getFunctionalFallthrough, filterModelListeners, internalObjectProto, createInternalObject, isInternalObject, isInternalKey, normalizeSlotValue, normalizeSlot, normalizeObjectSlots, normalizeVNodeSlots, assignSlots, initSlots, updateSlots, queuePostRenderEffect, isSuspense, Fragment, Text, Comment, Static, blockStack, currentBlock, isBlockTreeEnabled, normalizeKey, normalizeRef, createVNode, emptyAppContext, uid, currentInstance, getCurrentInstance, internalSetCurrentInstance, setInSSRSetupState, setCurrentInstance, unsetCurrentInstance, isInSSRComponentSetup, compile, installWithProxy, attrsProxyHandlers, computed, version;\n\tvar init_runtime_core_esm_bundler = __esmMin((() => {\n\t\tinit_reactivity_esm_bundler();\n\t\tinit_shared_esm_bundler();\n\t\tqueue = [];\n\t\tflushIndex = -1;\n\t\tpendingPostFlushCbs = [];\n\t\tactivePostFlushCbs = null;\n\t\tpostFlushIndex = 0;\n\t\tresolvedPromise = /* @__PURE__ */ Promise.resolve();\n\t\tcurrentFlushPromise = null;\n\t\tgetId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;\n\t\tcurrentRenderingInstance = null;\n\t\tcurrentScopeId = null;\n\t\tssrContextKey = /* @__PURE__ */ Symbol.for(\"v-scx\");\n\t\tuseSSRContext = () => {\n\t\t\t{\n\t\t\t\tconst ctx = inject(ssrContextKey);\n\t\t\t\tif (!ctx) {}\n\t\t\t\treturn ctx;\n\t\t\t}\n\t\t};\n\t\tTeleportEndKey = /* @__PURE__ */ Symbol(\"_vte\");\n\t\tisTeleport = (type) => type.__isTeleport;\n\t\tleaveCbKey = /* @__PURE__ */ Symbol(\"_leaveCb\");\n\t\tpendingSetRefMap = /* @__PURE__ */ new WeakMap();\n\t\tgetGlobalThis().requestIdleCallback;\n\t\tgetGlobalThis().cancelIdleCallback;\n\t\tisAsyncWrapper = (i) => !!i.type.__asyncLoader;\n\t\tisKeepAlive = (vnode) => vnode.type.__isKeepAlive;\n\t\tcreateHook = (lifecycle) => (hook, target = currentInstance) => {\n\t\t\tif (!isInSSRComponentSetup || lifecycle === \"sp\") injectHook(lifecycle, (...args) => hook(...args), target);\n\t\t};\n\t\tcreateHook(\"bm\");\n\t\tonMounted = createHook(\"m\");\n\t\tcreateHook(\"bu\");\n\t\tcreateHook(\"u\");\n\t\tonBeforeUnmount = createHook(\"bum\");\n\t\tonUnmounted = createHook(\"um\");\n\t\tcreateHook(\"sp\");\n\t\tcreateHook(\"rtg\");\n\t\tcreateHook(\"rtc\");\n\t\tNULL_DYNAMIC_COMPONENT = /* @__PURE__ */ Symbol.for(\"v-ndc\");\n\t\tgetPublicInstance = (i) => {\n\t\t\tif (!i) return null;\n\t\t\tif (isStatefulComponent(i)) return getComponentPublicInstance(i);\n\t\t\treturn getPublicInstance(i.parent);\n\t\t};\n\t\tpublicPropertiesMap = /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {\n\t\t\t$: (i) => i,\n\t\t\t$el: (i) => i.vnode.el,\n\t\t\t$data: (i) => i.data,\n\t\t\t$props: (i) => i.props,\n\t\t\t$attrs: (i) => i.attrs,\n\t\t\t$slots: (i) => i.slots,\n\t\t\t$refs: (i) => i.refs,\n\t\t\t$parent: (i) => getPublicInstance(i.parent),\n\t\t\t$root: (i) => getPublicInstance(i.root),\n\t\t\t$host: (i) => i.ce,\n\t\t\t$emit: (i) => i.emit,\n\t\t\t$options: (i) => i.type,\n\t\t\t$forceUpdate: (i) => i.f || (i.f = () => {\n\t\t\t\tqueueJob(i.update);\n\t\t\t}),\n\t\t\t$nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),\n\t\t\t$watch: (i) => NOOP\n\t\t});\n\t\thasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);\n\t\tPublicInstanceProxyHandlers = {\n\t\t\tget({ _: instance }, key) {\n\t\t\t\tif (key === \"__v_skip\") return true;\n\t\t\t\tconst { ctx, setupState, data, props, accessCache, type, appContext } = instance;\n\t\t\t\tif (key[0] !== \"$\") {\n\t\t\t\t\tconst n = accessCache[key];\n\t\t\t\t\tif (n !== void 0) switch (n) {\n\t\t\t\t\t\tcase 1: return setupState[key];\n\t\t\t\t\t\tcase 2: return data[key];\n\t\t\t\t\t\tcase 4: return ctx[key];\n\t\t\t\t\t\tcase 3: return props[key];\n\t\t\t\t\t}\n\t\t\t\t\telse if (hasSetupBinding(setupState, key)) {\n\t\t\t\t\t\taccessCache[key] = 1;\n\t\t\t\t\t\treturn setupState[key];\n\t\t\t\t\t} else if (hasOwn(props, key)) {\n\t\t\t\t\t\taccessCache[key] = 3;\n\t\t\t\t\t\treturn props[key];\n\t\t\t\t\t} else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {\n\t\t\t\t\t\taccessCache[key] = 4;\n\t\t\t\t\t\treturn ctx[key];\n\t\t\t\t\t} else accessCache[key] = 0;\n\t\t\t\t}\n\t\t\t\tconst publicGetter = publicPropertiesMap[key];\n\t\t\t\tlet cssModule, globalProperties;\n\t\t\t\tif (publicGetter) {\n\t\t\t\t\tif (key === \"$attrs\") track(instance.attrs, \"get\", \"\");\n\t\t\t\t\treturn publicGetter(instance);\n\t\t\t\t} else if ((cssModule = type.__cssModules) && (cssModule = cssModule[key])) return cssModule;\n\t\t\t\telse if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {\n\t\t\t\t\taccessCache[key] = 4;\n\t\t\t\t\treturn ctx[key];\n\t\t\t\t} else if (globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)) return globalProperties[key];\n\t\t\t},\n\t\t\tset({ _: instance }, key, value) {\n\t\t\t\tconst { data, setupState, ctx } = instance;\n\t\t\t\tif (hasSetupBinding(setupState, key)) {\n\t\t\t\t\tsetupState[key] = value;\n\t\t\t\t\treturn true;\n\t\t\t\t} else if (hasOwn(instance.props, key)) return false;\n\t\t\t\tif (key[0] === \"$\" && key.slice(1) in instance) return false;\n\t\t\t\telse ctx[key] = value;\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\thas({ _: { data, setupState, accessCache, ctx, appContext, props, type } }, key) {\n\t\t\t\tlet cssModules;\n\t\t\t\treturn !!(accessCache[key] || hasSetupBinding(setupState, key) || hasOwn(props, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key) || (cssModules = type.__cssModules) && cssModules[key]);\n\t\t\t},\n\t\t\tdefineProperty(target, key, descriptor) {\n\t\t\t\tif (descriptor.get != null) target._.accessCache[key] = 0;\n\t\t\t\telse if (hasOwn(descriptor, \"value\")) this.set(target, key, descriptor.value, null);\n\t\t\t\treturn Reflect.defineProperty(target, key, descriptor);\n\t\t\t}\n\t\t};\n\t\tuid$1 = 0;\n\t\tcurrentApp = null;\n\t\tgetModelModifiers = (props, modelName) => {\n\t\t\treturn modelName === \"modelValue\" || modelName === \"model-value\" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize(modelName)}Modifiers`] || props[`${hyphenate(modelName)}Modifiers`];\n\t\t};\n\t\tgetFunctionalFallthrough = (attrs) => {\n\t\t\tlet res;\n\t\t\tfor (const key in attrs) if (key === \"class\" || key === \"style\" || isOn(key)) (res || (res = {}))[key] = attrs[key];\n\t\t\treturn res;\n\t\t};\n\t\tfilterModelListeners = (attrs, props) => {\n\t\t\tconst res = {};\n\t\t\tfor (const key in attrs) if (!isModelListener(key) || !(key.slice(9) in props)) res[key] = attrs[key];\n\t\t\treturn res;\n\t\t};\n\t\tinternalObjectProto = {};\n\t\tcreateInternalObject = () => Object.create(internalObjectProto);\n\t\tisInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;\n\t\tisInternalKey = (key) => key === \"_\" || key === \"_ctx\" || key === \"$stable\";\n\t\tnormalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];\n\t\tnormalizeSlot = (key, rawSlot, ctx) => {\n\t\t\tif (rawSlot._n) return rawSlot;\n\t\t\tconst normalized = withCtx((...args) => {\n\t\t\t\treturn normalizeSlotValue(rawSlot(...args));\n\t\t\t}, ctx);\n\t\t\tnormalized._c = false;\n\t\t\treturn normalized;\n\t\t};\n\t\tnormalizeObjectSlots = (rawSlots, slots, instance) => {\n\t\t\tconst ctx = rawSlots._ctx;\n\t\t\tfor (const key in rawSlots) {\n\t\t\t\tif (isInternalKey(key)) continue;\n\t\t\t\tconst value = rawSlots[key];\n\t\t\t\tif (isFunction(value)) slots[key] = normalizeSlot(key, value, ctx);\n\t\t\t\telse if (value != null) {\n\t\t\t\t\tconst normalized = normalizeSlotValue(value);\n\t\t\t\t\tslots[key] = () => normalized;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tnormalizeVNodeSlots = (instance, children) => {\n\t\t\tconst normalized = normalizeSlotValue(children);\n\t\t\tinstance.slots.default = () => normalized;\n\t\t};\n\t\tassignSlots = (slots, children, optimized) => {\n\t\t\tfor (const key in children) if (optimized || !isInternalKey(key)) slots[key] = children[key];\n\t\t};\n\t\tinitSlots = (instance, children, optimized) => {\n\t\t\tconst slots = instance.slots = createInternalObject();\n\t\t\tif (instance.vnode.shapeFlag & 32) {\n\t\t\t\tconst type = children._;\n\t\t\t\tif (type) {\n\t\t\t\t\tassignSlots(slots, children, optimized);\n\t\t\t\t\tif (optimized) def(slots, \"_\", type, true);\n\t\t\t\t} else normalizeObjectSlots(children, slots);\n\t\t\t} else if (children) normalizeVNodeSlots(instance, children);\n\t\t};\n\t\tupdateSlots = (instance, children, optimized) => {\n\t\t\tconst { vnode, slots } = instance;\n\t\t\tlet needDeletionCheck = true;\n\t\t\tlet deletionComparisonTarget = EMPTY_OBJ;\n\t\t\tif (vnode.shapeFlag & 32) {\n\t\t\t\tconst type = children._;\n\t\t\t\tif (type) if (optimized && type === 1) needDeletionCheck = false;\n\t\t\t\telse assignSlots(slots, children, optimized);\n\t\t\t\telse {\n\t\t\t\t\tneedDeletionCheck = !children.$stable;\n\t\t\t\t\tnormalizeObjectSlots(children, slots);\n\t\t\t\t}\n\t\t\t\tdeletionComparisonTarget = children;\n\t\t\t} else if (children) {\n\t\t\t\tnormalizeVNodeSlots(instance, children);\n\t\t\t\tdeletionComparisonTarget = { default: 1 };\n\t\t\t}\n\t\t\tif (needDeletionCheck) {\n\t\t\t\tfor (const key in slots) if (!isInternalKey(key) && deletionComparisonTarget[key] == null) delete slots[key];\n\t\t\t}\n\t\t};\n\t\tqueuePostRenderEffect = queueEffectWithSuspense;\n\t\tisSuspense = (type) => type.__isSuspense;\n\t\tFragment = /* @__PURE__ */ Symbol.for(\"v-fgt\");\n\t\tText = /* @__PURE__ */ Symbol.for(\"v-txt\");\n\t\tComment = /* @__PURE__ */ Symbol.for(\"v-cmt\");\n\t\tStatic = /* @__PURE__ */ Symbol.for(\"v-stc\");\n\t\tblockStack = [];\n\t\tcurrentBlock = null;\n\t\tisBlockTreeEnabled = 1;\n\t\tnormalizeKey = ({ key }) => key != null ? key : null;\n\t\tnormalizeRef = ({ ref, ref_key, ref_for }) => {\n\t\t\tif (typeof ref === \"number\") ref = \"\" + ref;\n\t\t\treturn ref != null ? isString(ref) || /* @__PURE__ */ isRef(ref) || isFunction(ref) ? {\n\t\t\t\ti: currentRenderingInstance,\n\t\t\t\tr: ref,\n\t\t\t\tk: ref_key,\n\t\t\t\tf: !!ref_for\n\t\t\t} : ref : null;\n\t\t};\n\t\tcreateVNode = _createVNode;\n\t\temptyAppContext = createAppContext();\n\t\tuid = 0;\n\t\tcurrentInstance = null;\n\t\tgetCurrentInstance = () => currentInstance || currentRenderingInstance;\n\t\t{\n\t\t\tconst g = getGlobalThis();\n\t\t\tconst registerGlobalSetter = (key, setter) => {\n\t\t\t\tlet setters;\n\t\t\t\tif (!(setters = g[key])) setters = g[key] = [];\n\t\t\t\tsetters.push(setter);\n\t\t\t\treturn (v) => {\n\t\t\t\t\tif (setters.length > 1) setters.forEach((set) => set(v));\n\t\t\t\t\telse setters[0](v);\n\t\t\t\t};\n\t\t\t};\n\t\t\tinternalSetCurrentInstance = registerGlobalSetter(`__VUE_INSTANCE_SETTERS__`, (v) => currentInstance = v);\n\t\t\tsetInSSRSetupState = registerGlobalSetter(`__VUE_SSR_SETTERS__`, (v) => isInSSRComponentSetup = v);\n\t\t}\n\t\tsetCurrentInstance = (instance) => {\n\t\t\tconst prev = currentInstance;\n\t\t\tinternalSetCurrentInstance(instance);\n\t\t\tinstance.scope.on();\n\t\t\treturn () => {\n\t\t\t\tinstance.scope.off();\n\t\t\t\tinternalSetCurrentInstance(prev);\n\t\t\t};\n\t\t};\n\t\tunsetCurrentInstance = () => {\n\t\t\tcurrentInstance && currentInstance.scope.off();\n\t\t\tinternalSetCurrentInstance(null);\n\t\t};\n\t\tisInSSRComponentSetup = false;\n\t\tattrsProxyHandlers = { get(target, key) {\n\t\t\ttrack(target, \"get\", \"\");\n\t\t\treturn target[key];\n\t\t} };\n\t\tcomputed = (getterOrOptions, debugOptions) => {\n\t\t\treturn /* @__PURE__ */ computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);\n\t\t};\n\t\tversion = \"3.5.40\";\n\t}));\n\t//#endregion\n\t//#region node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js\n\t/**\n\t* @vue/runtime-dom v3.5.40\n\t* (c) 2018-present Yuxi (Evan) You and Vue contributors\n\t* @license MIT\n\t**/\n\tfunction patchClass(el, value, isSVG) {\n\t\tconst transitionClasses = el[vtcKey];\n\t\tif (transitionClasses) value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(\" \");\n\t\tif (value == null) el.removeAttribute(\"class\");\n\t\telse if (isSVG) el.setAttribute(\"class\", value);\n\t\telse el.className = value;\n\t}\n\tfunction setDisplay(el, value) {\n\t\tel.style.display = value ? el[vShowOriginalDisplay] : \"none\";\n\t\tel[vShowHidden] = !value;\n\t}\n\tfunction patchStyle(el, prev, next) {\n\t\tconst style = el.style;\n\t\tconst isCssString = isString(next);\n\t\tlet hasControlledDisplay = false;\n\t\tif (next && !isCssString) {\n\t\t\tif (prev) if (!isString(prev)) {\n\t\t\t\tfor (const key in prev) if (next[key] == null) setStyle(style, key, \"\");\n\t\t\t} else for (const prevStyle of prev.split(\";\")) {\n\t\t\t\tconst key = prevStyle.slice(0, prevStyle.indexOf(\":\")).trim();\n\t\t\t\tif (next[key] == null) setStyle(style, key, \"\");\n\t\t\t}\n\t\t\tfor (const key in next) {\n\t\t\t\tif (key === \"display\") hasControlledDisplay = true;\n\t\t\t\tconst value = next[key];\n\t\t\t\tif (value != null) {\n\t\t\t\t\tif (!shouldPreserveTextareaResizeStyle(el, key, !isString(prev) && prev ? prev[key] : void 0, value)) setStyle(style, key, value);\n\t\t\t\t} else setStyle(style, key, \"\");\n\t\t\t}\n\t\t} else if (isCssString) {\n\t\t\tif (prev !== next) {\n\t\t\t\tconst cssVarText = style[CSS_VAR_TEXT];\n\t\t\t\tif (cssVarText) next += \";\" + cssVarText;\n\t\t\t\tstyle.cssText = next;\n\t\t\t\thasControlledDisplay = displayRE.test(next);\n\t\t\t}\n\t\t} else if (prev) el.removeAttribute(\"style\");\n\t\tif (vShowOriginalDisplay in el) {\n\t\t\tel[vShowOriginalDisplay] = hasControlledDisplay ? style.display : \"\";\n\t\t\tif (el[vShowHidden]) style.display = \"none\";\n\t\t}\n\t}\n\tfunction setStyle(style, name, val) {\n\t\tif (isArray(val)) val.forEach((v) => setStyle(style, name, v));\n\t\telse {\n\t\t\tif (val == null) val = \"\";\n\t\t\tif (name.startsWith(\"--\")) style.setProperty(name, val);\n\t\t\telse {\n\t\t\t\tconst prefixed = autoPrefix(style, name);\n\t\t\t\tif (importantRE.test(val)) style.setProperty(hyphenate(prefixed), val.replace(importantRE, \"\"), \"important\");\n\t\t\t\telse style[prefixed] = val;\n\t\t\t}\n\t\t}\n\t}\n\tfunction autoPrefix(style, rawName) {\n\t\tconst cached = prefixCache[rawName];\n\t\tif (cached) return cached;\n\t\tlet name = camelize(rawName);\n\t\tif (name !== \"filter\" && name in style) return prefixCache[rawName] = name;\n\t\tname = capitalize(name);\n\t\tfor (let i = 0; i < prefixes.length; i++) {\n\t\t\tconst prefixed = prefixes[i] + name;\n\t\t\tif (prefixed in style) return prefixCache[rawName] = prefixed;\n\t\t}\n\t\treturn rawName;\n\t}\n\tfunction shouldPreserveTextareaResizeStyle(el, key, prev, next) {\n\t\treturn el.tagName === \"TEXTAREA\" && (key === \"width\" || key === \"height\") && isString(next) && prev === next;\n\t}\n\tfunction patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key)) {\n\t\tif (isSVG && key.startsWith(\"xlink:\")) if (value == null) el.removeAttributeNS(xlinkNS, key.slice(6, key.length));\n\t\telse el.setAttributeNS(xlinkNS, key, value);\n\t\telse if (value == null || isBoolean && !includeBooleanAttr(value)) el.removeAttribute(key);\n\t\telse el.setAttribute(key, isBoolean ? \"\" : isSymbol(value) ? String(value) : value);\n\t}\n\tfunction patchDOMProp(el, key, value, parentComponent, attrName) {\n\t\tif (key === \"innerHTML\" || key === \"textContent\") {\n\t\t\tif (value != null) el[key] = key === \"innerHTML\" ? unsafeToTrustedHTML(value) : value;\n\t\t\treturn;\n\t\t}\n\t\tconst tag = el.tagName;\n\t\tif (key === \"value\" && tag !== \"PROGRESS\" && !tag.includes(\"-\")) {\n\t\t\tconst oldValue = tag === \"OPTION\" ? el.getAttribute(\"value\") || \"\" : el.value;\n\t\t\tconst newValue = value == null ? el.type === \"checkbox\" ? \"on\" : \"\" : String(value);\n\t\t\tif (oldValue !== newValue || !(\"_value\" in el)) el.value = newValue;\n\t\t\tif (value == null) el.removeAttribute(key);\n\t\t\tel._value = value;\n\t\t\treturn;\n\t\t}\n\t\tlet needRemove = false;\n\t\tif (value === \"\" || value == null) {\n\t\t\tconst type = typeof el[key];\n\t\t\tif (type === \"boolean\") value = includeBooleanAttr(value);\n\t\t\telse if (value == null && type === \"string\") {\n\t\t\t\tvalue = \"\";\n\t\t\t\tneedRemove = true;\n\t\t\t} else if (type === \"number\") {\n\t\t\t\tvalue = 0;\n\t\t\t\tneedRemove = true;\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tel[key] = value;\n\t\t} catch (e) {}\n\t\tneedRemove && el.removeAttribute(attrName || key);\n\t}\n\tfunction addEventListener(el, event, handler, options) {\n\t\tel.addEventListener(event, handler, options);\n\t}\n\tfunction removeEventListener(el, event, handler, options) {\n\t\tel.removeEventListener(event, handler, options);\n\t}\n\tfunction patchEvent(el, rawName, prevValue, nextValue, instance = null) {\n\t\tconst invokers = el[veiKey] || (el[veiKey] = {});\n\t\tconst existingInvoker = invokers[rawName];\n\t\tif (nextValue && existingInvoker) existingInvoker.value = nextValue;\n\t\telse {\n\t\t\tconst [name, options] = parseName(rawName);\n\t\t\tif (nextValue) addEventListener(el, name, invokers[rawName] = createInvoker(nextValue, instance), options);\n\t\t\telse if (existingInvoker) {\n\t\t\t\tremoveEventListener(el, name, existingInvoker, options);\n\t\t\t\tinvokers[rawName] = void 0;\n\t\t\t}\n\t\t}\n\t}\n\tfunction parseName(name) {\n\t\tlet options;\n\t\tlet m;\n\t\twhile ((m = name.match(optionsModifierRE)) && !optionsModifierEventRE.test(name)) {\n\t\t\tif (!options) options = {};\n\t\t\tname = name.slice(0, name.length - m[1].length);\n\t\t\toptions[m[1].toLowerCase()] = true;\n\t\t}\n\t\treturn [name[2] === \":\" ? name.slice(3) : hyphenate(name.slice(2)), options];\n\t}\n\tfunction createInvoker(initialValue, instance) {\n\t\tconst invoker = (e) => {\n\t\t\tif (!e._vts) e._vts = Date.now();\n\t\t\telse if (e._vts <= invoker.attached) return;\n\t\t\tconst value = invoker.value;\n\t\t\tif (isArray(value)) {\n\t\t\t\tconst originalStop = e.stopImmediatePropagation;\n\t\t\t\te.stopImmediatePropagation = () => {\n\t\t\t\t\toriginalStop.call(e);\n\t\t\t\t\te._stopped = true;\n\t\t\t\t};\n\t\t\t\tconst handlers = value.slice();\n\t\t\t\tconst args = [e];\n\t\t\t\tfor (let i = 0; i < handlers.length; i++) {\n\t\t\t\t\tif (e._stopped) break;\n\t\t\t\t\tconst handler = handlers[i];\n\t\t\t\t\tif (handler) callWithAsyncErrorHandling(handler, instance, 5, args);\n\t\t\t\t}\n\t\t\t} else callWithAsyncErrorHandling(value, instance, 5, [e]);\n\t\t};\n\t\tinvoker.value = initialValue;\n\t\tinvoker.attached = getNow();\n\t\treturn invoker;\n\t}\n\tfunction shouldSetAsProp(el, key, value, isSVG) {\n\t\tif (isSVG) {\n\t\t\tif (key === \"innerHTML\" || key === \"textContent\") return true;\n\t\t\tif (key in el && isNativeOn(key) && isFunction(value)) return true;\n\t\t\treturn false;\n\t\t}\n\t\tif (key === \"spellcheck\" || key === \"draggable\" || key === \"translate\" || key === \"autocorrect\") return false;\n\t\tif (key === \"sandbox\" && el.tagName === \"IFRAME\") return false;\n\t\tif (key === \"form\") return false;\n\t\tif (key === \"list\" && el.tagName === \"INPUT\") return false;\n\t\tif (key === \"type\" && el.tagName === \"TEXTAREA\") return false;\n\t\tif (key === \"width\" || key === \"height\") {\n\t\t\tconst tag = el.tagName;\n\t\t\tif (tag === \"IMG\" || tag === \"VIDEO\" || tag === \"CANVAS\" || tag === \"SOURCE\") return false;\n\t\t}\n\t\tif (isNativeOn(key) && isString(value)) return false;\n\t\treturn key in el;\n\t}\n\tfunction shouldSetAsPropForVueCE(el, key) {\n\t\tconst props = el._def.props;\n\t\tif (!props) return false;\n\t\tconst camelKey = camelize(key);\n\t\treturn Array.isArray(props) ? props.some((prop) => camelize(prop) === camelKey) : Object.keys(props).some((prop) => camelize(prop) === camelKey);\n\t}\n\tfunction onCompositionStart(e) {\n\t\te.target.composing = true;\n\t}\n\tfunction onCompositionEnd(e) {\n\t\tconst target = e.target;\n\t\tif (target.composing) {\n\t\t\ttarget.composing = false;\n\t\t\ttarget.dispatchEvent(new Event(\"input\"));\n\t\t}\n\t}\n\tfunction castValue(value, trim, number) {\n\t\tif (trim) value = value.trim();\n\t\tif (number) value = looseToNumber(value);\n\t\treturn value;\n\t}\n\tfunction setChecked(el, { value, oldValue }, vnode) {\n\t\tel._modelValue = value;\n\t\tlet checked;\n\t\tif (isArray(value)) checked = looseIndexOf(value, vnode.props.value) > -1;\n\t\telse if (isSet(value)) checked = value.has(vnode.props.value);\n\t\telse {\n\t\t\tif (value === oldValue) return;\n\t\t\tchecked = looseEqual(value, getCheckboxValue(el, true));\n\t\t}\n\t\tif (el.checked !== checked) el.checked = checked;\n\t}\n\tfunction setSelected(el, value) {\n\t\tconst isMultiple = el.multiple;\n\t\tconst isArrayValue = isArray(value);\n\t\tif (isMultiple && !isArrayValue && !isSet(value)) return;\n\t\tfor (let i = 0, l = el.options.length; i < l; i++) {\n\t\t\tconst option = el.options[i];\n\t\t\tconst optionValue = getValue(option);\n\t\t\tif (isMultiple) if (isArrayValue) {\n\t\t\t\tconst optionType = typeof optionValue;\n\t\t\t\tif (optionType === \"string\" || optionType === \"number\") option.selected = value.some((v) => String(v) === String(optionValue));\n\t\t\t\telse option.selected = looseIndexOf(value, optionValue) > -1;\n\t\t\t} else option.selected = value.has(optionValue);\n\t\t\telse if (looseEqual(getValue(option), value)) {\n\t\t\t\tif (el.selectedIndex !== i) el.selectedIndex = i;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (!isMultiple && el.selectedIndex !== -1) el.selectedIndex = -1;\n\t}\n\tfunction getValue(el) {\n\t\treturn \"_value\" in el ? el._value : el.value;\n\t}\n\tfunction getCheckboxValue(el, checked) {\n\t\tconst key = checked ? \"_trueValue\" : \"_falseValue\";\n\t\treturn key in el ? el[key] : checked;\n\t}\n\tfunction ensureRenderer() {\n\t\treturn renderer || (renderer = createRenderer(rendererOptions));\n\t}\n\tfunction resolveRootNamespace(container) {\n\t\tif (container instanceof SVGElement) return \"svg\";\n\t\tif (typeof MathMLElement === \"function\" && container instanceof MathMLElement) return \"mathml\";\n\t}\n\tfunction normalizeContainer(container) {\n\t\tif (isString(container)) return document.querySelector(container);\n\t\treturn container;\n\t}\n\tvar policy, tt, unsafeToTrustedHTML, svgNS, mathmlNS, doc, templateContainer, nodeOps, vtcKey, vShowOriginalDisplay, vShowHidden, vShow, CSS_VAR_TEXT, displayRE, importantRE, prefixes, prefixCache, xlinkNS, veiKey, optionsModifierRE, optionsModifierEventRE, cachedNow, p, getNow, isNativeOn, patchProp, getModelAssigner, assignKey, vModelText, vModelCheckbox, vModelSelect, systemModifiers, modifierGuards, withModifiers, keyNames, withKeys, rendererOptions, renderer, createApp;\n\tvar init_runtime_dom_esm_bundler = __esmMin((() => {\n\t\tinit_runtime_core_esm_bundler();\n\t\tinit_runtime_core_esm_bundler();\n\t\tinit_shared_esm_bundler();\n\t\tpolicy = void 0;\n\t\ttt = typeof window !== \"undefined\" && window.trustedTypes;\n\t\tif (tt) try {\n\t\t\tpolicy = /* @__PURE__ */ tt.createPolicy(\"vue\", { createHTML: (val) => val });\n\t\t} catch (e) {}\n\t\tunsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val;\n\t\tsvgNS = \"http://www.w3.org/2000/svg\";\n\t\tmathmlNS = \"http://www.w3.org/1998/Math/MathML\";\n\t\tdoc = typeof document !== \"undefined\" ? document : null;\n\t\ttemplateContainer = doc && /* @__PURE__ */ doc.createElement(\"template\");\n\t\tnodeOps = {\n\t\t\tinsert: (child, parent, anchor) => {\n\t\t\t\tparent.insertBefore(child, anchor || null);\n\t\t\t},\n\t\t\tremove: (child) => {\n\t\t\t\tconst parent = child.parentNode;\n\t\t\t\tif (parent) parent.removeChild(child);\n\t\t\t},\n\t\t\tcreateElement: (tag, namespace, is, props) => {\n\t\t\t\tconst el = namespace === \"svg\" ? doc.createElementNS(svgNS, tag) : namespace === \"mathml\" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag);\n\t\t\t\tif (tag === \"select\" && props && props.multiple != null) el.setAttribute(\"multiple\", props.multiple);\n\t\t\t\treturn el;\n\t\t\t},\n\t\t\tcreateText: (text) => doc.createTextNode(text),\n\t\t\tcreateComment: (text) => doc.createComment(text),\n\t\t\tsetText: (node, text) => {\n\t\t\t\tnode.nodeValue = text;\n\t\t\t},\n\t\t\tsetElementText: (el, text) => {\n\t\t\t\tel.textContent = text;\n\t\t\t},\n\t\t\tparentNode: (node) => node.parentNode,\n\t\t\tnextSibling: (node) => node.nextSibling,\n\t\t\tquerySelector: (selector) => doc.querySelector(selector),\n\t\t\tsetScopeId(el, id) {\n\t\t\t\tel.setAttribute(id, \"\");\n\t\t\t},\n\t\t\tinsertStaticContent(content, parent, anchor, namespace, start, end) {\n\t\t\t\tconst before = anchor ? anchor.previousSibling : parent.lastChild;\n\t\t\t\tif (start && (start === end || start.nextSibling)) while (true) {\n\t\t\t\t\tparent.insertBefore(start.cloneNode(true), anchor);\n\t\t\t\t\tif (start === end || !(start = start.nextSibling)) break;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttemplateContainer.innerHTML = unsafeToTrustedHTML(namespace === \"svg\" ? `<svg>${content}</svg>` : namespace === \"mathml\" ? `<math>${content}</math>` : content);\n\t\t\t\t\tconst template = templateContainer.content;\n\t\t\t\t\tif (namespace === \"svg\" || namespace === \"mathml\") {\n\t\t\t\t\t\tconst wrapper = template.firstChild;\n\t\t\t\t\t\twhile (wrapper.firstChild) template.appendChild(wrapper.firstChild);\n\t\t\t\t\t\ttemplate.removeChild(wrapper);\n\t\t\t\t\t}\n\t\t\t\t\tparent.insertBefore(template, anchor);\n\t\t\t\t}\n\t\t\t\treturn [before ? before.nextSibling : parent.firstChild, anchor ? anchor.previousSibling : parent.lastChild];\n\t\t\t}\n\t\t};\n\t\tvtcKey = /* @__PURE__ */ Symbol(\"_vtc\");\n\t\tvShowOriginalDisplay = /* @__PURE__ */ Symbol(\"_vod\");\n\t\tvShowHidden = /* @__PURE__ */ Symbol(\"_vsh\");\n\t\tvShow = {\n\t\t\tname: \"show\",\n\t\t\tbeforeMount(el, { value }, { transition }) {\n\t\t\t\tel[vShowOriginalDisplay] = el.style.display === \"none\" ? \"\" : el.style.display;\n\t\t\t\tif (transition && value) transition.beforeEnter(el);\n\t\t\t\telse setDisplay(el, value);\n\t\t\t},\n\t\t\tmounted(el, { value }, { transition }) {\n\t\t\t\tif (transition && value) transition.enter(el);\n\t\t\t},\n\t\t\tupdated(el, { value, oldValue }, { transition }) {\n\t\t\t\tif (!value === !oldValue) return;\n\t\t\t\tif (transition) if (value) {\n\t\t\t\t\ttransition.beforeEnter(el);\n\t\t\t\t\tsetDisplay(el, true);\n\t\t\t\t\ttransition.enter(el);\n\t\t\t\t} else transition.leave(el, () => {\n\t\t\t\t\tsetDisplay(el, false);\n\t\t\t\t});\n\t\t\t\telse setDisplay(el, value);\n\t\t\t},\n\t\t\tbeforeUnmount(el, { value }) {\n\t\t\t\tsetDisplay(el, value);\n\t\t\t}\n\t\t};\n\t\tCSS_VAR_TEXT = /* @__PURE__ */ Symbol(\"\");\n\t\tdisplayRE = /(?:^|;)\\s*display\\s*:/;\n\t\timportantRE = /\\s*!important$/;\n\t\tprefixes = [\n\t\t\t\"Webkit\",\n\t\t\t\"Moz\",\n\t\t\t\"ms\"\n\t\t];\n\t\tprefixCache = {};\n\t\txlinkNS = \"http://www.w3.org/1999/xlink\";\n\t\tveiKey = /* @__PURE__ */ Symbol(\"_vei\");\n\t\toptionsModifierRE = /(Once|Passive|Capture)$/;\n\t\toptionsModifierEventRE = /^on:?(?:Once|Passive|Capture)$/;\n\t\tcachedNow = 0;\n\t\tp = /* @__PURE__ */ Promise.resolve();\n\t\tgetNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());\n\t\tisNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;\n\t\tpatchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => {\n\t\t\tconst isSVG = namespace === \"svg\";\n\t\t\tif (key === \"class\") patchClass(el, nextValue, isSVG);\n\t\t\telse if (key === \"style\") patchStyle(el, prevValue, nextValue);\n\t\t\telse if (isOn(key)) {\n\t\t\t\tif (!isModelListener(key)) patchEvent(el, key, prevValue, nextValue, parentComponent);\n\t\t\t} else if (key[0] === \".\" ? (key = key.slice(1), true) : key[0] === \"^\" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) {\n\t\t\t\tpatchDOMProp(el, key, nextValue);\n\t\t\t\tif (!el.tagName.includes(\"-\") && (key === \"value\" || key === \"checked\" || key === \"selected\")) patchAttr(el, key, nextValue, isSVG, parentComponent, key !== \"value\");\n\t\t\t} else if (el._isVueCE && (shouldSetAsPropForVueCE(el, key) || el._def.__asyncLoader && (/[A-Z]/.test(key) || !isString(nextValue)))) patchDOMProp(el, camelize(key), nextValue, parentComponent, key);\n\t\t\telse {\n\t\t\t\tif (key === \"true-value\") el._trueValue = nextValue;\n\t\t\t\telse if (key === \"false-value\") el._falseValue = nextValue;\n\t\t\t\tpatchAttr(el, key, nextValue, isSVG);\n\t\t\t}\n\t\t};\n\t\tgetModelAssigner = (vnode) => {\n\t\t\tconst fn = vnode.props[\"onUpdate:modelValue\"] || false;\n\t\t\treturn isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn;\n\t\t};\n\t\tassignKey = /* @__PURE__ */ Symbol(\"_assign\");\n\t\tvModelText = {\n\t\t\tcreated(el, { modifiers: { lazy, trim, number } }, vnode) {\n\t\t\t\tel[assignKey] = getModelAssigner(vnode);\n\t\t\t\tconst castToNumber = number || vnode.props && vnode.props.type === \"number\";\n\t\t\t\taddEventListener(el, lazy ? \"change\" : \"input\", (e) => {\n\t\t\t\t\tif (e.target.composing) return;\n\t\t\t\t\tel[assignKey](castValue(el.value, trim, castToNumber));\n\t\t\t\t});\n\t\t\t\tif (trim || castToNumber) addEventListener(el, \"change\", () => {\n\t\t\t\t\tel.value = castValue(el.value, trim, castToNumber);\n\t\t\t\t});\n\t\t\t\tif (!lazy) {\n\t\t\t\t\taddEventListener(el, \"compositionstart\", onCompositionStart);\n\t\t\t\t\taddEventListener(el, \"compositionend\", onCompositionEnd);\n\t\t\t\t\taddEventListener(el, \"change\", onCompositionEnd);\n\t\t\t\t}\n\t\t\t},\n\t\t\tmounted(el, { value }) {\n\t\t\t\tel.value = value == null ? \"\" : value;\n\t\t\t},\n\t\t\tbeforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) {\n\t\t\t\tel[assignKey] = getModelAssigner(vnode);\n\t\t\t\tif (el.composing) return;\n\t\t\t\tconst elValue = (number || el.type === \"number\") && !/^0\\d/.test(el.value) ? looseToNumber(el.value) : el.value;\n\t\t\t\tconst newValue = value == null ? \"\" : value;\n\t\t\t\tif (elValue === newValue) return;\n\t\t\t\tconst rootNode = el.getRootNode();\n\t\t\t\tif ((rootNode instanceof Document || rootNode instanceof ShadowRoot) && rootNode.activeElement === el && el.type !== \"range\") {\n\t\t\t\t\tif (lazy && value === oldValue) return;\n\t\t\t\t\tif (trim && el.value.trim() === newValue) return;\n\t\t\t\t}\n\t\t\t\tel.value = newValue;\n\t\t\t}\n\t\t};\n\t\tvModelCheckbox = {\n\t\t\tdeep: true,\n\t\t\tcreated(el, _, vnode) {\n\t\t\t\tel[assignKey] = getModelAssigner(vnode);\n\t\t\t\taddEventListener(el, \"change\", () => {\n\t\t\t\t\tconst modelValue = el._modelValue;\n\t\t\t\t\tconst elementValue = getValue(el);\n\t\t\t\t\tconst checked = el.checked;\n\t\t\t\t\tconst assign = el[assignKey];\n\t\t\t\t\tif (isArray(modelValue)) {\n\t\t\t\t\t\tconst index = looseIndexOf(modelValue, elementValue);\n\t\t\t\t\t\tconst found = index !== -1;\n\t\t\t\t\t\tif (checked && !found) assign(modelValue.concat(elementValue));\n\t\t\t\t\t\telse if (!checked && found) {\n\t\t\t\t\t\t\tconst filtered = [...modelValue];\n\t\t\t\t\t\t\tfiltered.splice(index, 1);\n\t\t\t\t\t\t\tassign(filtered);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (isSet(modelValue)) {\n\t\t\t\t\t\tconst cloned = new Set(modelValue);\n\t\t\t\t\t\tif (checked) cloned.add(elementValue);\n\t\t\t\t\t\telse cloned.delete(elementValue);\n\t\t\t\t\t\tassign(cloned);\n\t\t\t\t\t} else assign(getCheckboxValue(el, checked));\n\t\t\t\t});\n\t\t\t},\n\t\t\tmounted: setChecked,\n\t\t\tbeforeUpdate(el, binding, vnode) {\n\t\t\t\tel[assignKey] = getModelAssigner(vnode);\n\t\t\t\tsetChecked(el, binding, vnode);\n\t\t\t}\n\t\t};\n\t\tvModelSelect = {\n\t\t\tdeep: true,\n\t\t\tcreated(el, { value, modifiers: { number } }, vnode) {\n\t\t\t\tel._modelValue = value;\n\t\t\t\taddEventListener(el, \"change\", () => {\n\t\t\t\t\tconst selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map((o) => number ? looseToNumber(getValue(o)) : getValue(o));\n\t\t\t\t\tel[assignKey](el.multiple ? isSet(el._modelValue) ? new Set(selectedVal) : selectedVal : selectedVal[0]);\n\t\t\t\t\tel._assigning = true;\n\t\t\t\t\tnextTick(() => {\n\t\t\t\t\t\tel._assigning = false;\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t\tel[assignKey] = getModelAssigner(vnode);\n\t\t\t},\n\t\t\tmounted(el, { value }) {\n\t\t\t\tsetSelected(el, value);\n\t\t\t},\n\t\t\tbeforeUpdate(el, { value }, vnode) {\n\t\t\t\tel._modelValue = value;\n\t\t\t\tel[assignKey] = getModelAssigner(vnode);\n\t\t\t},\n\t\t\tupdated(el, { value }) {\n\t\t\t\tif (!el._assigning) setSelected(el, value);\n\t\t\t}\n\t\t};\n\t\tsystemModifiers = [\n\t\t\t\"ctrl\",\n\t\t\t\"shift\",\n\t\t\t\"alt\",\n\t\t\t\"meta\"\n\t\t];\n\t\tmodifierGuards = {\n\t\t\tstop: (e) => e.stopPropagation(),\n\t\t\tprevent: (e) => e.preventDefault(),\n\t\t\tself: (e) => e.target !== e.currentTarget,\n\t\t\tctrl: (e) => !e.ctrlKey,\n\t\t\tshift: (e) => !e.shiftKey,\n\t\t\talt: (e) => !e.altKey,\n\t\t\tmeta: (e) => !e.metaKey,\n\t\t\tleft: (e) => \"button\" in e && e.button !== 0,\n\t\t\tmiddle: (e) => \"button\" in e && e.button !== 1,\n\t\t\tright: (e) => \"button\" in e && e.button !== 2,\n\t\t\texact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))\n\t\t};\n\t\twithModifiers = (fn, modifiers) => {\n\t\t\tif (!fn) return fn;\n\t\t\tconst cache = fn._withMods || (fn._withMods = {});\n\t\t\tconst cacheKey = modifiers.join(\".\");\n\t\t\treturn cache[cacheKey] || (cache[cacheKey] = ((event, ...args) => {\n\t\t\t\tfor (let i = 0; i < modifiers.length; i++) {\n\t\t\t\t\tconst guard = modifierGuards[modifiers[i]];\n\t\t\t\t\tif (guard && guard(event, modifiers)) return;\n\t\t\t\t}\n\t\t\t\treturn fn(event, ...args);\n\t\t\t}));\n\t\t};\n\t\tkeyNames = {\n\t\t\tesc: \"escape\",\n\t\t\tspace: \" \",\n\t\t\tup: \"arrow-up\",\n\t\t\tleft: \"arrow-left\",\n\t\t\tright: \"arrow-right\",\n\t\t\tdown: \"arrow-down\",\n\t\t\tdelete: \"backspace\"\n\t\t};\n\t\twithKeys = (fn, modifiers) => {\n\t\t\tconst cache = fn._withKeys || (fn._withKeys = {});\n\t\t\tconst cacheKey = modifiers.join(\".\");\n\t\t\treturn cache[cacheKey] || (cache[cacheKey] = ((event) => {\n\t\t\t\tif (!(\"key\" in event)) return;\n\t\t\t\tconst eventKey = hyphenate(event.key);\n\t\t\t\tif (modifiers.some((k) => k === eventKey || keyNames[k] === eventKey)) return fn(event);\n\t\t\t}));\n\t\t};\n\t\trendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);\n\t\tcreateApp = ((...args) => {\n\t\t\tconst app = ensureRenderer().createApp(...args);\n\t\t\tconst { mount } = app;\n\t\t\tapp.mount = (containerOrSelector) => {\n\t\t\t\tconst container = normalizeContainer(containerOrSelector);\n\t\t\t\tif (!container) return;\n\t\t\t\tconst component = app._component;\n\t\t\t\tif (!isFunction(component) && !component.render && !component.template) component.template = container.innerHTML;\n\t\t\t\tif (container.nodeType === 1) container.textContent = \"\";\n\t\t\t\tconst proxy = mount(container, false, resolveRootNamespace(container));\n\t\t\t\tif (container instanceof Element) {\n\t\t\t\t\tcontainer.removeAttribute(\"v-cloak\");\n\t\t\t\t\tcontainer.setAttribute(\"data-v-app\", \"\");\n\t\t\t\t}\n\t\t\t\treturn proxy;\n\t\t\t};\n\t\t\treturn app;\n\t\t});\n\t}));\n\t//#endregion\n\t//#region node_modules/vue/dist/vue.runtime.esm-bundler.js\n\tvar init_vue_runtime_esm_bundler = __esmMin((() => {\n\t\tinit_runtime_dom_esm_bundler();\n\t}));\n\t/**\n\t* vue v3.5.40\n\t* (c) 2018-present Yuxi (Evan) You and Vue contributors\n\t* @license MIT\n\t**/\n\t//#endregion\n\t//#region src/web-editor/client/api.ts\n\tfunction createEditorApi(token) {\n\t\treturn async function api(path, options = {}) {\n\t\t\tconst headers = new Headers(options.headers);\n\t\t\theaders.set(\"x-pi-forge-token\", token);\n\t\t\tlet body = options.body;\n\t\t\tif (body && typeof body === \"object\" && !(body instanceof Blob) && !(body instanceof FormData) && !(body instanceof URLSearchParams)) {\n\t\t\t\theaders.set(\"content-type\", \"application/json\");\n\t\t\t\tbody = JSON.stringify(body);\n\t\t\t}\n\t\t\tconst response = await fetch(path, {\n\t\t\t\t...options,\n\t\t\t\theaders,\n\t\t\t\tbody\n\t\t\t});\n\t\t\tconst text = await response.text();\n\t\t\tconst data = text ? JSON.parse(text) : {};\n\t\t\tif (!response.ok) throw new EditorApiError(data.error || response.statusText, response.status);\n\t\t\treturn data;\n\t\t};\n\t}\n\tvar EditorApiError;\n\tvar init_api = __esmMin((() => {\n\t\tEditorApiError = class extends Error {\n\t\t\tstatus;\n\t\t\tconstructor(message, status) {\n\t\t\t\tsuper(message);\n\t\t\t\tthis.status = status;\n\t\t\t\tthis.name = \"EditorApiError\";\n\t\t\t}\n\t\t};\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/components/ProfileEditor.vue?vue&type=script&setup=true&lang.ts\n\tinit_vue_runtime_esm_bundler();\n\tinit_api();\n\tvar _hoisted_1$7 = { class: \"profile-editor profile-card\" };\n\tvar _hoisted_2$7 = { class: \"profile-editor-head\" };\n\tvar _hoisted_3$7 = { class: \"profile-editor-title\" };\n\tvar _hoisted_4$7 = { class: \"profile-editor-note\" };\n\tvar _hoisted_5$7 = {\n\t\tkey: 0,\n\t\tclass: \"profile-editor-dirty\"\n\t};\n\tvar _hoisted_6$7 = [\"disabled\"];\n\tvar _hoisted_7$6 = [\"disabled\"];\n\tvar _hoisted_8$6 = [\"disabled\"];\n\tvar _hoisted_9$6 = { class: \"profile-form\" };\n\tvar _hoisted_10$6 = { class: \"profile-field\" };\n\tvar _hoisted_11$6 = [\"readonly\"];\n\tvar _hoisted_12$5 = { class: \"profile-field\" };\n\tvar _hoisted_13$5 = { class: \"profile-field profile-field-wide\" };\n\tvar _hoisted_14$5 = { class: \"profile-field\" };\n\tvar _hoisted_15$5 = { id: \"profileProviderOptions\" };\n\tvar _hoisted_16$5 = [\"value\"];\n\tvar _hoisted_17$5 = { class: \"profile-field\" };\n\tvar _hoisted_18$4 = { id: \"profileModelOptions\" };\n\tvar _hoisted_19$4 = [\"value\", \"label\"];\n\tvar _hoisted_20$4 = {\n\t\tkey: 0,\n\t\tclass: \"profile-field-warning\",\n\t\t\"data-model-auth-warning\": \"\"\n\t};\n\tvar _hoisted_21$4 = { class: \"profile-field\" };\n\tvar _hoisted_22$4 = [\"value\"];\n\tvar _hoisted_23$4 = { class: \"profile-field\" };\n\tvar _hoisted_24$3 = [\"value\"];\n\tvar _hoisted_25$3 = { key: 0 };\n\tvar _hoisted_26$3 = { key: 1 };\n\tvar _hoisted_27$3 = { class: \"profile-check profile-field-wide\" };\n\tvar _hoisted_28$3 = {\n\t\tkey: 1,\n\t\tclass: \"profile-editor-validation\"\n\t};\n\tvar _hoisted_29$3 = { class: \"profile-diagnostics\" };\n\tvar _hoisted_30$3 = {\n\t\tkey: 0,\n\t\tclass: \"diagnostic info\"\n\t};\n\tvar ProfileEditor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({\n\t\t__name: \"ProfileEditor\",\n\t\tprops: {\n\t\t\tmode: {},\n\t\t\tcollection: {},\n\t\t\tsource: {},\n\t\t\tsourceSelector: {},\n\t\t\tcreateScope: {}\n\t\t},\n\t\temits: [\"cancel\", \"saved\"],\n\t\tsetup(__props, { emit: __emit }) {\n\t\t\tconst props = __props;\n\t\t\tconst emit = __emit;\n\t\t\tconst thinkingLevels = [\n\t\t\t\t\"off\",\n\t\t\t\t\"minimal\",\n\t\t\t\t\"low\",\n\t\t\t\t\"medium\",\n\t\t\t\t\"high\",\n\t\t\t\t\"xhigh\",\n\t\t\t\t\"max\"\n\t\t\t];\n\t\t\tconst api = createEditorApi(new URLSearchParams(location.search).get(\"token\") || \"\");\n\t\t\tconst initial = props.source ?? defaultProfile();\n\t\t\tconst draft = /* @__PURE__ */ reactive({\n\t\t\t\tid: initial.id,\n\t\t\t\tname: initial.name ?? \"\",\n\t\t\t\tdescription: initial.description ?? \"\",\n\t\t\t\tautoActivate: initial.autoActivate === true,\n\t\t\t\tprovider: initial.model.provider,\n\t\t\t\tmodelId: initial.model.id,\n\t\t\t\tthinkingLevel: initial.thinkingLevel,\n\t\t\t\tpromptStack: initial.promptStack ?? \"\"\n\t\t\t});\n\t\t\tconst validation = /* @__PURE__ */ ref();\n\t\t\tconst status = /* @__PURE__ */ ref(\"\");\n\t\t\tconst error = /* @__PURE__ */ ref(\"\");\n\t\t\tconst busy = /* @__PURE__ */ ref(false);\n\t\t\tconst editScope = computed(() => {\n\t\t\t\tif (props.mode !== \"edit\") return props.createScope ?? \"project\";\n\t\t\t\treturn (props.sourceSelector ?? \"\").startsWith(\"global:\") ? \"global\" : \"project\";\n\t\t\t});\n\t\t\tconst scopeLabel = computed(() => editScope.value === \"global\" ? \"user-global\" : \"project-local\");\n\t\t\tconst providerOptions = computed(() => {\n\t\t\t\treturn [...new Set(props.collection.models.map((model) => model.provider))].sort();\n\t\t\t});\n\t\t\tconst modelOptions = computed(() => {\n\t\t\t\treturn props.collection.models.filter((model) => !draft.provider || model.provider === draft.provider).sort((left, right) => left.id.localeCompare(right.id));\n\t\t\t});\n\t\t\tconst promptStackOptions = computed(() => {\n\t\t\t\tconst options = props.collection.promptStacks.filter((stack) => editScope.value !== \"global\" || stack.scope === \"global\").map((stack) => ({\n\t\t\t\t\tid: stack.id,\n\t\t\t\t\tname: stack.name,\n\t\t\t\t\tselector: stack.selector,\n\t\t\t\t\tscope: stack.scope,\n\t\t\t\t\tvalue: stack.scope === editScope.value ? stack.id : stack.selector\n\t\t\t\t}));\n\t\t\t\tif (draft.promptStack && !options.some((stack) => stack.value === draft.promptStack)) options.push({\n\t\t\t\t\tid: draft.promptStack,\n\t\t\t\t\tname: void 0,\n\t\t\t\t\tselector: draft.promptStack,\n\t\t\t\t\tscope: draft.promptStack.startsWith(\"global:\") ? \"global\" : draft.promptStack.startsWith(\"project:\") ? \"project\" : editScope.value,\n\t\t\t\t\tvalue: draft.promptStack\n\t\t\t\t});\n\t\t\t\treturn options.sort((left, right) => left.value.localeCompare(right.value));\n\t\t\t});\n\t\t\tconst typedModelUnavailable = computed(() => {\n\t\t\t\tconst provider = draft.provider.trim();\n\t\t\t\tconst modelId = draft.modelId.trim();\n\t\t\t\tif (!provider || !modelId) return false;\n\t\t\t\tconst match = props.collection.models.find((model) => model.provider === provider && model.id === modelId);\n\t\t\t\treturn match ? !match.available : false;\n\t\t\t});\n\t\t\twatch(draft, () => {\n\t\t\t\tvalidation.value = void 0;\n\t\t\t\tstatus.value = \"\";\n\t\t\t\terror.value = \"\";\n\t\t\t}, { deep: true });\n\t\t\tfunction defaultProfile() {\n\t\t\t\tconst current = props.collection.status.current;\n\t\t\t\tconst fallbackModel = current.model ?? props.collection.models.find((model) => model.available) ?? props.collection.models[0];\n\t\t\t\treturn {\n\t\t\t\t\tschemaVersion: 1,\n\t\t\t\t\ttype: \"pi-forge.agent-profile\",\n\t\t\t\t\tid: \"\",\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tprovider: fallbackModel?.provider ?? \"\",\n\t\t\t\t\t\tid: fallbackModel?.id ?? \"\"\n\t\t\t\t\t},\n\t\t\t\t\tthinkingLevel: current.thinkingLevel,\n\t\t\t\t\tpromptStack: normalizeProfilePromptStackReference(current.promptStack, props.createScope ?? \"project\")\n\t\t\t\t};\n\t\t\t}\n\t\t\tfunction normalizeProfilePromptStackReference(reference, targetScope) {\n\t\t\t\tif (!reference) return reference;\n\t\t\t\tif (reference.startsWith(\"project:\")) {\n\t\t\t\t\tif (targetScope === \"project\") return reference.slice(8);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\tif (reference.startsWith(\"global:\")) return targetScope === \"global\" ? reference.slice(7) : reference;\n\t\t\t\treturn reference;\n\t\t\t}\n\t\t\tfunction profileFromDraft() {\n\t\t\t\treturn {\n\t\t\t\t\tschemaVersion: 1,\n\t\t\t\t\ttype: \"pi-forge.agent-profile\",\n\t\t\t\t\tid: draft.id.trim(),\n\t\t\t\t\tname: draft.name.trim() || void 0,\n\t\t\t\t\tdescription: draft.description.trim() || void 0,\n\t\t\t\t\tautoActivate: draft.autoActivate || void 0,\n\t\t\t\t\tmodel: {\n\t\t\t\t\t\tprovider: draft.provider.trim(),\n\t\t\t\t\t\tid: draft.modelId.trim()\n\t\t\t\t\t},\n\t\t\t\t\tthinkingLevel: draft.thinkingLevel,\n\t\t\t\t\tpromptStack: draft.promptStack || null\n\t\t\t\t};\n\t\t\t}\n\t\t\tconst initialSnapshot = JSON.stringify(profileFromDraft());\n\t\t\tconst dirty = computed(() => JSON.stringify(profileFromDraft()) !== initialSnapshot);\n\t\t\tfunction handleBeforeUnload(event) {\n\t\t\t\tif (!dirty.value) return;\n\t\t\t\tevent.preventDefault();\n\t\t\t\tevent.returnValue = \"\";\n\t\t\t}\n\t\t\tonMounted(() => window.addEventListener(\"beforeunload\", handleBeforeUnload));\n\t\t\tonBeforeUnmount(() => window.removeEventListener(\"beforeunload\", handleBeforeUnload));\n\t\t\tfunction requestCancel() {\n\t\t\t\tif (dirty.value && !window.confirm(\"Discard unsaved agent-profile changes?\")) return;\n\t\t\t\temit(\"cancel\");\n\t\t\t}\n\t\t\tasync function validateDraft() {\n\t\t\t\tbusy.value = true;\n\t\t\t\terror.value = \"\";\n\t\t\t\tstatus.value = \"\";\n\t\t\t\ttry {\n\t\t\t\t\tconst result = await api(\"/api/profiles/validate\", {\n\t\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\t\tbody: {\n\t\t\t\t\t\t\tprofile: profileFromDraft(),\n\t\t\t\t\t\t\texistingId: props.mode === \"edit\" ? props.sourceSelector ?? props.source?.id : void 0,\n\t\t\t\t\t\t\tscope: props.mode === \"create\" ? editScope.value : void 0\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tvalidation.value = result;\n\t\t\t\t\tstatus.value = result.errors ? `${result.errors} validation error${result.errors === 1 ? \"\" : \"s\"}` : result.warnings ? `Valid with ${result.warnings} warning${result.warnings === 1 ? \"\" : \"s\"}` : \"Valid and ready to apply\";\n\t\t\t\t\treturn result;\n\t\t\t\t} catch (caught) {\n\t\t\t\t\terror.value = caught instanceof Error ? caught.message : String(caught);\n\t\t\t\t\treturn;\n\t\t\t\t} finally {\n\t\t\t\t\tbusy.value = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tasync function saveDraft() {\n\t\t\t\tbusy.value = true;\n\t\t\t\terror.value = \"\";\n\t\t\t\tstatus.value = \"\";\n\t\t\t\ttry {\n\t\t\t\t\tconst profile = profileFromDraft();\n\t\t\t\t\tconst path = props.mode === \"create\" ? \"/api/profiles\" : `/api/profiles/${encodeURIComponent(props.sourceSelector ?? props.source.id)}`;\n\t\t\t\t\tconst result = await api(path, {\n\t\t\t\t\t\tmethod: props.mode === \"create\" ? \"POST\" : \"PUT\",\n\t\t\t\t\t\tbody: {\n\t\t\t\t\t\t\tprofile,\n\t\t\t\t\t\t\tscope: props.mode === \"create\" ? editScope.value : void 0\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\temit(\"saved\", result);\n\t\t\t\t} catch (caught) {\n\t\t\t\t\terror.value = caught instanceof Error ? caught.message : String(caught);\n\t\t\t\t} finally {\n\t\t\t\t\tbusy.value = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn (_ctx, _cache) => {\n\t\t\t\treturn openBlock(), createElementBlock(\"section\", _hoisted_1$7, [\n\t\t\t\t\tcreateBaseVNode(\"header\", _hoisted_2$7, [\n\t\t\t\t\t\tcreateBaseVNode(\"div\", null, [createBaseVNode(\"div\", _hoisted_3$7, toDisplayString(__props.mode === \"create\" ? \"New agent profile\" : `Edit ${__props.source?.id}`), 1), createBaseVNode(\"div\", _hoisted_4$7, \" Profile application is preflighted separately; saving only updates the \" + toDisplayString(scopeLabel.value) + \" definition. \", 1)]),\n\t\t\t\t\t\t_cache[8] || (_cache[8] = createBaseVNode(\"span\", { class: \"action-spacer\" }, null, -1)),\n\t\t\t\t\t\tdirty.value ? (openBlock(), createElementBlock(\"span\", _hoisted_5$7, \"Unsaved\")) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\tid: \"profileCancelBtn\",\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\tdisabled: busy.value,\n\t\t\t\t\t\t\tonClick: requestCancel\n\t\t\t\t\t\t}, \"Cancel\", 8, _hoisted_6$7),\n\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\tid: \"profileValidateBtn\",\n\t\t\t\t\t\t\t\"data-icon\": \"!\",\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\tdisabled: busy.value,\n\t\t\t\t\t\t\tonClick: validateDraft\n\t\t\t\t\t\t}, \" Validate \", 8, _hoisted_7$6),\n\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\tid: \"profileSaveBtn\",\n\t\t\t\t\t\t\tclass: \"primary\",\n\t\t\t\t\t\t\t\"data-icon\": \"✓\",\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\tdisabled: busy.value,\n\t\t\t\t\t\t\tonClick: saveDraft\n\t\t\t\t\t\t}, toDisplayString(__props.mode === \"create\" ? \"Create profile\" : \"Save profile\"), 9, _hoisted_8$6)\n\t\t\t\t\t]),\n\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_9$6, [\n\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_10$6, [\n\t\t\t\t\t\t\t_cache[9] || (_cache[9] = createBaseVNode(\"span\", null, \"Profile ID\", -1)),\n\t\t\t\t\t\t\twithDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\tid: \"profileId\",\n\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event) => draft.id = $event),\n\t\t\t\t\t\t\t\treadonly: __props.mode === \"edit\",\n\t\t\t\t\t\t\t\tplaceholder: \"reviewer\",\n\t\t\t\t\t\t\t\tautocomplete: \"off\"\n\t\t\t\t\t\t\t}, null, 8, _hoisted_11$6), [[vModelText, draft.id]]),\n\t\t\t\t\t\t\t_cache[10] || (_cache[10] = createBaseVNode(\"small\", null, \"Letters, numbers, dots, underscores, and hyphens; immutable after creation.\", -1))\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_12$5, [_cache[11] || (_cache[11] = createBaseVNode(\"span\", null, \"Name\", -1)), withDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\tid: \"profileName\",\n\t\t\t\t\t\t\t\"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event) => draft.name = $event),\n\t\t\t\t\t\t\tplaceholder: \"Reviewer\",\n\t\t\t\t\t\t\tautocomplete: \"off\"\n\t\t\t\t\t\t}, null, 512), [[vModelText, draft.name]])]),\n\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_13$5, [_cache[12] || (_cache[12] = createBaseVNode(\"span\", null, \"Description\", -1)), withDirectives(createBaseVNode(\"textarea\", {\n\t\t\t\t\t\t\tid: \"profileDescription\",\n\t\t\t\t\t\t\t\"onUpdate:modelValue\": _cache[2] || (_cache[2] = ($event) => draft.description = $event),\n\t\t\t\t\t\t\tplaceholder: \"What this profile is for.\"\n\t\t\t\t\t\t}, null, 512), [[vModelText, draft.description]])]),\n\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_14$5, [\n\t\t\t\t\t\t\t_cache[13] || (_cache[13] = createBaseVNode(\"span\", null, \"Model provider\", -1)),\n\t\t\t\t\t\t\twithDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\tid: \"profileModelProvider\",\n\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": _cache[3] || (_cache[3] = ($event) => draft.provider = $event),\n\t\t\t\t\t\t\t\tlist: \"profileProviderOptions\",\n\t\t\t\t\t\t\t\tautocomplete: \"off\"\n\t\t\t\t\t\t\t}, null, 512), [[vModelText, draft.provider]]),\n\t\t\t\t\t\t\tcreateBaseVNode(\"datalist\", _hoisted_15$5, [(openBlock(true), createElementBlock(Fragment, null, renderList(providerOptions.value, (provider) => {\n\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"option\", {\n\t\t\t\t\t\t\t\t\tkey: provider,\n\t\t\t\t\t\t\t\t\tvalue: provider\n\t\t\t\t\t\t\t\t}, null, 8, _hoisted_16$5);\n\t\t\t\t\t\t\t}), 128))])\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_17$5, [\n\t\t\t\t\t\t\t_cache[14] || (_cache[14] = createBaseVNode(\"span\", null, \"Model ID\", -1)),\n\t\t\t\t\t\t\twithDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\tid: \"profileModelId\",\n\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": _cache[4] || (_cache[4] = ($event) => draft.modelId = $event),\n\t\t\t\t\t\t\t\tlist: \"profileModelOptions\",\n\t\t\t\t\t\t\t\tautocomplete: \"off\"\n\t\t\t\t\t\t\t}, null, 512), [[vModelText, draft.modelId]]),\n\t\t\t\t\t\t\tcreateBaseVNode(\"datalist\", _hoisted_18$4, [(openBlock(true), createElementBlock(Fragment, null, renderList(modelOptions.value, (model) => {\n\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"option\", {\n\t\t\t\t\t\t\t\t\tkey: `${model.provider}/${model.id}`,\n\t\t\t\t\t\t\t\t\tvalue: model.id,\n\t\t\t\t\t\t\t\t\tlabel: `${model.name || model.id}${model.available ? \"\" : \" (authentication unavailable)\"}`\n\t\t\t\t\t\t\t\t}, null, 8, _hoisted_19$4);\n\t\t\t\t\t\t\t}), 128))]),\n\t\t\t\t\t\t\ttypedModelUnavailable.value ? (openBlock(), createElementBlock(\"small\", _hoisted_20$4, \" This model has no configured authentication; applying the profile will fail preflight. \")) : createCommentVNode(\"v-if\", true)\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_21$4, [_cache[15] || (_cache[15] = createBaseVNode(\"span\", null, \"Thinking level\", -1)), withDirectives(createBaseVNode(\"select\", {\n\t\t\t\t\t\t\tid: \"profileThinkingLevel\",\n\t\t\t\t\t\t\t\"onUpdate:modelValue\": _cache[5] || (_cache[5] = ($event) => draft.thinkingLevel = $event)\n\t\t\t\t\t\t}, [(openBlock(), createElementBlock(Fragment, null, renderList(thinkingLevels, (level) => {\n\t\t\t\t\t\t\treturn createBaseVNode(\"option\", {\n\t\t\t\t\t\t\t\tkey: level,\n\t\t\t\t\t\t\t\tvalue: level\n\t\t\t\t\t\t\t}, toDisplayString(level), 9, _hoisted_22$4);\n\t\t\t\t\t\t}), 64))], 512), [[vModelSelect, draft.thinkingLevel]])]),\n\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_23$4, [\n\t\t\t\t\t\t\t_cache[17] || (_cache[17] = createBaseVNode(\"span\", null, \"Prompt stack\", -1)),\n\t\t\t\t\t\t\twithDirectives(createBaseVNode(\"select\", {\n\t\t\t\t\t\t\t\tid: \"profilePromptStack\",\n\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": _cache[6] || (_cache[6] = ($event) => draft.promptStack = $event)\n\t\t\t\t\t\t\t}, [_cache[16] || (_cache[16] = createBaseVNode(\"option\", { value: \"\" }, \"(none)\", -1)), (openBlock(true), createElementBlock(Fragment, null, renderList(promptStackOptions.value, (stack) => {\n\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"option\", {\n\t\t\t\t\t\t\t\t\tkey: stack.selector,\n\t\t\t\t\t\t\t\t\tvalue: stack.value\n\t\t\t\t\t\t\t\t}, toDisplayString(stack.name ? `${stack.value} — ${stack.name}` : stack.value), 9, _hoisted_24$3);\n\t\t\t\t\t\t\t}), 128))], 512), [[vModelSelect, draft.promptStack]]),\n\t\t\t\t\t\t\teditScope.value === \"global\" ? (openBlock(), createElementBlock(\"small\", _hoisted_25$3, \"Global profiles may only reference user-global prompt stacks.\")) : (openBlock(), createElementBlock(\"small\", _hoisted_26$3, \"Project profiles may reference project stacks or explicitly qualified global stacks.\"))\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_27$3, [withDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\tid: \"profileAutoActivate\",\n\t\t\t\t\t\t\t\"onUpdate:modelValue\": _cache[7] || (_cache[7] = ($event) => draft.autoActivate = $event),\n\t\t\t\t\t\t\ttype: \"checkbox\"\n\t\t\t\t\t\t}, null, 512), [[vModelCheckbox, draft.autoActivate]]), createBaseVNode(\"span\", null, [_cache[18] || (_cache[18] = createBaseVNode(\"strong\", null, \"Auto-activate on a fresh session\", -1)), createBaseVNode(\"small\", null, \"Only one \" + toDisplayString(editScope.value) + \" profile may request auto-activation.\", 1)])])\n\t\t\t\t\t]),\n\t\t\t\t\tstatus.value || error.value ? (openBlock(), createElementBlock(\"div\", {\n\t\t\t\t\t\tkey: 0,\n\t\t\t\t\t\tid: \"profileEditorStatus\",\n\t\t\t\t\t\tclass: normalizeClass([\"profile-editor-status\", { error: !!error.value }])\n\t\t\t\t\t}, toDisplayString(error.value || status.value), 3)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\tvalidation.value ? (openBlock(), createElementBlock(\"div\", _hoisted_28$3, [createBaseVNode(\"div\", { class: normalizeClass([\"profile-editor-validation-summary\", {\n\t\t\t\t\t\terror: validation.value.errors > 0,\n\t\t\t\t\t\tready: validation.value.errors === 0\n\t\t\t\t\t}]) }, toDisplayString(validation.value.preview.applicable ? \"Ready to apply\" : \"Preflight failed\") + \" · \" + toDisplayString(validation.value.errors) + \" error(s) · \" + toDisplayString(validation.value.warnings) + \" warning(s) \", 3), createBaseVNode(\"div\", _hoisted_29$3, [!validation.value.diagnostics.length ? (openBlock(), createElementBlock(\"div\", _hoisted_30$3, \"No diagnostics.\")) : createCommentVNode(\"v-if\", true), (openBlock(true), createElementBlock(Fragment, null, renderList(validation.value.diagnostics, (diagnostic, index) => {\n\t\t\t\t\t\treturn openBlock(), createElementBlock(\"div\", {\n\t\t\t\t\t\t\tkey: `${diagnostic.field || \"\"}-${index}-${diagnostic.message}`,\n\t\t\t\t\t\t\tclass: normalizeClass([\"diagnostic\", diagnostic.level])\n\t\t\t\t\t\t}, [createBaseVNode(\"strong\", null, toDisplayString(diagnostic.level.toUpperCase()) + toDisplayString(diagnostic.field ? ` · ${diagnostic.field}` : \"\"), 1), createTextVNode(\": \" + toDisplayString(diagnostic.message), 1)], 2);\n\t\t\t\t\t}), 128))])])) : createCommentVNode(\"v-if\", true)\n\t\t\t\t]);\n\t\t\t};\n\t\t}\n\t});\n\t//#endregion\n\t//#region \\0plugin-vue:export-helper\n\tvar _plugin_vue_export_helper_default = (sfc, props) => {\n\t\tconst target = sfc.__vccOpts || sfc;\n\t\tfor (const [key, val] of props) target[key] = val;\n\t\treturn target;\n\t};\n\t//#endregion\n\t//#region src/web-editor/client/components/ProfileEditor.vue\n\tvar ProfileEditor_default = /*#__PURE__*/ _plugin_vue_export_helper_default(ProfileEditor_vue_vue_type_script_setup_true_lang_default, [[\"__scopeId\", \"data-v-dd5432c1\"]]);\n\t//#endregion\n\t//#region src/web-editor/client/components/ProfileBrowser.vue?vue&type=script&setup=true&lang.ts\n\tinit_vue_runtime_esm_bundler();\n\tinit_api();\n\tvar _hoisted_1$6 = { class: \"profile-surface\" };\n\tvar _hoisted_2$6 = { class: \"profile-toolbar\" };\n\tvar _hoisted_3$6 = {\n\t\tid: \"profilesStatus\",\n\t\tclass: \"status\"\n\t};\n\tvar _hoisted_4$6 = [\"disabled\"];\n\tvar _hoisted_5$6 = [\"disabled\"];\n\tvar _hoisted_6$6 = [\"disabled\"];\n\tvar _hoisted_7$5 = {\n\t\tkey: 0,\n\t\tclass: \"profile-message error\"\n\t};\n\tvar _hoisted_8$5 = {\n\t\tkey: 1,\n\t\tclass: \"profile-message warning\"\n\t};\n\tvar _hoisted_9$5 = {\n\t\tkey: 2,\n\t\tclass: \"profile-layout\"\n\t};\n\tvar _hoisted_10$5 = { class: \"profile-sidebar\" };\n\tvar _hoisted_11$5 = { class: \"side-head\" };\n\tvar _hoisted_12$4 = { class: \"cwd\" };\n\tvar _hoisted_13$4 = { class: \"profile-list\" };\n\tvar _hoisted_14$4 = [\n\t\t\"disabled\",\n\t\t\"data-profile-id\",\n\t\t\"onClick\"\n\t];\n\tvar _hoisted_15$4 = { class: \"profile-row-title\" };\n\tvar _hoisted_16$4 = {\n\t\tkey: 0,\n\t\tclass: \"badge shadow\"\n\t};\n\tvar _hoisted_17$4 = {\n\t\tkey: 1,\n\t\tclass: \"badge\"\n\t};\n\tvar _hoisted_18$3 = {\n\t\tkey: 2,\n\t\tclass: \"badge\"\n\t};\n\tvar _hoisted_19$3 = { class: \"profile-row-name\" };\n\tvar _hoisted_20$3 = { class: \"profile-row-meta\" };\n\tvar _hoisted_21$3 = {\n\t\tkey: 0,\n\t\tclass: \"profile-empty\"\n\t};\n\tvar _hoisted_22$3 = { class: \"profile-main\" };\n\tvar _hoisted_23$3 = { class: \"profile-card profile-summary-card\" };\n\tvar _hoisted_24$2 = { class: \"profile-title\" };\n\tvar _hoisted_25$2 = { class: \"profile-path\" };\n\tvar _hoisted_26$2 = { class: \"profile-summary-actions\" };\n\tvar _hoisted_27$2 = [\"disabled\", \"title\"];\n\tvar _hoisted_28$2 = [\"disabled\"];\n\tvar _hoisted_29$2 = {\n\t\tkey: 0,\n\t\tclass: \"profile-description\"\n\t};\n\tvar _hoisted_30$2 = { class: \"profile-card\" };\n\tvar _hoisted_31$2 = { class: \"profile-transition-grid\" };\n\tvar _hoisted_32$2 = { class: \"profile-detail-row\" };\n\tvar _hoisted_33$2 = { class: \"profile-card\" };\n\tvar _hoisted_34$2 = { class: \"profile-diagnostics\" };\n\tvar _hoisted_35$2 = {\n\t\tkey: 0,\n\t\tclass: \"diagnostic info\"\n\t};\n\tvar _hoisted_36$2 = {\n\t\tkey: 2,\n\t\tclass: \"profile-card profile-empty\"\n\t};\n\tvar _hoisted_37$2 = { class: \"profile-card profile-runtime-card\" };\n\tvar _hoisted_38$2 = { class: \"profile-detail-row\" };\n\tvar _hoisted_39$2 = { class: \"profile-detail-row\" };\n\tvar _hoisted_40$2 = { class: \"profile-detail-row\" };\n\tvar _hoisted_41$1 = { class: \"profile-drift\" };\n\tvar _hoisted_42$1 = {\n\t\tkey: 1,\n\t\tclass: \"profile-note\"\n\t};\n\t//#endregion\n\t//#region src/web-editor/client/components/ProfileBrowser.vue\n\tvar ProfileBrowser_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({\n\t\t__name: \"ProfileBrowser\",\n\t\tprops: { active: { type: Boolean } },\n\t\tsetup(__props) {\n\t\t\tconst props = __props;\n\t\t\tconst api = createEditorApi(new URLSearchParams(location.search).get(\"token\") || \"\");\n\t\t\tconst collection = /* @__PURE__ */ ref();\n\t\t\tconst selectedPath = /* @__PURE__ */ ref(\"\");\n\t\t\tconst loadError = /* @__PURE__ */ ref(\"\");\n\t\t\tconst loading = /* @__PURE__ */ ref(false);\n\t\t\tconst editorMode = /* @__PURE__ */ ref();\n\t\t\tconst createScope = /* @__PURE__ */ ref(\"project\");\n\t\t\tconst profileActionStatus = /* @__PURE__ */ ref(\"\");\n\t\t\tconst profileActionError = /* @__PURE__ */ ref(\"\");\n\t\t\tconst profileActionBusy = /* @__PURE__ */ ref(false);\n\t\t\tfunction preferredProfilePath(entries) {\n\t\t\t\treturn (entries.find((entry) => entry.lastApplied) ?? entries.find((entry) => entry.errors === 0) ?? entries[0])?.filePath ?? \"\";\n\t\t\t}\n\t\t\tconst selected = computed(() => {\n\t\t\t\tconst entries = collection.value?.profiles || [];\n\t\t\t\treturn entries.find((entry) => entry.filePath === selectedPath.value) ?? entries.find((entry) => entry.filePath === preferredProfilePath(entries)) ?? entries[0];\n\t\t\t});\n\t\t\twatch(() => props.active, (active) => {\n\t\t\t\tif (active) loadProfiles();\n\t\t\t}, { immediate: true });\n\t\t\tasync function loadProfiles(reloadFromDisk = false) {\n\t\t\t\tloading.value = true;\n\t\t\t\tloadError.value = \"\";\n\t\t\t\tprofileActionStatus.value = \"\";\n\t\t\t\tprofileActionError.value = \"\";\n\t\t\t\ttry {\n\t\t\t\t\tconst next = await api(reloadFromDisk ? \"/api/profiles/reload\" : \"/api/profiles\", reloadFromDisk ? { method: \"POST\" } : void 0);\n\t\t\t\t\tcollection.value = next;\n\t\t\t\t\tif (!next.profiles.some((entry) => entry.filePath === selectedPath.value)) selectedPath.value = preferredProfilePath(next.profiles);\n\t\t\t\t\tif (reloadFromDisk) editorMode.value = void 0;\n\t\t\t\t} catch (error) {\n\t\t\t\t\tloadError.value = error instanceof Error ? error.message : String(error);\n\t\t\t\t} finally {\n\t\t\t\t\tloading.value = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction selectProfile(entry) {\n\t\t\t\tif (entry.filePath === selected.value?.filePath) return;\n\t\t\t\tselectedPath.value = entry.filePath;\n\t\t\t\teditorMode.value = void 0;\n\t\t\t\tprofileActionStatus.value = \"\";\n\t\t\t\tprofileActionError.value = \"\";\n\t\t\t}\n\t\t\tfunction startEditor(mode) {\n\t\t\t\teditorMode.value = mode;\n\t\t\t}\n\t\t\tfunction refreshProfiles() {\n\t\t\t\tloadProfiles(true);\n\t\t\t}\n\t\t\tfunction handleProfileSaved(mutation) {\n\t\t\t\tcollection.value = mutation.collection;\n\t\t\t\tselectedPath.value = mutation.selectedPath;\n\t\t\t\tconst saved = mutation.collection.profiles.find((entry) => entry.filePath === mutation.selectedPath);\n\t\t\t\tprofileActionStatus.value = `${editorMode.value === \"create\" ? \"Created\" : \"Saved\"} ${saved?.profile.id || \"profile\"}`;\n\t\t\t\tprofileActionError.value = \"\";\n\t\t\t\teditorMode.value = void 0;\n\t\t\t}\n\t\t\tasync function applySelectedProfile() {\n\t\t\t\tconst target = selected.value;\n\t\t\t\tif (!target) return;\n\t\t\t\tprofileActionBusy.value = true;\n\t\t\t\tprofileActionStatus.value = \"\";\n\t\t\t\tprofileActionError.value = \"\";\n\t\t\t\ttry {\n\t\t\t\t\tconst result = await api(`/api/profiles/${encodeURIComponent(target.selector)}/apply`, { method: \"POST\" });\n\t\t\t\t\tcollection.value = result.collection;\n\t\t\t\t\tselectedPath.value = result.selectedPath;\n\t\t\t\t\tprofileActionStatus.value = `Applied ${target.profile.id} once`;\n\t\t\t\t\twindow.dispatchEvent(new Event(\"pi-forge:profile-applied\"));\n\t\t\t\t} catch (error) {\n\t\t\t\t\tprofileActionError.value = error instanceof Error ? error.message : String(error);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst refreshed = await api(\"/api/profiles\");\n\t\t\t\t\t\tcollection.value = refreshed;\n\t\t\t\t\t\tif (!refreshed.profiles.some((entry) => entry.filePath === selectedPath.value)) selectedPath.value = refreshed.profiles[0]?.filePath || \"\";\n\t\t\t\t\t} catch (refreshError) {\n\t\t\t\t\t\tconst detail = refreshError instanceof Error ? refreshError.message : String(refreshError);\n\t\t\t\t\t\tprofileActionError.value += ` Runtime refresh failed: ${detail}`;\n\t\t\t\t\t}\n\t\t\t\t\twindow.dispatchEvent(new Event(\"pi-forge:profile-applied\"));\n\t\t\t\t} finally {\n\t\t\t\t\tprofileActionBusy.value = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tasync function deleteSelectedProfile() {\n\t\t\t\tconst target = selected.value;\n\t\t\t\tif (!target) return;\n\t\t\t\tif (!window.confirm(`Delete agent profile ${target.profile.id}?\\n\\n${target.filePath}\\n\\nDelegation settings in subagents.json are managed by the optional pi-forge-subagents package and are not removed.`)) return;\n\t\t\t\tprofileActionBusy.value = true;\n\t\t\t\tprofileActionStatus.value = \"\";\n\t\t\t\tprofileActionError.value = \"\";\n\t\t\t\ttry {\n\t\t\t\t\tconst result = await api(`/api/profiles/${encodeURIComponent(target.selector)}`, { method: \"DELETE\" });\n\t\t\t\t\tcollection.value = result.collection;\n\t\t\t\t\tselectedPath.value = result.selectedPath;\n\t\t\t\t\tprofileActionStatus.value = `Deleted ${target.profile.id}`;\n\t\t\t\t} catch (error) {\n\t\t\t\t\tprofileActionError.value = error instanceof Error ? error.message : String(error);\n\t\t\t\t} finally {\n\t\t\t\t\tprofileActionBusy.value = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction modelLabel(model) {\n\t\t\t\treturn model ? `${model.provider}/${model.id}` : \"(none)\";\n\t\t\t}\n\t\t\tfunction promptStackLabel(value) {\n\t\t\t\treturn value ?? \"(none)\";\n\t\t\t}\n\t\t\tfunction profileState(entry) {\n\t\t\t\tif (entry.errors > 0) return `${entry.errors} error${entry.errors === 1 ? \"\" : \"s\"}`;\n\t\t\t\tif (entry.warnings > 0) return `${entry.warnings} warning${entry.warnings === 1 ? \"\" : \"s\"}`;\n\t\t\t\treturn \"ready\";\n\t\t\t}\n\t\t\tfunction driftLabel(changed) {\n\t\t\t\treturn changed ? \"drifted\" : \"unchanged\";\n\t\t\t}\n\t\t\tfunction shadowRelationship(entry) {\n\t\t\t\tconst other = collection.value?.profiles.find((candidate) => candidate.profile.id === entry.profile.id && candidate.scope !== entry.scope);\n\t\t\t\tif (!other) return \"\";\n\t\t\t\treturn entry.scope === \"project\" ? `shadows ${other.selector}` : `shadowed by ${other.selector}`;\n\t\t\t}\n\t\t\treturn (_ctx, _cache) => {\n\t\t\t\treturn openBlock(), createElementBlock(\"section\", _hoisted_1$6, [\n\t\t\t\t\tcreateBaseVNode(\"header\", _hoisted_2$6, [\n\t\t\t\t\t\t_cache[5] || (_cache[5] = createBaseVNode(\"div\", null, [createBaseVNode(\"div\", { class: \"profile-heading\" }, \"Agent profiles\"), createBaseVNode(\"div\", { class: \"profile-subheading\" }, \" One-shot model, thinking, and prompt-stack presets. Applying a profile does not continuously own runtime state. \")], -1)),\n\t\t\t\t\t\t_cache[6] || (_cache[6] = createBaseVNode(\"span\", { class: \"action-spacer\" }, null, -1)),\n\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_3$6, toDisplayString(loading.value || profileActionBusy.value ? \"Working\" : loadError.value || profileActionError.value || profileActionStatus.value || `${collection.value?.profiles.length || 0} profile(s)`), 1),\n\t\t\t\t\t\twithDirectives(createBaseVNode(\"select\", {\n\t\t\t\t\t\t\tid: \"profileCreateScope\",\n\t\t\t\t\t\t\t\"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event) => createScope.value = $event),\n\t\t\t\t\t\t\ttitle: \"Scope for new profiles\",\n\t\t\t\t\t\t\tdisabled: loading.value || profileActionBusy.value || !!editorMode.value\n\t\t\t\t\t\t}, [..._cache[4] || (_cache[4] = [createBaseVNode(\"option\", { value: \"project\" }, \"project\", -1), createBaseVNode(\"option\", { value: \"global\" }, \"global\", -1)])], 8, _hoisted_4$6), [[vModelSelect, createScope.value]]),\n\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\tid: \"profileNewBtn\",\n\t\t\t\t\t\t\t\"data-icon\": \"+\",\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\tdisabled: loading.value || profileActionBusy.value || !!editorMode.value || !collection.value?.trusted,\n\t\t\t\t\t\t\tonClick: _cache[1] || (_cache[1] = ($event) => startEditor(\"create\"))\n\t\t\t\t\t\t}, \" New profile \", 8, _hoisted_5$6),\n\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\tid: \"profileRefreshBtn\",\n\t\t\t\t\t\t\t\"data-icon\": \"↻\",\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\tdisabled: loading.value || profileActionBusy.value || !!editorMode.value,\n\t\t\t\t\t\t\tonClick: refreshProfiles\n\t\t\t\t\t\t}, \" Refresh \", 8, _hoisted_6$6)\n\t\t\t\t\t]),\n\t\t\t\t\tloadError.value ? (openBlock(), createElementBlock(\"div\", _hoisted_7$5, toDisplayString(loadError.value), 1)) : collection.value && !collection.value.trusted ? (openBlock(), createElementBlock(\"div\", _hoisted_8$5, \" This project is not trusted; only user-global agent profiles are shown and applying profiles is disabled. \")) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\tcollection.value ? (openBlock(), createElementBlock(\"div\", _hoisted_9$5, [createBaseVNode(\"aside\", _hoisted_10$5, [createBaseVNode(\"div\", _hoisted_11$5, [_cache[7] || (_cache[7] = createBaseVNode(\"div\", { class: \"side-title\" }, \"Agent profiles\", -1)), createBaseVNode(\"div\", _hoisted_12$4, toDisplayString(collection.value.profileDirectory), 1)]), createBaseVNode(\"div\", _hoisted_13$4, [(openBlock(true), createElementBlock(Fragment, null, renderList(collection.value.profiles, (entry) => {\n\t\t\t\t\t\treturn openBlock(), createElementBlock(\"button\", {\n\t\t\t\t\t\t\tkey: entry.filePath,\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\tclass: normalizeClass([\"profile-row\", { selected: selected.value?.filePath === entry.filePath }]),\n\t\t\t\t\t\t\tdisabled: profileActionBusy.value || !!editorMode.value,\n\t\t\t\t\t\t\t\"data-profile-row\": \"\",\n\t\t\t\t\t\t\t\"data-profile-id\": entry.profile.id,\n\t\t\t\t\t\t\tonClick: ($event) => selectProfile(entry)\n\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_15$4, [\n\t\t\t\t\t\t\t\tcreateTextVNode(toDisplayString(entry.profile.id) + \" \", 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", { class: normalizeClass([\"badge scope\", entry.scope]) }, toDisplayString(entry.scope), 3),\n\t\t\t\t\t\t\t\tshadowRelationship(entry) ? (openBlock(), createElementBlock(\"span\", _hoisted_16$4, toDisplayString(shadowRelationship(entry)), 1)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\t\tentry.profile.autoActivate ? (openBlock(), createElementBlock(\"span\", _hoisted_17$4, \"auto\")) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\t\tentry.lastApplied ? (openBlock(), createElementBlock(\"span\", _hoisted_18$3, \"last applied\")) : createCommentVNode(\"v-if\", true)\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_19$3, toDisplayString(entry.profile.name || \"(unnamed)\"), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_20$3, toDisplayString(modelLabel(entry.profile.model)) + \" · \" + toDisplayString(entry.profile.thinkingLevel), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"span\", { class: normalizeClass([\"profile-row-state\", {\n\t\t\t\t\t\t\t\terror: entry.errors > 0,\n\t\t\t\t\t\t\t\twarning: !entry.errors && entry.warnings > 0,\n\t\t\t\t\t\t\t\tready: !entry.errors && !entry.warnings\n\t\t\t\t\t\t\t}]) }, toDisplayString(profileState(entry)), 3)\n\t\t\t\t\t\t], 10, _hoisted_14$4);\n\t\t\t\t\t}), 128)), !collection.value.profiles.length ? (openBlock(), createElementBlock(\"div\", _hoisted_21$3, \" No agent profiles found. \")) : createCommentVNode(\"v-if\", true)])]), createBaseVNode(\"main\", _hoisted_22$3, [editorMode.value ? (openBlock(), createBlock(ProfileEditor_default, {\n\t\t\t\t\t\tkey: `${editorMode.value}-${selected.value?.filePath || \"new\"}`,\n\t\t\t\t\t\tmode: editorMode.value,\n\t\t\t\t\t\tcollection: collection.value,\n\t\t\t\t\t\tsource: editorMode.value === \"edit\" ? selected.value?.profile : void 0,\n\t\t\t\t\t\t\"source-selector\": editorMode.value === \"edit\" ? selected.value?.selector : void 0,\n\t\t\t\t\t\t\"create-scope\": createScope.value,\n\t\t\t\t\t\tonCancel: _cache[2] || (_cache[2] = ($event) => editorMode.value = void 0),\n\t\t\t\t\t\tonSaved: handleProfileSaved\n\t\t\t\t\t}, null, 8, [\n\t\t\t\t\t\t\"mode\",\n\t\t\t\t\t\t\"collection\",\n\t\t\t\t\t\t\"source\",\n\t\t\t\t\t\t\"source-selector\",\n\t\t\t\t\t\t\"create-scope\"\n\t\t\t\t\t])) : selected.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [\n\t\t\t\t\t\tcreateBaseVNode(\"section\", _hoisted_23$3, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, [createBaseVNode(\"div\", _hoisted_24$2, toDisplayString(selected.value.profile.name || selected.value.profile.id), 1), createBaseVNode(\"div\", _hoisted_25$2, toDisplayString(selected.value.filePath), 1)]),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_26$2, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", { class: normalizeClass([\"profile-applicability\", {\n\t\t\t\t\t\t\t\t\tready: selected.value.preview.applicable,\n\t\t\t\t\t\t\t\t\terror: !selected.value.preview.applicable\n\t\t\t\t\t\t\t\t}]) }, toDisplayString(selected.value.preview.applicable ? \"Ready to apply\" : \"Preflight failed\"), 3),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\t\t\tid: \"profileEditBtn\",\n\t\t\t\t\t\t\t\t\t\"data-icon\": \"✎\",\n\t\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\t\tonClick: _cache[3] || (_cache[3] = ($event) => startEditor(\"edit\"))\n\t\t\t\t\t\t\t\t}, \" Edit \"),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\t\t\tid: \"profileApplyBtn\",\n\t\t\t\t\t\t\t\t\tclass: \"primary\",\n\t\t\t\t\t\t\t\t\t\"data-icon\": \"▶\",\n\t\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\t\tdisabled: profileActionBusy.value || !selected.value.preview.applicable,\n\t\t\t\t\t\t\t\t\ttitle: selected.value.preview.applicable ? \"Apply this profile once\" : \"Resolve preflight errors before applying\",\n\t\t\t\t\t\t\t\t\tonClick: applySelectedProfile\n\t\t\t\t\t\t\t\t}, \" Apply once \", 8, _hoisted_27$2),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\t\t\tid: \"profileDeleteBtn\",\n\t\t\t\t\t\t\t\t\tclass: \"danger\",\n\t\t\t\t\t\t\t\t\t\"data-icon\": \"×\",\n\t\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\t\tdisabled: profileActionBusy.value,\n\t\t\t\t\t\t\t\t\tonClick: deleteSelectedProfile\n\t\t\t\t\t\t\t\t}, \" Delete \", 8, _hoisted_28$2)\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\tselected.value.profile.description ? (openBlock(), createElementBlock(\"p\", _hoisted_29$2, toDisplayString(selected.value.profile.description), 1)) : createCommentVNode(\"v-if\", true)\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tcreateBaseVNode(\"section\", _hoisted_30$2, [\n\t\t\t\t\t\t\t_cache[15] || (_cache[15] = createBaseVNode(\"div\", { class: \"profile-card-title\" }, \"One-shot transition\", -1)),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_31$2, [\n\t\t\t\t\t\t\t\t_cache[8] || (_cache[8] = createBaseVNode(\"div\", { class: \"profile-transition-head\" }, null, -1)),\n\t\t\t\t\t\t\t\t_cache[9] || (_cache[9] = createBaseVNode(\"div\", { class: \"profile-transition-head\" }, \"Current runtime\", -1)),\n\t\t\t\t\t\t\t\t_cache[10] || (_cache[10] = createBaseVNode(\"div\", { class: \"profile-transition-head\" }, \"Profile target\", -1)),\n\t\t\t\t\t\t\t\t_cache[11] || (_cache[11] = createBaseVNode(\"div\", null, \"Model\", -1)),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, toDisplayString(modelLabel(selected.value.preview.current.model)), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, toDisplayString(modelLabel(selected.value.preview.target.model)), 1),\n\t\t\t\t\t\t\t\t_cache[12] || (_cache[12] = createBaseVNode(\"div\", null, \"Thinking\", -1)),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, toDisplayString(selected.value.preview.current.thinkingLevel), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, toDisplayString(selected.value.preview.target.thinkingLevel), 1),\n\t\t\t\t\t\t\t\t_cache[13] || (_cache[13] = createBaseVNode(\"div\", null, \"Prompt stack\", -1)),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, toDisplayString(promptStackLabel(selected.value.preview.current.promptStack)), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, toDisplayString(promptStackLabel(selected.value.preview.target.promptStack)), 1)\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_32$2, [_cache[14] || (_cache[14] = createBaseVNode(\"span\", null, \"Effective tools after stack policy\", -1)), createBaseVNode(\"code\", null, toDisplayString(selected.value.preview.target.effectiveTools.join(\", \") || \"(none)\"), 1)])\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tcreateBaseVNode(\"section\", _hoisted_33$2, [_cache[16] || (_cache[16] = createBaseVNode(\"div\", { class: \"profile-card-title\" }, \"Resolution diagnostics\", -1)), createBaseVNode(\"div\", _hoisted_34$2, [!selected.value.preview.diagnostics.length ? (openBlock(), createElementBlock(\"div\", _hoisted_35$2, \" No diagnostics. \")) : createCommentVNode(\"v-if\", true), (openBlock(true), createElementBlock(Fragment, null, renderList(selected.value.preview.diagnostics, (diagnostic, index) => {\n\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"div\", {\n\t\t\t\t\t\t\t\tkey: `${diagnostic.field || \"\"}-${index}-${diagnostic.message}`,\n\t\t\t\t\t\t\t\tclass: normalizeClass([\"diagnostic\", diagnostic.level])\n\t\t\t\t\t\t\t}, [createBaseVNode(\"strong\", null, toDisplayString(diagnostic.level.toUpperCase()) + toDisplayString(diagnostic.field ? ` · ${diagnostic.field}` : \"\"), 1), createTextVNode(\": \" + toDisplayString(diagnostic.message), 1)], 2);\n\t\t\t\t\t\t}), 128))])])\n\t\t\t\t\t], 64)) : !editorMode.value ? (openBlock(), createElementBlock(\"section\", _hoisted_36$2, [..._cache[17] || (_cache[17] = [\n\t\t\t\t\t\tcreateTextVNode(\" Create a project profile here or capture the current runtime with \", -1),\n\t\t\t\t\t\tcreateBaseVNode(\"code\", null, \"/profile save <id>\", -1),\n\t\t\t\t\t\tcreateTextVNode(\". \", -1)\n\t\t\t\t\t])])) : createCommentVNode(\"v-if\", true), createBaseVNode(\"section\", _hoisted_37$2, [\n\t\t\t\t\t\t_cache[21] || (_cache[21] = createBaseVNode(\"div\", { class: \"profile-card-title\" }, \"Runtime and provenance\", -1)),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_38$2, [_cache[18] || (_cache[18] = createBaseVNode(\"span\", null, \"Current\", -1)), createBaseVNode(\"code\", null, toDisplayString(modelLabel(collection.value.status.current.model)) + \" · \" + toDisplayString(collection.value.status.current.thinkingLevel) + \" · \" + toDisplayString(promptStackLabel(collection.value.status.current.promptStack)), 1)]),\n\t\t\t\t\t\tcollection.value.status.lastApplied ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_39$2, [_cache[19] || (_cache[19] = createBaseVNode(\"span\", null, \"Last applied\", -1)), createBaseVNode(\"code\", null, toDisplayString(collection.value.status.lastApplied.provenance.profileId), 1)]),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_40$2, [_cache[20] || (_cache[20] = createBaseVNode(\"span\", null, \"Source definition\", -1)), createBaseVNode(\"code\", null, toDisplayString(collection.value.status.lastApplied.sourceState), 1)]),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_41$1, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, \"Model: \" + toDisplayString(driftLabel(collection.value.status.lastApplied.drift.model.changed)), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, \"Thinking: \" + toDisplayString(driftLabel(collection.value.status.lastApplied.drift.thinkingLevel.changed)), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, \"Stack: \" + toDisplayString(driftLabel(collection.value.status.lastApplied.drift.promptStack.changed)), 1)\n\t\t\t\t\t\t\t])\n\t\t\t\t\t\t], 64)) : (openBlock(), createElementBlock(\"div\", _hoisted_42$1, \"No profile has been applied in this session.\"))\n\t\t\t\t\t])])])) : createCommentVNode(\"v-if\", true)\n\t\t\t\t]);\n\t\t\t};\n\t\t}\n\t}), [[\"__scopeId\", \"data-v-17accaea\"]]);\n\t//#endregion\n\t//#region src/web-editor/client/theme.ts\n\tfunction readStoredTheme() {\n\t\ttry {\n\t\t\tconst theme = localStorage.getItem(THEME_STORAGE_KEY);\n\t\t\treturn theme === \"light\" || theme === \"dark\" ? theme : \"\";\n\t\t} catch {\n\t\t\treturn \"\";\n\t\t}\n\t}\n\tfunction systemTheme() {\n\t\treturn window.matchMedia?.(\"(prefers-color-scheme: dark)\")?.matches ? \"dark\" : \"light\";\n\t}\n\tfunction initialTheme() {\n\t\treturn readStoredTheme() || systemTheme();\n\t}\n\tfunction applyEditorTheme(theme) {\n\t\teditorTheme.value = theme;\n\t\tdocument.body.dataset.theme = theme;\n\t}\n\tfunction setEditorTheme(theme) {\n\t\tapplyEditorTheme(theme);\n\t\ttry {\n\t\t\tlocalStorage.setItem(THEME_STORAGE_KEY, theme);\n\t\t} catch {}\n\t}\n\tfunction toggleEditorTheme() {\n\t\tsetEditorTheme(editorTheme.value === \"dark\" ? \"light\" : \"dark\");\n\t}\n\tvar THEME_STORAGE_KEY, editorTheme;\n\tvar init_theme = __esmMin((() => {\n\t\tinit_vue_runtime_esm_bundler();\n\t\tTHEME_STORAGE_KEY = \"pi-forge-theme\";\n\t\teditorTheme = /* @__PURE__ */ ref(initialTheme());\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/dom.ts\n\tfunction el(id) {\n\t\tconst element = document.getElementById(id);\n\t\tif (!element) throw new Error(`Editor element #${id} is missing.`);\n\t\treturn element;\n\t}\n\tfunction query(root, selector) {\n\t\treturn root.querySelector(selector);\n\t}\n\tfunction queryAll(root, selector) {\n\t\treturn root.querySelectorAll(selector);\n\t}\n\tfunction escapeHtml(value) {\n\t\treturn String(value ?? \"\").replace(/[&<>\"']/g, (character) => ({\n\t\t\t\"&\": \"&\",\n\t\t\t\"<\": \"<\",\n\t\t\t\">\": \">\",\n\t\t\t\"\\\"\": \""\",\n\t\t\t\"'\": \"'\"\n\t\t})[character]);\n\t}\n\tfunction attr(value) {\n\t\treturn escapeHtml(value).replace(/`/g, \"`\");\n\t}\n\tvar init_dom = __esmMin((() => {}));\n\t//#endregion\n\t//#region src/web-editor/client/inspector.ts\n\tfunction createInspector(deps) {\n\t\tconst { api, stackForSubmit, renderDiagnostics, renderItemList, setStatus } = deps;\n\t\tconst selectedId = deps.getSelectedId;\n\t\tlet payloadSnapshot = { status: \"idle\" };\n\t\tlet previewCopyTexts = [];\n\t\tasync function validateStack() {\n\t\t\tconst stack = stackForSubmit();\n\t\t\tconst data = await api(\"/api/stacks/\" + encodeURIComponent(selectedId()) + \"/validate\", {\n\t\t\t\tmethod: \"POST\",\n\t\t\t\tbody: { stack }\n\t\t\t});\n\t\t\trenderDiagnostics(data.diagnostics || []);\n\t\t\trenderItemList();\n\t\t\thidePreview();\n\t\t\tsetStatus(\"Validation complete\", \"success\");\n\t\t}\n\t\tasync function previewStack() {\n\t\t\tconst stack = stackForSubmit();\n\t\t\tconst data = await api(\"/api/stacks/\" + encodeURIComponent(selectedId()) + \"/preview\", {\n\t\t\t\tmethod: \"POST\",\n\t\t\t\tbody: { stack }\n\t\t\t});\n\t\t\trenderDiagnostics(data.diagnostics || []);\n\t\t\trenderItemList();\n\t\t\trenderPreviewInspector(data);\n\t\t\tsetStatus(\"Preview rendered\", \"success\");\n\t\t}\n\t\tasync function refreshPayloadCapture(options = {}) {\n\t\t\tconst previousCapturedAt = payloadSnapshot.status === \"captured\" ? payloadSnapshot.capture?.capturedAt : \"\";\n\t\t\tpayloadSnapshot = await api(\"/api/payload\");\n\t\t\tupdatePayloadButton();\n\t\t\tconst nextCapturedAt = payloadSnapshot.status === \"captured\" ? payloadSnapshot.capture?.capturedAt : \"\";\n\t\t\tif (options.open || options.autoOpen && nextCapturedAt && nextCapturedAt !== previousCapturedAt) renderPayloadInspector(payloadSnapshot);\n\t\t}\n\t\tasync function armPayloadCapture(showInspector = false) {\n\t\t\tpayloadSnapshot = await api(\"/api/payload/arm\", { method: \"POST\" });\n\t\t\tupdatePayloadButton();\n\t\t\tsetStatus(\"Payload capture armed; send the next Pi prompt\");\n\t\t\tif (showInspector) renderPayloadInspector(payloadSnapshot);\n\t\t}\n\t\tasync function clearPayloadCapture() {\n\t\t\tpayloadSnapshot = await api(\"/api/payload\", { method: \"DELETE\" });\n\t\t\tupdatePayloadButton();\n\t\t\thidePreview();\n\t\t\tsetStatus(\"Payload capture cleared\", \"success\");\n\t\t}\n\t\tasync function openPayloadCapture() {\n\t\t\tawait refreshPayloadCapture();\n\t\t\tif (payloadSnapshot.status === \"captured\" || payloadSnapshot.status === \"armed\") {\n\t\t\t\trenderPayloadInspector(payloadSnapshot);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tawait armPayloadCapture();\n\t\t}\n\t\tfunction updatePayloadButton() {\n\t\t\tconst button = el(\"payloadBtn\");\n\t\t\tif (!button) return;\n\t\t\tbutton.classList.remove(\"primary\");\n\t\t\tif (payloadSnapshot.status === \"armed\") {\n\t\t\t\tbutton.textContent = \"Payload armed\";\n\t\t\t\tbutton.classList.add(\"primary\");\n\t\t\t\tbutton.title = \"Waiting for the next provider payload\";\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (payloadSnapshot.status === \"captured\") {\n\t\t\t\tbutton.textContent = \"View payload\";\n\t\t\t\tbutton.title = \"Open the latest captured provider payload\";\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tbutton.textContent = \"Arm payload\";\n\t\t\tbutton.title = \"Capture the next provider payload in this editor\";\n\t\t}\n\t\tfunction hidePreview() {\n\t\t\tconst pane = el(\"preview\");\n\t\t\tpane.classList.remove(\"open\");\n\t\t\tpane.innerHTML = \"\";\n\t\t\tpreviewCopyTexts = [];\n\t\t}\n\t\tfunction renderPreviewInspector(data) {\n\t\t\tconst pane = el(\"preview\");\n\t\t\tconst preview = data.preview;\n\t\t\tif (!preview) {\n\t\t\t\tpreviewCopyTexts = [data.text || \"\"];\n\t\t\t\tpane.innerHTML = \"<div class=\\\"preview-dialog\\\" role=\\\"dialog\\\" aria-modal=\\\"true\\\" aria-label=\\\"Prompt preview\\\"><div class=\\\"preview-head\\\"><div><div class=\\\"preview-title\\\">Preview</div><div class=\\\"preview-meta\\\">Plain text fallback</div></div><div class=\\\"preview-actions\\\"><button class=\\\"preview-copy\\\" data-copy-index=\\\"0\\\" data-icon=\\\"□\\\" title=\\\"Copy the full preview text\\\">Copy</button><button data-preview-close=\\\"true\\\" data-icon=\\\"×\\\" title=\\\"Close the preview\\\">Close</button></div></div><div class=\\\"preview-body\\\"><pre class=\\\"preview-text\\\">\" + escapeHtml(data.text || \"\") + \"</pre></div></div>\";\n\t\t\t\tpane.classList.add(\"open\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst sections = [preview.system, ...preview.messages || []];\n\t\t\tpreviewCopyTexts = [data.text || \"\", ...sections.map((section) => section.content || \"\")];\n\t\t\tconst sectionHtml = sections.map((section, index) => {\n\t\t\t\tconst open = index === 0 ? \" open\" : \"\";\n\t\t\t\tconst label = section.role ? section.role + \" · \" : \"\";\n\t\t\t\treturn \"<details class=\\\"preview-section\\\"\" + open + \"><summary><span class=\\\"preview-title\\\">\" + escapeHtml(section.title || section.id) + \"</span><span class=\\\"preview-meta\\\">\" + escapeHtml(label + formatCount(section.chars) + \" chars · ~\" + formatCount(section.approxTokens) + \" tokens\") + \"</span><button class=\\\"preview-copy\\\" data-copy-index=\\\"\" + attr(index + 1) + \"\\\" data-icon=\\\"□\\\" title=\\\"Copy this preview section\\\" onclick=\\\"event.preventDefault()\\\">Copy</button></summary><pre class=\\\"preview-text\\\">\" + escapeHtml(section.content || \"\") + \"</pre></details>\";\n\t\t\t}).join(\"\");\n\t\t\tpane.innerHTML = \"<div class=\\\"preview-dialog\\\" role=\\\"dialog\\\" aria-modal=\\\"true\\\" aria-label=\\\"Prompt preview\\\"><div class=\\\"preview-head\\\"><div><div class=\\\"preview-title\\\">Prompt preview: \" + escapeHtml(preview.stackId || selectedId()) + \"</div><div class=\\\"preview-meta\\\">\" + escapeHtml(formatCount(preview.totalChars) + \" chars · ~\" + formatCount(preview.approxTokens) + \" tokens · \" + (preview.messages || []).length + \" messages\") + \"</div></div><div class=\\\"preview-actions\\\"><button class=\\\"preview-copy\\\" data-copy-index=\\\"0\\\" data-icon=\\\"□\\\" title=\\\"Copy the full prompt preview\\\">Copy full</button><button data-preview-close=\\\"true\\\" data-icon=\\\"×\\\" title=\\\"Close the preview\\\">Close</button></div></div><div class=\\\"preview-body\\\">\" + sectionHtml + \"</div></div>\";\n\t\t\tpane.classList.add(\"open\");\n\t\t}\n\t\tfunction renderPayloadInspector(snapshot) {\n\t\t\tconst pane = el(\"preview\");\n\t\t\tif (snapshot.status === \"idle\") {\n\t\t\t\tpreviewCopyTexts = [];\n\t\t\t\tpane.innerHTML = \"<div class=\\\"preview-dialog\\\" role=\\\"dialog\\\" aria-modal=\\\"true\\\" aria-label=\\\"Provider payload capture\\\"><div class=\\\"preview-head\\\"><div><div class=\\\"preview-title\\\">Provider payload</div><div class=\\\"preview-meta\\\">No payload captured.</div></div><div class=\\\"preview-actions\\\"><button data-payload-arm=\\\"true\\\" data-icon=\\\"◆\\\" title=\\\"Capture the next provider payload\\\">Arm next</button><button data-preview-close=\\\"true\\\" data-icon=\\\"×\\\" title=\\\"Close the payload inspector\\\">Close</button></div></div><div class=\\\"preview-body\\\"><div class=\\\"empty\\\">Arm capture, then send the next prompt in Pi. The provider payload will appear here before it is sent.</div></div></div>\";\n\t\t\t\tpane.classList.add(\"open\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (snapshot.status === \"armed\") {\n\t\t\t\tconst meta = snapshot.armedAt ? \"Armed at \" + snapshot.armedAt : \"Waiting for next provider request\";\n\t\t\t\tpreviewCopyTexts = [];\n\t\t\t\tpane.innerHTML = \"<div class=\\\"preview-dialog\\\" role=\\\"dialog\\\" aria-modal=\\\"true\\\" aria-label=\\\"Provider payload capture\\\"><div class=\\\"preview-head\\\"><div><div class=\\\"preview-title\\\">Payload capture armed</div><div class=\\\"preview-meta\\\">\" + escapeHtml(meta) + \"</div></div><div class=\\\"preview-actions\\\"><button class=\\\"danger\\\" data-payload-clear=\\\"true\\\" data-icon=\\\"×\\\" title=\\\"Clear the armed payload capture\\\">Clear</button><button data-preview-close=\\\"true\\\" data-icon=\\\"×\\\" title=\\\"Close the payload inspector\\\">Close</button></div></div><div class=\\\"preview-body\\\"><div class=\\\"empty\\\">Send the next prompt in Pi. The exact provider payload will be captured here and redacted before display.</div></div></div>\";\n\t\t\t\tpane.classList.add(\"open\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst capture = snapshot.capture || {};\n\t\t\tconst sections = payloadSections(capture);\n\t\t\tpreviewCopyTexts = [capture.text || \"\", ...sections.map((section) => section.content || \"\")];\n\t\t\tconst sectionHtml = sections.map((section, index) => {\n\t\t\t\treturn \"<details class=\\\"preview-section\\\"\" + (index === 0 ? \" open\" : \"\") + \"><summary><span class=\\\"preview-title\\\">\" + escapeHtml(section.title) + \"</span><span class=\\\"preview-meta\\\">\" + escapeHtml(section.meta) + \"</span><button class=\\\"preview-copy\\\" data-copy-index=\\\"\" + attr(index + 1) + \"\\\" data-icon=\\\"□\\\" title=\\\"Copy this payload section\\\" onclick=\\\"event.preventDefault()\\\">Copy</button></summary><pre class=\\\"preview-text\\\">\" + escapeHtml(section.content || \"\") + \"</pre></details>\";\n\t\t\t}).join(\"\");\n\t\t\tpane.innerHTML = \"<div class=\\\"preview-dialog\\\" role=\\\"dialog\\\" aria-modal=\\\"true\\\" aria-label=\\\"Provider payload capture\\\"><div class=\\\"preview-head\\\"><div><div class=\\\"preview-title\\\">Provider payload</div><div class=\\\"preview-meta\\\">\" + escapeHtml([\n\t\t\t\tformatCount(capture.chars) + \" chars\",\n\t\t\t\t\"~\" + formatCount(capture.approxTokens) + \" tokens\",\n\t\t\t\tcapture.stackId ? \"stack \" + capture.stackId : void 0,\n\t\t\t\tcapture.truncated ? \"truncated\" : void 0\n\t\t\t].filter(Boolean).join(\" · \") + (capture.capturedAt ? \" · \" + capture.capturedAt : \"\")) + \"</div></div><div class=\\\"preview-actions\\\"><button class=\\\"preview-copy\\\" data-copy-index=\\\"0\\\" data-icon=\\\"□\\\" title=\\\"Copy the full redacted payload\\\">Copy full</button><button data-payload-arm=\\\"true\\\" data-icon=\\\"◆\\\" title=\\\"Capture the next provider payload\\\">Arm again</button><button class=\\\"danger\\\" data-payload-clear=\\\"true\\\" data-icon=\\\"×\\\" title=\\\"Clear the captured payload\\\">Clear</button><button data-preview-close=\\\"true\\\" data-icon=\\\"×\\\" title=\\\"Close the payload inspector\\\">Close</button></div></div><div class=\\\"preview-body\\\">\" + sectionHtml + \"</div></div>\";\n\t\t\tpane.classList.add(\"open\");\n\t\t}\n\t\tfunction payloadSections(capture) {\n\t\t\tconst value = capture.payload;\n\t\t\tif (value && typeof value === \"object\") {\n\t\t\t\tif (Array.isArray(value)) return value.map((item, index) => payloadSection(String(index), item));\n\t\t\t\tconst entries = Object.entries(value);\n\t\t\t\tif (entries.length) return entries.map(([key, item]) => payloadSection(key, item));\n\t\t\t}\n\t\t\treturn [{\n\t\t\t\ttitle: capture.error ? \"Stringify error\" : capture.truncated ? \"Raw truncated payload\" : \"Raw payload\",\n\t\t\t\tmeta: formatCount((capture.text || \"\").length) + \" chars\",\n\t\t\t\tcontent: capture.text || \"\"\n\t\t\t}];\n\t\t}\n\t\tfunction payloadSection(title, value) {\n\t\t\tconst rendered = JSON.stringify(value, null, 2);\n\t\t\tconst content = rendered === void 0 ? String(value) : rendered;\n\t\t\treturn {\n\t\t\t\ttitle,\n\t\t\t\tmeta: describePayloadValue(value) + \" · \" + formatCount(content.length) + \" chars\",\n\t\t\t\tcontent\n\t\t\t};\n\t\t}\n\t\tfunction describePayloadValue(value) {\n\t\t\tif (Array.isArray(value)) return \"array[\" + value.length + \"]\";\n\t\t\tif (value && typeof value === \"object\") return \"object{\" + Object.keys(value).length + \"}\";\n\t\t\tif (value === null) return \"null\";\n\t\t\treturn typeof value;\n\t\t}\n\t\tfunction formatCount(value) {\n\t\t\treturn Number(value || 0).toLocaleString();\n\t\t}\n\t\tasync function copyPreviewText(index) {\n\t\t\tconst text = previewCopyTexts[index] || \"\";\n\t\t\tif (!text) return;\n\t\t\tawait copyTextToClipboard(text);\n\t\t\tsetStatus(\"Copied text\", \"success\");\n\t\t}\n\t\tasync function copyTextToClipboard(text) {\n\t\t\tif (navigator.clipboard && window.isSecureContext) await navigator.clipboard.writeText(text);\n\t\t\telse {\n\t\t\t\tconst area = document.createElement(\"textarea\");\n\t\t\t\tarea.value = text;\n\t\t\t\tarea.style.position = \"fixed\";\n\t\t\t\tarea.style.left = \"-9999px\";\n\t\t\t\tdocument.body.appendChild(area);\n\t\t\t\tarea.select();\n\t\t\t\tdocument.execCommand(\"copy\");\n\t\t\t\tarea.remove();\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tvalidateStack,\n\t\t\tpreviewStack,\n\t\t\trefreshPayloadCapture,\n\t\t\tarmPayloadCapture,\n\t\t\tclearPayloadCapture,\n\t\t\topenPayloadCapture,\n\t\t\thidePreview,\n\t\t\tcopyPreviewText,\n\t\t\tcopyTextToClipboard\n\t\t};\n\t}\n\tvar init_inspector = __esmMin((() => {\n\t\tinit_dom();\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/components/StackItemEditor.vue?vue&type=script&setup=true&lang.ts\n\tvar _hoisted_1$5, _hoisted_2$5, _hoisted_3$5, _hoisted_4$5, _hoisted_5$5, _hoisted_6$5, _hoisted_7$4, _hoisted_8$4, _hoisted_9$4, _hoisted_10$4, _hoisted_11$4, _hoisted_12$3, _hoisted_13$3, _hoisted_14$3, _hoisted_15$3, _hoisted_16$3, _hoisted_17$3, _hoisted_18$2, _hoisted_19$2, _hoisted_20$2, _hoisted_21$2, _hoisted_22$2, _hoisted_23$2, _hoisted_24$1, _hoisted_25$1, _hoisted_26$1, _hoisted_27$1, _hoisted_28$1, _hoisted_29$1, _hoisted_30$1, _hoisted_31$1, _hoisted_32$1, _hoisted_33$1, _hoisted_34$1, _hoisted_35$1, _hoisted_36$1, _hoisted_37$1, _hoisted_38$1, _hoisted_39$1, _hoisted_40$1, StackItemEditor_vue_vue_type_script_setup_true_lang_default;\n\tvar init_StackItemEditor_vue_vue_type_script_setup_true_lang = __esmMin((() => {\n\t\tinit_vue_runtime_esm_bundler();\n\t\t_hoisted_1$5 = { class: \"item-form\" };\n\t\t_hoisted_2$5 = { class: \"item-fields\" };\n\t\t_hoisted_3$5 = { class: \"field\" };\n\t\t_hoisted_4$5 = [\"value\"];\n\t\t_hoisted_5$5 = { class: \"field\" };\n\t\t_hoisted_6$5 = [\"value\"];\n\t\t_hoisted_7$4 = { class: \"field\" };\n\t\t_hoisted_8$4 = [\"value\"];\n\t\t_hoisted_9$4 = { class: \"field\" };\n\t\t_hoisted_10$4 = [\"value\"];\n\t\t_hoisted_11$4 = [\"value\"];\n\t\t_hoisted_12$3 = {\n\t\t\tkey: 0,\n\t\t\tclass: \"field\"\n\t\t};\n\t\t_hoisted_13$3 = [\"value\"];\n\t\t_hoisted_14$3 = [\"value\"];\n\t\t_hoisted_15$3 = { class: \"item-body\" };\n\t\t_hoisted_16$3 = {\n\t\t\tkey: 0,\n\t\t\tclass: \"field content-field\"\n\t\t};\n\t\t_hoisted_17$3 = [\"value\"];\n\t\t_hoisted_18$2 = {\n\t\t\tkey: 1,\n\t\t\tclass: \"field wide slot-options\"\n\t\t};\n\t\t_hoisted_19$2 = { class: \"segmented\" };\n\t\t_hoisted_20$2 = [\"value\"];\n\t\t_hoisted_21$2 = {\n\t\t\tkey: 1,\n\t\t\tclass: \"options-grid\"\n\t\t};\n\t\t_hoisted_22$2 = [\"title\"];\n\t\t_hoisted_23$2 = [\"checked\"];\n\t\t_hoisted_24$1 = [\"title\"];\n\t\t_hoisted_25$1 = [\"checked\"];\n\t\t_hoisted_26$1 = [\"title\"];\n\t\t_hoisted_27$1 = [\"checked\"];\n\t\t_hoisted_28$1 = [\"title\"];\n\t\t_hoisted_29$1 = [\"value\"];\n\t\t_hoisted_30$1 = [\"title\"];\n\t\t_hoisted_31$1 = [\"value\"];\n\t\t_hoisted_32$1 = [\"title\"];\n\t\t_hoisted_33$1 = [\"value\"];\n\t\t_hoisted_34$1 = [\"title\"];\n\t\t_hoisted_35$1 = [\"value\"];\n\t\t_hoisted_36$1 = [\"title\"];\n\t\t_hoisted_37$1 = [\"value\"];\n\t\t_hoisted_38$1 = [\"title\"];\n\t\t_hoisted_39$1 = [\"checked\"];\n\t\t_hoisted_40$1 = {\n\t\t\tkey: 3,\n\t\t\tclass: \"wide option-note\"\n\t\t};\n\t\tStackItemEditor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({\n\t\t\t__name: \"StackItemEditor\",\n\t\t\tprops: {\n\t\t\t\titem: {},\n\t\t\t\tmode: {},\n\t\t\t\tslotNames: {},\n\t\t\t\troles: {}\n\t\t\t},\n\t\t\temits: [\n\t\t\t\t\"change\",\n\t\t\t\t\"error\",\n\t\t\t\t\"mode\",\n\t\t\t\t\"replace\"\n\t\t\t],\n\t\t\tsetup(__props, { emit: __emit }) {\n\t\t\t\tconst props = __props;\n\t\t\t\tconst emit = __emit;\n\t\t\t\tconst item = /* @__PURE__ */ reactive(props.item);\n\t\t\t\tconst mode = /* @__PURE__ */ ref(props.mode);\n\t\t\t\tconst optionsText = /* @__PURE__ */ ref(JSON.stringify(item.options || {}, null, 2));\n\t\t\t\tconst optionsError = /* @__PURE__ */ ref(false);\n\t\t\t\tconst options = computed(() => item.options || {});\n\t\t\t\tconst structuredOptionCount = computed(() => {\n\t\t\t\t\tif (item.slot === \"chat-history\") return 7;\n\t\t\t\t\tif ([\n\t\t\t\t\t\t\"tools\",\n\t\t\t\t\t\t\"tool-guidelines\",\n\t\t\t\t\t\t\"skills\",\n\t\t\t\t\t\t\"project-context\"\n\t\t\t\t\t].includes(item.slot || \"\")) return 1;\n\t\t\t\t\tif ([\"date\", \"date-cwd\"].includes(item.slot || \"\")) return 1;\n\t\t\t\t\treturn 0;\n\t\t\t\t});\n\t\t\t\tfunction setKind(kind) {\n\t\t\t\t\tif (kind === item.kind) return;\n\t\t\t\t\tconst base = {\n\t\t\t\t\t\tid: item.id,\n\t\t\t\t\t\tname: item.name,\n\t\t\t\t\t\tenabled: item.enabled,\n\t\t\t\t\t\trole: item.role,\n\t\t\t\t\t\ttags: item.tags,\n\t\t\t\t\t\tsource: item.source\n\t\t\t\t\t};\n\t\t\t\t\temit(\"replace\", kind === \"slot\" ? {\n\t\t\t\t\t\t...base,\n\t\t\t\t\t\tkind: \"slot\",\n\t\t\t\t\t\tslot: \"chat-history\"\n\t\t\t\t\t} : {\n\t\t\t\t\t\t...base,\n\t\t\t\t\t\tkind: \"block\",\n\t\t\t\t\t\tcontent: \"\"\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tfunction setString(key, value, optional = false, refreshList = false) {\n\t\t\t\t\tif (optional && !value.trim()) delete item[key];\n\t\t\t\t\telse item[key] = value;\n\t\t\t\t\temit(\"change\", refreshList);\n\t\t\t\t}\n\t\t\t\tfunction switchMode(next) {\n\t\t\t\t\tmode.value = next;\n\t\t\t\t\tif (next === \"form\" && optionsError.value) {\n\t\t\t\t\t\toptionsError.value = false;\n\t\t\t\t\t\temit(\"error\", \"\");\n\t\t\t\t\t}\n\t\t\t\t\toptionsText.value = JSON.stringify(item.options || {}, null, 2);\n\t\t\t\t\temit(\"mode\", next);\n\t\t\t\t}\n\t\t\t\tfunction setJsonOptions(value) {\n\t\t\t\t\toptionsText.value = value;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst parsed = value.trim() ? JSON.parse(value) : {};\n\t\t\t\t\t\titem.options = Object.keys(parsed).length ? parsed : void 0;\n\t\t\t\t\t\toptionsError.value = false;\n\t\t\t\t\t\temit(\"error\", \"\");\n\t\t\t\t\t\temit(\"change\", false);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\toptionsError.value = true;\n\t\t\t\t\t\temit(\"error\", error instanceof Error ? error.message : String(error));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfunction setOption(key, value, defaultValue = void 0) {\n\t\t\t\t\tconst next = { ...item.options || {} };\n\t\t\t\t\tif (value === void 0 || value === defaultValue) delete next[key];\n\t\t\t\t\telse next[key] = value;\n\t\t\t\t\titem.options = Object.keys(next).length ? next : void 0;\n\t\t\t\t\temit(\"change\", false);\n\t\t\t\t}\n\t\t\t\tfunction setNumberOption(key, value) {\n\t\t\t\t\tsetOption(key, value.trim() ? Number(value) : void 0);\n\t\t\t\t}\n\t\t\t\tfunction setArrayOption(key, value) {\n\t\t\t\t\tconst values = value.split(\",\").map((part) => part.trim()).filter(Boolean);\n\t\t\t\t\tsetOption(key, values.length ? values : void 0);\n\t\t\t\t}\n\t\t\t\tfunction optionHelp(key) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tincludeLastUserMessage: \"Keep the latest user message inside the inserted chat history.\",\n\t\t\t\t\t\tstripAssistantThinking: \"Remove prior assistant thinking blocks from inserted chat history while keeping visible text, tool calls, and tool results.\",\n\t\t\t\t\t\tincludeSummaries: \"Keep Pi branch and compaction summary messages inside inserted chat history.\",\n\t\t\t\t\t\ttoolMode: \"Keep tool calls/results or drop prior tool history from inserted chat history.\",\n\t\t\t\t\t\troles: \"Optional comma-separated message roles to keep, such as user, assistant, toolResult, compactionSummary.\",\n\t\t\t\t\t\tmaxMessages: \"Keep only the most recent N chat-history messages after filtering.\",\n\t\t\t\t\t\tmaxChars: \"Keep only the most recent chat-history messages within an approximate character budget.\",\n\t\t\t\t\t\tincludeTime: \"Render the current time in HH:MM:SS after the current date.\",\n\t\t\t\t\t\tformat: \"Choose XML or compact plain text rendering.\"\n\t\t\t\t\t}[key] || \"Advanced slot option.\";\n\t\t\t\t}\n\t\t\t\treturn (_ctx, _cache) => {\n\t\t\t\t\treturn openBlock(), createElementBlock(\"div\", _hoisted_1$5, [createBaseVNode(\"div\", _hoisted_2$5, [\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_3$5, [_cache[19] || (_cache[19] = createBaseVNode(\"label\", null, \"Kind\", -1)), createBaseVNode(\"select\", {\n\t\t\t\t\t\t\tid: \"itemKind\",\n\t\t\t\t\t\t\tvalue: item.kind,\n\t\t\t\t\t\t\tonChange: _cache[0] || (_cache[0] = ($event) => setKind($event.target.value))\n\t\t\t\t\t\t}, [..._cache[18] || (_cache[18] = [createBaseVNode(\"option\", { value: \"block\" }, \"block\", -1), createBaseVNode(\"option\", { value: \"slot\" }, \"slot\", -1)])], 40, _hoisted_4$5)]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_5$5, [_cache[20] || (_cache[20] = createBaseVNode(\"label\", null, \"ID\", -1)), createBaseVNode(\"input\", {\n\t\t\t\t\t\t\tid: \"itemId\",\n\t\t\t\t\t\t\tvalue: item.id,\n\t\t\t\t\t\t\tonInput: _cache[1] || (_cache[1] = ($event) => setString(\"id\", $event.target.value, false, true))\n\t\t\t\t\t\t}, null, 40, _hoisted_6$5)]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_7$4, [_cache[21] || (_cache[21] = createBaseVNode(\"label\", null, \"Name\", -1)), createBaseVNode(\"input\", {\n\t\t\t\t\t\t\tid: \"itemName\",\n\t\t\t\t\t\t\tvalue: item.name || \"\",\n\t\t\t\t\t\t\tonInput: _cache[2] || (_cache[2] = ($event) => setString(\"name\", $event.target.value, true, true))\n\t\t\t\t\t\t}, null, 40, _hoisted_8$4)]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_9$4, [_cache[22] || (_cache[22] = createBaseVNode(\"label\", null, \"Role\", -1)), createBaseVNode(\"select\", {\n\t\t\t\t\t\t\tid: \"itemRole\",\n\t\t\t\t\t\t\tvalue: item.role || \"\",\n\t\t\t\t\t\t\tonChange: _cache[3] || (_cache[3] = ($event) => setString(\"role\", $event.target.value, true, true))\n\t\t\t\t\t\t}, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.roles, (role) => {\n\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"option\", {\n\t\t\t\t\t\t\t\tkey: role,\n\t\t\t\t\t\t\t\tvalue: role\n\t\t\t\t\t\t\t}, toDisplayString(role || \"(none)\"), 9, _hoisted_11$4);\n\t\t\t\t\t\t}), 128))], 40, _hoisted_10$4)]),\n\t\t\t\t\t\titem.kind === \"slot\" ? (openBlock(), createElementBlock(\"div\", _hoisted_12$3, [_cache[23] || (_cache[23] = createBaseVNode(\"label\", null, \"Slot\", -1)), createBaseVNode(\"select\", {\n\t\t\t\t\t\t\tid: \"itemSlot\",\n\t\t\t\t\t\t\tvalue: item.slot || \"chat-history\",\n\t\t\t\t\t\t\tonChange: _cache[4] || (_cache[4] = ($event) => setString(\"slot\", $event.target.value, false, true))\n\t\t\t\t\t\t}, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.slotNames, (slot) => {\n\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"option\", {\n\t\t\t\t\t\t\t\tkey: slot,\n\t\t\t\t\t\t\t\tvalue: slot\n\t\t\t\t\t\t\t}, toDisplayString(slot), 9, _hoisted_14$3);\n\t\t\t\t\t\t}), 128))], 40, _hoisted_13$3)])) : createCommentVNode(\"v-if\", true)\n\t\t\t\t\t]), createBaseVNode(\"div\", _hoisted_15$3, [item.kind === \"block\" ? (openBlock(), createElementBlock(\"div\", _hoisted_16$3, [_cache[24] || (_cache[24] = createBaseVNode(\"label\", null, \"Content\", -1)), createBaseVNode(\"textarea\", {\n\t\t\t\t\t\tid: \"itemContent\",\n\t\t\t\t\t\tvalue: item.content || \"\",\n\t\t\t\t\t\tonInput: _cache[5] || (_cache[5] = ($event) => setString(\"content\", $event.target.value))\n\t\t\t\t\t}, null, 40, _hoisted_17$3)])) : (openBlock(), createElementBlock(\"div\", _hoisted_18$2, [\n\t\t\t\t\t\t_cache[37] || (_cache[37] = createBaseVNode(\"label\", null, \"Slot options\", -1)),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_19$2, [createBaseVNode(\"button\", {\n\t\t\t\t\t\t\tid: \"slotOptionsFormBtn\",\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\tclass: normalizeClass({ active: mode.value === \"form\" }),\n\t\t\t\t\t\t\tonClick: _cache[6] || (_cache[6] = ($event) => switchMode(\"form\"))\n\t\t\t\t\t\t}, \"Form\", 2), createBaseVNode(\"button\", {\n\t\t\t\t\t\t\tid: \"slotOptionsJsonBtn\",\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\tclass: normalizeClass({ active: mode.value === \"json\" }),\n\t\t\t\t\t\t\tonClick: _cache[7] || (_cache[7] = ($event) => switchMode(\"json\"))\n\t\t\t\t\t\t}, \"JSON\", 2)]),\n\t\t\t\t\t\tmode.value === \"json\" ? (openBlock(), createElementBlock(\"textarea\", {\n\t\t\t\t\t\t\tkey: 0,\n\t\t\t\t\t\t\tid: \"itemOptions\",\n\t\t\t\t\t\t\tclass: \"json-options\",\n\t\t\t\t\t\t\tvalue: optionsText.value,\n\t\t\t\t\t\t\tonInput: _cache[8] || (_cache[8] = ($event) => setJsonOptions($event.target.value))\n\t\t\t\t\t\t}, null, 40, _hoisted_20$2)) : (openBlock(), createElementBlock(\"div\", _hoisted_21$2, [\n\t\t\t\t\t\t\titem.slot === \"chat-history\" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"label\", {\n\t\t\t\t\t\t\t\t\tclass: \"checkline\",\n\t\t\t\t\t\t\t\t\ttitle: optionHelp(\"includeLastUserMessage\")\n\t\t\t\t\t\t\t\t}, [createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\ttype: \"checkbox\",\n\t\t\t\t\t\t\t\t\t\"data-option\": \"includeLastUserMessage\",\n\t\t\t\t\t\t\t\t\tchecked: options.value.includeLastUserMessage !== false,\n\t\t\t\t\t\t\t\t\tonChange: _cache[9] || (_cache[9] = ($event) => setOption(\"includeLastUserMessage\", $event.target.checked, true))\n\t\t\t\t\t\t\t\t}, null, 40, _hoisted_23$2), _cache[25] || (_cache[25] = createTextVNode(\" Include last user message \", -1))], 8, _hoisted_22$2),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"label\", {\n\t\t\t\t\t\t\t\t\tclass: \"checkline\",\n\t\t\t\t\t\t\t\t\ttitle: optionHelp(\"stripAssistantThinking\")\n\t\t\t\t\t\t\t\t}, [createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\ttype: \"checkbox\",\n\t\t\t\t\t\t\t\t\t\"data-option\": \"stripAssistantThinking\",\n\t\t\t\t\t\t\t\t\tchecked: options.value.stripAssistantThinking === true,\n\t\t\t\t\t\t\t\t\tonChange: _cache[10] || (_cache[10] = ($event) => setOption(\"stripAssistantThinking\", $event.target.checked, false))\n\t\t\t\t\t\t\t\t}, null, 40, _hoisted_25$1), _cache[26] || (_cache[26] = createTextVNode(\" Strip assistant thinking \", -1))], 8, _hoisted_24$1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"label\", {\n\t\t\t\t\t\t\t\t\tclass: \"checkline\",\n\t\t\t\t\t\t\t\t\ttitle: optionHelp(\"includeSummaries\")\n\t\t\t\t\t\t\t\t}, [createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\ttype: \"checkbox\",\n\t\t\t\t\t\t\t\t\t\"data-option\": \"includeSummaries\",\n\t\t\t\t\t\t\t\t\tchecked: options.value.includeSummaries !== false,\n\t\t\t\t\t\t\t\t\tonChange: _cache[11] || (_cache[11] = ($event) => setOption(\"includeSummaries\", $event.target.checked, true))\n\t\t\t\t\t\t\t\t}, null, 40, _hoisted_27$1), _cache[27] || (_cache[27] = createTextVNode(\" Include summaries \", -1))], 8, _hoisted_26$1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", {\n\t\t\t\t\t\t\t\t\tclass: \"field\",\n\t\t\t\t\t\t\t\t\ttitle: optionHelp(\"toolMode\")\n\t\t\t\t\t\t\t\t}, [_cache[29] || (_cache[29] = createBaseVNode(\"label\", null, \"Tool history\", -1)), createBaseVNode(\"select\", {\n\t\t\t\t\t\t\t\t\t\"data-option\": \"toolMode\",\n\t\t\t\t\t\t\t\t\tvalue: options.value.toolMode || \"keep\",\n\t\t\t\t\t\t\t\t\tonChange: _cache[12] || (_cache[12] = ($event) => setOption(\"toolMode\", $event.target.value, \"keep\"))\n\t\t\t\t\t\t\t\t}, [..._cache[28] || (_cache[28] = [createBaseVNode(\"option\", { value: \"keep\" }, \"keep\", -1), createBaseVNode(\"option\", { value: \"drop\" }, \"drop\", -1)])], 40, _hoisted_29$1)], 8, _hoisted_28$1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", {\n\t\t\t\t\t\t\t\t\tclass: \"field\",\n\t\t\t\t\t\t\t\t\ttitle: optionHelp(\"roles\")\n\t\t\t\t\t\t\t\t}, [_cache[30] || (_cache[30] = createBaseVNode(\"label\", null, \"Roles\", -1)), createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\t\"data-option\": \"roles\",\n\t\t\t\t\t\t\t\t\t\"data-array\": \"true\",\n\t\t\t\t\t\t\t\t\tvalue: Array.isArray(options.value.roles) ? options.value.roles.join(\", \") : \"\",\n\t\t\t\t\t\t\t\t\tplaceholder: \"comma,separated\",\n\t\t\t\t\t\t\t\t\tonChange: _cache[13] || (_cache[13] = ($event) => setArrayOption(\"roles\", $event.target.value))\n\t\t\t\t\t\t\t\t}, null, 40, _hoisted_31$1)], 8, _hoisted_30$1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", {\n\t\t\t\t\t\t\t\t\tclass: \"field\",\n\t\t\t\t\t\t\t\t\ttitle: optionHelp(\"maxMessages\")\n\t\t\t\t\t\t\t\t}, [_cache[31] || (_cache[31] = createBaseVNode(\"label\", null, \"Max messages\", -1)), createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t\t\t\tmin: \"1\",\n\t\t\t\t\t\t\t\t\t\"data-option\": \"maxMessages\",\n\t\t\t\t\t\t\t\t\tvalue: options.value.maxMessages ?? \"\",\n\t\t\t\t\t\t\t\t\tonChange: _cache[14] || (_cache[14] = ($event) => setNumberOption(\"maxMessages\", $event.target.value))\n\t\t\t\t\t\t\t\t}, null, 40, _hoisted_33$1)], 8, _hoisted_32$1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", {\n\t\t\t\t\t\t\t\t\tclass: \"field\",\n\t\t\t\t\t\t\t\t\ttitle: optionHelp(\"maxChars\")\n\t\t\t\t\t\t\t\t}, [_cache[32] || (_cache[32] = createBaseVNode(\"label\", null, \"Max chars\", -1)), createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t\t\t\tmin: \"1\",\n\t\t\t\t\t\t\t\t\t\"data-option\": \"maxChars\",\n\t\t\t\t\t\t\t\t\tvalue: options.value.maxChars ?? \"\",\n\t\t\t\t\t\t\t\t\tonChange: _cache[15] || (_cache[15] = ($event) => setNumberOption(\"maxChars\", $event.target.value))\n\t\t\t\t\t\t\t\t}, null, 40, _hoisted_35$1)], 8, _hoisted_34$1)\n\t\t\t\t\t\t\t], 64)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\"tools\",\n\t\t\t\t\t\t\t\t\"tool-guidelines\",\n\t\t\t\t\t\t\t\t\"skills\",\n\t\t\t\t\t\t\t\t\"project-context\"\n\t\t\t\t\t\t\t].includes(item.slot || \"\") ? (openBlock(), createElementBlock(\"div\", {\n\t\t\t\t\t\t\t\tkey: 1,\n\t\t\t\t\t\t\t\tclass: \"field\",\n\t\t\t\t\t\t\t\ttitle: optionHelp(\"format\")\n\t\t\t\t\t\t\t}, [_cache[34] || (_cache[34] = createBaseVNode(\"label\", null, \"Format\", -1)), createBaseVNode(\"select\", {\n\t\t\t\t\t\t\t\t\"data-option\": \"format\",\n\t\t\t\t\t\t\t\tvalue: options.value.format || \"xml\",\n\t\t\t\t\t\t\t\tonChange: _cache[16] || (_cache[16] = ($event) => setOption(\"format\", $event.target.value, \"xml\"))\n\t\t\t\t\t\t\t}, [..._cache[33] || (_cache[33] = [createBaseVNode(\"option\", { value: \"xml\" }, \"xml\", -1), createBaseVNode(\"option\", { value: \"plain\" }, \"plain\", -1)])], 40, _hoisted_37$1)], 8, _hoisted_36$1)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\t[\"date\", \"date-cwd\"].includes(item.slot || \"\") ? (openBlock(), createElementBlock(\"label\", {\n\t\t\t\t\t\t\t\tkey: 2,\n\t\t\t\t\t\t\t\tclass: \"checkline\",\n\t\t\t\t\t\t\t\ttitle: optionHelp(\"includeTime\")\n\t\t\t\t\t\t\t}, [createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\ttype: \"checkbox\",\n\t\t\t\t\t\t\t\t\"data-option\": \"includeTime\",\n\t\t\t\t\t\t\t\tchecked: options.value.includeTime === true,\n\t\t\t\t\t\t\t\tonChange: _cache[17] || (_cache[17] = ($event) => setOption(\"includeTime\", $event.target.checked, false))\n\t\t\t\t\t\t\t}, null, 40, _hoisted_39$1), _cache[35] || (_cache[35] = createTextVNode(\" Include current time \", -1))], 8, _hoisted_38$1)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\tstructuredOptionCount.value === 0 ? (openBlock(), createElementBlock(\"div\", _hoisted_40$1, \" This slot has no structured options yet. Use JSON mode for advanced settings. \")) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\t_cache[36] || (_cache[36] = createBaseVNode(\"div\", { class: \"wide option-note\" }, \"Unknown option keys are preserved. Use JSON mode for advanced settings.\", -1))\n\t\t\t\t\t\t]))\n\t\t\t\t\t]))])]);\n\t\t\t\t};\n\t\t\t}\n\t\t});\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/components/StackItemEditor.vue\n\tvar StackItemEditor_default;\n\tvar init_StackItemEditor = __esmMin((() => {\n\t\tinit_StackItemEditor_vue_vue_type_script_setup_true_lang();\n\t\tinit_StackItemEditor_vue_vue_type_script_setup_true_lang();\n\t\tStackItemEditor_default = StackItemEditor_vue_vue_type_script_setup_true_lang_default;\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/vue-item-host.ts\n\tfunction createVueItemHost(deps) {\n\t\tlet app;\n\t\tlet mode = \"form\";\n\t\tlet error = \"\";\n\t\tfunction mount(root) {\n\t\t\tunmount();\n\t\t\terror = \"\";\n\t\t\tconst stack = deps.getStack();\n\t\t\tconst index = deps.getSelectedIndex();\n\t\t\tconst item = stack?.items[index];\n\t\t\tif (!stack || !item) return false;\n\t\t\tapp = createApp(StackItemEditor_default, {\n\t\t\t\titem,\n\t\t\t\tmode,\n\t\t\t\tslotNames: deps.slotNames,\n\t\t\t\troles: deps.roles,\n\t\t\t\tonChange: (refreshList) => {\n\t\t\t\t\terror = \"\";\n\t\t\t\t\tdeps.markDirty();\n\t\t\t\t\tif (refreshList) deps.renderItemList();\n\t\t\t\t},\n\t\t\t\tonError: (message) => {\n\t\t\t\t\terror = message;\n\t\t\t\t\tif (message) deps.setStatus(\"Invalid item options JSON\", \"error\");\n\t\t\t\t},\n\t\t\t\tonMode: (next) => {\n\t\t\t\t\tmode = next;\n\t\t\t\t},\n\t\t\t\tonReplace: (replacement) => {\n\t\t\t\t\tstack.items[index] = replacement;\n\t\t\t\t\terror = \"\";\n\t\t\t\t\tdeps.markDirty();\n\t\t\t\t\tdeps.renderItemList();\n\t\t\t\t\tmount(root);\n\t\t\t\t}\n\t\t\t});\n\t\t\tapp.mount(root);\n\t\t\treturn true;\n\t\t}\n\t\tfunction unmount() {\n\t\t\tapp?.unmount();\n\t\t\tapp = void 0;\n\t\t}\n\t\tfunction reset() {\n\t\t\tmode = \"form\";\n\t\t\terror = \"\";\n\t\t}\n\t\treturn {\n\t\t\tmount,\n\t\t\tunmount,\n\t\t\treset,\n\t\t\tgetError: () => error\n\t\t};\n\t}\n\tvar init_vue_item_host = __esmMin((() => {\n\t\tinit_vue_runtime_esm_bundler();\n\t\tinit_StackItemEditor();\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/components/StackMetadataEditor.vue?vue&type=script&setup=true&lang.ts\n\tvar _hoisted_1$4, _hoisted_2$4, _hoisted_3$4, _hoisted_4$4, _hoisted_5$4, _hoisted_6$4, _hoisted_7$3, _hoisted_8$3, _hoisted_9$3, _hoisted_10$3, _hoisted_11$3, _hoisted_12$2, _hoisted_13$2, _hoisted_14$2, _hoisted_15$2, _hoisted_16$2, _hoisted_17$2, StackMetadataEditor_vue_vue_type_script_setup_true_lang_default;\n\tvar init_StackMetadataEditor_vue_vue_type_script_setup_true_lang = __esmMin((() => {\n\t\tinit_vue_runtime_esm_bundler();\n\t\t_hoisted_1$4 = { class: \"metadata-head\" };\n\t\t_hoisted_2$4 = [\"data-icon\"];\n\t\t_hoisted_3$4 = {\n\t\t\tid: \"metadataSummary\",\n\t\t\tclass: \"metadata-summary\"\n\t\t};\n\t\t_hoisted_4$4 = {\n\t\t\tid: \"settings\",\n\t\t\tclass: \"settings\"\n\t\t};\n\t\t_hoisted_5$4 = { class: \"field\" };\n\t\t_hoisted_6$4 = [\"value\"];\n\t\t_hoisted_7$3 = { class: \"field\" };\n\t\t_hoisted_8$3 = [\"value\"];\n\t\t_hoisted_9$3 = { class: \"field\" };\n\t\t_hoisted_10$3 = [\"value\"];\n\t\t_hoisted_11$3 = { class: \"field\" };\n\t\t_hoisted_12$2 = { class: \"checkline\" };\n\t\t_hoisted_13$2 = [\"checked\"];\n\t\t_hoisted_14$2 = { class: \"field wide\" };\n\t\t_hoisted_15$2 = [\"value\"];\n\t\t_hoisted_16$2 = { class: \"field wide\" };\n\t\t_hoisted_17$2 = [\"value\"];\n\t\tStackMetadataEditor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({\n\t\t\t__name: \"StackMetadataEditor\",\n\t\t\tprops: {\n\t\t\t\tstack: {},\n\t\t\t\tfilePath: {},\n\t\t\t\tcollapsed: { type: Boolean }\n\t\t\t},\n\t\t\temits: [\"change\", \"toggle\"],\n\t\t\tsetup(__props, { emit: __emit }) {\n\t\t\t\tconst props = __props;\n\t\t\t\tconst emit = __emit;\n\t\t\t\tconst collapsed = /* @__PURE__ */ ref(props.collapsed);\n\t\t\t\tconst summary = computed(() => [\n\t\t\t\t\tprops.stack.id || \"(no id)\",\n\t\t\t\t\tprops.stack.name || \"(unnamed)\",\n\t\t\t\t\tprops.stack.mode || \"replace\",\n\t\t\t\t\tprops.filePath\n\t\t\t\t].filter(Boolean).join(\" | \"));\n\t\t\t\tfunction setOptionalString(key, value) {\n\t\t\t\t\tif (value.trim()) props.stack[key] = value;\n\t\t\t\t\telse delete props.stack[key];\n\t\t\t\t\temit(\"change\");\n\t\t\t\t}\n\t\t\t\tfunction setMode(value) {\n\t\t\t\t\tprops.stack.mode = value;\n\t\t\t\t\temit(\"change\");\n\t\t\t\t}\n\t\t\t\tfunction setAutoActivate(value) {\n\t\t\t\t\tprops.stack.autoActivate = value;\n\t\t\t\t\temit(\"change\");\n\t\t\t\t}\n\t\t\t\tfunction toggleMetadata() {\n\t\t\t\t\tcollapsed.value = !collapsed.value;\n\t\t\t\t\temit(\"toggle\", collapsed.value);\n\t\t\t\t}\n\t\t\t\treturn (_ctx, _cache) => {\n\t\t\t\t\treturn openBlock(), createElementBlock(Fragment, null, [createBaseVNode(\"div\", _hoisted_1$4, [\n\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\tid: \"metadataToggleBtn\",\n\t\t\t\t\t\t\t\"data-icon\": collapsed.value ? \"▸\" : \"▾\",\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\ttitle: \"Show or hide stack metadata\",\n\t\t\t\t\t\t\tonClick: toggleMetadata\n\t\t\t\t\t\t}, toDisplayString(collapsed.value ? \"Show metadata\" : \"Hide metadata\"), 9, _hoisted_2$4),\n\t\t\t\t\t\t_cache[4] || (_cache[4] = createBaseVNode(\"div\", { class: \"metadata-title\" }, \"Stack metadata\", -1)),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_3$4, toDisplayString(summary.value), 1)\n\t\t\t\t\t]), withDirectives(createBaseVNode(\"div\", _hoisted_4$4, [\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_5$4, [_cache[5] || (_cache[5] = createBaseVNode(\"label\", null, \"Stack ID\", -1)), createBaseVNode(\"input\", {\n\t\t\t\t\t\t\tid: \"stackId\",\n\t\t\t\t\t\t\tvalue: __props.stack.id,\n\t\t\t\t\t\t\treadonly: \"\",\n\t\t\t\t\t\t\ttitle: \"Stack IDs are immutable; use Fork to create a new ID.\"\n\t\t\t\t\t\t}, null, 8, _hoisted_6$4)]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_7$3, [_cache[6] || (_cache[6] = createBaseVNode(\"label\", null, \"Name\", -1)), createBaseVNode(\"input\", {\n\t\t\t\t\t\t\tid: \"stackName\",\n\t\t\t\t\t\t\tvalue: __props.stack.name || \"\",\n\t\t\t\t\t\t\tonInput: _cache[0] || (_cache[0] = ($event) => setOptionalString(\"name\", $event.target.value))\n\t\t\t\t\t\t}, null, 40, _hoisted_8$3)]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_9$3, [_cache[8] || (_cache[8] = createBaseVNode(\"label\", null, \"Mode\", -1)), createBaseVNode(\"select\", {\n\t\t\t\t\t\t\tid: \"stackMode\",\n\t\t\t\t\t\t\tvalue: __props.stack.mode || \"replace\",\n\t\t\t\t\t\t\tonChange: _cache[1] || (_cache[1] = ($event) => setMode($event.target.value))\n\t\t\t\t\t\t}, [..._cache[7] || (_cache[7] = [\n\t\t\t\t\t\t\tcreateBaseVNode(\"option\", { value: \"replace\" }, \"replace\", -1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"option\", { value: \"append\" }, \"append\", -1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"option\", { value: \"prepend\" }, \"prepend\", -1)\n\t\t\t\t\t\t])], 40, _hoisted_10$3)]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_11$3, [_cache[10] || (_cache[10] = createBaseVNode(\"label\", null, \"Auto activate\", -1)), createBaseVNode(\"label\", _hoisted_12$2, [createBaseVNode(\"input\", {\n\t\t\t\t\t\t\tid: \"stackAuto\",\n\t\t\t\t\t\t\ttype: \"checkbox\",\n\t\t\t\t\t\t\tchecked: __props.stack.autoActivate === true,\n\t\t\t\t\t\t\tonChange: _cache[2] || (_cache[2] = ($event) => setAutoActivate($event.target.checked))\n\t\t\t\t\t\t}, null, 40, _hoisted_13$2), _cache[9] || (_cache[9] = createTextVNode(\" enabled \", -1))])]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_14$2, [_cache[11] || (_cache[11] = createBaseVNode(\"label\", null, \"Description\", -1)), createBaseVNode(\"textarea\", {\n\t\t\t\t\t\t\tid: \"stackDescription\",\n\t\t\t\t\t\t\tclass: \"wide\",\n\t\t\t\t\t\t\tvalue: __props.stack.description || \"\",\n\t\t\t\t\t\t\tonInput: _cache[3] || (_cache[3] = ($event) => setOptionalString(\"description\", $event.target.value))\n\t\t\t\t\t\t}, null, 40, _hoisted_15$2)]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_16$2, [_cache[12] || (_cache[12] = createBaseVNode(\"label\", null, \"File\", -1)), createBaseVNode(\"input\", {\n\t\t\t\t\t\t\tvalue: __props.filePath,\n\t\t\t\t\t\t\tdisabled: \"\"\n\t\t\t\t\t\t}, null, 8, _hoisted_17$2)])\n\t\t\t\t\t], 512), [[vShow, !collapsed.value]])], 64);\n\t\t\t\t};\n\t\t\t}\n\t\t});\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/components/StackMetadataEditor.vue\n\tvar StackMetadataEditor_default;\n\tvar init_StackMetadataEditor = __esmMin((() => {\n\t\tinit_StackMetadataEditor_vue_vue_type_script_setup_true_lang();\n\t\tinit_StackMetadataEditor_vue_vue_type_script_setup_true_lang();\n\t\tStackMetadataEditor_default = StackMetadataEditor_vue_vue_type_script_setup_true_lang_default;\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/vue-metadata-host.ts\n\tfunction createVueMetadataHost(deps) {\n\t\tlet app;\n\t\tfunction mount(root) {\n\t\t\tunmount();\n\t\t\tconst stack = deps.getStack();\n\t\t\tif (!stack) return;\n\t\t\tapp = createApp(StackMetadataEditor_default, {\n\t\t\t\tstack,\n\t\t\t\tfilePath: deps.getFilePath(),\n\t\t\t\tcollapsed: deps.getCollapsed(),\n\t\t\t\tonChange: deps.markDirty,\n\t\t\t\tonToggle: (collapsed) => {\n\t\t\t\t\tdeps.setCollapsed(collapsed);\n\t\t\t\t\tdeps.setStatus(collapsed ? \"Stack metadata hidden\" : \"Stack metadata shown\");\n\t\t\t\t}\n\t\t\t});\n\t\t\tapp.mount(root);\n\t\t}\n\t\tfunction unmount() {\n\t\t\tapp?.unmount();\n\t\t\tapp = void 0;\n\t\t}\n\t\treturn {\n\t\t\tmount,\n\t\t\tunmount\n\t\t};\n\t}\n\tvar init_vue_metadata_host = __esmMin((() => {\n\t\tinit_vue_runtime_esm_bundler();\n\t\tinit_StackMetadataEditor();\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/components/PolicyEditor.vue?vue&type=script&setup=true&lang.ts\n\tvar _hoisted_1$3, _hoisted_2$3, _hoisted_3$3, _hoisted_4$3, _hoisted_5$3, _hoisted_6$3, _hoisted_7$2, _hoisted_8$2, _hoisted_9$2, _hoisted_10$2, _hoisted_11$2, _hoisted_12$1, _hoisted_13$1, _hoisted_14$1, _hoisted_15$1, _hoisted_16$1, _hoisted_17$1, _hoisted_18$1, _hoisted_19$1, _hoisted_20$1, _hoisted_21$1, _hoisted_22$1, _hoisted_23$1, PolicyEditor_vue_vue_type_script_setup_true_lang_default;\n\tvar init_PolicyEditor_vue_vue_type_script_setup_true_lang = __esmMin((() => {\n\t\tinit_vue_runtime_esm_bundler();\n\t\t_hoisted_1$3 = { class: \"tab-section\" };\n\t\t_hoisted_2$3 = {\n\t\t\tid: \"policyRows\",\n\t\t\tclass: \"data-table\"\n\t\t};\n\t\t_hoisted_3$3 = [\"data-policy-kind\", \"data-policy-mode\"];\n\t\t_hoisted_4$3 = { class: \"policy-title\" };\n\t\t_hoisted_5$3 = { class: \"modal-meta\" };\n\t\t_hoisted_6$3 = { class: \"field\" };\n\t\t_hoisted_7$2 = { class: \"segmented policy-mode\" };\n\t\t_hoisted_8$2 = [\"data-policy-mode-option\", \"onClick\"];\n\t\t_hoisted_9$2 = { class: \"field\" };\n\t\t_hoisted_10$2 = {\n\t\t\tclass: \"selected-patterns\",\n\t\t\t\"data-selected-patterns\": \"\"\n\t\t};\n\t\t_hoisted_11$2 = {\n\t\t\tkey: 0,\n\t\t\tclass: \"selected-pattern-empty\"\n\t\t};\n\t\t_hoisted_12$1 = [\"data-remove-policy-pattern\", \"onClick\"];\n\t\t_hoisted_13$1 = [\n\t\t\t\"placeholder\",\n\t\t\t\"disabled\",\n\t\t\t\"value\",\n\t\t\t\"onInput\"\n\t\t];\n\t\t_hoisted_14$1 = { class: \"resource-picker\" };\n\t\t_hoisted_15$1 = { key: 0 };\n\t\t_hoisted_16$1 = [\n\t\t\t\"list\",\n\t\t\t\"value\",\n\t\t\t\"onInput\",\n\t\t\t\"onKeydown\"\n\t\t];\n\t\t_hoisted_17$1 = [\"id\"];\n\t\t_hoisted_18$1 = [\"value\"];\n\t\t_hoisted_19$1 = {\n\t\t\tclass: \"resource-list\",\n\t\t\t\"data-resource-list\": \"\"\n\t\t};\n\t\t_hoisted_20$1 = {\n\t\t\tkey: 0,\n\t\t\tclass: \"resource-empty\"\n\t\t};\n\t\t_hoisted_21$1 = [\n\t\t\t\"data-resource-name\",\n\t\t\t\"title\",\n\t\t\t\"onClick\"\n\t\t];\n\t\t_hoisted_22$1 = {\n\t\t\tkey: 1,\n\t\t\tclass: \"resource-empty\"\n\t\t};\n\t\t_hoisted_23$1 = {\n\t\t\tclass: \"policy-summary\",\n\t\t\t\"data-policy-summary\": \"\"\n\t\t};\n\t\tPolicyEditor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({\n\t\t\t__name: \"PolicyEditor\",\n\t\t\tprops: {\n\t\t\t\tstack: {},\n\t\t\t\tresources: {}\n\t\t\t},\n\t\t\temits: [\"change\", \"status\"],\n\t\t\tsetup(__props, { expose: __expose, emit: __emit }) {\n\t\t\t\tconst props = __props;\n\t\t\t\tconst emit = __emit;\n\t\t\t\tconst policyKinds = [{\n\t\t\t\t\tkind: \"tools\",\n\t\t\t\t\tlabel: \"Tools\"\n\t\t\t\t}, {\n\t\t\t\t\tkind: \"skills\",\n\t\t\t\t\tlabel: \"Skills\"\n\t\t\t\t}];\n\t\t\t\tconst rows = /* @__PURE__ */ reactive({\n\t\t\t\t\ttools: createRowState(\"tools\"),\n\t\t\t\t\tskills: createRowState(\"skills\")\n\t\t\t\t});\n\t\t\t\tconst policyError = /* @__PURE__ */ ref(\"\");\n\t\t\t\twatch(() => props.stack, () => reset());\n\t\t\t\tfunction createRowState(kind) {\n\t\t\t\t\tconst policy = stackPolicyObject(kind);\n\t\t\t\t\tconst mode = policyMode(policy);\n\t\t\t\t\treturn {\n\t\t\t\t\t\tmode,\n\t\t\t\t\t\tpatternsText: policyPatternsToText(mode === \"deny\" ? policy.deny : mode === \"allow\" ? policy.allow : []),\n\t\t\t\t\t\tfilter: \"\"\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tfunction reset() {\n\t\t\t\t\tfor (const { kind } of policyKinds) Object.assign(rows[kind], createRowState(kind));\n\t\t\t\t\tpolicyError.value = \"\";\n\t\t\t\t}\n\t\t\t\tfunction stackPolicyObject(kind) {\n\t\t\t\t\tconst policy = props.stack[kind];\n\t\t\t\t\treturn policy && typeof policy === \"object\" && !Array.isArray(policy) ? policy : {};\n\t\t\t\t}\n\t\t\t\tfunction policyMode(policy) {\n\t\t\t\t\tconst allow = Array.isArray(policy.allow) ? policy.allow : [];\n\t\t\t\t\tif ((Array.isArray(policy.deny) ? policy.deny : []).length && !allow.length) return \"deny\";\n\t\t\t\t\tif (allow.length) return \"allow\";\n\t\t\t\t\treturn \"none\";\n\t\t\t\t}\n\t\t\t\tfunction policyPatternsToText(patterns) {\n\t\t\t\t\treturn Array.isArray(patterns) ? patterns.join(\"\\n\") : \"\";\n\t\t\t\t}\n\t\t\t\tfunction parsePolicyPatterns(value) {\n\t\t\t\t\treturn String(value || \"\").split(/[\\n,]/).map((pattern) => pattern.trim()).filter(Boolean);\n\t\t\t\t}\n\t\t\t\tfunction selectedPatterns(kind) {\n\t\t\t\t\tconst row = rows[kind];\n\t\t\t\t\treturn row.mode === \"none\" ? [] : parsePolicyPatterns(row.patternsText);\n\t\t\t\t}\n\t\t\t\tfunction duplicatePolicyPattern(patterns) {\n\t\t\t\t\tconst seen = /* @__PURE__ */ new Set();\n\t\t\t\t\tfor (const pattern of patterns) {\n\t\t\t\t\t\tif (seen.has(pattern)) return pattern;\n\t\t\t\t\t\tseen.add(pattern);\n\t\t\t\t\t}\n\t\t\t\t\treturn \"\";\n\t\t\t\t}\n\t\t\t\tfunction setMode(kind, mode) {\n\t\t\t\t\tconst row = rows[kind];\n\t\t\t\t\trow.mode = mode;\n\t\t\t\t\tif (mode === \"none\") row.patternsText = \"\";\n\t\t\t\t\tsyncPolicies();\n\t\t\t\t}\n\t\t\t\tfunction onPatternsInput(kind, event) {\n\t\t\t\t\trows[kind].patternsText = event.target.value;\n\t\t\t\t\tsyncPolicies();\n\t\t\t\t}\n\t\t\t\tfunction onFilterInput(kind, event) {\n\t\t\t\t\trows[kind].filter = event.target.value;\n\t\t\t\t}\n\t\t\t\tfunction addPolicyPattern(kind, name) {\n\t\t\t\t\tif (!name) return;\n\t\t\t\t\tconst row = rows[kind];\n\t\t\t\t\tif (row.mode === \"none\") row.mode = \"allow\";\n\t\t\t\t\tconst patterns = parsePolicyPatterns(row.patternsText);\n\t\t\t\t\tif (!patterns.includes(name)) patterns.push(name);\n\t\t\t\t\trow.patternsText = patterns.join(\"\\n\");\n\t\t\t\t\trow.filter = \"\";\n\t\t\t\t\tsyncPolicies();\n\t\t\t\t}\n\t\t\t\tfunction removePolicyPattern(kind, pattern) {\n\t\t\t\t\tif (!pattern) return;\n\t\t\t\t\trows[kind].patternsText = parsePolicyPatterns(rows[kind].patternsText).filter((candidate) => candidate !== pattern).join(\"\\n\");\n\t\t\t\t\tsyncPolicies();\n\t\t\t\t}\n\t\t\t\tfunction addAutocompletePattern(kind) {\n\t\t\t\t\tconst typed = rows[kind].filter.trim();\n\t\t\t\t\tif (!typed) return;\n\t\t\t\t\tconst resources = availableResources(kind, typed);\n\t\t\t\t\taddPolicyPattern(kind, resources.find((resource) => resource.name.toLowerCase() === typed.toLowerCase())?.name || resources[0]?.name || typed);\n\t\t\t\t}\n\t\t\t\tfunction syncPolicies() {\n\t\t\t\t\tconst errors = [];\n\t\t\t\t\tfor (const { kind } of policyKinds) {\n\t\t\t\t\t\tconst row = rows[kind];\n\t\t\t\t\t\tconst patterns = row.mode === \"none\" ? [] : parsePolicyPatterns(row.patternsText);\n\t\t\t\t\t\tconst duplicate = duplicatePolicyPattern(patterns);\n\t\t\t\t\t\tif (duplicate) errors.push(`${kind}.${row.mode} has duplicate pattern: ${duplicate}`);\n\t\t\t\t\t\tconst policy = { ...stackPolicyObject(kind) };\n\t\t\t\t\t\tdelete policy.allow;\n\t\t\t\t\t\tdelete policy.deny;\n\t\t\t\t\t\tif (row.mode === \"allow\" && patterns.length) policy.allow = patterns;\n\t\t\t\t\t\tif (row.mode === \"deny\" && patterns.length) policy.deny = patterns;\n\t\t\t\t\t\tif (Object.keys(policy).length) props.stack[kind] = policy;\n\t\t\t\t\t\telse delete props.stack[kind];\n\t\t\t\t\t}\n\t\t\t\t\tpolicyError.value = errors[0] || \"\";\n\t\t\t\t\temit(\"change\", policyError.value);\n\t\t\t\t\tif (policyError.value) emit(\"status\", policyError.value, \"error\");\n\t\t\t\t}\n\t\t\t\tfunction policyPatternPlaceholder(mode) {\n\t\t\t\t\tif (mode === \"allow\") return \"read\\nbrowser-*\";\n\t\t\t\t\tif (mode === \"deny\") return \"browser-danger\\nlegacy-*\";\n\t\t\t\t\treturn \"\";\n\t\t\t\t}\n\t\t\t\tfunction policySummary(kind) {\n\t\t\t\t\tconst mode = rows[kind].mode;\n\t\t\t\t\tconst patterns = mode === \"none\" ? [] : parsePolicyPatterns(rows[kind].patternsText);\n\t\t\t\t\tif (mode === \"allow\" && patterns.some((pattern) => pattern !== \"*\")) return `Allow list active: ${patterns.length} pattern${patterns.length === 1 ? \"\" : \"s\"}.`;\n\t\t\t\t\tif (mode === \"allow\" && patterns.length) return `Unrestricted ${kind}.`;\n\t\t\t\t\tif (mode === \"deny\" && patterns.length) return `Deny list active: ${patterns.length} pattern${patterns.length === 1 ? \"\" : \"s\"}.`;\n\t\t\t\t\treturn `Unrestricted ${kind}.`;\n\t\t\t\t}\n\t\t\t\tfunction policyResourceMatchesFilter(resource, needle) {\n\t\t\t\t\treturn [\n\t\t\t\t\t\tresource.name,\n\t\t\t\t\t\tresource.description,\n\t\t\t\t\t\tresource.source\n\t\t\t\t\t].filter(Boolean).some((value) => String(value).toLowerCase().includes(needle));\n\t\t\t\t}\n\t\t\t\tfunction availableResources(kind, filter = rows[kind].filter) {\n\t\t\t\t\tconst selected = new Set(selectedPatterns(kind));\n\t\t\t\t\tconst needle = filter.trim().toLowerCase();\n\t\t\t\t\treturn (props.resources[kind] || []).filter((resource) => !selected.has(resource.name)).filter((resource) => !needle || policyResourceMatchesFilter(resource, needle));\n\t\t\t\t}\n\t\t\t\tfunction resourceTitle(resource) {\n\t\t\t\t\treturn [\n\t\t\t\t\t\tresource.description,\n\t\t\t\t\t\tresource.source ? `Source: ${resource.source}` : \"\",\n\t\t\t\t\t\tresource.active ? \"Active tool\" : \"\",\n\t\t\t\t\t\tresource.hidden ? \"Hidden from model invocation\" : \"\"\n\t\t\t\t\t].filter(Boolean).join(\"\\n\") || resource.name;\n\t\t\t\t}\n\t\t\t\tfunction resourceLabel(resource) {\n\t\t\t\t\tconst suffix = resource.active ? \" *\" : resource.hidden ? \" hidden\" : \"\";\n\t\t\t\t\treturn resource.name + suffix;\n\t\t\t\t}\n\t\t\t\t__expose({\n\t\t\t\t\tgetError: () => policyError.value,\n\t\t\t\t\treset\n\t\t\t\t});\n\t\t\t\treturn (_ctx, _cache) => {\n\t\t\t\t\treturn openBlock(), createElementBlock(\"div\", _hoisted_1$3, [\n\t\t\t\t\t\t_cache[4] || (_cache[4] = createBaseVNode(\"div\", { class: \"tab-section-title\" }, \"Tool policy and skill visibility\", -1)),\n\t\t\t\t\t\t_cache[5] || (_cache[5] = createBaseVNode(\"div\", { class: \"tab-section-meta\" }, \" Tool rules constrain active tools. Skill rules only filter model-visible skills rendered by pi-forge; they do not block explicit skill invocation. Patterns support exact names and * wildcards. \", -1)),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_2$3, [_cache[3] || (_cache[3] = createBaseVNode(\"div\", { class: \"data-row header policy-row\" }, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, \"Resource\"),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, \"Mode\"),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, \"Patterns\"),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, \"Available\"),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, \"Status\")\n\t\t\t\t\t\t], -1)), (openBlock(), createElementBlock(Fragment, null, renderList(policyKinds, ({ kind, label }) => {\n\t\t\t\t\t\t\treturn createBaseVNode(\"div\", {\n\t\t\t\t\t\t\t\tkey: kind,\n\t\t\t\t\t\t\t\tclass: \"data-row policy-row\",\n\t\t\t\t\t\t\t\t\"data-policy-row\": \"\",\n\t\t\t\t\t\t\t\t\"data-policy-kind\": kind,\n\t\t\t\t\t\t\t\t\"data-policy-mode\": rows[kind].mode\n\t\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, [createBaseVNode(\"div\", _hoisted_4$3, toDisplayString(label), 1), createBaseVNode(\"div\", _hoisted_5$3, toDisplayString(kind), 1)]),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_6$3, [_cache[0] || (_cache[0] = createBaseVNode(\"label\", null, \"Mode\", -1)), createBaseVNode(\"div\", _hoisted_7$2, [(openBlock(), createElementBlock(Fragment, null, renderList([\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tvalue: \"none\",\n\t\t\t\t\t\t\t\t\t\tlabel: \"Unrestricted\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tvalue: \"allow\",\n\t\t\t\t\t\t\t\t\t\tlabel: \"Allow\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tvalue: \"deny\",\n\t\t\t\t\t\t\t\t\t\tlabel: \"Deny\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t], (option) => {\n\t\t\t\t\t\t\t\t\treturn createBaseVNode(\"button\", {\n\t\t\t\t\t\t\t\t\t\tkey: option.value,\n\t\t\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\t\t\t\"data-policy-mode-option\": option.value,\n\t\t\t\t\t\t\t\t\t\tclass: normalizeClass({ active: rows[kind].mode === option.value }),\n\t\t\t\t\t\t\t\t\t\tonClick: ($event) => setMode(kind, option.value)\n\t\t\t\t\t\t\t\t\t}, toDisplayString(option.label), 11, _hoisted_8$2);\n\t\t\t\t\t\t\t\t}), 64))])]),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_9$2, [\n\t\t\t\t\t\t\t\t\t_cache[2] || (_cache[2] = createBaseVNode(\"label\", null, \"Patterns\", -1)),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_10$2, [!selectedPatterns(kind).length ? (openBlock(), createElementBlock(\"span\", _hoisted_11$2, \"No selected patterns.\")) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(selectedPatterns(kind), (pattern, index) => {\n\t\t\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"button\", {\n\t\t\t\t\t\t\t\t\t\t\tkey: `${pattern}-${index}`,\n\t\t\t\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\t\t\t\tclass: \"selected-pattern-chip\",\n\t\t\t\t\t\t\t\t\t\t\t\"data-remove-policy-pattern\": pattern,\n\t\t\t\t\t\t\t\t\t\t\ttitle: \"Remove selected pattern\",\n\t\t\t\t\t\t\t\t\t\t\tonClick: ($event) => removePolicyPattern(kind, pattern)\n\t\t\t\t\t\t\t\t\t\t}, [createTextVNode(toDisplayString(pattern), 1), _cache[1] || (_cache[1] = createBaseVNode(\"span\", { \"aria-hidden\": \"true\" }, \"x\", -1))], 8, _hoisted_12$1);\n\t\t\t\t\t\t\t\t\t}), 128))]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"textarea\", {\n\t\t\t\t\t\t\t\t\t\tclass: \"policy-patterns\",\n\t\t\t\t\t\t\t\t\t\t\"data-policy-patterns\": \"\",\n\t\t\t\t\t\t\t\t\t\tspellcheck: \"false\",\n\t\t\t\t\t\t\t\t\t\tplaceholder: policyPatternPlaceholder(rows[kind].mode),\n\t\t\t\t\t\t\t\t\t\tdisabled: rows[kind].mode === \"none\",\n\t\t\t\t\t\t\t\t\t\tvalue: rows[kind].patternsText,\n\t\t\t\t\t\t\t\t\t\tonInput: ($event) => onPatternsInput(kind, $event)\n\t\t\t\t\t\t\t\t\t}, null, 40, _hoisted_13$1)\n\t\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_14$1, [createBaseVNode(\"label\", null, \"Available \" + toDisplayString(kind), 1), props.resources[kind]?.length ? (openBlock(), createElementBlock(\"div\", _hoisted_15$1, [\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\t\tclass: \"resource-filter\",\n\t\t\t\t\t\t\t\t\t\t\"data-resource-filter\": \"\",\n\t\t\t\t\t\t\t\t\t\tlist: `resource-options-${kind}`,\n\t\t\t\t\t\t\t\t\t\tplaceholder: \"Type to filter or add\",\n\t\t\t\t\t\t\t\t\t\tvalue: rows[kind].filter,\n\t\t\t\t\t\t\t\t\t\tonInput: ($event) => onFilterInput(kind, $event),\n\t\t\t\t\t\t\t\t\t\tonKeydown: withKeys(withModifiers(($event) => addAutocompletePattern(kind), [\"prevent\"]), [\"enter\"])\n\t\t\t\t\t\t\t\t\t}, null, 40, _hoisted_16$1),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"datalist\", {\n\t\t\t\t\t\t\t\t\t\tid: `resource-options-${kind}`,\n\t\t\t\t\t\t\t\t\t\t\"data-resource-options\": \"\"\n\t\t\t\t\t\t\t\t\t}, [(openBlock(true), createElementBlock(Fragment, null, renderList(availableResources(kind, \"\"), (resource) => {\n\t\t\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"option\", {\n\t\t\t\t\t\t\t\t\t\t\tkey: resource.name,\n\t\t\t\t\t\t\t\t\t\t\tvalue: resource.name\n\t\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_18$1);\n\t\t\t\t\t\t\t\t\t}), 128))], 8, _hoisted_17$1),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_19$1, [!availableResources(kind).length ? (openBlock(), createElementBlock(\"div\", _hoisted_20$1, \" No matching unselected \" + toDisplayString(kind) + \". \", 1)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(availableResources(kind), (resource) => {\n\t\t\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"button\", {\n\t\t\t\t\t\t\t\t\t\t\tkey: resource.name,\n\t\t\t\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\t\t\t\tclass: normalizeClass([\"resource-chip\", {\n\t\t\t\t\t\t\t\t\t\t\t\tactive: resource.active,\n\t\t\t\t\t\t\t\t\t\t\t\thidden: resource.hidden\n\t\t\t\t\t\t\t\t\t\t\t}]),\n\t\t\t\t\t\t\t\t\t\t\t\"data-resource-name\": resource.name,\n\t\t\t\t\t\t\t\t\t\t\ttitle: resourceTitle(resource),\n\t\t\t\t\t\t\t\t\t\t\tonClick: ($event) => addPolicyPattern(kind, resource.name)\n\t\t\t\t\t\t\t\t\t\t}, toDisplayString(resourceLabel(resource)), 11, _hoisted_21$1);\n\t\t\t\t\t\t\t\t\t}), 128))])\n\t\t\t\t\t\t\t\t])) : (openBlock(), createElementBlock(\"div\", _hoisted_22$1, \"No registered \" + toDisplayString(kind) + \" reported.\", 1))]),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_23$1, toDisplayString(policySummary(kind)), 1)\n\t\t\t\t\t\t\t], 8, _hoisted_3$3);\n\t\t\t\t\t\t}), 64))])\n\t\t\t\t\t]);\n\t\t\t\t};\n\t\t\t}\n\t\t});\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/components/PolicyEditor.vue\n\tvar PolicyEditor_default;\n\tvar init_PolicyEditor = __esmMin((() => {\n\t\tinit_PolicyEditor_vue_vue_type_script_setup_true_lang();\n\t\tinit_PolicyEditor_vue_vue_type_script_setup_true_lang();\n\t\tPolicyEditor_default = PolicyEditor_vue_vue_type_script_setup_true_lang_default;\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/components/RegexEditor.vue?vue&type=script&setup=true&lang.ts\n\tvar _hoisted_1$2, _hoisted_2$2, _hoisted_3$2, _hoisted_4$2, _hoisted_5$2, _hoisted_6$2, _hoisted_7$1, _hoisted_8$1, _hoisted_9$1, _hoisted_10$1, _hoisted_11$1, _hoisted_12, _hoisted_13, _hoisted_14, _hoisted_15, _hoisted_16, _hoisted_17, _hoisted_18, _hoisted_19, _hoisted_20, _hoisted_21, _hoisted_22, _hoisted_23, _hoisted_24, _hoisted_25, _hoisted_26, _hoisted_27, _hoisted_28, _hoisted_29, _hoisted_30, _hoisted_31, _hoisted_32, _hoisted_33, _hoisted_34, _hoisted_35, _hoisted_36, _hoisted_37, _hoisted_38, _hoisted_39, _hoisted_40, _hoisted_41, _hoisted_42, _hoisted_43, RegexEditor_vue_vue_type_script_setup_true_lang_default;\n\tvar init_RegexEditor_vue_vue_type_script_setup_true_lang = __esmMin((() => {\n\t\tinit_vue_runtime_esm_bundler();\n\t\t_hoisted_1$2 = { class: \"tab-section\" };\n\t\t_hoisted_2$2 = { class: \"modal-toolbar\" };\n\t\t_hoisted_3$2 = {\n\t\t\tid: \"regexRows\",\n\t\t\tclass: \"data-table\"\n\t\t};\n\t\t_hoisted_4$2 = { class: \"regex-controls\" };\n\t\t_hoisted_5$2 = [\"onClick\"];\n\t\t_hoisted_6$2 = [\"onClick\"];\n\t\t_hoisted_7$1 = { class: \"regex-fields\" };\n\t\t_hoisted_8$1 = [\"value\"];\n\t\t_hoisted_9$1 = { class: \"checkline\" };\n\t\t_hoisted_10$1 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_11$1 = { class: \"field\" };\n\t\t_hoisted_12 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_13 = { class: \"field\" };\n\t\t_hoisted_14 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_15 = { class: \"field\" };\n\t\t_hoisted_16 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_17 = [\"value\"];\n\t\t_hoisted_18 = { class: \"field\" };\n\t\t_hoisted_19 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_20 = [\"value\"];\n\t\t_hoisted_21 = { class: \"field\" };\n\t\t_hoisted_22 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_23 = { class: \"field span-2\" };\n\t\t_hoisted_24 = {\n\t\t\tclass: \"regex-checks\",\n\t\t\ttitle: \"compiled only; empty means default\"\n\t\t};\n\t\t_hoisted_25 = [\"onUpdate:modelValue\", \"value\"];\n\t\t_hoisted_26 = { class: \"field span-2\" };\n\t\t_hoisted_27 = {\n\t\t\tclass: \"regex-checks\",\n\t\t\ttitle: \"message rules only; empty means all roles\"\n\t\t};\n\t\t_hoisted_28 = [\"onUpdate:modelValue\", \"value\"];\n\t\t_hoisted_29 = { class: \"field\" };\n\t\t_hoisted_30 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_31 = { class: \"field\" };\n\t\t_hoisted_32 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_33 = { class: \"field\" };\n\t\t_hoisted_34 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_35 = { class: \"field\" };\n\t\t_hoisted_36 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_37 = { class: \"field span-2\" };\n\t\t_hoisted_38 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_39 = { class: \"field span-3\" };\n\t\t_hoisted_40 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_41 = { class: \"field span-3\" };\n\t\t_hoisted_42 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_43 = [\"onClick\"];\n\t\tRegexEditor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({\n\t\t\t__name: \"RegexEditor\",\n\t\t\tprops: { stack: {} },\n\t\t\temits: [\"change\", \"validate\"],\n\t\t\tsetup(__props, { expose: __expose, emit: __emit }) {\n\t\t\t\tconst props = __props;\n\t\t\t\tconst emit = __emit;\n\t\t\t\tconst regexStages = [\"history\", \"compiled\"];\n\t\t\t\tconst regexEffects = [\"outgoing\", \"finalize\"];\n\t\t\t\tconst regexTargets = [\"system\", \"messages\"];\n\t\t\t\tconst regexRoles = [\n\t\t\t\t\t\"system\",\n\t\t\t\t\t\"user\",\n\t\t\t\t\t\"assistant\",\n\t\t\t\t\t\"custom\"\n\t\t\t\t];\n\t\t\t\tlet nextRowKey = 1;\n\t\t\t\tconst rows = /* @__PURE__ */ ref(readStackRules());\n\t\t\t\tconst regexError = /* @__PURE__ */ ref(\"\");\n\t\t\t\tlet resettingFromStack = false;\n\t\t\t\twatch(() => props.stack, () => {\n\t\t\t\t\tresettingFromStack = true;\n\t\t\t\t\trows.value = readStackRules();\n\t\t\t\t\tregexError.value = \"\";\n\t\t\t\t\tresettingFromStack = false;\n\t\t\t\t}, { flush: \"sync\" });\n\t\t\t\twatch(rows, () => {\n\t\t\t\t\tif (!resettingFromStack) syncRules();\n\t\t\t\t}, {\n\t\t\t\t\tdeep: true,\n\t\t\t\t\tflush: \"sync\"\n\t\t\t\t});\n\t\t\t\tfunction readStackRules() {\n\t\t\t\t\tconst candidate = props.stack.regex?.rules;\n\t\t\t\t\tif (!Array.isArray(candidate)) return [];\n\t\t\t\t\treturn candidate.map((rule) => formFromRule(rule));\n\t\t\t\t}\n\t\t\t\tfunction formFromRule(rule) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tkey: nextRowKey++,\n\t\t\t\t\t\toriginal: { ...rule },\n\t\t\t\t\t\tid: textValue(rule.id),\n\t\t\t\t\t\tname: textValue(rule.name),\n\t\t\t\t\t\tenabled: rule.enabled !== false,\n\t\t\t\t\t\tstage: selectedChoice(rule.stage, regexStages, \"compiled\"),\n\t\t\t\t\t\teffect: selectedChoice(rule.effect, regexEffects, \"outgoing\"),\n\t\t\t\t\t\tflags: textValue(rule.flags),\n\t\t\t\t\t\ttargets: selectedValues(rule.targets, regexTargets),\n\t\t\t\t\t\troles: selectedValues(rule.roles, regexRoles),\n\t\t\t\t\t\tmaxMessages: inputValue(rule.maxMessages),\n\t\t\t\t\t\tmaxChars: inputValue(rule.maxChars),\n\t\t\t\t\t\tminDepth: inputValue(rule.minDepth),\n\t\t\t\t\t\tmaxDepth: inputValue(rule.maxDepth),\n\t\t\t\t\t\ttrimStrings: Array.isArray(rule.trimStrings) ? rule.trimStrings.join(\"\\n\") : \"\",\n\t\t\t\t\t\tpattern: textValue(rule.pattern),\n\t\t\t\t\t\treplace: textValue(rule.replace)\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tfunction selectedChoice(value, choices, fallback) {\n\t\t\t\t\treturn typeof value === \"string\" && choices.some((choice) => choice === value) ? value : fallback;\n\t\t\t\t}\n\t\t\t\tfunction selectedValues(value, choices) {\n\t\t\t\t\tif (!Array.isArray(value)) return [];\n\t\t\t\t\treturn choices.filter((choice) => value.includes(choice));\n\t\t\t\t}\n\t\t\t\tfunction textValue(value) {\n\t\t\t\t\treturn typeof value === \"string\" ? value : \"\";\n\t\t\t\t}\n\t\t\t\tfunction inputValue(value) {\n\t\t\t\t\treturn value === void 0 || value === null ? \"\" : String(value);\n\t\t\t\t}\n\t\t\t\tfunction addRule() {\n\t\t\t\t\trows.value = [...rows.value, formFromRule(defaultRegexRule())];\n\t\t\t\t}\n\t\t\t\tfunction deleteRule(index) {\n\t\t\t\t\trows.value = rows.value.filter((_, rowIndex) => rowIndex !== index);\n\t\t\t\t}\n\t\t\t\tfunction moveRule(index, offset) {\n\t\t\t\t\tconst destination = index + offset;\n\t\t\t\t\tif (destination < 0 || destination >= rows.value.length) return;\n\t\t\t\t\tconst reordered = [...rows.value];\n\t\t\t\t\t[reordered[index], reordered[destination]] = [reordered[destination], reordered[index]];\n\t\t\t\t\trows.value = reordered;\n\t\t\t\t}\n\t\t\t\tfunction defaultRegexRule() {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tid: uniqueRegexRuleId(),\n\t\t\t\t\t\tenabled: true,\n\t\t\t\t\t\tstage: \"compiled\",\n\t\t\t\t\t\teffect: \"outgoing\",\n\t\t\t\t\t\ttargets: [\"messages\"],\n\t\t\t\t\t\tpattern: \"\",\n\t\t\t\t\t\treplace: \"\"\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tfunction uniqueRegexRuleId() {\n\t\t\t\t\tconst existing = new Set(rows.value.map((row) => row.id).filter(Boolean));\n\t\t\t\t\tlet index = existing.size + 1;\n\t\t\t\t\tlet id = `regex-${index}`;\n\t\t\t\t\twhile (existing.has(id)) id = `regex-${++index}`;\n\t\t\t\t\treturn id;\n\t\t\t\t}\n\t\t\t\tfunction syncRules() {\n\t\t\t\t\tconst rules = [];\n\t\t\t\t\tconst seen = /* @__PURE__ */ new Set();\n\t\t\t\t\tconst errors = [];\n\t\t\t\t\trows.value.forEach((row, index) => {\n\t\t\t\t\t\tconst rule = ruleFromForm(row);\n\t\t\t\t\t\tconst label = rule.id || `rule ${index + 1}`;\n\t\t\t\t\t\tif (!rule.id) errors.push(`Regex rule ${index + 1} needs an id.`);\n\t\t\t\t\t\telse if (seen.has(rule.id)) errors.push(`Duplicate regex rule id: ${rule.id}`);\n\t\t\t\t\t\tseen.add(rule.id);\n\t\t\t\t\t\tif (!rule.pattern) errors.push(`Regex rule ${label} needs a pattern.`);\n\t\t\t\t\t\tif (hasInputValue(row.maxMessages) && !rule.maxMessages) errors.push(`Regex rule ${label} maxMessages must be a positive integer.`);\n\t\t\t\t\t\tif (hasInputValue(row.maxChars) && !rule.maxChars) errors.push(`Regex rule ${label} maxChars must be a positive integer.`);\n\t\t\t\t\t\tif (hasInputValue(row.minDepth) && rule.minDepth === void 0) errors.push(`Regex rule ${label} minDepth must be a non-negative integer.`);\n\t\t\t\t\t\tif (hasInputValue(row.maxDepth) && rule.maxDepth === void 0) errors.push(`Regex rule ${label} maxDepth must be a non-negative integer.`);\n\t\t\t\t\t\tif (rule.minDepth !== void 0 && rule.maxDepth !== void 0 && rule.maxDepth < rule.minDepth) errors.push(`Regex rule ${label} maxDepth must be greater than or equal to minDepth.`);\n\t\t\t\t\t\trules.push(rule);\n\t\t\t\t\t});\n\t\t\t\t\tif (rules.length > 0) props.stack.regex = {\n\t\t\t\t\t\t...props.stack.regex || {},\n\t\t\t\t\t\tschemaVersion: props.stack.regex?.schemaVersion || 1,\n\t\t\t\t\t\trules\n\t\t\t\t\t};\n\t\t\t\t\telse delete props.stack.regex;\n\t\t\t\t\tregexError.value = errors[0] || \"\";\n\t\t\t\t\temit(\"change\", regexError.value);\n\t\t\t\t}\n\t\t\t\tfunction ruleFromForm(form) {\n\t\t\t\t\tconst rule = { ...form.original };\n\t\t\t\t\tfor (const key of [\n\t\t\t\t\t\t\"id\",\n\t\t\t\t\t\t\"name\",\n\t\t\t\t\t\t\"enabled\",\n\t\t\t\t\t\t\"stage\",\n\t\t\t\t\t\t\"effect\",\n\t\t\t\t\t\t\"pattern\",\n\t\t\t\t\t\t\"flags\",\n\t\t\t\t\t\t\"replace\",\n\t\t\t\t\t\t\"trimStrings\",\n\t\t\t\t\t\t\"roles\",\n\t\t\t\t\t\t\"targets\",\n\t\t\t\t\t\t\"maxMessages\",\n\t\t\t\t\t\t\"maxChars\",\n\t\t\t\t\t\t\"minDepth\",\n\t\t\t\t\t\t\"maxDepth\"\n\t\t\t\t\t]) delete rule[key];\n\t\t\t\t\trule.id = form.id.trim();\n\t\t\t\t\tsetOptionalString(rule, \"name\", form.name);\n\t\t\t\t\trule.enabled = form.enabled;\n\t\t\t\t\trule.stage = form.stage || \"compiled\";\n\t\t\t\t\trule.effect = form.effect || \"outgoing\";\n\t\t\t\t\trule.pattern = form.pattern;\n\t\t\t\t\tconst flags = form.flags.trim();\n\t\t\t\t\tif (flags) rule.flags = flags;\n\t\t\t\t\tif (form.replace) rule.replace = form.replace;\n\t\t\t\t\tconst trimStrings = form.trimStrings.split(/\\r?\\n/).filter((line) => line.length > 0);\n\t\t\t\t\tif (trimStrings.length > 0) rule.trimStrings = trimStrings;\n\t\t\t\t\tif (form.roles.length > 0) rule.roles = [...form.roles];\n\t\t\t\t\tif (form.targets.length > 0) rule.targets = [...form.targets];\n\t\t\t\t\tconst maxMessages = positiveIntegerFromInput(form.maxMessages);\n\t\t\t\t\tconst maxChars = positiveIntegerFromInput(form.maxChars);\n\t\t\t\t\tconst minDepth = nonNegativeIntegerFromInput(form.minDepth);\n\t\t\t\t\tconst maxDepth = nonNegativeIntegerFromInput(form.maxDepth);\n\t\t\t\t\tif (maxMessages) rule.maxMessages = maxMessages;\n\t\t\t\t\tif (maxChars) rule.maxChars = maxChars;\n\t\t\t\t\tif (minDepth !== void 0) rule.minDepth = minDepth;\n\t\t\t\t\tif (maxDepth !== void 0) rule.maxDepth = maxDepth;\n\t\t\t\t\treturn rule;\n\t\t\t\t}\n\t\t\t\tfunction positiveIntegerFromInput(value) {\n\t\t\t\t\tif (!hasInputValue(value)) return void 0;\n\t\t\t\t\tconst number = Number(value);\n\t\t\t\t\treturn Number.isInteger(number) && number > 0 ? number : void 0;\n\t\t\t\t}\n\t\t\t\tfunction nonNegativeIntegerFromInput(value) {\n\t\t\t\t\tif (!hasInputValue(value)) return void 0;\n\t\t\t\t\tconst number = Number(value);\n\t\t\t\t\treturn Number.isInteger(number) && number >= 0 ? number : void 0;\n\t\t\t\t}\n\t\t\t\tfunction hasInputValue(value) {\n\t\t\t\t\treturn String(value ?? \"\").trim().length > 0;\n\t\t\t\t}\n\t\t\t\tfunction setOptionalString(target, key, value) {\n\t\t\t\t\tconst trimmed = value.trim();\n\t\t\t\t\tif (trimmed) target[key] = trimmed;\n\t\t\t\t}\n\t\t\t\tfunction warningForForm(form) {\n\t\t\t\t\treturn regexRuleWarning(ruleFromForm(form));\n\t\t\t\t}\n\t\t\t\tfunction regexRuleWarning(rule) {\n\t\t\t\t\tif (rule.effect === \"finalize\") return \"Warning: finalize runs after streaming and replaces the stored assistant transcript. Use stage \\\"compiled\\\" with target \\\"messages\\\".\";\n\t\t\t\t\tif (typeof rule.replace === \"string\" && /\\{\\{\\s*match\\s*\\}\\}/i.test(rule.replace)) return \"Warning: {{match}} is not pi-forge replacement syntax. Use $& or $0 for the full match.\";\n\t\t\t\t\treturn \"\";\n\t\t\t\t}\n\t\t\t\tfunction serializeOriginal(rule) {\n\t\t\t\t\treturn JSON.stringify(rule || {});\n\t\t\t\t}\n\t\t\t\t__expose({ getError: () => regexError.value });\n\t\t\t\treturn (_ctx, _cache) => {\n\t\t\t\t\treturn openBlock(), createElementBlock(\"div\", _hoisted_1$2, [\n\t\t\t\t\t\t_cache[18] || (_cache[18] = createBaseVNode(\"div\", { class: \"tab-section-title\" }, \"Regex rules\", -1)),\n\t\t\t\t\t\t_cache[19] || (_cache[19] = createBaseVNode(\"div\", { class: \"tab-section-meta\" }, \" Ordered JavaScript RegExp replacements for outgoing prompt text and finalized assistant messages. \", -1)),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_2$2, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\t\tid: \"addRegexRuleBtn\",\n\t\t\t\t\t\t\t\t\"data-icon\": \"+\",\n\t\t\t\t\t\t\t\ttitle: \"Add a regex rule\",\n\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\tonClick: addRule\n\t\t\t\t\t\t\t}, \" Add rule \"),\n\t\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\t\tid: \"validateRegexRulesBtn\",\n\t\t\t\t\t\t\t\t\"data-icon\": \"!\",\n\t\t\t\t\t\t\t\ttitle: \"Validate the edited stack\",\n\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\tonClick: _cache[0] || (_cache[0] = ($event) => emit(\"validate\"))\n\t\t\t\t\t\t\t}, \" Validate \"),\n\t\t\t\t\t\t\t_cache[1] || (_cache[1] = createBaseVNode(\"span\", { class: \"modal-spacer\" }, null, -1)),\n\t\t\t\t\t\t\t_cache[2] || (_cache[2] = createBaseVNode(\"span\", { class: \"modal-meta\" }, \"Save writes these rules to stack.regex.rules.\", -1))\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_3$2, [(openBlock(true), createElementBlock(Fragment, null, renderList(rows.value, (row, index) => {\n\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"div\", {\n\t\t\t\t\t\t\t\tkey: row.key,\n\t\t\t\t\t\t\t\tclass: \"data-row regex-row\",\n\t\t\t\t\t\t\t\t\"data-regex-row\": \"\"\n\t\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_4$2, [createBaseVNode(\"button\", {\n\t\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\t\t\"data-regex-up\": \"true\",\n\t\t\t\t\t\t\t\t\t\"data-icon\": \"↑\",\n\t\t\t\t\t\t\t\t\ttitle: \"Move this rule up\",\n\t\t\t\t\t\t\t\t\tonClick: ($event) => moveRule(index, -1)\n\t\t\t\t\t\t\t\t}, \" Up \", 8, _hoisted_5$2), createBaseVNode(\"button\", {\n\t\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\t\t\"data-regex-down\": \"true\",\n\t\t\t\t\t\t\t\t\t\"data-icon\": \"↓\",\n\t\t\t\t\t\t\t\t\ttitle: \"Move this rule down\",\n\t\t\t\t\t\t\t\t\tonClick: ($event) => moveRule(index, 1)\n\t\t\t\t\t\t\t\t}, \" Down \", 8, _hoisted_6$2)]),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_7$1, [\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"textarea\", {\n\t\t\t\t\t\t\t\t\t\t\"data-regex-original\": \"\",\n\t\t\t\t\t\t\t\t\t\thidden: \"\",\n\t\t\t\t\t\t\t\t\t\tvalue: serializeOriginal(row.original)\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_8$1),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_9$1, [withDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.enabled = $event,\n\t\t\t\t\t\t\t\t\t\ttype: \"checkbox\",\n\t\t\t\t\t\t\t\t\t\t\"data-regex-enabled\": \"\"\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_10$1), [[vModelCheckbox, row.enabled]]), _cache[3] || (_cache[3] = createTextVNode(\" Enabled \", -1))]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_11$1, [_cache[4] || (_cache[4] = createBaseVNode(\"label\", null, \"ID\", -1)), withDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.id = $event,\n\t\t\t\t\t\t\t\t\t\t\"data-regex-id\": \"\",\n\t\t\t\t\t\t\t\t\t\tplaceholder: \"trim-ooc\"\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_12), [[vModelText, row.id]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_13, [_cache[5] || (_cache[5] = createBaseVNode(\"label\", null, \"Name\", -1)), withDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.name = $event,\n\t\t\t\t\t\t\t\t\t\t\"data-regex-name\": \"\",\n\t\t\t\t\t\t\t\t\t\tplaceholder: \"Readable label\"\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_14), [[vModelText, row.name]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_15, [_cache[6] || (_cache[6] = createBaseVNode(\"label\", null, \"Stage\", -1)), withDirectives(createBaseVNode(\"select\", {\n\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.stage = $event,\n\t\t\t\t\t\t\t\t\t\t\"data-regex-stage\": \"\"\n\t\t\t\t\t\t\t\t\t}, [(openBlock(), createElementBlock(Fragment, null, renderList(regexStages, (stage) => {\n\t\t\t\t\t\t\t\t\t\treturn createBaseVNode(\"option\", {\n\t\t\t\t\t\t\t\t\t\t\tkey: stage,\n\t\t\t\t\t\t\t\t\t\t\tvalue: stage\n\t\t\t\t\t\t\t\t\t\t}, toDisplayString(stage), 9, _hoisted_17);\n\t\t\t\t\t\t\t\t\t}), 64))], 8, _hoisted_16), [[vModelSelect, row.stage]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_18, [_cache[7] || (_cache[7] = createBaseVNode(\"label\", null, \"Effect\", -1)), withDirectives(createBaseVNode(\"select\", {\n\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.effect = $event,\n\t\t\t\t\t\t\t\t\t\t\"data-regex-effect\": \"\"\n\t\t\t\t\t\t\t\t\t}, [(openBlock(), createElementBlock(Fragment, null, renderList(regexEffects, (effect) => {\n\t\t\t\t\t\t\t\t\t\treturn createBaseVNode(\"option\", {\n\t\t\t\t\t\t\t\t\t\t\tkey: effect,\n\t\t\t\t\t\t\t\t\t\t\tvalue: effect\n\t\t\t\t\t\t\t\t\t\t}, toDisplayString(effect), 9, _hoisted_20);\n\t\t\t\t\t\t\t\t\t}), 64))], 8, _hoisted_19), [[vModelSelect, row.effect]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_21, [_cache[8] || (_cache[8] = createBaseVNode(\"label\", null, \"Flags\", -1)), withDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.flags = $event,\n\t\t\t\t\t\t\t\t\t\t\"data-regex-flags\": \"\",\n\t\t\t\t\t\t\t\t\t\tplaceholder: \"gimsu\"\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_22), [[vModelText, row.flags]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_23, [_cache[9] || (_cache[9] = createBaseVNode(\"label\", null, \"Targets\", -1)), createBaseVNode(\"div\", _hoisted_24, [(openBlock(), createElementBlock(Fragment, null, renderList(regexTargets, (target) => {\n\t\t\t\t\t\t\t\t\t\treturn createBaseVNode(\"label\", { key: target }, [withDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.targets = $event,\n\t\t\t\t\t\t\t\t\t\t\ttype: \"checkbox\",\n\t\t\t\t\t\t\t\t\t\t\t\"data-regex-target\": \"\",\n\t\t\t\t\t\t\t\t\t\t\tvalue: target\n\t\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_25), [[vModelCheckbox, row.targets]]), createTextVNode(\" \" + toDisplayString(target), 1)]);\n\t\t\t\t\t\t\t\t\t}), 64))])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_26, [_cache[10] || (_cache[10] = createBaseVNode(\"label\", null, \"Roles\", -1)), createBaseVNode(\"div\", _hoisted_27, [(openBlock(), createElementBlock(Fragment, null, renderList(regexRoles, (role) => {\n\t\t\t\t\t\t\t\t\t\treturn createBaseVNode(\"label\", { key: role }, [withDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.roles = $event,\n\t\t\t\t\t\t\t\t\t\t\ttype: \"checkbox\",\n\t\t\t\t\t\t\t\t\t\t\t\"data-regex-role\": \"\",\n\t\t\t\t\t\t\t\t\t\t\tvalue: role\n\t\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_28), [[vModelCheckbox, row.roles]]), createTextVNode(\" \" + toDisplayString(role), 1)]);\n\t\t\t\t\t\t\t\t\t}), 64))])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_29, [_cache[11] || (_cache[11] = createBaseVNode(\"label\", null, \"Max messages\", -1)), withDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.maxMessages = $event,\n\t\t\t\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t\t\t\t\tmin: \"1\",\n\t\t\t\t\t\t\t\t\t\t\"data-regex-max-messages\": \"\"\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_30), [[vModelText, row.maxMessages]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_31, [_cache[12] || (_cache[12] = createBaseVNode(\"label\", null, \"Max chars\", -1)), withDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.maxChars = $event,\n\t\t\t\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t\t\t\t\tmin: \"1\",\n\t\t\t\t\t\t\t\t\t\t\"data-regex-max-chars\": \"\"\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_32), [[vModelText, row.maxChars]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_33, [_cache[13] || (_cache[13] = createBaseVNode(\"label\", null, \"Min depth\", -1)), withDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.minDepth = $event,\n\t\t\t\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t\t\t\t\tmin: \"0\",\n\t\t\t\t\t\t\t\t\t\t\"data-regex-min-depth\": \"\"\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_34), [[vModelText, row.minDepth]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_35, [_cache[14] || (_cache[14] = createBaseVNode(\"label\", null, \"Max depth\", -1)), withDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.maxDepth = $event,\n\t\t\t\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t\t\t\t\tmin: \"0\",\n\t\t\t\t\t\t\t\t\t\t\"data-regex-max-depth\": \"\"\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_36), [[vModelText, row.maxDepth]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_37, [_cache[15] || (_cache[15] = createBaseVNode(\"label\", null, \"Trim strings\", -1)), withDirectives(createBaseVNode(\"textarea\", {\n\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.trimStrings = $event,\n\t\t\t\t\t\t\t\t\t\t\"data-regex-trim-strings\": \"\",\n\t\t\t\t\t\t\t\t\t\tspellcheck: \"false\",\n\t\t\t\t\t\t\t\t\t\tplaceholder: \"one per line\"\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_38), [[vModelText, row.trimStrings]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_39, [_cache[16] || (_cache[16] = createBaseVNode(\"label\", null, \"Pattern\", -1)), withDirectives(createBaseVNode(\"textarea\", {\n\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.pattern = $event,\n\t\t\t\t\t\t\t\t\t\t\"data-regex-pattern\": \"\",\n\t\t\t\t\t\t\t\t\t\tspellcheck: \"false\",\n\t\t\t\t\t\t\t\t\t\tplaceholder: \"\\\\\\\\(OOC:[^)]+\\\\\\\\)\"\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_40), [[vModelText, row.pattern]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_41, [_cache[17] || (_cache[17] = createBaseVNode(\"label\", null, \"Replace\", -1)), withDirectives(createBaseVNode(\"textarea\", {\n\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.replace = $event,\n\t\t\t\t\t\t\t\t\t\t\"data-regex-replace\": \"\",\n\t\t\t\t\t\t\t\t\t\tspellcheck: \"false\"\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_42), [[vModelText, row.replace]])]),\n\t\t\t\t\t\t\t\t\twithDirectives(createBaseVNode(\"div\", {\n\t\t\t\t\t\t\t\t\t\tclass: \"regex-warning wide\",\n\t\t\t\t\t\t\t\t\t\t\"data-regex-warning\": \"\"\n\t\t\t\t\t\t\t\t\t}, toDisplayString(warningForForm(row)), 513), [[vShow, warningForForm(row)]])\n\t\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\t\tclass: \"danger\",\n\t\t\t\t\t\t\t\t\t\"data-delete-row\": \"true\",\n\t\t\t\t\t\t\t\t\t\"data-icon\": \"×\",\n\t\t\t\t\t\t\t\t\ttitle: \"Delete this regex rule\",\n\t\t\t\t\t\t\t\t\tonClick: ($event) => deleteRule(index)\n\t\t\t\t\t\t\t\t}, \" Delete \", 8, _hoisted_43)\n\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t}), 128))])\n\t\t\t\t\t]);\n\t\t\t\t};\n\t\t\t}\n\t\t});\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/components/RegexEditor.vue\n\tvar RegexEditor_default;\n\tvar init_RegexEditor = __esmMin((() => {\n\t\tinit_RegexEditor_vue_vue_type_script_setup_true_lang();\n\t\tinit_RegexEditor_vue_vue_type_script_setup_true_lang();\n\t\tRegexEditor_default = RegexEditor_vue_vue_type_script_setup_true_lang_default;\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/components/StackEditor.vue?vue&type=script&setup=true&lang.ts\n\tvar _hoisted_1$1, _hoisted_2$1, _hoisted_3$1, _hoisted_4$1, _hoisted_5$1, _hoisted_6$1, _hoisted_7, _hoisted_8, _hoisted_9, _hoisted_10, _hoisted_11, StackEditor_vue_vue_type_script_setup_true_lang_default;\n\tvar init_StackEditor_vue_vue_type_script_setup_true_lang = __esmMin((() => {\n\t\tinit_vue_runtime_esm_bundler();\n\t\t_hoisted_1$1 = { class: \"tab-section\" };\n\t\t_hoisted_2$1 = {\n\t\t\tclass: \"checkline\",\n\t\t\ttitle: \"Allow multiple enabled chat-history slots. When off, only the first enabled chat-history slot is expanded.\"\n\t\t};\n\t\t_hoisted_3$1 = [\"checked\"];\n\t\t_hoisted_4$1 = { class: \"tab-section\" };\n\t\t_hoisted_5$1 = {\n\t\t\tid: \"variablesRows\",\n\t\t\tclass: \"data-table\"\n\t\t};\n\t\t_hoisted_6$1 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_7 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_8 = [\"onClick\"];\n\t\t_hoisted_9 = { class: \"tab-section\" };\n\t\t_hoisted_10 = { class: \"modal-toolbar\" };\n\t\t_hoisted_11 = {\n\t\t\tid: \"stackJsonStatus\",\n\t\t\tclass: \"modal-meta\"\n\t\t};\n\t\tStackEditor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({\n\t\t\t__name: \"StackEditor\",\n\t\t\tprops: {\n\t\t\t\tstack: {},\n\t\t\t\tcopyText: { type: Function }\n\t\t\t},\n\t\t\temits: [\n\t\t\t\t\"apply\",\n\t\t\t\t\"change\",\n\t\t\t\t\"status\"\n\t\t\t],\n\t\t\tsetup(__props, { expose: __expose, emit: __emit }) {\n\t\t\t\tconst props = __props;\n\t\t\t\tconst emit = __emit;\n\t\t\t\tlet nextVariableKey = 1;\n\t\t\t\tconst variableRows = /* @__PURE__ */ ref(readVariableRows());\n\t\t\t\tconst stackError = /* @__PURE__ */ ref(\"\");\n\t\t\t\tconst rawJsonText = /* @__PURE__ */ ref(displayStackJson());\n\t\t\t\tconst rawJsonStatus = /* @__PURE__ */ ref(\"Unsaved stack JSON draft.\");\n\t\t\t\twatch(() => props.stack, () => reset());\n\t\t\t\tfunction reset() {\n\t\t\t\t\tvariableRows.value = readVariableRows();\n\t\t\t\t\tstackError.value = \"\";\n\t\t\t\t\trawJsonText.value = displayStackJson();\n\t\t\t\t\trawJsonStatus.value = \"Unsaved stack JSON draft.\";\n\t\t\t\t}\n\t\t\t\tfunction readVariableRows() {\n\t\t\t\t\tconst values = props.stack.schemaVersion === 2 ? props.stack.parameters || {} : props.stack.variables || {};\n\t\t\t\t\treturn Object.entries(values).sort(([a], [b]) => a.localeCompare(b)).map(([name, value]) => ({\n\t\t\t\t\t\tkey: nextVariableKey++,\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tvalue: String(value ?? \"\")\n\t\t\t\t\t}));\n\t\t\t\t}\n\t\t\t\tfunction setAllowDuplicateChatHistory(event) {\n\t\t\t\t\tconst checked = event.target.checked;\n\t\t\t\t\tconst context = { ...props.stack.context && typeof props.stack.context === \"object\" ? props.stack.context : {} };\n\t\t\t\t\tif (checked) context.allowDuplicateChatHistory = true;\n\t\t\t\t\telse delete context.allowDuplicateChatHistory;\n\t\t\t\t\tif (Object.keys(context).length > 0) props.stack.context = context;\n\t\t\t\t\telse delete props.stack.context;\n\t\t\t\t\temit(\"change\", stackError.value);\n\t\t\t\t}\n\t\t\t\tfunction addVariable() {\n\t\t\t\t\tvariableRows.value.push({\n\t\t\t\t\t\tkey: nextVariableKey++,\n\t\t\t\t\t\tname: uniqueVariableName(),\n\t\t\t\t\t\tvalue: \"\"\n\t\t\t\t\t});\n\t\t\t\t\tsyncVariables();\n\t\t\t\t}\n\t\t\t\tfunction deleteVariable(index) {\n\t\t\t\t\tvariableRows.value.splice(index, 1);\n\t\t\t\t\tsyncVariables();\n\t\t\t\t}\n\t\t\t\tfunction uniqueVariableName() {\n\t\t\t\t\tconst existing = new Set(variableRows.value.map((row) => row.name.trim()).filter(Boolean));\n\t\t\t\t\tlet index = existing.size + 1;\n\t\t\t\t\tlet name = `var${index}`;\n\t\t\t\t\twhile (existing.has(name)) name = `var${++index}`;\n\t\t\t\t\treturn name;\n\t\t\t\t}\n\t\t\t\tfunction syncVariables() {\n\t\t\t\t\tconst variables = {};\n\t\t\t\t\tconst seen = /* @__PURE__ */ new Set();\n\t\t\t\t\tlet duplicate = false;\n\t\t\t\t\tfor (const row of variableRows.value) {\n\t\t\t\t\t\tconst name = row.name.trim();\n\t\t\t\t\t\tif (!name) continue;\n\t\t\t\t\t\tif (seen.has(name)) duplicate = true;\n\t\t\t\t\t\tseen.add(name);\n\t\t\t\t\t\tvariables[name] = row.value;\n\t\t\t\t\t}\n\t\t\t\t\tif (props.stack.schemaVersion === 2) if (Object.keys(variables).length > 0) props.stack.parameters = variables;\n\t\t\t\t\telse delete props.stack.parameters;\n\t\t\t\t\telse if (Object.keys(variables).length > 0) props.stack.variables = variables;\n\t\t\t\t\telse delete props.stack.variables;\n\t\t\t\t\tstackError.value = duplicate ? \"Duplicate stack variable names.\" : \"\";\n\t\t\t\t\temit(\"change\", stackError.value);\n\t\t\t\t}\n\t\t\t\tfunction displayStackJson() {\n\t\t\t\t\tconst stack = cloneJson(props.stack);\n\t\t\t\t\tif (!stack.type) stack.type = \"pi-forge.prompt-stack\";\n\t\t\t\t\tif (!stack.schemaVersion) stack.schemaVersion = 1;\n\t\t\t\t\treturn JSON.stringify(stack, null, 2);\n\t\t\t\t}\n\t\t\t\tasync function copyRawJson() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait props.copyText(rawJsonText.value);\n\t\t\t\t\t\trawJsonStatus.value = \"Copied JSON.\";\n\t\t\t\t\t\temit(\"status\", \"Copied stack JSON\", \"success\");\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tconst message = errorMessage(error);\n\t\t\t\t\t\trawJsonStatus.value = message;\n\t\t\t\t\t\temit(\"status\", message, \"error\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfunction applyRawJson() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst parsed = JSON.parse(rawJsonText.value);\n\t\t\t\t\t\tvalidateRawStackJson(parsed);\n\t\t\t\t\t\tconst stack = parsed;\n\t\t\t\t\t\tif (!stack.schemaVersion) stack.schemaVersion = 1;\n\t\t\t\t\t\tif (!stack.type) stack.type = \"pi-forge.prompt-stack\";\n\t\t\t\t\t\treplaceObject(props.stack, stack);\n\t\t\t\t\t\trawJsonStatus.value = \"Applied stack JSON to editor.\";\n\t\t\t\t\t\temit(\"apply\");\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tconst message = errorMessage(error);\n\t\t\t\t\t\trawJsonStatus.value = message;\n\t\t\t\t\t\temit(\"status\", message, \"error\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfunction validateRawStackJson(stack) {\n\t\t\t\t\tif (!stack || typeof stack !== \"object\" || Array.isArray(stack)) throw new Error(\"Stack JSON must be an object.\");\n\t\t\t\t\tconst candidate = stack;\n\t\t\t\t\tif (typeof candidate.id !== \"string\" || !candidate.id.trim()) throw new Error(\"Stack JSON needs a non-empty string id.\");\n\t\t\t\t\tif (!Array.isArray(candidate.items)) throw new Error(\"Stack JSON needs an items array.\");\n\t\t\t\t\tcandidate.items.forEach((item, index) => {\n\t\t\t\t\t\tconst label = `Item ${index + 1}`;\n\t\t\t\t\t\tif (!item || typeof item !== \"object\" || Array.isArray(item)) throw new Error(`${label} must be an object.`);\n\t\t\t\t\t\tconst candidateItem = item;\n\t\t\t\t\t\tif (candidateItem.kind !== \"block\" && candidateItem.kind !== \"slot\") throw new Error(`${label} kind must be block or slot.`);\n\t\t\t\t\t\tif (typeof candidateItem.id !== \"string\" || !candidateItem.id.trim()) throw new Error(`${label} needs a non-empty string id.`);\n\t\t\t\t\t\tif (candidateItem.kind === \"block\" && typeof candidateItem.content !== \"string\") throw new Error(`${label} block content must be a string.`);\n\t\t\t\t\t\tif (candidateItem.kind === \"slot\" && typeof candidateItem.slot !== \"string\") throw new Error(`${label} slot must be a string.`);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tfunction replaceObject(target, source) {\n\t\t\t\t\tfor (const key of Object.keys(target)) delete target[key];\n\t\t\t\t\tObject.assign(target, source);\n\t\t\t\t}\n\t\t\t\tfunction cloneJson(value) {\n\t\t\t\t\treturn JSON.parse(JSON.stringify(value));\n\t\t\t\t}\n\t\t\t\tfunction errorMessage(error) {\n\t\t\t\t\treturn error instanceof Error ? error.message : String(error);\n\t\t\t\t}\n\t\t\t\t__expose({\n\t\t\t\t\tgetError: () => stackError.value,\n\t\t\t\t\treset\n\t\t\t\t});\n\t\t\t\treturn (_ctx, _cache) => {\n\t\t\t\t\treturn openBlock(), createElementBlock(Fragment, null, [\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_1$1, [\n\t\t\t\t\t\t\t_cache[2] || (_cache[2] = createBaseVNode(\"div\", { class: \"tab-section-title\" }, \"Context options\", -1)),\n\t\t\t\t\t\t\t_cache[3] || (_cache[3] = createBaseVNode(\"div\", { class: \"tab-section-meta\" }, \" Stack-level behavior for how pi-forge rewrites Pi conversation context. \", -1)),\n\t\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_2$1, [createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\tid: \"allowDuplicateChatHistoryInput\",\n\t\t\t\t\t\t\t\ttype: \"checkbox\",\n\t\t\t\t\t\t\t\tchecked: props.stack.context?.allowDuplicateChatHistory === true,\n\t\t\t\t\t\t\t\tonChange: setAllowDuplicateChatHistory\n\t\t\t\t\t\t\t}, null, 40, _hoisted_3$1), _cache[1] || (_cache[1] = createTextVNode(\" Allow duplicate chat-history slots \", -1))]),\n\t\t\t\t\t\t\t_cache[4] || (_cache[4] = createBaseVNode(\"div\", { class: \"option-note\" }, \" Keep this off unless you intentionally want the same conversation history injected more than once. \", -1))\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_4$1, [\n\t\t\t\t\t\t\t_cache[8] || (_cache[8] = createBaseVNode(\"div\", { class: \"tab-section-title\" }, \"Stack parameters\", -1)),\n\t\t\t\t\t\t\t_cache[9] || (_cache[9] = createBaseVNode(\"div\", { class: \"tab-section-meta\" }, [\n\t\t\t\t\t\t\t\tcreateTextVNode(\" Immutable static values; schema v2 uses \"),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"code\", null, \"parameters\"),\n\t\t\t\t\t\t\t\tcreateTextVNode(\", v1 uses \"),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"code\", null, \"variables\"),\n\t\t\t\t\t\t\t\tcreateTextVNode(\". \")\n\t\t\t\t\t\t\t], -1)),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", { class: \"modal-toolbar\" }, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\t\t\tid: \"addVariableBtn\",\n\t\t\t\t\t\t\t\t\t\"data-icon\": \"+\",\n\t\t\t\t\t\t\t\t\ttitle: \"Add a static stack variable\",\n\t\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\t\tonClick: addVariable\n\t\t\t\t\t\t\t\t}, \" Add variable \"),\n\t\t\t\t\t\t\t\t_cache[5] || (_cache[5] = createBaseVNode(\"span\", { class: \"modal-spacer\" }, null, -1)),\n\t\t\t\t\t\t\t\t_cache[6] || (_cache[6] = createBaseVNode(\"span\", { class: \"modal-meta\" }, \"Saved in stack.parameters (v2) / stack.variables (v1).\", -1))\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_5$1, [_cache[7] || (_cache[7] = createBaseVNode(\"div\", { class: \"data-row header variable-row\" }, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, \"Name\"),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, \"Value\"),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\")\n\t\t\t\t\t\t\t], -1)), (openBlock(true), createElementBlock(Fragment, null, renderList(variableRows.value, (row, index) => {\n\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"div\", {\n\t\t\t\t\t\t\t\t\tkey: row.key,\n\t\t\t\t\t\t\t\t\tclass: \"data-row variable-row\",\n\t\t\t\t\t\t\t\t\t\"data-var-row\": \"\"\n\t\t\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\t\t\twithDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.name = $event,\n\t\t\t\t\t\t\t\t\t\t\"data-var-name\": \"\",\n\t\t\t\t\t\t\t\t\t\tplaceholder: \"char\",\n\t\t\t\t\t\t\t\t\t\tonInput: syncVariables\n\t\t\t\t\t\t\t\t\t}, null, 40, _hoisted_6$1), [[vModelText, row.name]]),\n\t\t\t\t\t\t\t\t\twithDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.value = $event,\n\t\t\t\t\t\t\t\t\t\t\"data-var-value\": \"\",\n\t\t\t\t\t\t\t\t\t\tplaceholder: \"泉此方\",\n\t\t\t\t\t\t\t\t\t\tonInput: syncVariables\n\t\t\t\t\t\t\t\t\t}, null, 40, _hoisted_7), [[vModelText, row.value]]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\t\t\tclass: \"danger\",\n\t\t\t\t\t\t\t\t\t\t\"data-delete-row\": \"true\",\n\t\t\t\t\t\t\t\t\t\t\"data-icon\": \"×\",\n\t\t\t\t\t\t\t\t\t\ttitle: \"Delete this stack variable\",\n\t\t\t\t\t\t\t\t\t\tonClick: ($event) => deleteVariable(index)\n\t\t\t\t\t\t\t\t\t}, \" Delete \", 8, _hoisted_8)\n\t\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t\t}), 128))])\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_9, [\n\t\t\t\t\t\t\t_cache[11] || (_cache[11] = createBaseVNode(\"div\", { class: \"tab-section-title\" }, \"Stack JSON\", -1)),\n\t\t\t\t\t\t\t_cache[12] || (_cache[12] = createBaseVNode(\"div\", { class: \"tab-section-meta\" }, \" Raw recovery view for advanced fields. Apply updates the editor; Save writes to disk. \", -1)),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_10, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\t\t\tid: \"copyStackJsonBtn\",\n\t\t\t\t\t\t\t\t\t\"data-icon\": \"□\",\n\t\t\t\t\t\t\t\t\ttitle: \"Copy this JSON to the clipboard\",\n\t\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\t\tonClick: copyRawJson\n\t\t\t\t\t\t\t\t}, \" Copy \"),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\t\t\tid: \"applyStackJsonBtn\",\n\t\t\t\t\t\t\t\t\tclass: \"primary\",\n\t\t\t\t\t\t\t\t\t\"data-icon\": \"✓\",\n\t\t\t\t\t\t\t\t\ttitle: \"Apply this JSON to the editor without saving\",\n\t\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\t\tonClick: applyRawJson\n\t\t\t\t\t\t\t\t}, \" Apply to editor \"),\n\t\t\t\t\t\t\t\t_cache[10] || (_cache[10] = createBaseVNode(\"span\", { class: \"modal-spacer\" }, null, -1)),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_11, toDisplayString(rawJsonStatus.value), 1)\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\twithDirectives(createBaseVNode(\"textarea\", {\n\t\t\t\t\t\t\t\tid: \"stackJsonText\",\n\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event) => rawJsonText.value = $event),\n\t\t\t\t\t\t\t\tclass: \"raw-json-editor\",\n\t\t\t\t\t\t\t\tspellcheck: \"false\"\n\t\t\t\t\t\t\t}, null, 512), [[vModelText, rawJsonText.value]])\n\t\t\t\t\t\t])\n\t\t\t\t\t], 64);\n\t\t\t\t};\n\t\t\t}\n\t\t});\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/components/StackEditor.vue\n\tvar StackEditor_default;\n\tvar init_StackEditor = __esmMin((() => {\n\t\tinit_StackEditor_vue_vue_type_script_setup_true_lang();\n\t\tinit_StackEditor_vue_vue_type_script_setup_true_lang();\n\t\tStackEditor_default = StackEditor_vue_vue_type_script_setup_true_lang_default;\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/vue-tab-host.ts\n\tfunction createVueTabHost(deps) {\n\t\tlet app;\n\t\tlet draft;\n\t\tconst errors = {\n\t\t\tpolicy: \"\",\n\t\t\tregex: \"\",\n\t\t\tstack: \"\"\n\t\t};\n\t\tfunction mount(kind, root) {\n\t\t\tunmount();\n\t\t\tconst stack = deps.getStack();\n\t\t\tif (!stack) return;\n\t\t\tdraft = cloneJson(stack);\n\t\t\tconst onChange = (error) => {\n\t\t\t\tsyncDraft(kind);\n\t\t\t\terrors[kind] = error;\n\t\t\t\tdeps.markDirty();\n\t\t\t\tif (errors[kind]) deps.setStatus(errors[kind], \"error\");\n\t\t\t};\n\t\t\tif (kind === \"policy\") app = createApp(PolicyEditor_default, {\n\t\t\t\tstack: draft,\n\t\t\t\tresources: deps.getResources(),\n\t\t\t\tonChange,\n\t\t\t\tonStatus: deps.setStatus\n\t\t\t});\n\t\t\telse if (kind === \"regex\") app = createApp(RegexEditor_default, {\n\t\t\t\tstack: draft,\n\t\t\t\tonChange,\n\t\t\t\tonValidate: deps.validateStack\n\t\t\t});\n\t\t\telse app = createApp(StackEditor_default, {\n\t\t\t\tstack: draft,\n\t\t\t\tcopyText: deps.copyText,\n\t\t\t\tonApply: () => {\n\t\t\t\t\tif (draft) deps.applyStack(cloneJson(draft));\n\t\t\t\t},\n\t\t\t\tonChange,\n\t\t\t\tonStatus: deps.setStatus\n\t\t\t});\n\t\t\tapp.mount(root);\n\t\t}\n\t\tfunction unmount() {\n\t\t\tapp?.unmount();\n\t\t\tapp = void 0;\n\t\t\tdraft = void 0;\n\t\t}\n\t\tfunction resetErrors() {\n\t\t\terrors.policy = \"\";\n\t\t\terrors.regex = \"\";\n\t\t\terrors.stack = \"\";\n\t\t}\n\t\tfunction getError(kind) {\n\t\t\treturn errors[kind];\n\t\t}\n\t\tfunction syncDraft(kind) {\n\t\t\tconst stack = deps.getStack();\n\t\t\tif (!stack || !draft) return;\n\t\t\tconst plainDraft = cloneJson(draft);\n\t\t\tif (kind === \"policy\") {\n\t\t\t\tcopyOptionalField(stack, plainDraft, \"tools\");\n\t\t\t\tcopyOptionalField(stack, plainDraft, \"skills\");\n\t\t\t} else if (kind === \"regex\") copyOptionalField(stack, plainDraft, \"regex\");\n\t\t\telse {\n\t\t\t\tcopyOptionalField(stack, plainDraft, \"context\");\n\t\t\t\tcopyOptionalField(stack, plainDraft, \"variables\");\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tmountPolicy: (root) => mount(\"policy\", root),\n\t\t\tmountRegex: (root) => mount(\"regex\", root),\n\t\t\tmountStack: (root) => mount(\"stack\", root),\n\t\t\tunmount,\n\t\t\tresetErrors,\n\t\t\tgetError\n\t\t};\n\t}\n\tfunction cloneJson(value) {\n\t\treturn JSON.parse(JSON.stringify(value));\n\t}\n\tfunction copyOptionalField(target, source, key) {\n\t\tif (key in source) target[key] = source[key];\n\t\telse delete target[key];\n\t}\n\tvar init_vue_tab_host = __esmMin((() => {\n\t\tinit_vue_runtime_esm_bundler();\n\t\tinit_PolicyEditor();\n\t\tinit_RegexEditor();\n\t\tinit_StackEditor();\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/legacy-editor.ts\n\tvar legacy_editor_exports = /* @__PURE__ */ __exportAll({ startLegacyEditor: () => startLegacyEditor });\n\tfunction setStatus(text, tone = \"\") {\n\t\tel(\"status\").textContent = text;\n\t\tel(\"status\").style.color = tone === \"error\" ? \"var(--error)\" : tone === \"success\" ? \"var(--success)\" : \"var(--muted)\";\n\t}\n\tfunction markDirty() {\n\t\tdirty = true;\n\t\trenderDirtyState();\n\t\tsetStatus(\"Unsaved changes\");\n\t}\n\tfunction renderDirtyState() {\n\t\tconst badge = el(\"dirtyBadge\");\n\t\tif (!badge) return;\n\t\tbadge.classList.toggle(\"visible\", dirty);\n\t\tupdateActionState();\n\t}\n\tfunction updateActionState() {\n\t\tconst hasStack = !!currentStack;\n\t\tfor (const id of [\n\t\t\t\"activateBtn\",\n\t\t\t\"saveBtn\",\n\t\t\t\"validateBtn\",\n\t\t\t\"previewBtn\",\n\t\t\t\"forkBtn\",\n\t\t\t\"exportBtn\",\n\t\t\t\"deleteStackBtn\",\n\t\t\t\"addItemBtn\",\n\t\t\t\"addSlotBtn\"\n\t\t]) {\n\t\t\tconst button = el(id);\n\t\t\tif (button) button.disabled = !hasStack;\n\t\t}\n\t\tconst deleteItemButton = el(\"deleteItemBtn\");\n\t\tif (deleteItemButton) deleteItemButton.disabled = !hasStack || selectedItemIndex < 0;\n\t\tdocument.querySelectorAll(\"[data-tab]\").forEach((button) => {\n\t\t\tbutton.disabled = !hasStack;\n\t\t});\n\t}\n\tasync function loadStacks(preferId = selectedId) {\n\t\tconst [data, resources] = await Promise.all([api(\"/api/stacks\"), api(\"/api/resources\")]);\n\t\tif (!editorStarted) return;\n\t\tstacks = data.stacks || [];\n\t\tpolicyResources = normalizePolicyResources(resources);\n\t\tcwd = data.cwd || \"\";\n\t\tel(\"cwd\").textContent = cwd;\n\t\trenderStackList();\n\t\tconst next = stacks.find((stack) => (stack.selector || stack.id) === preferId) || stacks.find((stack) => stack.active) || stacks[0];\n\t\tif (next) await selectStack(next.selector || next.id, { keepDirty: false });\n\t\telse renderEmpty();\n\t}\n\tasync function refreshStackRuntimeState() {\n\t\tconst [data, resources] = await Promise.all([api(\"/api/stacks\"), api(\"/api/resources\")]);\n\t\tif (!editorStarted) return;\n\t\tstacks = data.stacks || [];\n\t\tpolicyResources = normalizePolicyResources(resources);\n\t\tcwd = data.cwd || \"\";\n\t\tel(\"cwd\").textContent = cwd;\n\t\trenderStackList();\n\t\tupdateActionState();\n\t\tif (activeTab === \"policy\") renderActiveTab();\n\t}\n\tfunction handleProfileApplied() {\n\t\trun(refreshStackRuntimeState);\n\t}\n\tasync function selectStack(id, options = {}) {\n\t\tif (dirty && !options.keepDirty && !confirm(\"Discard unsaved changes?\")) return;\n\t\tconst data = await api(\"/api/stacks/\" + encodeURIComponent(id));\n\t\tif (!editorStarted) return;\n\t\tselectedId = id;\n\t\tconst loadedStack = structuredClone(data.stack);\n\t\tcurrentStack = loadedStack;\n\t\tcurrentFilePath = data.filePath || \"\";\n\t\tselectedItemIndex = loadedStack.items.length ? 0 : -1;\n\t\tdirty = false;\n\t\tvueTabHost.resetErrors();\n\t\tvueItemHost.reset();\n\t\trenderDirtyState();\n\t\trenderAll(data.diagnostics || []);\n\t\tsetStatus(\"Loaded \" + loadedStack.id);\n\t}\n\tfunction renderAll(diagnostics = []) {\n\t\tlatestDiagnostics = diagnostics;\n\t\trenderStackList();\n\t\trenderSettings();\n\t\trenderActiveTab();\n\t\trenderDiagnostics(diagnostics);\n\t\thidePreview();\n\t\tupdateActionState();\n\t}\n\tfunction renderActiveTab() {\n\t\tvueTabHost.unmount();\n\t\tdocument.querySelectorAll(\"[data-tab]\").forEach((button) => {\n\t\t\tbutton.classList.toggle(\"active\", button.dataset.tab === activeTab);\n\t\t});\n\t\tconst workspace = el(\"workspace\");\n\t\tconst panel = el(\"tabPanel\");\n\t\tif (activeTab === \"items\") {\n\t\t\tworkspace.style.display = \"\";\n\t\t\tpanel.classList.remove(\"open\");\n\t\t\tpanel.innerHTML = \"\";\n\t\t\trenderItemList();\n\t\t\trenderItemEditor();\n\t\t\treturn;\n\t\t}\n\t\tworkspace.style.display = \"none\";\n\t\tpanel.classList.add(\"open\");\n\t\tif (activeTab === \"regex\") vueTabHost.mountRegex(panel);\n\t\telse if (activeTab === \"policy\") vueTabHost.mountPolicy(panel);\n\t\telse if (activeTab === \"stack\") vueTabHost.mountStack(panel);\n\t}\n\tfunction renderStackList() {\n\t\tconst list = el(\"stackList\");\n\t\tlist.innerHTML = \"\";\n\t\tif (!stacks.length) {\n\t\t\tlist.innerHTML = \"<div class=\\\"side-empty\\\">No prompt stacks in this project.</div>\";\n\t\t\treturn;\n\t\t}\n\t\tfor (const stack of stacks) {\n\t\t\tconst row = document.createElement(\"button\");\n\t\t\trow.className = \"stack-row\" + (stack.active ? \" active\" : \"\") + ((stack.selector || stack.id) === selectedId ? \" selected\" : \"\");\n\t\t\tconst diag = stack.errors ? \"<span class=\\\"badge error\\\">\" + stack.errors + \" error</span>\" : stack.warnings ? \"<span class=\\\"badge warning\\\">\" + stack.warnings + \" warning</span>\" : \"\";\n\t\t\tconst scopeBadge = stack.scope === \"global\" ? \"<span class=\\\"badge\\\">global</span>\" : \"\";\n\t\t\trow.innerHTML = \"<div class=\\\"stack-name\\\">\" + escapeHtml(stack.id) + (stack.active ? \"<span class=\\\"badge\\\">active</span>\" : \"\") + scopeBadge + diag + \"</div><div class=\\\"stack-meta\\\">\" + escapeHtml(stack.name || \"(unnamed)\") + \"</div><div class=\\\"stack-meta\\\">\" + stack.itemCount + \" items | \" + escapeHtml(stack.mode || \"replace\") + \"</div>\";\n\t\t\trow.onclick = () => selectStack(stack.selector || stack.id);\n\t\t\tlist.appendChild(row);\n\t\t}\n\t}\n\tfunction normalizePolicyResources(value) {\n\t\treturn {\n\t\t\ttools: normalizeResourceList(value?.tools),\n\t\t\tskills: normalizeResourceList(value?.skills)\n\t\t};\n\t}\n\tfunction normalizeResourceList(value) {\n\t\tif (!Array.isArray(value)) return [];\n\t\treturn value.filter((resource) => resource && typeof resource === \"object\" && typeof resource.name === \"string\" && resource.name.trim()).map((resource) => ({\n\t\t\tname: resource.name.trim(),\n\t\t\tdescription: typeof resource.description === \"string\" ? resource.description : \"\",\n\t\t\tsource: typeof resource.source === \"string\" ? resource.source : \"\",\n\t\t\tactive: resource.active === true,\n\t\t\thidden: resource.hidden === true\n\t\t}));\n\t}\n\tfunction renderSettings() {\n\t\tif (!currentStack) {\n\t\t\tvueMetadataHost.unmount();\n\t\t\treturn;\n\t\t}\n\t\tel(\"metadataPanel\").style.display = \"\";\n\t\tvueMetadataHost.mount(el(\"metadataHost\"));\n\t}\n\tfunction renderItemList() {\n\t\tconst list = el(\"itemList\");\n\t\tlist.innerHTML = \"\";\n\t\tlist.classList.toggle(\"drag-active\", dragIndex !== -1);\n\t\tif (!currentStack) return;\n\t\tel(\"itemCount\").textContent = currentStack.items.length + \" total\";\n\t\tlist.ondragover = handleItemListDragOver;\n\t\tlist.ondrop = handleItemListDrop;\n\t\tconst diagnosticsByItem = diagnosticsForItems();\n\t\tcurrentStack.items.forEach((item, index) => {\n\t\t\tconst row = document.createElement(\"div\");\n\t\t\trow.className = \"item-row\" + (index === selectedItemIndex ? \" selected\" : \"\") + (item.enabled === false ? \" disabled\" : \"\");\n\t\t\trow.dataset.itemIndex = String(index);\n\t\t\trow.draggable = true;\n\t\t\tconst enabled = item.enabled !== false;\n\t\t\tconst itemDiagnostics = diagnosticsByItem[item.id] || [];\n\t\t\tconst errors = itemDiagnostics.filter((diag) => diag.level === \"error\").length;\n\t\t\tconst warnings = itemDiagnostics.filter((diag) => diag.level === \"warning\").length;\n\t\t\tconst diagBadge = errors ? \"<span class=\\\"item-badge error\\\" title=\\\"\" + attr(diagnosticTitle(itemDiagnostics)) + \"\\\">\" + errors + \"E</span>\" : warnings ? \"<span class=\\\"item-badge warning\\\" title=\\\"\" + attr(diagnosticTitle(itemDiagnostics)) + \"\\\">\" + warnings + \"W</span>\" : \"\";\n\t\t\trow.innerHTML = \"<div class=\\\"drag-handle\\\" title=\\\"Drag to reorder\\\">≡</div><div><div class=\\\"item-title\\\">\" + escapeHtml(displayItemName(item)) + diagBadge + \"</div><div class=\\\"item-meta\\\">\" + escapeHtml(item.kind) + \" | id: \" + escapeHtml(item.id) + (item.role ? \" | \" + escapeHtml(item.role) : \"\") + (item.kind === \"slot\" ? \" | \" + escapeHtml(item.slot || \"\") : \"\") + \"</div></div><button type=\\\"button\\\" class=\\\"item-toggle \" + (enabled ? \"enabled\" : \"disabled\") + \"\\\" title=\\\"Toggle item\\\">\" + (enabled ? \"On\" : \"Off\") + \"</button>\";\n\t\t\trow.onclick = (event) => {\n\t\t\t\tif (event.target?.classList?.contains(\"item-toggle\")) return;\n\t\t\t\tselectedItemIndex = index;\n\t\t\t\trenderItemList();\n\t\t\t\trenderItemEditor();\n\t\t\t};\n\t\t\tquery(row, \".item-toggle\").onclick = (event) => {\n\t\t\t\tevent.stopPropagation();\n\t\t\t\titem.enabled = item.enabled === false;\n\t\t\t\tselectedItemIndex = index;\n\t\t\t\tmarkDirty();\n\t\t\t\trenderItemList();\n\t\t\t\trenderItemEditor();\n\t\t\t};\n\t\t\trow.ondragstart = (event) => {\n\t\t\t\tdragIndex = index;\n\t\t\t\tdragDropIndex = index;\n\t\t\t\trow.classList.add(\"dragging\");\n\t\t\t\tlist.classList.add(\"drag-active\");\n\t\t\t\tif (event.dataTransfer) {\n\t\t\t\t\tevent.dataTransfer.effectAllowed = \"move\";\n\t\t\t\t\tevent.dataTransfer.setData(\"text/plain\", item.id || String(index));\n\t\t\t\t}\n\t\t\t\tupdateItemDropIndicator();\n\t\t\t};\n\t\t\trow.ondragend = finishItemDrag;\n\t\t\trow.ondragover = handleItemListDragOver;\n\t\t\trow.ondrop = handleItemListDrop;\n\t\t\tlist.appendChild(row);\n\t\t});\n\t\tupdateItemDropIndicator();\n\t}\n\tfunction handleItemListDragOver(event) {\n\t\tif (dragIndex === -1 || !currentStack) return;\n\t\tevent.preventDefault();\n\t\tdragClientY = event.clientY;\n\t\tupdateItemDragAutoScroll(event.clientY);\n\t\tsetItemDropIndex(dropIndexFromClientY(event.clientY));\n\t}\n\tfunction handleItemListDrop(event) {\n\t\tif (dragIndex === -1 || !currentStack) return;\n\t\tevent.preventDefault();\n\t\tdropDraggedItem();\n\t}\n\tfunction dropDraggedItem() {\n\t\tif (!currentStack || dragIndex < 0 || dragIndex >= currentStack.items.length) {\n\t\t\tfinishItemDrag();\n\t\t\treturn;\n\t\t}\n\t\tlet insertIndex = dragDropIndex;\n\t\tif (insertIndex < 0) insertIndex = dragIndex;\n\t\tinsertIndex = Math.max(0, Math.min(insertIndex, currentStack.items.length));\n\t\tconst [moved] = currentStack.items.splice(dragIndex, 1);\n\t\tif (!moved) {\n\t\t\tfinishItemDrag();\n\t\t\treturn;\n\t\t}\n\t\tif (dragIndex < insertIndex) insertIndex--;\n\t\tinsertIndex = Math.max(0, Math.min(insertIndex, currentStack.items.length));\n\t\tcurrentStack.items.splice(insertIndex, 0, moved);\n\t\tselectedItemIndex = insertIndex;\n\t\tconst changed = dragIndex !== insertIndex;\n\t\tfinishItemDrag(false);\n\t\tif (changed) markDirty();\n\t\trenderItemList();\n\t\trenderItemEditor();\n\t}\n\tfunction setItemDropIndex(index) {\n\t\tif (!currentStack) return;\n\t\tconst next = Math.max(0, Math.min(index, currentStack.items.length));\n\t\tif (dragDropIndex === next) return;\n\t\tdragDropIndex = next;\n\t\tupdateItemDropIndicator();\n\t}\n\tfunction dropIndexFromClientY(clientY) {\n\t\tconst list = el(\"itemList\");\n\t\tconst rows = [...queryAll(list, \".item-row\")];\n\t\tif (!rows.length) return 0;\n\t\tconst listRect = list.getBoundingClientRect();\n\t\tif (clientY <= listRect.top) return 0;\n\t\tif (clientY >= listRect.bottom) return rows.length;\n\t\tfor (const row of rows) {\n\t\t\tconst rect = row.getBoundingClientRect();\n\t\t\tconst index = Number(row.dataset.itemIndex);\n\t\t\tif (clientY < rect.top + rect.height / 2) return index;\n\t\t}\n\t\treturn rows.length;\n\t}\n\tfunction updateItemDropIndicator() {\n\t\tconst list = el(\"itemList\");\n\t\tconst rows = [...list.querySelectorAll(\".item-row\")];\n\t\tfor (const row of rows) row.classList.remove(\"drop-before\", \"drop-after\");\n\t\tlist.classList.toggle(\"drag-active\", dragIndex !== -1);\n\t\tif (dragIndex === -1 || dragDropIndex === -1 || !rows.length) return;\n\t\tif (dragDropIndex <= 0) rows[0].classList.add(\"drop-before\");\n\t\telse if (dragDropIndex >= rows.length) rows[rows.length - 1].classList.add(\"drop-after\");\n\t\telse rows[dragDropIndex].classList.add(\"drop-before\");\n\t}\n\tfunction updateItemDragAutoScroll(clientY) {\n\t\tconst rect = el(\"itemList\").getBoundingClientRect();\n\t\tconst edge = Math.min(72, Math.max(36, rect.height / 5));\n\t\tlet speed = 0;\n\t\tif (clientY < rect.top) speed = -Math.min(30, 8 + (rect.top - clientY) / 3);\n\t\telse if (clientY < rect.top + edge) speed = -Math.min(22, (rect.top + edge - clientY) / 3);\n\t\telse if (clientY > rect.bottom) speed = Math.min(30, 8 + (clientY - rect.bottom) / 3);\n\t\telse if (clientY > rect.bottom - edge) speed = Math.min(22, (clientY - (rect.bottom - edge)) / 3);\n\t\tdragScrollSpeed = speed;\n\t\tif (speed !== 0 && !dragScrollFrame) dragScrollFrame = requestAnimationFrame(runItemDragAutoScroll);\n\t}\n\tfunction runItemDragAutoScroll() {\n\t\tdragScrollFrame = 0;\n\t\tif (dragIndex === -1 || dragScrollSpeed === 0) return;\n\t\tconst list = el(\"itemList\");\n\t\tlist.scrollTop += dragScrollSpeed;\n\t\tsetItemDropIndex(dropIndexFromClientY(dragClientY));\n\t\tdragScrollFrame = requestAnimationFrame(runItemDragAutoScroll);\n\t}\n\tfunction finishItemDrag(clearIndicator = true) {\n\t\tdragIndex = -1;\n\t\tdragDropIndex = -1;\n\t\tdragScrollSpeed = 0;\n\t\tdragClientY = 0;\n\t\tif (dragScrollFrame) {\n\t\t\tcancelAnimationFrame(dragScrollFrame);\n\t\t\tdragScrollFrame = 0;\n\t\t}\n\t\tif (clearIndicator) updateItemDropIndicator();\n\t}\n\tfunction handleDocumentItemDragOver(event) {\n\t\tif (dragIndex === -1 || !currentStack) return;\n\t\tevent.preventDefault();\n\t\tdragClientY = event.clientY;\n\t\tupdateItemDragAutoScroll(event.clientY);\n\t\tsetItemDropIndex(dropIndexFromClientY(event.clientY));\n\t}\n\tfunction handleDocumentItemDrop(event) {\n\t\tif (dragIndex === -1 || !currentStack) return;\n\t\tevent.preventDefault();\n\t\tdropDraggedItem();\n\t}\n\tfunction diagnosticsForItems() {\n\t\tconst grouped = {};\n\t\tfor (const diagnostic of latestDiagnostics || []) {\n\t\t\tif (!diagnostic.itemId) continue;\n\t\t\tif (!grouped[diagnostic.itemId]) grouped[diagnostic.itemId] = [];\n\t\t\tgrouped[diagnostic.itemId].push(diagnostic);\n\t\t}\n\t\treturn grouped;\n\t}\n\tfunction diagnosticTitle(diagnostics) {\n\t\treturn diagnostics.map((diag) => (diag.level || \"info\").toUpperCase() + \": \" + (diag.message || \"\")).join(\"\\n\");\n\t}\n\tfunction renderItemEditor() {\n\t\tconst editor = el(\"itemEditor\");\n\t\tif (!vueItemHost.mount(editor)) {\n\t\t\teditor.innerHTML = \"<div class=\\\"empty\\\">No item selected.</div>\";\n\t\t\tel(\"deleteItemBtn\").disabled = true;\n\t\t\treturn;\n\t\t}\n\t\tel(\"deleteItemBtn\").disabled = false;\n\t}\n\tfunction closeStackModal() {\n\t\tconst pane = el(\"stackModal\");\n\t\tpane.classList.remove(\"open\");\n\t\tpane.innerHTML = \"\";\n\t}\n\tfunction applyStackFromVue(stack) {\n\t\tcurrentStack = stack;\n\t\tif (!stack.schemaVersion) stack.schemaVersion = 1;\n\t\tif (!stack.type) stack.type = \"pi-forge.prompt-stack\";\n\t\tselectedItemIndex = stack.items.length ? Math.min(Math.max(selectedItemIndex, 0), stack.items.length - 1) : -1;\n\t\tvueItemHost.reset();\n\t\tvueTabHost.resetErrors();\n\t\tmarkDirty();\n\t\trenderAll(latestDiagnostics);\n\t\tsetStatus(\"Applied stack JSON to editor\", \"success\");\n\t}\n\tfunction addItem(kind) {\n\t\tif (!currentStack) return;\n\t\tconst id = nextNumericItemId();\n\t\tconst insertIndex = selectedItemIndex >= 0 && selectedItemIndex < currentStack.items.length ? selectedItemIndex + 1 : currentStack.items.length;\n\t\tcurrentStack.items.splice(insertIndex, 0, kind === \"slot\" ? {\n\t\t\tkind: \"slot\",\n\t\t\tid,\n\t\t\tenabled: true,\n\t\t\tslot: \"chat-history\"\n\t\t} : {\n\t\t\tkind: \"block\",\n\t\t\tid,\n\t\t\tenabled: true,\n\t\t\trole: \"user\",\n\t\t\tcontent: \"\"\n\t\t});\n\t\tselectedItemIndex = insertIndex;\n\t\tmarkDirty();\n\t\trenderItemList();\n\t\trenderItemEditor();\n\t}\n\tfunction nextNumericItemId() {\n\t\tconst existing = new Set((currentStack?.items || []).map((item) => String(item.id)));\n\t\tlet index = 1;\n\t\twhile (existing.has(String(index))) index++;\n\t\treturn String(index);\n\t}\n\tfunction deleteSelectedItem() {\n\t\tif (!currentStack || selectedItemIndex < 0) return;\n\t\tconst item = currentStack.items[selectedItemIndex];\n\t\tif (!confirm(\"Delete item \" + item.id + \"?\")) return;\n\t\tcurrentStack.items.splice(selectedItemIndex, 1);\n\t\tselectedItemIndex = Math.min(selectedItemIndex, currentStack.items.length - 1);\n\t\tmarkDirty();\n\t\trenderItemList();\n\t\trenderItemEditor();\n\t}\n\tasync function saveStack() {\n\t\tconst stack = stackForSubmit();\n\t\tconst data = await api(\"/api/stacks/\" + encodeURIComponent(selectedId), {\n\t\t\tmethod: \"PUT\",\n\t\t\tbody: { stack }\n\t\t});\n\t\tstacks = data.stacks || stacks;\n\t\tselectedId = data.stack?.selector || data.stack?.id || stack.id;\n\t\tcurrentStack = structuredClone(stack);\n\t\tdirty = false;\n\t\trenderDirtyState();\n\t\trenderAll(data.stack?.diagnostics || []);\n\t\tsetStatus(\"Saved \" + selectedId, \"success\");\n\t\tawait selectStack(selectedId, { keepDirty: true });\n\t}\n\tasync function createStackRemote(stack, options = {}) {\n\t\ttry {\n\t\t\treturn await api(\"/api/stacks\", {\n\t\t\t\tmethod: \"POST\",\n\t\t\t\tbody: {\n\t\t\t\t\tstack,\n\t\t\t\t\t...options\n\t\t\t\t}\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tif (error instanceof EditorApiError && error.status === 409 && !options.overwrite && confirm((error.message || \"Stack already exists.\") + \"\\n\\nOverwrite it?\")) return await api(\"/api/stacks\", {\n\t\t\t\tmethod: \"POST\",\n\t\t\t\tbody: {\n\t\t\t\t\tstack,\n\t\t\t\t\t...options,\n\t\t\t\t\toverwrite: true\n\t\t\t\t}\n\t\t\t});\n\t\t\tthrow error;\n\t\t}\n\t}\n\tfunction chooseCreateScope() {\n\t\treturn el(\"stackCreateScope\")?.value === \"global\" ? \"global\" : \"project\";\n\t}\n\tasync function createAndOpenStack(stack, activate, actionLabel, extraOptions = {}) {\n\t\tconst data = await createStackRemote(stack, {\n\t\t\t...extraOptions,\n\t\t\tactivate\n\t\t});\n\t\tstacks = data.stacks || stacks;\n\t\tselectedId = data.stack?.selector || data.stack?.id || stack.id;\n\t\tdirty = false;\n\t\trenderDirtyState();\n\t\tawait selectStack(selectedId, { keepDirty: true });\n\t\tconst displayId = data.stack?.id || stack.id;\n\t\tsetStatus(actionLabel + \" \" + displayId, \"success\");\n\t}\n\tasync function createNewStack() {\n\t\tif (dirty && !confirm(\"Discard unsaved changes?\")) return;\n\t\tconst promptedId = prompt(\"New stack id\", uniqueStackId(\"new-stack\"));\n\t\tif (promptedId === null) return;\n\t\tconst id = sanitizeStackId(promptedId);\n\t\tif (!id) throw new Error(\"Stack id must not be empty.\");\n\t\tif (id !== promptedId.trim() && !confirm(\"Use stack id '\" + id + \"'?\")) return;\n\t\tconst promptedName = prompt(\"Stack display name\", \"Default Pi Prompt Mirror\");\n\t\tif (promptedName === null) return;\n\t\tconst stack = defaultNewStack(id, promptedName.trim() || id);\n\t\tconst scope = chooseCreateScope();\n\t\tawait createAndOpenStack(stack, stacks.length === 0 || confirm(\"Activate new stack now?\"), \"Created\", { scope });\n\t}\n\tfunction defaultNewStack(id, name) {\n\t\treturn {\n\t\t\tschemaVersion: 1,\n\t\t\ttype: \"pi-forge.prompt-stack\",\n\t\t\tid,\n\t\t\tname,\n\t\t\tdescription: \"Recreates Pi's built-in prompt layout with pi-forge slots, exposing tools, guidelines, docs, append-system-prompt, project context, skills, date/cwd, and chat history as movable pieces.\",\n\t\t\tautoActivate: stacks.length === 0,\n\t\t\tmode: \"replace\",\n\t\t\tdefaults: {\n\t\t\t\tsyntheticMessagesVisible: false,\n\t\t\t\tunresolvedMacroPolicy: \"warn\"\n\t\t\t},\n\t\t\tcontext: { allowDuplicateChatHistory: false },\n\t\t\ttools: { allow: [\"*\"] },\n\t\t\tskills: { allow: [\"*\"] },\n\t\t\titems: [\n\t\t\t\t{\n\t\t\t\t\tkind: \"block\",\n\t\t\t\t\tid: \"main-role\",\n\t\t\t\t\tname: \"Pi Default Role\",\n\t\t\t\t\tenabled: true,\n\t\t\t\t\trole: \"system\",\n\t\t\t\t\tsource: {\n\t\t\t\t\t\tpackage: \"@earendil-works/pi-coding-agent\",\n\t\t\t\t\t\tfile: \"dist/core/system-prompt.js\"\n\t\t\t\t\t},\n\t\t\t\t\tcontent: \"You are an expert coding assistant operating inside pi, a coding agent harness. You help users by reading files, executing commands, editing code, and writing new files.\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tkind: \"slot\",\n\t\t\t\t\tid: \"tools\",\n\t\t\t\t\tname: \"Available Tools\",\n\t\t\t\t\tenabled: true,\n\t\t\t\t\trole: \"system\",\n\t\t\t\t\tslot: \"tools\",\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tformat: \"plain\",\n\t\t\t\t\t\tonlyWithSnippets: true\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tkind: \"block\",\n\t\t\t\t\tid: \"custom-tools-note\",\n\t\t\t\t\tname: \"Custom Tools Note\",\n\t\t\t\t\tenabled: true,\n\t\t\t\t\trole: \"system\",\n\t\t\t\t\tcontent: \"In addition to the tools above, you may have access to other custom tools depending on the project.\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tkind: \"slot\",\n\t\t\t\t\tid: \"tool-guidelines\",\n\t\t\t\t\tname: \"Guidelines\",\n\t\t\t\t\tenabled: true,\n\t\t\t\t\trole: \"system\",\n\t\t\t\t\tslot: \"tool-guidelines\",\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tformat: \"plain\",\n\t\t\t\t\t\theading: \"Guidelines:\",\n\t\t\t\t\t\tincludePiDefaultGuidelines: true,\n\t\t\t\t\t\tpiStyle: true\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tkind: \"slot\",\n\t\t\t\t\tid: \"pi-docs\",\n\t\t\t\t\tname: \"Pi Documentation Guidance\",\n\t\t\t\t\tenabled: true,\n\t\t\t\t\trole: \"system\",\n\t\t\t\t\tslot: \"pi-docs\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tkind: \"slot\",\n\t\t\t\t\tid: \"append-system-prompt\",\n\t\t\t\t\tname: \"User Append System Prompt\",\n\t\t\t\t\tenabled: true,\n\t\t\t\t\trole: \"system\",\n\t\t\t\t\tslot: \"append-system-prompt\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tkind: \"slot\",\n\t\t\t\t\tid: \"project-context\",\n\t\t\t\t\tname: \"Project Context\",\n\t\t\t\t\tenabled: true,\n\t\t\t\t\trole: \"system\",\n\t\t\t\t\tslot: \"project-context\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tkind: \"slot\",\n\t\t\t\t\tid: \"skills\",\n\t\t\t\t\tname: \"Available Skills\",\n\t\t\t\t\tenabled: true,\n\t\t\t\t\trole: \"system\",\n\t\t\t\t\tslot: \"skills\",\n\t\t\t\t\toptions: { requireReadTool: true }\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tkind: \"slot\",\n\t\t\t\t\tid: \"date-cwd\",\n\t\t\t\t\tname: \"Date and Working Directory\",\n\t\t\t\t\tenabled: true,\n\t\t\t\t\trole: \"system\",\n\t\t\t\t\tslot: \"date-cwd\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tkind: \"slot\",\n\t\t\t\t\tid: \"chat-history\",\n\t\t\t\t\tname: \"Chat History\",\n\t\t\t\t\tenabled: true,\n\t\t\t\t\tslot: \"chat-history\"\n\t\t\t\t}\n\t\t\t]\n\t\t};\n\t}\n\tasync function importStackJson() {\n\t\tel(\"importFileInput\").value = \"\";\n\t\tel(\"importFileInput\").click();\n\t}\n\tasync function handleImportFile(event) {\n\t\tconst file = event.target.files?.[0];\n\t\tif (!file) return;\n\t\tconst text = await file.text();\n\t\tconst imported = JSON.parse(text);\n\t\tif (!imported || typeof imported !== \"object\" || Array.isArray(imported)) throw new Error(\"Imported JSON must be an object.\");\n\t\tconst stack = imported;\n\t\tif (!stack.id || typeof stack.id !== \"string\") {\n\t\t\tconst promptedId = prompt(\"Stack id\", sanitizeStackId(file.name.replace(/\\.json$/i, \"\")));\n\t\t\tif (!promptedId) return;\n\t\t\tstack.id = promptedId.trim();\n\t\t}\n\t\tif (!Array.isArray(stack.items)) throw new Error(\"Imported stack must contain an items array.\");\n\t\tif (!stack.schemaVersion) stack.schemaVersion = 1;\n\t\tif (!stack.type) stack.type = \"pi-forge.prompt-stack\";\n\t\tconst scope = chooseCreateScope();\n\t\tawait createAndOpenStack(stack, confirm(\"Activate imported stack now?\"), \"Imported\", { scope });\n\t}\n\tasync function forkStack() {\n\t\tconst source = stackForSubmit();\n\t\tconst forkId = prompt(\"New fork stack id\", uniqueForkId(source.id || \"stack\"));\n\t\tif (!forkId) return;\n\t\tconst forkName = prompt(\"Fork display name\", (source.name || source.id || \"Prompt stack\") + \" fork\");\n\t\tconst fork = structuredClone(source);\n\t\tfork.id = forkId.trim();\n\t\tif (forkName && forkName.trim()) fork.name = forkName;\n\t\tfork.autoActivate = false;\n\t\tconst scope = chooseCreateScope();\n\t\tawait createAndOpenStack(fork, confirm(\"Activate fork now?\"), \"Forked\", { scope });\n\t}\n\tasync function exportStackJson() {\n\t\tconst stack = stackForSubmit();\n\t\tconst json = JSON.stringify(stack, null, 2) + \"\\n\";\n\t\tif (downloadTextFile(sanitizeStackId(stack.id || \"prompt-stack\") + \".json\", json, \"application/json\")) {\n\t\t\tsetStatus(\"Exported \" + (stack.id || \"prompt stack\"), \"success\");\n\t\t\treturn;\n\t\t}\n\t\tawait copyTextToClipboard(json);\n\t\tsetStatus(\"Copied \" + (stack.id || \"prompt stack\") + \" JSON\", \"success\");\n\t}\n\tfunction downloadTextFile(filename, text, type) {\n\t\tif (typeof Blob === \"undefined\" || typeof URL === \"undefined\" || !URL.createObjectURL) return false;\n\t\tconst blob = new Blob([text], { type });\n\t\tconst url = URL.createObjectURL(blob);\n\t\tconst link = document.createElement(\"a\");\n\t\tif (!(\"download\" in link)) {\n\t\t\tURL.revokeObjectURL(url);\n\t\t\treturn false;\n\t\t}\n\t\tlink.href = url;\n\t\tlink.download = filename;\n\t\tdocument.body.appendChild(link);\n\t\tlink.click();\n\t\tlink.remove();\n\t\tURL.revokeObjectURL(url);\n\t\treturn true;\n\t}\n\tfunction uniqueForkId(baseId) {\n\t\tconst base = sanitizeStackId(baseId || \"stack\") || \"stack\";\n\t\tconst existing = new Set(stacks.map((stack) => stack.id));\n\t\tlet candidate = base + \"-fork\";\n\t\tlet index = 2;\n\t\twhile (existing.has(candidate)) candidate = base + \"-fork-\" + index++;\n\t\treturn candidate;\n\t}\n\tfunction uniqueStackId(baseId) {\n\t\tconst base = sanitizeStackId(baseId || \"stack\") || \"stack\";\n\t\tconst existing = new Set(stacks.map((stack) => stack.id));\n\t\tlet candidate = base;\n\t\tlet index = 2;\n\t\twhile (existing.has(candidate)) candidate = base + \"-\" + index++;\n\t\treturn candidate;\n\t}\n\tfunction sanitizeStackId(value) {\n\t\treturn String(value || \"\").trim().replace(/[^A-Za-z0-9_-]+/g, \"-\").replace(/-+/g, \"-\").replace(/^-|-$/g, \"\").toLowerCase();\n\t}\n\tasync function activateStack() {\n\t\tif (!currentStack) return;\n\t\tstacks = (await api(\"/api/stacks/\" + encodeURIComponent(selectedId) + \"/activate\", { method: \"POST\" })).stacks || stacks;\n\t\trenderStackList();\n\t\tsetStatus(\"Activated \" + selectedId, \"success\");\n\t}\n\tasync function disableStacks() {\n\t\tstacks = (await api(\"/api/disable\", { method: \"POST\" })).stacks || stacks;\n\t\trenderStackList();\n\t\tsetStatus(\"Prompt stack disabled\", \"success\");\n\t}\n\tasync function deleteCurrentStack() {\n\t\tif (!currentStack) return;\n\t\tconst routeId = selectedId;\n\t\tconst displayId = currentStack.id;\n\t\tconst message = \"Delete prompt stack '\" + displayId + \"'?\\n\\nThis removes its JSON file from prompt-stack storage.\";\n\t\tif (!confirm(message)) return;\n\t\tstacks = (await api(\"/api/stacks/\" + encodeURIComponent(routeId), { method: \"DELETE\" })).stacks || [];\n\t\tdirty = false;\n\t\trenderDirtyState();\n\t\tconst next = stacks.find((stack) => stack.active) || stacks[0];\n\t\tif (next) {\n\t\t\tawait selectStack(next.selector || next.id, { keepDirty: true });\n\t\t\tsetStatus(\"Deleted \" + displayId, \"success\");\n\t\t} else {\n\t\t\trenderStackList();\n\t\t\trenderEmpty();\n\t\t\tsetStatus(\"Deleted \" + displayId + \"; no stacks remain\", \"success\");\n\t\t}\n\t}\n\tasync function reloadFromDisk() {\n\t\tif (dirty && !confirm(\"Discard unsaved changes?\")) return;\n\t\tstacks = (await api(\"/api/reload\", { method: \"POST\" })).stacks || [];\n\t\trenderStackList();\n\t\tawait loadStacks(selectedId);\n\t\tsetStatus(\"Reloaded from disk\", \"success\");\n\t}\n\tfunction stackForSubmit() {\n\t\tif (!currentStack) throw new Error(\"No stack selected.\");\n\t\tconst itemOptionsError = vueItemHost.getError();\n\t\tif (itemOptionsError) throw new Error(\"Invalid item options JSON: \" + itemOptionsError);\n\t\tconst stackError = vueTabHost.getError(\"stack\");\n\t\tif (stackError) throw new Error(stackError);\n\t\tconst regexError = vueTabHost.getError(\"regex\");\n\t\tif (regexError) throw new Error(regexError);\n\t\tconst policyError = vueTabHost.getError(\"policy\");\n\t\tif (policyError) throw new Error(policyError);\n\t\tconst clone = structuredClone(currentStack);\n\t\tif (!clone.type) clone.type = \"pi-forge.prompt-stack\";\n\t\tif (!clone.schemaVersion) clone.schemaVersion = 1;\n\t\treturn clone;\n\t}\n\tfunction renderDiagnostics(diagnostics) {\n\t\tlatestDiagnostics = diagnostics || [];\n\t\tconst errors = latestDiagnostics.filter((diag) => (diag.level || \"info\") === \"error\").length;\n\t\tconst warnings = latestDiagnostics.filter((diag) => diag.level === \"warning\").length;\n\t\tconst collapsed = diagnosticsCollapsed ?? (errors === 0 && warnings === 0);\n\t\tconst summary = !latestDiagnostics.length ? \"none\" : [errors ? errors + \" error\" + (errors === 1 ? \"\" : \"s\") : \"\", warnings ? warnings + \" warning\" + (warnings === 1 ? \"\" : \"s\") : \"\"].filter(Boolean).join(\" · \") || latestDiagnostics.length + \" note\" + (latestDiagnostics.length === 1 ? \"\" : \"s\");\n\t\tconst body = !latestDiagnostics.length ? \"<div class=\\\"diagnostic info\\\">No diagnostics.</div>\" : latestDiagnostics.map((diag) => {\n\t\t\tconst level = diag.level || \"info\";\n\t\t\tconst item = diag.itemId ? \" [\" + escapeHtml(diag.itemId) + \"]\" : \"\";\n\t\t\treturn \"<div class=\\\"diagnostic \" + attr(level) + \"\\\"><strong>\" + escapeHtml(level.toUpperCase()) + item + \"</strong>: \" + escapeHtml(diag.message || \"\") + \"</div>\";\n\t\t}).join(\"\");\n\t\tconst pane = el(\"diagnostics\");\n\t\tpane.classList.toggle(\"collapsed\", collapsed);\n\t\tpane.innerHTML = \"<button type=\\\"button\\\" id=\\\"diagnosticsToggleBtn\\\" class=\\\"diagnostics-head\\\" aria-expanded=\\\"\" + String(!collapsed) + \"\\\" title=\\\"Toggle the diagnostics panel\\\"><span class=\\\"diagnostics-title\\\">Diagnostics · \" + escapeHtml(summary) + \"</span><span class=\\\"diagnostics-chevron\\\">▾</span></button><div class=\\\"diagnostics-body\\\">\" + body + \"</div>\";\n\t\tel(\"diagnosticsToggleBtn\").onclick = () => {\n\t\t\tdiagnosticsCollapsed = !collapsed;\n\t\t\trenderDiagnostics(latestDiagnostics);\n\t\t};\n\t}\n\tfunction renderEmpty() {\n\t\tvueTabHost.unmount();\n\t\tcurrentStack = null;\n\t\tselectedId = \"\";\n\t\tdirty = false;\n\t\tactiveTab = \"items\";\n\t\tvueTabHost.resetErrors();\n\t\trenderDirtyState();\n\t\tdocument.querySelectorAll(\"[data-tab]\").forEach((button) => {\n\t\t\tbutton.classList.toggle(\"active\", button.dataset.tab === activeTab);\n\t\t});\n\t\tel(\"workspace\").style.display = \"\";\n\t\tel(\"metadataPanel\").style.display = \"none\";\n\t\tvueMetadataHost.unmount();\n\t\tel(\"itemCount\").textContent = \"\";\n\t\tel(\"itemList\").innerHTML = \"\";\n\t\tel(\"itemEditor\").innerHTML = \"<div class=\\\"empty\\\"><div class=\\\"empty-title\\\">No prompt stacks found.</div><div>Create a stack in this project, or import an existing pi-forge JSON file.</div><div class=\\\"empty-actions\\\"><button id=\\\"emptyNewStackBtn\\\" class=\\\"primary\\\" data-icon=\\\"+\\\" title=\\\"Create a new prompt stack\\\">New stack</button><button id=\\\"emptyImportBtn\\\" data-icon=\\\"⇪\\\" title=\\\"Import pi-forge stack JSON\\\">Import JSON</button></div></div>\";\n\t\tel(\"tabPanel\").classList.remove(\"open\");\n\t\tel(\"tabPanel\").innerHTML = \"\";\n\t\trenderDiagnostics([]);\n\t\tel(\"emptyNewStackBtn\").onclick = () => run(createNewStack);\n\t\tel(\"emptyImportBtn\").onclick = () => run(importStackJson);\n\t\tsetStatus(\"No prompt stacks found\");\n\t\tupdateActionState();\n\t}\n\tfunction displayItemName(item) {\n\t\tif (item.name) return item.name;\n\t\tif (item.source && typeof item.source.previousName === \"string\" && item.source.previousName.trim()) return item.source.previousName;\n\t\tif (item.kind === \"slot\" && item.slot) return item.slot;\n\t\tif (item.kind === \"block\" && item.content) {\n\t\t\tconst firstLine = item.content.trim().split(/\\n/)[0]?.trim();\n\t\t\tif (firstLine) return firstLine.length > 46 ? firstLine.slice(0, 43) + \"...\" : firstLine;\n\t\t}\n\t\treturn item.id || \"(unnamed)\";\n\t}\n\tasync function run(action) {\n\t\ttry {\n\t\t\tawait action();\n\t\t} catch (error) {\n\t\t\tsetStatus(error instanceof Error ? error.message : String(error), \"error\");\n\t\t}\n\t}\n\tfunction toggleSidebar() {\n\t\tsidebarCollapsed = !sidebarCollapsed;\n\t\tel(\"shell\").classList.toggle(\"sidebar-collapsed\", sidebarCollapsed);\n\t\tel(\"sidebarToggleBtn\").title = sidebarCollapsed ? \"Show prompt stacks sidebar\" : \"Hide prompt stacks sidebar\";\n\t\tsetStatus(sidebarCollapsed ? \"Prompt stacks sidebar hidden\" : \"Prompt stacks sidebar shown\");\n\t}\n\tfunction handleStackModalClick(event) {\n\t\tif (event.target === el(\"stackModal\") || event.target.closest?.(\"[data-modal-close]\")) closeStackModal();\n\t}\n\tfunction handlePreviewClick(event) {\n\t\tif (event.target === el(\"preview\") || event.target.closest?.(\"[data-preview-close]\")) {\n\t\t\thidePreview();\n\t\t\treturn;\n\t\t}\n\t\tif (event.target.closest?.(\"[data-payload-arm]\")) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\trun(() => armPayloadCapture(true));\n\t\t\treturn;\n\t\t}\n\t\tif (event.target.closest?.(\"[data-payload-clear]\")) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\trun(clearPayloadCapture);\n\t\t\treturn;\n\t\t}\n\t\tconst button = event.target.closest?.(\"[data-copy-index]\");\n\t\tif (!button) return;\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\trun(() => copyPreviewText(Number(button.dataset.copyIndex)));\n\t}\n\tfunction handleEditorShortcut(event) {\n\t\tif (!editorIsActive()) return;\n\t\tif (event.key === \"Escape\") {\n\t\t\tif (el(\"preview\").classList.contains(\"open\")) hidePreview();\n\t\t\telse if (el(\"stackModal\").classList.contains(\"open\")) closeStackModal();\n\t\t\treturn;\n\t\t}\n\t\tif (!(event.ctrlKey || event.metaKey) || event.altKey) return;\n\t\tconst key = event.key.toLowerCase();\n\t\tif (key === \"n\") {\n\t\t\tevent.preventDefault();\n\t\t\trun(createNewStack);\n\t\t\treturn;\n\t\t}\n\t\tif (key === \"s\") {\n\t\t\tevent.preventDefault();\n\t\t\tif (currentStack) run(saveStack);\n\t\t\treturn;\n\t\t}\n\t\tif (key === \"enter\" && event.shiftKey) {\n\t\t\tevent.preventDefault();\n\t\t\tif (currentStack) run(validateStack);\n\t\t\treturn;\n\t\t}\n\t\tif (key === \"enter\") {\n\t\t\tevent.preventDefault();\n\t\t\tif (currentStack) run(previewStack);\n\t\t}\n\t}\n\tfunction startLegacyEditor(options = {}) {\n\t\tresetEditorState();\n\t\teditorIsActive = options.isActive ?? (() => true);\n\t\teditorStarted = true;\n\t\tapplyEditorTheme(editorTheme.value);\n\t\tel(\"sidebarToggleBtn\").onclick = toggleSidebar;\n\t\tel(\"newStackBtn\").onclick = () => run(createNewStack);\n\t\tel(\"reloadBtn\").onclick = () => run(reloadFromDisk);\n\t\tel(\"disableBtn\").onclick = () => run(disableStacks);\n\t\tel(\"activateBtn\").onclick = () => run(activateStack);\n\t\tel(\"saveBtn\").onclick = () => run(saveStack);\n\t\tel(\"validateBtn\").onclick = () => run(validateStack);\n\t\tel(\"previewBtn\").onclick = () => run(previewStack);\n\t\tel(\"payloadBtn\").onclick = () => run(openPayloadCapture);\n\t\tdocument.querySelectorAll(\"[data-tab]\").forEach((button) => {\n\t\t\tbutton.onclick = () => {\n\t\t\t\tactiveTab = button.dataset.tab || \"items\";\n\t\t\t\trenderActiveTab();\n\t\t\t\thidePreview();\n\t\t\t};\n\t\t});\n\t\tel(\"forkBtn\").onclick = () => run(forkStack);\n\t\tel(\"importBtn\").onclick = () => run(importStackJson);\n\t\tel(\"exportBtn\").onclick = () => run(exportStackJson);\n\t\tel(\"importFileInput\").onchange = (event) => run(() => handleImportFile(event));\n\t\tel(\"deleteStackBtn\").onclick = () => run(deleteCurrentStack);\n\t\tel(\"stackModal\").onclick = handleStackModalClick;\n\t\tel(\"preview\").onclick = handlePreviewClick;\n\t\tel(\"addItemBtn\").onclick = () => addItem(\"block\");\n\t\tel(\"addSlotBtn\").onclick = () => addItem(\"slot\");\n\t\tel(\"deleteItemBtn\").onclick = deleteSelectedItem;\n\t\tdocument.addEventListener(\"dragover\", handleDocumentItemDragOver);\n\t\tdocument.addEventListener(\"drop\", handleDocumentItemDrop);\n\t\twindow.addEventListener(\"keydown\", handleEditorShortcut);\n\t\twindow.addEventListener(\"pi-forge:profile-applied\", handleProfileApplied);\n\t\tconst previousBeforeUnload = window.onbeforeunload;\n\t\tconst beforeUnload = () => dirty ? \"Unsaved changes\" : void 0;\n\t\twindow.onbeforeunload = beforeUnload;\n\t\tlet payloadPoll;\n\t\trun(async () => {\n\t\t\tawait loadStacks();\n\t\t\tif (!editorStarted) return;\n\t\t\tawait refreshPayloadCapture();\n\t\t\tif (!editorStarted) return;\n\t\t\tpayloadPoll = window.setInterval(() => run(() => refreshPayloadCapture({ autoOpen: true })), 2e3);\n\t\t});\n\t\treturn () => {\n\t\t\tif (!editorStarted) return;\n\t\t\teditorStarted = false;\n\t\t\tif (payloadPoll !== void 0) window.clearInterval(payloadPoll);\n\t\t\tfinishItemDrag();\n\t\t\tdocument.removeEventListener(\"dragover\", handleDocumentItemDragOver);\n\t\t\tdocument.removeEventListener(\"drop\", handleDocumentItemDrop);\n\t\t\twindow.removeEventListener(\"keydown\", handleEditorShortcut);\n\t\t\twindow.removeEventListener(\"pi-forge:profile-applied\", handleProfileApplied);\n\t\t\tif (window.onbeforeunload === beforeUnload) window.onbeforeunload = previousBeforeUnload;\n\t\t\tvueTabHost.unmount();\n\t\t\tvueMetadataHost.unmount();\n\t\t\tvueItemHost.unmount();\n\t\t\teditorIsActive = () => true;\n\t\t};\n\t}\n\tfunction resetEditorState() {\n\t\tif (dragScrollFrame) cancelAnimationFrame(dragScrollFrame);\n\t\tstacks = [];\n\t\tcwd = \"\";\n\t\tselectedId = \"\";\n\t\tcurrentStack = null;\n\t\tcurrentFilePath = \"\";\n\t\tselectedItemIndex = -1;\n\t\tdirty = false;\n\t\tdragIndex = -1;\n\t\tdragDropIndex = -1;\n\t\tdragScrollFrame = 0;\n\t\tdragScrollSpeed = 0;\n\t\tdragClientY = 0;\n\t\tsidebarCollapsed = false;\n\t\tvueItemHost.reset();\n\t\tpolicyResources = {\n\t\t\ttools: [],\n\t\t\tskills: []\n\t\t};\n\t\tlatestDiagnostics = [];\n\t\tactiveTab = \"items\";\n\t\tmetadataCollapsed = true;\n\t\tvueTabHost.resetErrors();\n\t}\n\tvar api, stacks, cwd, selectedId, currentStack, currentFilePath, selectedItemIndex, dirty, dragIndex, dragDropIndex, dragScrollFrame, dragScrollSpeed, dragClientY, sidebarCollapsed, policyResources, latestDiagnostics, diagnosticsCollapsed, activeTab, metadataCollapsed, editorStarted, editorIsActive, slotNames, roles, validateStack, previewStack, refreshPayloadCapture, armPayloadCapture, clearPayloadCapture, openPayloadCapture, hidePreview, copyPreviewText, copyTextToClipboard, vueTabHost, vueMetadataHost, vueItemHost;\n\tvar init_legacy_editor = __esmMin((() => {\n\t\tinit_api();\n\t\tinit_dom();\n\t\tinit_inspector();\n\t\tinit_vue_item_host();\n\t\tinit_vue_metadata_host();\n\t\tinit_theme();\n\t\tinit_vue_tab_host();\n\t\tapi = createEditorApi(new URLSearchParams(location.search).get(\"token\") || \"\");\n\t\tstacks = [];\n\t\tcwd = \"\";\n\t\tselectedId = \"\";\n\t\tcurrentStack = null;\n\t\tcurrentFilePath = \"\";\n\t\tselectedItemIndex = -1;\n\t\tdirty = false;\n\t\tdragIndex = -1;\n\t\tdragDropIndex = -1;\n\t\tdragScrollFrame = 0;\n\t\tdragScrollSpeed = 0;\n\t\tdragClientY = 0;\n\t\tsidebarCollapsed = false;\n\t\tpolicyResources = {\n\t\t\ttools: [],\n\t\t\tskills: []\n\t\t};\n\t\tlatestDiagnostics = [];\n\t\tdiagnosticsCollapsed = null;\n\t\tactiveTab = \"items\";\n\t\tmetadataCollapsed = true;\n\t\teditorStarted = false;\n\t\teditorIsActive = () => true;\n\t\tslotNames = [\n\t\t\t\"chat-history\",\n\t\t\t\"tools\",\n\t\t\t\"tool-guidelines\",\n\t\t\t\"skills\",\n\t\t\t\"project-context\",\n\t\t\t\"append-system-prompt\",\n\t\t\t\"date\",\n\t\t\t\"cwd\",\n\t\t\t\"date-cwd\",\n\t\t\t\"active-model\",\n\t\t\t\"pi-docs\"\n\t\t];\n\t\troles = [\n\t\t\t\"\",\n\t\t\t\"system\",\n\t\t\t\"user\",\n\t\t\t\"assistant\",\n\t\t\t\"custom\"\n\t\t];\n\t\t({validateStack, previewStack, refreshPayloadCapture, armPayloadCapture, clearPayloadCapture, openPayloadCapture, hidePreview, copyPreviewText, copyTextToClipboard} = createInspector({\n\t\t\tapi,\n\t\t\tgetSelectedId: () => selectedId,\n\t\t\tstackForSubmit,\n\t\t\trenderDiagnostics,\n\t\t\trenderItemList,\n\t\t\tsetStatus\n\t\t}));\n\t\tvueTabHost = createVueTabHost({\n\t\t\tgetStack: () => currentStack,\n\t\t\tgetResources: () => policyResources,\n\t\t\tmarkDirty,\n\t\t\tsetStatus,\n\t\t\tvalidateStack: () => run(validateStack),\n\t\t\tapplyStack: applyStackFromVue,\n\t\t\tcopyText: copyTextToClipboard\n\t\t});\n\t\tvueMetadataHost = createVueMetadataHost({\n\t\t\tgetStack: () => currentStack,\n\t\t\tgetFilePath: () => currentFilePath,\n\t\t\tgetCollapsed: () => metadataCollapsed,\n\t\t\tsetCollapsed: (collapsed) => {\n\t\t\t\tmetadataCollapsed = collapsed;\n\t\t\t},\n\t\t\tmarkDirty,\n\t\t\tsetStatus\n\t\t});\n\t\tvueItemHost = createVueItemHost({\n\t\t\tgetStack: () => currentStack,\n\t\t\tgetSelectedIndex: () => selectedItemIndex,\n\t\t\tslotNames,\n\t\t\troles,\n\t\t\tmarkDirty,\n\t\t\trenderItemList,\n\t\t\tsetStatus\n\t\t});\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/App.vue?vue&type=script&setup=true&lang.ts\n\tinit_vue_runtime_esm_bundler();\n\tinit_theme();\n\tvar _hoisted_1 = { class: \"app-root\" };\n\tvar _hoisted_2 = {\n\t\tclass: \"surface-nav\",\n\t\t\"aria-label\": \"Pi Forge editor sections\"\n\t};\n\tvar _hoisted_3 = [\"aria-current\"];\n\tvar _hoisted_4 = [\"aria-current\"];\n\tvar _hoisted_5 = [\"data-icon\", \"title\"];\n\tvar _hoisted_6 = { class: \"editor-surface\" };\n\t//#endregion\n\t//#region src/web-editor/client/App.vue\n\tvar App_default = /* @__PURE__ */ defineComponent({\n\t\t__name: \"App\",\n\t\tsetup(__props) {\n\t\t\tlet stopLegacyEditor;\n\t\t\tconst activeSurface = /* @__PURE__ */ ref(\"stacks\");\n\t\t\tonMounted(async () => {\n\t\t\t\tapplyEditorTheme(editorTheme.value);\n\t\t\t\ttry {\n\t\t\t\t\tconst { startLegacyEditor } = await Promise.resolve().then(() => (init_legacy_editor(), legacy_editor_exports));\n\t\t\t\t\tstopLegacyEditor = startLegacyEditor({ isActive: () => activeSurface.value === \"stacks\" });\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconst status = document.getElementById(\"status\");\n\t\t\t\t\tif (status) {\n\t\t\t\t\t\tstatus.textContent = error instanceof Error ? error.message : String(error);\n\t\t\t\t\t\tstatus.style.color = \"var(--error)\";\n\t\t\t\t\t}\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t});\n\t\t\tonUnmounted(() => {\n\t\t\t\tstopLegacyEditor?.();\n\t\t\t});\n\t\t\treturn (_ctx, _cache) => {\n\t\t\t\treturn openBlock(), createElementBlock(\"div\", _hoisted_1, [\n\t\t\t\t\tcreateBaseVNode(\"nav\", _hoisted_2, [\n\t\t\t\t\t\t_cache[4] || (_cache[4] = createBaseVNode(\"div\", { class: \"surface-brand\" }, \"Pi Forge\", -1)),\n\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\tid: \"stacksSurfaceBtn\",\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\tclass: normalizeClass({ active: activeSurface.value === \"stacks\" }),\n\t\t\t\t\t\t\t\"aria-current\": activeSurface.value === \"stacks\" ? \"page\" : void 0,\n\t\t\t\t\t\t\tonClick: _cache[0] || (_cache[0] = ($event) => activeSurface.value = \"stacks\")\n\t\t\t\t\t\t}, \" Prompt stacks \", 10, _hoisted_3),\n\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\tid: \"profilesSurfaceBtn\",\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\tclass: normalizeClass({ active: activeSurface.value === \"profiles\" }),\n\t\t\t\t\t\t\t\"aria-current\": activeSurface.value === \"profiles\" ? \"page\" : void 0,\n\t\t\t\t\t\t\tonClick: _cache[1] || (_cache[1] = ($event) => activeSurface.value = \"profiles\")\n\t\t\t\t\t\t}, \" Agent profiles \", 10, _hoisted_4),\n\t\t\t\t\t\t_cache[5] || (_cache[5] = createBaseVNode(\"span\", { class: \"surface-nav-spacer\" }, null, -1)),\n\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\tid: \"themeToggleBtn\",\n\t\t\t\t\t\t\tclass: \"theme-toggle\",\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\"data-icon\": unref(editorTheme) === \"dark\" ? \"☀\" : \"◐\",\n\t\t\t\t\t\t\ttitle: unref(editorTheme) === \"dark\" ? \"Switch to light theme\" : \"Switch to dark theme\",\n\t\t\t\t\t\t\tonClick: _cache[2] || (_cache[2] = (...args) => unref(toggleEditorTheme) && unref(toggleEditorTheme)(...args))\n\t\t\t\t\t\t}, toDisplayString(unref(editorTheme) === \"dark\" ? \"Light\" : \"Dark\"), 9, _hoisted_5)\n\t\t\t\t\t]),\n\t\t\t\t\twithDirectives(createBaseVNode(\"section\", _hoisted_6, [_cache[3] || (setBlockTracking(-1, true), (_cache[3] = createBaseVNode(\"div\", { class: \"legacy-editor-root\" }, [_cache[6] || (_cache[6] = createStaticVNode(\"<header class=\\\"topbar\\\"><button id=\\\"sidebarToggleBtn\\\" class=\\\"icon\\\" data-icon=\\\"☰\\\" title=\\\"Toggle prompt stacks sidebar\\\" aria-label=\\\"Toggle prompt stacks sidebar\\\"></button><div class=\\\"brand\\\">pi-forge stack editor</div><div id=\\\"status\\\" class=\\\"status\\\">Loading</div><span id=\\\"dirtyBadge\\\" class=\\\"dirty-badge\\\" title=\\\"The current stack has unsaved edits\\\">Unsaved</span><button id=\\\"reloadBtn\\\" data-icon=\\\"↻\\\" title=\\\"Reload prompt stacks from disk\\\">Reload</button><button id=\\\"disableBtn\\\" data-icon=\\\"■\\\" title=\\\"Disable the active prompt stack\\\">Disable stack</button></header><div id=\\\"shell\\\" class=\\\"shell\\\"><aside class=\\\"sidebar\\\"><div class=\\\"side-head\\\"><div class=\\\"side-title\\\">Prompt stacks</div><div id=\\\"cwd\\\" class=\\\"cwd\\\"></div></div><div id=\\\"stackList\\\" class=\\\"stack-list\\\"></div></aside><main class=\\\"main\\\"><div class=\\\"main-actions\\\"><select id=\\\"stackCreateScope\\\" title=\\\"Scope for new stacks, imports, and forks\\\"><option value=\\\"project\\\">project</option><option value=\\\"global\\\">global</option></select><button id=\\\"newStackBtn\\\" data-icon=\\\"+\\\" title=\\\"Create a new prompt stack (Ctrl/Cmd+N)\\\">New stack</button><button id=\\\"activateBtn\\\" class=\\\"primary\\\" data-icon=\\\"▶\\\" title=\\\"Make this stack active for the current Pi session\\\">Activate</button><button id=\\\"saveBtn\\\" class=\\\"primary\\\" data-icon=\\\"✓\\\" title=\\\"Save the edited stack JSON to disk (Ctrl/Cmd+S)\\\">Save</button><button id=\\\"validateBtn\\\" data-icon=\\\"!\\\" title=\\\"Validate the edited stack without saving (Ctrl/Cmd+Shift+Enter)\\\">Validate</button><button id=\\\"previewBtn\\\" data-icon=\\\"◱\\\" title=\\\"Preview the compiled prompt without sending it (Ctrl/Cmd+Enter)\\\">Preview</button><button id=\\\"payloadBtn\\\" data-icon=\\\"◆\\\" title=\\\"Capture the next provider payload in the browser\\\">Arm payload</button><button id=\\\"forkBtn\\\" data-icon=\\\"⑂\\\" title=\\\"Create a new stack from the current edits\\\">Fork</button><button id=\\\"importBtn\\\" data-icon=\\\"⇪\\\" title=\\\"Import pi-forge stack JSON\\\">Import JSON</button><button id=\\\"exportBtn\\\" data-icon=\\\"⇩\\\" title=\\\"Download the current stack JSON, or copy it if download is unavailable\\\">Export JSON</button><span class=\\\"action-spacer\\\"></span><button id=\\\"deleteStackBtn\\\" class=\\\"danger\\\" data-icon=\\\"×\\\" title=\\\"Delete the selected stack JSON file\\\">Delete stack</button><input id=\\\"importFileInput\\\" type=\\\"file\\\" accept=\\\"application/json,.json\\\" hidden></div><section id=\\\"metadataPanel\\\" class=\\\"metadata-panel\\\"><div id=\\\"metadataHost\\\"></div></section><nav class=\\\"view-tabs\\\" aria-label=\\\"Stack editor sections\\\"><button id=\\\"itemsTabBtn\\\" data-tab=\\\"items\\\" class=\\\"active\\\" data-icon=\\\"☰\\\" title=\\\"Edit prompt stack items\\\">Items</button><button id=\\\"regexTabBtn\\\" data-tab=\\\"regex\\\" data-icon=\\\".*\\\" title=\\\"Edit regex transform rules\\\">Regex</button><button id=\\\"policyTabBtn\\\" data-tab=\\\"policy\\\" data-icon=\\\"⊕\\\" title=\\\"Edit active-tool policy and model-visible skill filtering\\\">Policy</button><button id=\\\"stackTabBtn\\\" data-tab=\\\"stack\\\" data-icon=\\\"{}\\\" title=\\\"Edit context options and raw stack JSON\\\">Stack</button></nav><section id=\\\"workspace\\\" class=\\\"workspace\\\"><div class=\\\"items-pane\\\"><div class=\\\"pane-head\\\"><span>Items</span><span id=\\\"itemCount\\\" class=\\\"stack-meta\\\"></span></div><div class=\\\"item-tools\\\"><button id=\\\"addItemBtn\\\" data-icon=\\\"+\\\" title=\\\"Add a prompt block item\\\">Add block</button><button id=\\\"addSlotBtn\\\" data-icon=\\\"+\\\" title=\\\"Add a runtime slot item\\\">Add slot</button><span class=\\\"item-tools-spacer\\\"></span><button id=\\\"deleteItemBtn\\\" class=\\\"danger\\\" data-icon=\\\"×\\\" title=\\\"Delete the selected stack item\\\">Delete item</button></div><div id=\\\"itemList\\\" class=\\\"item-list\\\"></div></div><div class=\\\"editor-pane\\\"><div id=\\\"itemEditor\\\" class=\\\"item-editor\\\"></div><div id=\\\"diagnostics\\\" class=\\\"diagnostics\\\"></div></div></section><section id=\\\"tabPanel\\\" class=\\\"tab-panel\\\"></section></main></div><div id=\\\"preview\\\" class=\\\"preview\\\"></div><div id=\\\"stackModal\\\" class=\\\"modal\\\"></div>\", 4))])).cacheIndex = 3, setBlockTracking(1), _cache[3])], 512), [[vShow, activeSurface.value === \"stacks\"]]),\n\t\t\t\t\twithDirectives(createVNode(ProfileBrowser_default, { active: activeSurface.value === \"profiles\" }, null, 8, [\"active\"]), [[vShow, activeSurface.value === \"profiles\"]])\n\t\t\t\t]);\n\t\t\t};\n\t\t}\n\t});\n\t//#endregion\n\t//#region src/web-editor/client/main.ts\n\tinit_vue_runtime_esm_bundler();\n\tcreateApp(App_default).mount(\"#app\");\n\t//#endregion\n})();\n";
|
|
3
3
|
//# sourceMappingURL=client-script.generated.js.map
|