@zihanw/pi-forge 0.5.3 → 0.5.4

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.
Files changed (45) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/compile-cycle.d.ts +6 -1
  3. package/dist/compile-cycle.d.ts.map +1 -1
  4. package/dist/compile-cycle.js +2 -0
  5. package/dist/compile-cycle.js.map +1 -1
  6. package/dist/compiler.d.ts +7 -1
  7. package/dist/compiler.d.ts.map +1 -1
  8. package/dist/compiler.js +70 -2
  9. package/dist/compiler.js.map +1 -1
  10. package/dist/context-diff-history.d.ts +2 -0
  11. package/dist/context-diff-history.d.ts.map +1 -1
  12. package/dist/context-diff-history.js +9 -0
  13. package/dist/context-diff-history.js.map +1 -1
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +4 -2
  16. package/dist/index.js.map +1 -1
  17. package/dist/lifecycle.d.ts.map +1 -1
  18. package/dist/lifecycle.js +12 -3
  19. package/dist/lifecycle.js.map +1 -1
  20. package/dist/preset-command.d.ts +2 -0
  21. package/dist/preset-command.d.ts.map +1 -1
  22. package/dist/preset-command.js +9 -1
  23. package/dist/preset-command.js.map +1 -1
  24. package/dist/preview.d.ts.map +1 -1
  25. package/dist/preview.js +2 -2
  26. package/dist/preview.js.map +1 -1
  27. package/dist/profile-command.d.ts +4 -1
  28. package/dist/profile-command.d.ts.map +1 -1
  29. package/dist/profile-command.js +9 -5
  30. package/dist/profile-command.js.map +1 -1
  31. package/dist/prompt-cache-warning.d.ts +23 -0
  32. package/dist/prompt-cache-warning.d.ts.map +1 -0
  33. package/dist/prompt-cache-warning.js +74 -0
  34. package/dist/prompt-cache-warning.js.map +1 -0
  35. package/dist/web-editor/client-script.generated.d.ts.map +1 -1
  36. package/dist/web-editor/client-script.generated.js +1 -1
  37. package/dist/web-editor/client-script.generated.js.map +1 -1
  38. package/dist/web-editor/client-styles.generated.d.ts.map +1 -1
  39. package/dist/web-editor/client-styles.generated.js +1 -1
  40. package/dist/web-editor/client-styles.generated.js.map +1 -1
  41. package/dist/web-editor/styles.d.ts.map +1 -1
  42. package/dist/web-editor/styles.js +79 -1
  43. package/dist/web-editor/styles.js.map +1 -1
  44. package/docs/design/pi-forge-system-update-design-notes.md +229 -0
  45. package/package.json +1 -1
@@ -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$1, 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$1 = (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$1(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$1(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$1(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$1(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/i18n.ts\n\tfunction detectLocale() {\n\t\tconst lang = typeof navigator !== \"undefined\" ? navigator.language : \"\";\n\t\treturn lang && lang.toLowerCase().startsWith(\"zh\") ? \"zh-CN\" : \"en\";\n\t}\n\tfunction initialLocale() {\n\t\tconst docLang = typeof document !== \"undefined\" ? document.documentElement.lang : \"\";\n\t\treturn docLang === \"zh-CN\" || docLang === \"en\" ? docLang : detectLocale();\n\t}\n\tfunction t(key, params) {\n\t\tlet text = (dictionaries[editorLocale.value] ?? dictionaries.en)[key] ?? dictionaries.en[key] ?? key;\n\t\tif (params) for (const [name, value] of Object.entries(params)) text = text.replaceAll(`{${name}}`, String(value));\n\t\treturn text;\n\t}\n\t/** Plural helper: English switches one/many; zh-CN uses a single form. */\n\tfunction tp(one, many, count, params = {}) {\n\t\treturn t(editorLocale.value === \"en\" && count === 1 ? one : many, {\n\t\t\t...params,\n\t\t\tcount\n\t\t});\n\t}\n\tfunction setEditorLocale(locale) {\n\t\teditorLocale.value = locale;\n\t\tif (typeof document !== \"undefined\") document.documentElement.lang = locale;\n\t}\n\t/**\n\t* Imperative translation pass for DOM regions Vue does not own (the v-once\n\t* legacy stack-editor chrome). Elements opt in with data-i18n (textContent)\n\t* and data-i18n-title (title attribute).\n\t*/\n\tfunction translateDom(root) {\n\t\tfor (const element of root.querySelectorAll(\"[data-i18n]\")) element.textContent = t(element.dataset.i18n);\n\t\tfor (const element of root.querySelectorAll(\"[data-i18n-title]\")) element.title = t(element.dataset.i18nTitle);\n\t\tfor (const element of root.querySelectorAll(\"[data-i18n-aria]\")) element.setAttribute(\"aria-label\", t(element.dataset.i18nAria));\n\t}\n\tvar dictionaries, editorLocale;\n\tvar init_i18n = __esmMin((() => {\n\t\tinit_vue_runtime_esm_bundler();\n\t\tdictionaries = {\n\t\t\ten: {\n\t\t\t\t\"nav.stacks\": \"Presets\",\n\t\t\t\t\"nav.profiles\": \"Agent profiles\",\n\t\t\t\t\"nav.settings\": \"Settings\",\n\t\t\t\t\"nav.themeToLight\": \"Switch to light theme\",\n\t\t\t\t\"nav.themeToDark\": \"Switch to dark theme\",\n\t\t\t\t\"nav.themeLight\": \"Light\",\n\t\t\t\t\"nav.themeDark\": \"Dark\",\n\t\t\t\t\"nav.locale\": \"Language\",\n\t\t\t\t\"nav.editorSectionsAria\": \"Pi Forge editor sections\",\n\t\t\t\t\"nav.stackSectionsAria\": \"Preset editor sections\",\n\t\t\t\t\"chrome.toggleSidebar\": \"Toggle presets sidebar\",\n\t\t\t\t\"chrome.brand\": \"pi-forge preset editor\",\n\t\t\t\t\"chrome.loading\": \"Loading\",\n\t\t\t\t\"chrome.unsaved\": \"Unsaved\",\n\t\t\t\t\"chrome.unsavedTitle\": \"The current preset has unsaved edits\",\n\t\t\t\t\"chrome.reload\": \"Reload\",\n\t\t\t\t\"chrome.reloadTitle\": \"Reload presets from disk\",\n\t\t\t\t\"chrome.disableStack\": \"Disable preset\",\n\t\t\t\t\"chrome.disableStackTitle\": \"Disable the active preset\",\n\t\t\t\t\"chrome.scopeTitle\": \"Scope for new presets, imports, and forks\",\n\t\t\t\t\"chrome.scopeAria\": \"Preset scope\",\n\t\t\t\t\"chrome.scopeProject\": \"Project\",\n\t\t\t\t\"chrome.scopeGlobal\": \"Global\",\n\t\t\t\t\"chrome.newStack\": \"New preset\",\n\t\t\t\t\"chrome.newStackTitle\": \"Create a new preset (Ctrl/Cmd+N)\",\n\t\t\t\t\"chrome.activate\": \"Activate\",\n\t\t\t\t\"chrome.activateTitle\": \"Make this preset active for the current Pi session\",\n\t\t\t\t\"chrome.save\": \"Save\",\n\t\t\t\t\"chrome.saveTitle\": \"Save the edited preset JSON to disk (Ctrl/Cmd+S)\",\n\t\t\t\t\"chrome.validate\": \"Validate\",\n\t\t\t\t\"chrome.validateTitle\": \"Validate the edited preset without saving (Ctrl/Cmd+Shift+Enter)\",\n\t\t\t\t\"chrome.preview\": \"Preview\",\n\t\t\t\t\"chrome.previewTitle\": \"Preview the compiled prompt without sending it (Ctrl/Cmd+Enter)\",\n\t\t\t\t\"chrome.more\": \"More\",\n\t\t\t\t\"chrome.moreTitle\": \"Show less-used preset actions\",\n\t\t\t\t\"chrome.armPayload\": \"Arm payload\",\n\t\t\t\t\"chrome.armPayloadTitle\": \"Capture the next provider payload in the browser\",\n\t\t\t\t\"chrome.fork\": \"Fork\",\n\t\t\t\t\"chrome.forkTitle\": \"Create a new preset from the current edits\",\n\t\t\t\t\"chrome.import\": \"Import JSON\",\n\t\t\t\t\"chrome.importTitle\": \"Import pi-forge preset JSON\",\n\t\t\t\t\"chrome.export\": \"Export JSON\",\n\t\t\t\t\"chrome.exportTitle\": \"Download the current preset JSON, or copy it if download is unavailable\",\n\t\t\t\t\"chrome.deleteStack\": \"Delete preset\",\n\t\t\t\t\"chrome.deleteStackTitle\": \"Delete the selected preset JSON file\",\n\t\t\t\t\"chrome.items\": \"Stack items\",\n\t\t\t\t\"chrome.addBlock\": \"Add block\",\n\t\t\t\t\"chrome.addBlockTitle\": \"Add a prompt block item\",\n\t\t\t\t\"chrome.addSlot\": \"Add slot\",\n\t\t\t\t\"chrome.addSlotTitle\": \"Add a runtime slot item\",\n\t\t\t\t\"chrome.deleteItem\": \"Delete item\",\n\t\t\t\t\"chrome.deleteItemTitle\": \"Delete the selected Stack item\",\n\t\t\t\t\"tab.items\": \"Stack\",\n\t\t\t\t\"tab.itemsTitle\": \"Edit the ordered Block and Slot Stack\",\n\t\t\t\t\"tab.regex\": \"Regex\",\n\t\t\t\t\"tab.regexTitle\": \"Edit regex transform rules\",\n\t\t\t\t\"tab.policy\": \"Policy\",\n\t\t\t\t\"tab.policyTitle\": \"Edit active-tool policy and model-visible skill filtering\",\n\t\t\t\t\"tab.stack\": \"Advanced\",\n\t\t\t\t\"tab.stackTitle\": \"Edit context options, parameters, extensions, and raw preset JSON\",\n\t\t\t\t\"tab.preview\": \"Preview\",\n\t\t\t\t\"tab.previewTitle\": \"Compiled prompt, unsaved draft diff, and recent run diff\",\n\t\t\t\t\"settings.pluginSettings\": \"Plugin settings\",\n\t\t\t\t\"settings.pluginSettingsMeta\": \"Configuration pages contributed by installed Pi Forge plugins.\",\n\t\t\t\t\"settings.loading\": \"Loading settings…\",\n\t\t\t\t\"status.unsavedChanges\": \"Unsaved changes\",\n\t\t\t\t\"status.loaded\": \"Loaded {id}\",\n\t\t\t\t\"status.appliedStack\": \"Applied preset JSON to editor\",\n\t\t\t\t\"status.saved\": \"Saved {id}\",\n\t\t\t\t\"status.created\": \"Created {id}\",\n\t\t\t\t\"status.imported\": \"Imported {id}\",\n\t\t\t\t\"status.forked\": \"Forked {id}\",\n\t\t\t\t\"status.exported\": \"Exported {id}\",\n\t\t\t\t\"status.copiedJson\": \"Copied {id} JSON\",\n\t\t\t\t\"status.activated\": \"Activated {id}\",\n\t\t\t\t\"status.stackDisabled\": \"Preset disabled\",\n\t\t\t\t\"status.deleted\": \"Deleted {id}\",\n\t\t\t\t\"status.deletedNoneRemain\": \"Deleted {id}; no presets remain\",\n\t\t\t\t\"status.reloaded\": \"Reloaded from disk\",\n\t\t\t\t\"status.noStacks\": \"No presets found\",\n\t\t\t\t\"status.sidebarHidden\": \"Presets sidebar hidden\",\n\t\t\t\t\"status.sidebarShown\": \"Presets sidebar shown\",\n\t\t\t\t\"stackList.empty\": \"No presets in this project.\",\n\t\t\t\t\"stackList.active\": \"active\",\n\t\t\t\t\"stackList.global\": \"global\",\n\t\t\t\t\"stackList.unnamed\": \"(unnamed)\",\n\t\t\t\t\"stackList.errorCount\": \"{count} error\",\n\t\t\t\t\"stackList.warningCount\": \"{count} warning\",\n\t\t\t\t\"stackList.itemCount\": \"{count} items\",\n\t\t\t\t\"itemList.total\": \"{count} total\",\n\t\t\t\t\"itemList.dragToReorder\": \"Drag to reorder\",\n\t\t\t\t\"itemList.toggleItem\": \"Toggle item\",\n\t\t\t\t\"itemList.on\": \"On\",\n\t\t\t\t\"itemList.off\": \"Off\",\n\t\t\t\t\"itemEditor.none\": \"No item selected.\",\n\t\t\t\t\"modal.close\": \"Close\",\n\t\t\t\t\"modal.closeTitle\": \"Close this dialog\",\n\t\t\t\t\"confirm.discardChanges\": \"Discard unsaved changes?\",\n\t\t\t\t\"confirm.deleteItem\": \"Delete item {id}?\",\n\t\t\t\t\"confirm.overwriteStack\": \"{message}\\n\\nOverwrite it?\",\n\t\t\t\t\"confirm.useStackId\": \"Use preset id '{id}'?\",\n\t\t\t\t\"confirm.activateNewStack\": \"Activate new preset now?\",\n\t\t\t\t\"confirm.activateImportedStack\": \"Activate imported preset now?\",\n\t\t\t\t\"confirm.activateFork\": \"Activate fork now?\",\n\t\t\t\t\"confirm.deleteStack\": \"Delete preset '{id}'?\\n\\nThis removes its JSON file from preset storage.\",\n\t\t\t\t\"prompt.newStackId\": \"New preset id\",\n\t\t\t\t\"prompt.stackId\": \"Preset id\",\n\t\t\t\t\"prompt.stackDisplayName\": \"Preset display name\",\n\t\t\t\t\"prompt.forkStackId\": \"New fork preset id\",\n\t\t\t\t\"prompt.forkDisplayName\": \"Fork display name\",\n\t\t\t\t\"error.stackIdEmpty\": \"Preset id must not be empty.\",\n\t\t\t\t\"error.importNotObject\": \"Imported JSON must be an object.\",\n\t\t\t\t\"error.importNoItems\": \"Imported preset must contain an items array.\",\n\t\t\t\t\"error.noStackSelected\": \"No preset selected.\",\n\t\t\t\t\"error.invalidItemOptions\": \"Invalid item options JSON: {message}\",\n\t\t\t\t\"diag.none\": \"none\",\n\t\t\t\t\"diag.errorOne\": \"{count} error\",\n\t\t\t\t\"diag.errorMany\": \"{count} errors\",\n\t\t\t\t\"diag.warningOne\": \"{count} warning\",\n\t\t\t\t\"diag.warningMany\": \"{count} warnings\",\n\t\t\t\t\"diag.noteOne\": \"{count} note\",\n\t\t\t\t\"diag.noteMany\": \"{count} notes\",\n\t\t\t\t\"diag.noDiagnostics\": \"No diagnostics.\",\n\t\t\t\t\"diag.title\": \"Diagnostics · {summary}\",\n\t\t\t\t\"diag.toggle\": \"Toggle the diagnostics panel\",\n\t\t\t\t\"empty.title\": \"No presets found.\",\n\t\t\t\t\"empty.body\": \"Create a preset in this project, or import an existing pi-forge JSON file.\",\n\t\t\t\t\"chrome.showSidebar\": \"Show presets sidebar\",\n\t\t\t\t\"chrome.hideSidebar\": \"Hide presets sidebar\",\n\t\t\t\t\"inspector.validationComplete\": \"Validation complete\",\n\t\t\t\t\"inspector.armed\": \"Payload capture armed; send the next Pi prompt\",\n\t\t\t\t\"inspector.cleared\": \"Payload capture cleared\",\n\t\t\t\t\"inspector.armedButton\": \"Payload armed\",\n\t\t\t\t\"inspector.armedButtonTitle\": \"Waiting for the next provider payload\",\n\t\t\t\t\"inspector.viewPayload\": \"View payload\",\n\t\t\t\t\"inspector.viewPayloadTitle\": \"Open the latest captured provider payload\",\n\t\t\t\t\"inspector.armTitle\": \"Capture the next provider payload in this editor\",\n\t\t\t\t\"inspector.copy\": \"Copy\",\n\t\t\t\t\"inspector.copyFullTitle\": \"Copy the full preview text\",\n\t\t\t\t\"inspector.sectionMeta\": \"{chars} chars · ~{tokens} tokens\",\n\t\t\t\t\"inspector.copySectionTitle\": \"Copy this preview section\",\n\t\t\t\t\"inspector.copyFull\": \"Copy full\",\n\t\t\t\t\"inspector.payloadTitle\": \"Provider payload\",\n\t\t\t\t\"inspector.noPayload\": \"No payload captured.\",\n\t\t\t\t\"inspector.armNext\": \"Arm next\",\n\t\t\t\t\"inspector.armNextTitle\": \"Capture the next provider payload\",\n\t\t\t\t\"inspector.closePayload\": \"Close the payload inspector\",\n\t\t\t\t\"inspector.armEmptyBody\": \"Arm capture, then send the next prompt in Pi. The provider payload will appear here before it is sent.\",\n\t\t\t\t\"inspector.armedAt\": \"Armed at {time}\",\n\t\t\t\t\"inspector.armedWaiting\": \"Waiting for next provider request\",\n\t\t\t\t\"inspector.armedTitle\": \"Payload capture armed\",\n\t\t\t\t\"inspector.clear\": \"Clear\",\n\t\t\t\t\"inspector.clearArmedTitle\": \"Clear the armed payload capture\",\n\t\t\t\t\"inspector.armedBody\": \"Send the next prompt in Pi. The exact provider payload will be captured here and redacted before display.\",\n\t\t\t\t\"inspector.stackId\": \"preset {id}\",\n\t\t\t\t\"inspector.truncated\": \"truncated\",\n\t\t\t\t\"inspector.copyPayloadTitle\": \"Copy the full redacted payload\",\n\t\t\t\t\"inspector.armAgain\": \"Arm again\",\n\t\t\t\t\"inspector.clearCapturedTitle\": \"Clear the captured payload\",\n\t\t\t\t\"inspector.stringifyError\": \"Stringify error\",\n\t\t\t\t\"inspector.rawTruncated\": \"Raw truncated payload\",\n\t\t\t\t\"inspector.rawPayload\": \"Raw payload\",\n\t\t\t\t\"inspector.chars\": \"{count} chars\",\n\t\t\t\t\"inspector.copiedText\": \"Copied text\",\n\t\t\t\t\"error.invalidItemOptionsShort\": \"Invalid item options JSON\",\n\t\t\t\t\"status.metadataHidden\": \"Preset metadata hidden\",\n\t\t\t\t\"status.metadataShown\": \"Preset metadata shown\",\n\t\t\t\t\"metadata.toggleTitle\": \"Show or hide preset metadata\",\n\t\t\t\t\"metadata.title\": \"Metadata\",\n\t\t\t\t\"metadata.noId\": \"(no id)\",\n\t\t\t\t\"metadata.stackId\": \"Preset ID\",\n\t\t\t\t\"metadata.stackIdTitle\": \"Preset IDs are immutable; use Fork to create a new ID.\",\n\t\t\t\t\"metadata.name\": \"Name\",\n\t\t\t\t\"metadata.mode\": \"Mode\",\n\t\t\t\t\"metadata.autoActivate\": \"Auto activate\",\n\t\t\t\t\"metadata.enabled\": \"enabled\",\n\t\t\t\t\"metadata.description\": \"Description\",\n\t\t\t\t\"metadata.file\": \"File\",\n\t\t\t\t\"item.kind\": \"Kind\",\n\t\t\t\t\"item.id\": \"ID\",\n\t\t\t\t\"item.name\": \"Name\",\n\t\t\t\t\"item.role\": \"Role\",\n\t\t\t\t\"item.roleNone\": \"(none)\",\n\t\t\t\t\"item.slot\": \"Slot\",\n\t\t\t\t\"item.slotUnregistered\": \"{name} (unregistered)\",\n\t\t\t\t\"item.content\": \"Content\",\n\t\t\t\t\"item.slotOptions\": \"Slot options\",\n\t\t\t\t\"item.form\": \"Form\",\n\t\t\t\t\"item.includeLastUserMessage\": \"Include last user message\",\n\t\t\t\t\"item.stripAssistantThinking\": \"Strip assistant thinking\",\n\t\t\t\t\"item.includeSummaries\": \"Include summaries\",\n\t\t\t\t\"item.toolHistory\": \"Tool history\",\n\t\t\t\t\"item.roles\": \"Roles\",\n\t\t\t\t\"item.maxMessages\": \"Max messages\",\n\t\t\t\t\"item.maxChars\": \"Max chars\",\n\t\t\t\t\"item.format\": \"Format\",\n\t\t\t\t\"item.includeTime\": \"Include current time\",\n\t\t\t\t\"item.noStructuredOptions\": \"This slot has no structured options yet. Use JSON mode for advanced settings.\",\n\t\t\t\t\"item.unknownKeysPreserved\": \"Unknown option keys are preserved. Use JSON mode for advanced settings.\",\n\t\t\t\t\"item.opt.includeLastUserMessage\": \"Keep the latest user message inside the inserted chat history.\",\n\t\t\t\t\"item.opt.stripAssistantThinking\": \"Remove prior assistant thinking blocks from inserted chat history while keeping visible text, tool calls, and tool results.\",\n\t\t\t\t\"item.opt.includeSummaries\": \"Keep Pi branch and compaction summary messages inside inserted chat history.\",\n\t\t\t\t\"item.opt.toolMode\": \"Keep tool calls/results or drop prior tool history from inserted chat history.\",\n\t\t\t\t\"item.opt.roles\": \"Optional comma-separated message roles to keep, such as user, assistant, toolResult, compactionSummary.\",\n\t\t\t\t\"item.opt.maxMessages\": \"Keep only the most recent N chat-history messages after filtering.\",\n\t\t\t\t\"item.opt.maxChars\": \"Keep only the most recent chat-history messages within an approximate character budget.\",\n\t\t\t\t\"item.opt.includeTime\": \"Render the current time in HH:MM:SS after the current date.\",\n\t\t\t\t\"item.opt.format\": \"Choose XML or compact plain text rendering.\",\n\t\t\t\t\"item.opt.advanced\": \"Advanced slot option.\",\n\t\t\t\t\"stackTab.contextOptions\": \"Context options\",\n\t\t\t\t\"stackTab.contextMeta\": \"Advanced behavior for how the ordered Stack rewrites Pi conversation context.\",\n\t\t\t\t\"stackTab.allowDuplicateTitle\": \"Allow multiple enabled chat-history slots. When off, only the first enabled chat-history slot is expanded.\",\n\t\t\t\t\"stackTab.allowDuplicate\": \"Allow duplicate chat-history slots\",\n\t\t\t\t\"stackTab.allowDuplicateNote\": \"Keep this off unless you intentionally want the same conversation history injected more than once.\",\n\t\t\t\t\"stackTab.mergeTitle\": \"Merge runs of consecutive Stack items that share the same role into a single message. Chat history and custom-role items are never merged.\",\n\t\t\t\t\"stackTab.merge\": \"Merge consecutive same-role items\",\n\t\t\t\t\"stackTab.mergeNote\": \"Only Stack-authored user/assistant items merge; chat history and custom-role items are hard boundaries.\",\n\t\t\t\t\"stackTab.customMergeSeparator\": \"Use a custom merge separator\",\n\t\t\t\t\"stackTab.customMergeSeparatorTitle\": \"Enable to store a separator explicitly, including an empty string.\",\n\t\t\t\t\"stackTab.mergeSeparator\": \"Merge separator\",\n\t\t\t\t\"stackTab.mergeSeparatorPlaceholder\": \"May be empty\",\n\t\t\t\t\"stackTab.mergeSeparatorNote\": \"Inserted verbatim between merged message texts. An empty custom separator joins texts directly; turn custom mode off to use the default blank line.\",\n\t\t\t\t\"stackTab.parameters\": \"Preset parameters\",\n\t\t\t\t\"stackTab.parametersMetaPre\": \"Immutable static values; schema v2 uses \",\n\t\t\t\t\"stackTab.parametersMetaMid\": \", v1 uses \",\n\t\t\t\t\"stackTab.parametersMetaPost\": \".\",\n\t\t\t\t\"stackTab.addVariable\": \"Add parameter\",\n\t\t\t\t\"stackTab.addVariableTitle\": \"Add a static preset parameter\",\n\t\t\t\t\"stackTab.variablesSavedNote\": \"Saved in stack.parameters (v2) / stack.variables (v1).\",\n\t\t\t\t\"stackTab.value\": \"Value\",\n\t\t\t\t\"stackTab.valueType\": \"Type\",\n\t\t\t\t\"stackTab.textValue\": \"Text\",\n\t\t\t\t\"stackTab.invalidParameterJson\": \"Parameter {name} must contain valid JSON.\",\n\t\t\t\t\"stackTab.extensions\": \"Available extensions\",\n\t\t\t\t\"stackTab.extensionsMeta\": \"Registrations currently loaded by pi-forge. Custom macros use the shown forge-v1 path; slots are selectable from item editors.\",\n\t\t\t\t\"stackTab.registeredMacros\": \"Registered macros\",\n\t\t\t\t\"stackTab.availableSlots\": \"Available slots\",\n\t\t\t\t\"stackTab.deleteVariable\": \"Delete\",\n\t\t\t\t\"stackTab.deleteVariableTitle\": \"Delete this preset parameter\",\n\t\t\t\t\"stackTab.stackJson\": \"Preset JSON\",\n\t\t\t\t\"stackTab.stackJsonMeta\": \"Raw recovery view for advanced fields. Apply updates the editor; Save writes to disk.\",\n\t\t\t\t\"stackTab.copyJsonTitle\": \"Copy this JSON to the clipboard\",\n\t\t\t\t\"stackTab.applyJson\": \"Apply to editor\",\n\t\t\t\t\"stackTab.applyJsonTitle\": \"Apply this JSON to the editor without saving\",\n\t\t\t\t\"stackTab.rawDraft\": \"Unsaved preset JSON draft.\",\n\t\t\t\t\"stackTab.duplicateVarNames\": \"Duplicate preset parameter names.\",\n\t\t\t\t\"stackTab.copiedJson\": \"Copied JSON.\",\n\t\t\t\t\"stackTab.copiedJsonStatus\": \"Copied preset JSON\",\n\t\t\t\t\"stackTab.appliedJson\": \"Applied preset JSON to editor.\",\n\t\t\t\t\"error.stackJsonNotObject\": \"Preset JSON must be an object.\",\n\t\t\t\t\"error.stackJsonNoId\": \"Preset JSON needs a non-empty string id.\",\n\t\t\t\t\"error.stackJsonNoItems\": \"Preset JSON needs an items array.\",\n\t\t\t\t\"error.itemLabel\": \"Item {index}\",\n\t\t\t\t\"error.itemNotObject\": \"{label} must be an object.\",\n\t\t\t\t\"error.itemKind\": \"{label} kind must be block or slot.\",\n\t\t\t\t\"error.itemNoId\": \"{label} needs a non-empty string id.\",\n\t\t\t\t\"error.itemContent\": \"{label} block content must be a string.\",\n\t\t\t\t\"error.itemSlot\": \"{label} slot must be a string.\",\n\t\t\t\t\"policy.title\": \"Tool policy and skill visibility\",\n\t\t\t\t\"policy.meta\": \"A specific tool allow list selects from every registered tool and can activate tools that are currently inactive; deny rules constrain the current active-tool baseline. Skill rules only filter model-visible skills rendered by pi-forge; they do not block explicit skill invocation. Patterns support exact names and * wildcards.\",\n\t\t\t\t\"policy.tools\": \"Tools\",\n\t\t\t\t\"policy.skills\": \"Skills\",\n\t\t\t\t\"policy.resource\": \"Resource\",\n\t\t\t\t\"policy.mode\": \"Mode\",\n\t\t\t\t\"policy.patterns\": \"Patterns\",\n\t\t\t\t\"policy.available\": \"Available\",\n\t\t\t\t\"policy.status\": \"Status\",\n\t\t\t\t\"policy.unrestrictedOption\": \"Unrestricted\",\n\t\t\t\t\"policy.allow\": \"Allow\",\n\t\t\t\t\"policy.deny\": \"Deny\",\n\t\t\t\t\"policy.noPatterns\": \"No selected patterns.\",\n\t\t\t\t\"policy.removePatternTitle\": \"Remove selected pattern\",\n\t\t\t\t\"policy.availableKind\": \"Available {kind}\",\n\t\t\t\t\"policy.filterPlaceholder\": \"Type to filter or add\",\n\t\t\t\t\"policy.noMatching\": \"No matching unselected {kind}.\",\n\t\t\t\t\"policy.noRegistered\": \"No registered {kind} reported.\",\n\t\t\t\t\"policy.unrestricted\": \"Unrestricted {kind}.\",\n\t\t\t\t\"policy.allowListActiveOne\": \"Allow list active: {count} pattern.\",\n\t\t\t\t\"policy.allowListActiveMany\": \"Allow list active: {count} patterns.\",\n\t\t\t\t\"policy.denyListActiveOne\": \"Deny list active: {count} pattern.\",\n\t\t\t\t\"policy.denyListActiveMany\": \"Deny list active: {count} patterns.\",\n\t\t\t\t\"policy.sourceLabel\": \"Source: {source}\",\n\t\t\t\t\"policy.currentlyActive\": \"Currently active\",\n\t\t\t\t\"policy.registeredInactive\": \"Registered, currently inactive; a specific allow list can activate it\",\n\t\t\t\t\"policy.hiddenFromModel\": \"Hidden from model invocation\",\n\t\t\t\t\"policy.suffixHidden\": \" hidden\",\n\t\t\t\t\"error.duplicatePattern\": \"{kind}.{mode} has duplicate pattern: {pattern}\",\n\t\t\t\t\"regex.title\": \"Regex rules\",\n\t\t\t\t\"regex.meta\": \"Ordered JavaScript RegExp replacements for outgoing prompt text and finalized assistant messages.\",\n\t\t\t\t\"regex.addRule\": \"Add rule\",\n\t\t\t\t\"regex.addRuleTitle\": \"Add a regex rule\",\n\t\t\t\t\"regex.validate\": \"Validate\",\n\t\t\t\t\"regex.validateTitle\": \"Validate the edited preset\",\n\t\t\t\t\"regex.saveNote\": \"Save writes these rules to stack.regex.rules.\",\n\t\t\t\t\"regex.up\": \"Up\",\n\t\t\t\t\"regex.upTitle\": \"Move this rule up\",\n\t\t\t\t\"regex.down\": \"Down\",\n\t\t\t\t\"regex.downTitle\": \"Move this rule down\",\n\t\t\t\t\"regex.enabled\": \"Enabled\",\n\t\t\t\t\"regex.id\": \"Rule ID\",\n\t\t\t\t\"regex.name\": \"Name\",\n\t\t\t\t\"regex.idPlaceholder\": \"trim-ooc\",\n\t\t\t\t\"regex.namePlaceholder\": \"Readable label\",\n\t\t\t\t\"regex.stage\": \"Stage\",\n\t\t\t\t\"regex.effect\": \"Effect\",\n\t\t\t\t\"regex.frequency\": \"Frequency\",\n\t\t\t\t\"regex.frequencyTitle\": \"turn: run on the first request of each user turn; request: also run on tool-result follow-up requests over the full natural context\",\n\t\t\t\t\"regex.flags\": \"Flags\",\n\t\t\t\t\"regex.flagsPlaceholder\": \"gimsu\",\n\t\t\t\t\"regex.targets\": \"Targets\",\n\t\t\t\t\"regex.targetsTitle\": \"compiled only; empty means default\",\n\t\t\t\t\"regex.roles\": \"Roles\",\n\t\t\t\t\"regex.rolesTitle\": \"message rules only; empty means all roles\",\n\t\t\t\t\"regex.maxMessages\": \"Max messages\",\n\t\t\t\t\"regex.maxChars\": \"Max chars\",\n\t\t\t\t\"regex.minDepth\": \"Min depth\",\n\t\t\t\t\"regex.maxDepth\": \"Max depth\",\n\t\t\t\t\"regex.trimStrings\": \"Trim strings\",\n\t\t\t\t\"regex.trimStringsPlaceholder\": \"one per line\",\n\t\t\t\t\"regex.pattern\": \"Pattern\",\n\t\t\t\t\"regex.patternPlaceholder\": \"\\\\(OOC:[^)]+\\\\)\",\n\t\t\t\t\"regex.replace\": \"Replace\",\n\t\t\t\t\"regex.deleteTitle\": \"Delete this regex rule\",\n\t\t\t\t\"regex.warnFinalize\": \"Warning: finalize runs after streaming and replaces the stored assistant transcript. Use stage \\\"compiled\\\" with target \\\"messages\\\".\",\n\t\t\t\t\"regex.warnMatch\": \"Warning: {{match}} is not pi-forge replacement syntax. Use $& or $0 for the full match.\",\n\t\t\t\t\"regex.ruleLabel\": \"rule {index}\",\n\t\t\t\t\"regex.errorId\": \"Regex rule {index} needs an id.\",\n\t\t\t\t\"regex.errorDuplicateId\": \"Duplicate regex rule id: {id}\",\n\t\t\t\t\"regex.errorPattern\": \"Regex rule {label} needs a pattern.\",\n\t\t\t\t\"regex.errorPositiveInteger\": \"Regex rule {label} {field} must be a positive integer.\",\n\t\t\t\t\"regex.errorNonNegativeInteger\": \"Regex rule {label} {field} must be a non-negative integer.\",\n\t\t\t\t\"regex.errorDepthOrder\": \"Regex rule {label} maxDepth must be greater than or equal to minDepth.\",\n\t\t\t\t\"common.delete\": \"Delete\",\n\t\t\t\t\"common.none\": \"(none)\",\n\t\t\t\t\"profiles.subheading\": \"One-shot bundles of model, thinking, and Preset. Applying a profile does not continuously own runtime state.\",\n\t\t\t\t\"profiles.working\": \"Working\",\n\t\t\t\t\"profiles.count\": \"{count} profile(s)\",\n\t\t\t\t\"profiles.scopeTitle\": \"Scope for new profiles\",\n\t\t\t\t\"profiles.scopeProject\": \"project\",\n\t\t\t\t\"profiles.scopeGlobal\": \"global\",\n\t\t\t\t\"profiles.newProfile\": \"New profile\",\n\t\t\t\t\"profiles.refresh\": \"Refresh\",\n\t\t\t\t\"profiles.untrustedWarning\": \"This project is not trusted; only user-global agent profiles are shown and applying profiles is disabled.\",\n\t\t\t\t\"profiles.empty\": \"No agent profiles found.\",\n\t\t\t\t\"profiles.autoBadge\": \"auto\",\n\t\t\t\t\"profiles.lastAppliedBadge\": \"last applied\",\n\t\t\t\t\"profiles.shadows\": \"shadows {selector}\",\n\t\t\t\t\"profiles.shadowedBy\": \"shadowed by {selector}\",\n\t\t\t\t\"profiles.ready\": \"ready\",\n\t\t\t\t\"profiles.readyToApply\": \"Ready to apply\",\n\t\t\t\t\"profiles.preflightFailed\": \"Preflight failed\",\n\t\t\t\t\"profiles.edit\": \"Edit\",\n\t\t\t\t\"profiles.applyOnce\": \"Apply once\",\n\t\t\t\t\"profiles.applyOnceTitle\": \"Apply this profile once\",\n\t\t\t\t\"profiles.applyBlockedTitle\": \"Resolve preflight errors before applying\",\n\t\t\t\t\"profiles.transition\": \"One-shot transition\",\n\t\t\t\t\"profiles.currentRuntime\": \"Current runtime\",\n\t\t\t\t\"profiles.profileTarget\": \"Profile target\",\n\t\t\t\t\"profiles.model\": \"Model\",\n\t\t\t\t\"profiles.thinking\": \"Thinking\",\n\t\t\t\t\"profiles.promptStack\": \"Preset\",\n\t\t\t\t\"profiles.effectiveTools\": \"Effective tools after Preset policy\",\n\t\t\t\t\"profiles.resolutionDiagnostics\": \"Resolution diagnostics\",\n\t\t\t\t\"profiles.emptyMainPre\": \"Create a project profile here or capture the current runtime with \",\n\t\t\t\t\"profiles.emptyMainPost\": \".\",\n\t\t\t\t\"profiles.runtimeProvenance\": \"Runtime and provenance\",\n\t\t\t\t\"profiles.current\": \"Current\",\n\t\t\t\t\"profiles.lastApplied\": \"Last applied\",\n\t\t\t\t\"profiles.sourceDefinition\": \"Source definition\",\n\t\t\t\t\"profiles.driftModel\": \"Model: {label}\",\n\t\t\t\t\"profiles.driftThinking\": \"Thinking: {label}\",\n\t\t\t\t\"profiles.driftStack\": \"Preset: {label}\",\n\t\t\t\t\"profiles.drifted\": \"drifted\",\n\t\t\t\t\"profiles.unchanged\": \"unchanged\",\n\t\t\t\t\"profiles.noneApplied\": \"No profile has been applied in this session.\",\n\t\t\t\t\"profiles.created\": \"Created {id}\",\n\t\t\t\t\"profiles.saved\": \"Saved {id}\",\n\t\t\t\t\"profiles.appliedOnce\": \"Applied {id} once\",\n\t\t\t\t\"profiles.refreshFailed\": \" Runtime refresh failed: {detail}\",\n\t\t\t\t\"profiles.confirmDelete\": \"Delete agent profile {id}?\\n\\n{path}\\n\\nDelegation settings in subagents.json are managed by the optional pi-forge-subagents package and are not removed.\",\n\t\t\t\t\"profiles.deleted\": \"Deleted {id}\",\n\t\t\t\t\"profileEditor.scopeGlobal\": \"user-global\",\n\t\t\t\t\"profileEditor.scopeProject\": \"project-local\",\n\t\t\t\t\"profileEditor.confirmDiscard\": \"Discard unsaved agent-profile changes?\",\n\t\t\t\t\"profileEditor.validationErrorOne\": \"{count} validation error\",\n\t\t\t\t\"profileEditor.validationErrorMany\": \"{count} validation errors\",\n\t\t\t\t\"profileEditor.validWithWarningOne\": \"Valid with {count} warning\",\n\t\t\t\t\"profileEditor.validWithWarningMany\": \"Valid with {count} warnings\",\n\t\t\t\t\"profileEditor.validReady\": \"Valid and ready to apply\",\n\t\t\t\t\"profileEditor.newTitle\": \"New agent profile\",\n\t\t\t\t\"profileEditor.editTitle\": \"Edit {id}\",\n\t\t\t\t\"profileEditor.note\": \"Profile application is preflighted separately; saving only updates the {scope} definition.\",\n\t\t\t\t\"profileEditor.cancel\": \"Cancel\",\n\t\t\t\t\"profileEditor.createSave\": \"Create profile\",\n\t\t\t\t\"profileEditor.editSave\": \"Save profile\",\n\t\t\t\t\"profileEditor.id\": \"Profile ID\",\n\t\t\t\t\"profileEditor.idPlaceholder\": \"focused-agent\",\n\t\t\t\t\"profileEditor.namePlaceholder\": \"Focused Agent\",\n\t\t\t\t\"profileEditor.idHint\": \"Letters, numbers, dots, underscores, and hyphens; immutable after creation. Scope is stored by location; this profile's canonical selector is {scope}:{id}.\",\n\t\t\t\t\"profileEditor.descriptionPlaceholder\": \"What this profile is for.\",\n\t\t\t\t\"profileEditor.modelProvider\": \"Model provider\",\n\t\t\t\t\"profileEditor.modelId\": \"Model ID\",\n\t\t\t\t\"profileEditor.authUnavailable\": \" (authentication unavailable)\",\n\t\t\t\t\"profileEditor.authWarning\": \"This model has no configured authentication; applying the profile will fail preflight.\",\n\t\t\t\t\"profileEditor.thinkingLevel\": \"Thinking level\",\n\t\t\t\t\"profileEditor.globalStackHint\": \"Global profiles may only reference user-global Presets. A same-scope Preset may be stored as a relative bare ID without changing its global resolution.\",\n\t\t\t\t\"profileEditor.projectStackHint\": \"Project profiles may reference project Presets or explicitly qualified global Presets.\",\n\t\t\t\t\"profileEditor.autoActivate\": \"Auto-activate on a fresh session\",\n\t\t\t\t\"profileEditor.autoActivateHint\": \"Only one {scope} profile may request auto-activation.\",\n\t\t\t\t\"diff.dockAria\": \"Preview dock\",\n\t\t\t\t\"diff.draftTab\": \"Draft diff\",\n\t\t\t\t\"diff.runTab\": \"Run diff\",\n\t\t\t\t\"diff.focus\": \"Focus\",\n\t\t\t\t\"diff.split\": \"Split\",\n\t\t\t\t\"diff.focusTitle\": \"Use the full editor width\",\n\t\t\t\t\"diff.splitTitle\": \"Return to split editor\",\n\t\t\t\t\"diff.compiledDraft\": \"Compiled draft\",\n\t\t\t\t\"diff.compiledMeta\": \"Estimate ~{tokens} tokens (chars/4) · {chars} chars\",\n\t\t\t\t\"diff.refreshing\": \"Refreshing…\",\n\t\t\t\t\"diff.noPreview\": \"No preview\",\n\t\t\t\t\"diff.loadingPreview\": \"Loading preview…\",\n\t\t\t\t\"diff.selectStackHint\": \"Select a preset to see its compiled prompt.\",\n\t\t\t\t\"diff.selectStackToPreview\": \"Select a preset to preview.\",\n\t\t\t\t\"diff.draftChangedRefreshing\": \"Draft changed; refreshing…\",\n\t\t\t\t\"diff.draftRefreshed\": \"Compiled draft refreshed.\",\n\t\t\t\t\"diff.previewNoSections\": \"Preview returned no structured sections.\",\n\t\t\t\t\"diff.compilerDiagnostics\": \"Compiler diagnostics ({count})\",\n\t\t\t\t\"diff.draftTitle\": \"Compiled draft vs saved output\",\n\t\t\t\t\"diff.runTitle\": \"Latest run vs previous run\",\n\t\t\t\t\"diff.noChanges\": \"No changes\",\n\t\t\t\t\"diff.changedBlocks\": \"{count} changed blocks\",\n\t\t\t\t\"diff.noDraftComparison\": \"No draft comparison\",\n\t\t\t\t\"diff.noCapturedRuns\": \"No captured runs\",\n\t\t\t\t\"diff.draftEmpty\": \"Select a saved preset to compare its current draft with disk.\",\n\t\t\t\t\"diff.runEmpty\": \"No captured provider turns yet. Send a prompt; recent turns appear here automatically.\",\n\t\t\t\t\"diff.estimatedDelta\": \"Estimated Δ ~{delta} tokens\",\n\t\t\t\t\"diff.changed\": \"{count} changed\",\n\t\t\t\t\"diff.displayOptionsAria\": \"Diff display options\",\n\t\t\t\t\"diff.unified\": \"Unified\",\n\t\t\t\t\"diff.lines\": \"Lines\",\n\t\t\t\t\"diff.lineContextAria\": \"Diff line context\",\n\t\t\t\t\"diff.changesOnly\": \"Changes only\",\n\t\t\t\t\"diff.threeLinesContext\": \"3 lines context\",\n\t\t\t\t\"diff.allLines\": \"All lines\",\n\t\t\t\t\"diff.showUnchanged\": \"Show {count} unchanged\",\n\t\t\t\t\"diff.runMetadata\": \"Run metadata\",\n\t\t\t\t\"diff.turn\": \"Turn\",\n\t\t\t\t\"diff.providerModel\": \"Provider/model\",\n\t\t\t\t\"diff.usagePending\": \"usage pending\",\n\t\t\t\t\"diff.actualPromptTokens\": \"Actual prompt tokens\",\n\t\t\t\t\"diff.actualCacheReadWrite\": \"Actual cache read / write\",\n\t\t\t\t\"diff.actualCacheHitRate\": \"Actual cache hit rate\",\n\t\t\t\t\"diff.actualUncached\": \"Actual uncached input / output\",\n\t\t\t\t\"diff.estimatedPrefix\": \"Estimated reusable prefix\",\n\t\t\t\t\"diff.prefixValue\": \"~{tokens} tokens ({percent}%)\",\n\t\t\t\t\"diff.cacheNotReportedNote\": \"Pi has not observed provider-reported cache reads or writes for this model yet, so a real hit rate cannot be distinguished from an unreported zero.\",\n\t\t\t\t\"diff.estimateNote\": \"Estimated values use captured text length (chars/4); actual values come from the provider usage returned by Pi.\",\n\t\t\t\t\"diff.draftSame\": \"Draft and saved prompt compile to the same content.\",\n\t\t\t\t\"diff.runSame\": \"The latest two runs have the same captured content.\",\n\t\t\t\t\"diff.unifiedAria\": \"Unified line diff\",\n\t\t\t\t\"diff.splitAria\": \"Split line diff\",\n\t\t\t\t\"diff.before\": \"Before\",\n\t\t\t\t\"diff.after\": \"After\",\n\t\t\t\t\"diff.blockTokensDelta\": \"est. Δ ~{delta} tokens\",\n\t\t\t\t\"diff.blockTokens\": \"est. ~{count} tokens\",\n\t\t\t\t\"diff.metadataChanged\": \"Provider-visible metadata changed; text is unchanged. {detail}\",\n\t\t\t\t\"diff.roleUnchanged\": \"Role unchanged ({role}); another serialized provider field changed.\",\n\t\t\t\t\"diff.roleChanged\": \"Role changed: {before} → {after}.\",\n\t\t\t\t\"diff.notReported\": \"not reported\",\n\t\t\t\t\"diff.sectionMeta\": \"{rolePrefix}{chars} chars · estimate ~{tokens} tokens\",\n\t\t\t\t\"schema.key\": \"Key\",\n\t\t\t\t\"schema.keyUnavailable\": \"{key} · configured profile unavailable\",\n\t\t\t\t\"schema.allHaveEntries\": \"Every available {key} already has an entry.\",\n\t\t\t\t\"schema.needKey\": \"Every entry needs a key.\",\n\t\t\t\t\"schema.uniqueKeys\": \"Entry keys must be unique.\",\n\t\t\t\t\"schema.addEntry\": \"Add entry\",\n\t\t\t\t\"schema.addEntryTitle\": \"Add a {key} entry\",\n\t\t\t\t\"schema.oneEntryPer\": \"One entry per {key}.\",\n\t\t\t\t\"schema.deleteEntryTitle\": \"Delete this entry\",\n\t\t\t\t\"schema.noEntries\": \"No entries yet.\",\n\t\t\t\t\"settings.ready\": \"Settings ready\",\n\t\t\t\t\"settings.saving\": \"Saving\",\n\t\t\t\t\"settings.saved\": \"Saved\",\n\t\t\t\t\"settings.providerRetrying\": \"Provider restarted; retrying\",\n\t\t\t\t\"settings.editTab\": \"Edit {title}\",\n\t\t\t\t\"settings.navAria\": \"Plugin settings\"\n\t\t\t},\n\t\t\t\"zh-CN\": {\n\t\t\t\t\"nav.stacks\": \"预设\",\n\t\t\t\t\"nav.profiles\": \"代理配置\",\n\t\t\t\t\"nav.settings\": \"设置\",\n\t\t\t\t\"nav.themeToLight\": \"切换到浅色主题\",\n\t\t\t\t\"nav.themeToDark\": \"切换到深色主题\",\n\t\t\t\t\"nav.themeLight\": \"浅色\",\n\t\t\t\t\"nav.themeDark\": \"深色\",\n\t\t\t\t\"nav.locale\": \"语言\",\n\t\t\t\t\"nav.editorSectionsAria\": \"Pi Forge 编辑器区域\",\n\t\t\t\t\"nav.stackSectionsAria\": \"预设编辑器区域\",\n\t\t\t\t\"chrome.toggleSidebar\": \"切换预设侧栏\",\n\t\t\t\t\"chrome.brand\": \"pi-forge 预设编辑器\",\n\t\t\t\t\"chrome.loading\": \"加载中\",\n\t\t\t\t\"chrome.unsaved\": \"未保存\",\n\t\t\t\t\"chrome.unsavedTitle\": \"当前预设有未保存的修改\",\n\t\t\t\t\"chrome.reload\": \"重新加载\",\n\t\t\t\t\"chrome.reloadTitle\": \"从磁盘重新加载预设\",\n\t\t\t\t\"chrome.disableStack\": \"停用预设\",\n\t\t\t\t\"chrome.disableStackTitle\": \"停用当前激活的预设\",\n\t\t\t\t\"chrome.scopeTitle\": \"新建预设、导入和派生的目标作用域\",\n\t\t\t\t\"chrome.scopeAria\": \"预设作用域\",\n\t\t\t\t\"chrome.scopeProject\": \"项目\",\n\t\t\t\t\"chrome.scopeGlobal\": \"全局\",\n\t\t\t\t\"chrome.newStack\": \"新建预设\",\n\t\t\t\t\"chrome.newStackTitle\": \"创建新的预设(Ctrl/Cmd+N)\",\n\t\t\t\t\"chrome.activate\": \"激活\",\n\t\t\t\t\"chrome.activateTitle\": \"将此预设设为当前 Pi 会话的激活预设\",\n\t\t\t\t\"chrome.save\": \"保存\",\n\t\t\t\t\"chrome.saveTitle\": \"将编辑后的预设 JSON 保存到磁盘(Ctrl/Cmd+S)\",\n\t\t\t\t\"chrome.validate\": \"校验\",\n\t\t\t\t\"chrome.validateTitle\": \"校验编辑中的预设但不保存(Ctrl/Cmd+Shift+Enter)\",\n\t\t\t\t\"chrome.preview\": \"预览\",\n\t\t\t\t\"chrome.previewTitle\": \"预览编译后的提示词,不发送(Ctrl/Cmd+Enter)\",\n\t\t\t\t\"chrome.more\": \"更多\",\n\t\t\t\t\"chrome.moreTitle\": \"显示不常用的预设操作\",\n\t\t\t\t\"chrome.armPayload\": \"捕获载荷\",\n\t\t\t\t\"chrome.armPayloadTitle\": \"在浏览器中捕获下一次 provider 载荷\",\n\t\t\t\t\"chrome.fork\": \"派生\",\n\t\t\t\t\"chrome.forkTitle\": \"基于当前编辑内容创建新预设\",\n\t\t\t\t\"chrome.import\": \"导入 JSON\",\n\t\t\t\t\"chrome.importTitle\": \"导入 pi-forge 预设 JSON\",\n\t\t\t\t\"chrome.export\": \"导出 JSON\",\n\t\t\t\t\"chrome.exportTitle\": \"下载当前预设 JSON;无法下载时复制到剪贴板\",\n\t\t\t\t\"chrome.deleteStack\": \"删除预设\",\n\t\t\t\t\"chrome.deleteStackTitle\": \"删除所选预设的 JSON 文件\",\n\t\t\t\t\"chrome.items\": \"堆栈条目\",\n\t\t\t\t\"chrome.addBlock\": \"添加块\",\n\t\t\t\t\"chrome.addBlockTitle\": \"添加提示词块条目\",\n\t\t\t\t\"chrome.addSlot\": \"添加槽位\",\n\t\t\t\t\"chrome.addSlotTitle\": \"添加运行时槽位条目\",\n\t\t\t\t\"chrome.deleteItem\": \"删除条目\",\n\t\t\t\t\"chrome.deleteItemTitle\": \"删除所选堆栈条目\",\n\t\t\t\t\"tab.items\": \"堆栈\",\n\t\t\t\t\"tab.itemsTitle\": \"编辑由 Block 和 Slot 组成的有序堆栈\",\n\t\t\t\t\"tab.regex\": \"正则\",\n\t\t\t\t\"tab.regexTitle\": \"编辑正则转换规则\",\n\t\t\t\t\"tab.policy\": \"策略\",\n\t\t\t\t\"tab.policyTitle\": \"编辑激活工具策略与模型可见的技能过滤\",\n\t\t\t\t\"tab.stack\": \"高级\",\n\t\t\t\t\"tab.stackTitle\": \"编辑上下文选项、参数、扩展与预设原始 JSON\",\n\t\t\t\t\"tab.preview\": \"预览\",\n\t\t\t\t\"tab.previewTitle\": \"编译后的提示词、未保存草稿差异与最近一次运行差异\",\n\t\t\t\t\"settings.pluginSettings\": \"插件设置\",\n\t\t\t\t\"settings.pluginSettingsMeta\": \"由已安装的 Pi Forge 插件提供的配置页面。\",\n\t\t\t\t\"settings.loading\": \"正在加载设置…\",\n\t\t\t\t\"status.unsavedChanges\": \"未保存的修改\",\n\t\t\t\t\"status.loaded\": \"已加载 {id}\",\n\t\t\t\t\"status.appliedStack\": \"已将预设 JSON 应用到编辑器\",\n\t\t\t\t\"status.saved\": \"已保存 {id}\",\n\t\t\t\t\"status.created\": \"已创建 {id}\",\n\t\t\t\t\"status.imported\": \"已导入 {id}\",\n\t\t\t\t\"status.forked\": \"已派生 {id}\",\n\t\t\t\t\"status.exported\": \"已导出 {id}\",\n\t\t\t\t\"status.copiedJson\": \"已复制 {id} 的 JSON\",\n\t\t\t\t\"status.activated\": \"已激活 {id}\",\n\t\t\t\t\"status.stackDisabled\": \"预设已停用\",\n\t\t\t\t\"status.deleted\": \"已删除 {id}\",\n\t\t\t\t\"status.deletedNoneRemain\": \"已删除 {id};没有剩余预设\",\n\t\t\t\t\"status.reloaded\": \"已从磁盘重新加载\",\n\t\t\t\t\"status.noStacks\": \"未找到预设\",\n\t\t\t\t\"status.sidebarHidden\": \"预设侧栏已隐藏\",\n\t\t\t\t\"status.sidebarShown\": \"预设侧栏已显示\",\n\t\t\t\t\"stackList.empty\": \"此项目中没有预设。\",\n\t\t\t\t\"stackList.active\": \"当前\",\n\t\t\t\t\"stackList.global\": \"全局\",\n\t\t\t\t\"stackList.unnamed\": \"(未命名)\",\n\t\t\t\t\"stackList.errorCount\": \"{count} 错误\",\n\t\t\t\t\"stackList.warningCount\": \"{count} 警告\",\n\t\t\t\t\"stackList.itemCount\": \"{count} 条目\",\n\t\t\t\t\"itemList.total\": \"共 {count} 条\",\n\t\t\t\t\"itemList.dragToReorder\": \"拖拽以重新排序\",\n\t\t\t\t\"itemList.toggleItem\": \"启用/停用条目\",\n\t\t\t\t\"itemList.on\": \"开\",\n\t\t\t\t\"itemList.off\": \"关\",\n\t\t\t\t\"itemEditor.none\": \"未选择条目。\",\n\t\t\t\t\"modal.close\": \"关闭\",\n\t\t\t\t\"modal.closeTitle\": \"关闭此对话框\",\n\t\t\t\t\"confirm.discardChanges\": \"放弃未保存的修改?\",\n\t\t\t\t\"confirm.deleteItem\": \"删除条目 {id}?\",\n\t\t\t\t\"confirm.overwriteStack\": \"{message}\\n\\n要覆盖它吗?\",\n\t\t\t\t\"confirm.useStackId\": \"使用预设 id“{id}”?\",\n\t\t\t\t\"confirm.activateNewStack\": \"立即激活新预设?\",\n\t\t\t\t\"confirm.activateImportedStack\": \"立即激活导入的预设?\",\n\t\t\t\t\"confirm.activateFork\": \"立即激活派生的预设?\",\n\t\t\t\t\"confirm.deleteStack\": \"删除预设“{id}”?\\n\\n这将从预设存储中删除其 JSON 文件。\",\n\t\t\t\t\"prompt.newStackId\": \"新预设 id\",\n\t\t\t\t\"prompt.stackId\": \"预设 id\",\n\t\t\t\t\"prompt.stackDisplayName\": \"预设显示名称\",\n\t\t\t\t\"prompt.forkStackId\": \"新派生预设 id\",\n\t\t\t\t\"prompt.forkDisplayName\": \"派生预设显示名称\",\n\t\t\t\t\"error.stackIdEmpty\": \"预设 id 不能为空。\",\n\t\t\t\t\"error.importNotObject\": \"导入的 JSON 必须是对象。\",\n\t\t\t\t\"error.importNoItems\": \"导入的预设必须包含 items 数组。\",\n\t\t\t\t\"error.noStackSelected\": \"未选择预设。\",\n\t\t\t\t\"error.invalidItemOptions\": \"条目选项 JSON 无效:{message}\",\n\t\t\t\t\"diag.none\": \"无\",\n\t\t\t\t\"diag.errorOne\": \"{count} 个错误\",\n\t\t\t\t\"diag.errorMany\": \"{count} 个错误\",\n\t\t\t\t\"diag.warningOne\": \"{count} 个警告\",\n\t\t\t\t\"diag.warningMany\": \"{count} 个警告\",\n\t\t\t\t\"diag.noteOne\": \"{count} 条提示\",\n\t\t\t\t\"diag.noteMany\": \"{count} 条提示\",\n\t\t\t\t\"diag.noDiagnostics\": \"没有诊断信息。\",\n\t\t\t\t\"diag.title\": \"诊断 · {summary}\",\n\t\t\t\t\"diag.toggle\": \"切换诊断面板\",\n\t\t\t\t\"empty.title\": \"未找到预设。\",\n\t\t\t\t\"empty.body\": \"在此项目中创建预设,或导入现有的 pi-forge JSON 文件。\",\n\t\t\t\t\"chrome.showSidebar\": \"显示预设侧栏\",\n\t\t\t\t\"chrome.hideSidebar\": \"隐藏预设侧栏\",\n\t\t\t\t\"inspector.validationComplete\": \"校验完成\",\n\t\t\t\t\"inspector.armed\": \"载荷捕获已就绪;请在 Pi 中发送下一条提示词\",\n\t\t\t\t\"inspector.cleared\": \"载荷捕获已清除\",\n\t\t\t\t\"inspector.armedButton\": \"载荷已就绪\",\n\t\t\t\t\"inspector.armedButtonTitle\": \"正在等待下一次 provider 载荷\",\n\t\t\t\t\"inspector.viewPayload\": \"查看载荷\",\n\t\t\t\t\"inspector.viewPayloadTitle\": \"打开最近捕获的 provider 载荷\",\n\t\t\t\t\"inspector.armTitle\": \"在此编辑器中捕获下一次 provider 载荷\",\n\t\t\t\t\"inspector.copy\": \"复制\",\n\t\t\t\t\"inspector.copyFullTitle\": \"复制完整预览文本\",\n\t\t\t\t\"inspector.sectionMeta\": \"{chars} 字符 · 约 {tokens} token\",\n\t\t\t\t\"inspector.copySectionTitle\": \"复制此预览片段\",\n\t\t\t\t\"inspector.copyFull\": \"全部复制\",\n\t\t\t\t\"inspector.payloadTitle\": \"Provider 载荷\",\n\t\t\t\t\"inspector.noPayload\": \"尚未捕获载荷。\",\n\t\t\t\t\"inspector.armNext\": \"准备捕获\",\n\t\t\t\t\"inspector.armNextTitle\": \"捕获下一次 provider 载荷\",\n\t\t\t\t\"inspector.closePayload\": \"关闭载荷检查器\",\n\t\t\t\t\"inspector.armEmptyBody\": \"准备捕获后,在 Pi 中发送下一条提示词。provider 载荷会在发送前显示在这里。\",\n\t\t\t\t\"inspector.armedAt\": \"就绪于 {time}\",\n\t\t\t\t\"inspector.armedWaiting\": \"正在等待下一次 provider 请求\",\n\t\t\t\t\"inspector.armedTitle\": \"载荷捕获已就绪\",\n\t\t\t\t\"inspector.clear\": \"清除\",\n\t\t\t\t\"inspector.clearArmedTitle\": \"清除已就绪的载荷捕获\",\n\t\t\t\t\"inspector.armedBody\": \"在 Pi 中发送下一条提示词。准确的 provider 载荷将被捕获,并在显示前脱敏。\",\n\t\t\t\t\"inspector.stackId\": \"预设 {id}\",\n\t\t\t\t\"inspector.truncated\": \"已截断\",\n\t\t\t\t\"inspector.copyPayloadTitle\": \"复制完整脱敏载荷\",\n\t\t\t\t\"inspector.armAgain\": \"再次捕获\",\n\t\t\t\t\"inspector.clearCapturedTitle\": \"清除已捕获的载荷\",\n\t\t\t\t\"inspector.stringifyError\": \"序列化错误\",\n\t\t\t\t\"inspector.rawTruncated\": \"原始截断载荷\",\n\t\t\t\t\"inspector.rawPayload\": \"原始载荷\",\n\t\t\t\t\"inspector.chars\": \"{count} 字符\",\n\t\t\t\t\"inspector.copiedText\": \"已复制文本\",\n\t\t\t\t\"error.invalidItemOptionsShort\": \"条目选项 JSON 无效\",\n\t\t\t\t\"status.metadataHidden\": \"预设元数据已隐藏\",\n\t\t\t\t\"status.metadataShown\": \"预设元数据已显示\",\n\t\t\t\t\"metadata.toggleTitle\": \"显示或隐藏预设元数据\",\n\t\t\t\t\"metadata.title\": \"元数据\",\n\t\t\t\t\"metadata.noId\": \"(无 id)\",\n\t\t\t\t\"metadata.stackId\": \"预设 ID\",\n\t\t\t\t\"metadata.stackIdTitle\": \"预设 ID 不可变;请使用“派生”创建新 ID。\",\n\t\t\t\t\"metadata.name\": \"名称\",\n\t\t\t\t\"metadata.mode\": \"模式\",\n\t\t\t\t\"metadata.autoActivate\": \"自动激活\",\n\t\t\t\t\"metadata.enabled\": \"启用\",\n\t\t\t\t\"metadata.description\": \"描述\",\n\t\t\t\t\"metadata.file\": \"文件\",\n\t\t\t\t\"item.kind\": \"类型\",\n\t\t\t\t\"item.id\": \"ID\",\n\t\t\t\t\"item.name\": \"名称\",\n\t\t\t\t\"item.role\": \"角色\",\n\t\t\t\t\"item.roleNone\": \"(无)\",\n\t\t\t\t\"item.slot\": \"槽位\",\n\t\t\t\t\"item.slotUnregistered\": \"{name}(未注册)\",\n\t\t\t\t\"item.content\": \"内容\",\n\t\t\t\t\"item.slotOptions\": \"槽位选项\",\n\t\t\t\t\"item.form\": \"表单\",\n\t\t\t\t\"item.includeLastUserMessage\": \"包含最后一条用户消息\",\n\t\t\t\t\"item.stripAssistantThinking\": \"移除助手思考块\",\n\t\t\t\t\"item.includeSummaries\": \"包含摘要\",\n\t\t\t\t\"item.toolHistory\": \"工具历史\",\n\t\t\t\t\"item.roles\": \"角色\",\n\t\t\t\t\"item.maxMessages\": \"最大消息数\",\n\t\t\t\t\"item.maxChars\": \"最大字符数\",\n\t\t\t\t\"item.format\": \"格式\",\n\t\t\t\t\"item.includeTime\": \"包含当前时间\",\n\t\t\t\t\"item.noStructuredOptions\": \"此槽位暂没有结构化选项。高级设置请使用 JSON 模式。\",\n\t\t\t\t\"item.unknownKeysPreserved\": \"未知选项键会被保留。高级设置请使用 JSON 模式。\",\n\t\t\t\t\"item.opt.includeLastUserMessage\": \"在插入的聊天历史中保留最后一条用户消息。\",\n\t\t\t\t\"item.opt.stripAssistantThinking\": \"从插入的聊天历史中移除之前的助手思考块,同时保留可见文本、工具调用和工具结果。\",\n\t\t\t\t\"item.opt.includeSummaries\": \"在插入的聊天历史中保留 Pi 分支摘要和压缩摘要消息。\",\n\t\t\t\t\"item.opt.toolMode\": \"在插入的聊天历史中保留工具调用/结果,或丢弃之前的工具历史。\",\n\t\t\t\t\"item.opt.roles\": \"可选的逗号分隔消息角色过滤,如 user、assistant、toolResult、compactionSummary。\",\n\t\t\t\t\"item.opt.maxMessages\": \"过滤后仅保留最近的 N 条聊天历史消息。\",\n\t\t\t\t\"item.opt.maxChars\": \"仅保留近似字符预算内的最近聊天历史消息。\",\n\t\t\t\t\"item.opt.includeTime\": \"在当前日期后以 HH:MM:SS 渲染当前时间。\",\n\t\t\t\t\"item.opt.format\": \"选择 XML 或紧凑纯文本渲染。\",\n\t\t\t\t\"item.opt.advanced\": \"高级槽位选项。\",\n\t\t\t\t\"stackTab.contextOptions\": \"上下文选项\",\n\t\t\t\t\"stackTab.contextMeta\": \"控制有序堆栈如何改写 Pi 对话上下文的高级行为。\",\n\t\t\t\t\"stackTab.allowDuplicateTitle\": \"允许多个启用的 chat-history 槽位。关闭时仅展开第一个启用的 chat-history 槽位。\",\n\t\t\t\t\"stackTab.allowDuplicate\": \"允许重复的 chat-history 槽位\",\n\t\t\t\t\"stackTab.allowDuplicateNote\": \"除非你确实想多次注入同一段会话历史,否则请保持关闭。\",\n\t\t\t\t\"stackTab.mergeTitle\": \"将角色相同的连续堆栈条目合并为一条消息。聊天历史和 custom role 条目永远不会合并。\",\n\t\t\t\t\"stackTab.merge\": \"合并连续同角色条目\",\n\t\t\t\t\"stackTab.mergeNote\": \"只有堆栈创建的 user/assistant 条目会合并;聊天历史和 custom role 条目是硬边界。\",\n\t\t\t\t\"stackTab.customMergeSeparator\": \"使用自定义合并分隔符\",\n\t\t\t\t\"stackTab.customMergeSeparatorTitle\": \"启用后可显式保存分隔符,包括空字符串。\",\n\t\t\t\t\"stackTab.mergeSeparator\": \"合并分隔符\",\n\t\t\t\t\"stackTab.mergeSeparatorPlaceholder\": \"可以为空\",\n\t\t\t\t\"stackTab.mergeSeparatorNote\": \"原样插入到合并后的消息文本之间。空的自定义分隔符会直接拼接文本;关闭自定义模式可恢复默认空行。\",\n\t\t\t\t\"stackTab.parameters\": \"预设参数\",\n\t\t\t\t\"stackTab.parametersMetaPre\": \"不可变静态值;schema v2 使用 \",\n\t\t\t\t\"stackTab.parametersMetaMid\": \",v1 使用 \",\n\t\t\t\t\"stackTab.parametersMetaPost\": \"。\",\n\t\t\t\t\"stackTab.addVariable\": \"添加参数\",\n\t\t\t\t\"stackTab.addVariableTitle\": \"添加静态预设参数\",\n\t\t\t\t\"stackTab.variablesSavedNote\": \"保存于 stack.parameters(v2)/ stack.variables(v1)。\",\n\t\t\t\t\"stackTab.value\": \"值\",\n\t\t\t\t\"stackTab.valueType\": \"类型\",\n\t\t\t\t\"stackTab.textValue\": \"文本\",\n\t\t\t\t\"stackTab.invalidParameterJson\": \"参数 {name} 必须包含有效的 JSON。\",\n\t\t\t\t\"stackTab.extensions\": \"可用扩展\",\n\t\t\t\t\"stackTab.extensionsMeta\": \"pi-forge 当前加载的注册项。自定义 macro 使用所示 forge-v1 路径;slot 可在条目编辑器中选择。\",\n\t\t\t\t\"stackTab.registeredMacros\": \"已注册 macro\",\n\t\t\t\t\"stackTab.availableSlots\": \"可用 slot\",\n\t\t\t\t\"stackTab.deleteVariable\": \"删除\",\n\t\t\t\t\"stackTab.deleteVariableTitle\": \"删除此预设参数\",\n\t\t\t\t\"stackTab.stackJson\": \"预设 JSON\",\n\t\t\t\t\"stackTab.stackJsonMeta\": \"高级字段的原始恢复视图。Apply 更新编辑器;Save 写入磁盘。\",\n\t\t\t\t\"stackTab.copyJsonTitle\": \"复制此 JSON 到剪贴板\",\n\t\t\t\t\"stackTab.applyJson\": \"应用到编辑器\",\n\t\t\t\t\"stackTab.applyJsonTitle\": \"将此 JSON 应用到编辑器,但不保存\",\n\t\t\t\t\"stackTab.rawDraft\": \"未保存的预设 JSON 草稿。\",\n\t\t\t\t\"stackTab.duplicateVarNames\": \"预设参数名重复。\",\n\t\t\t\t\"stackTab.copiedJson\": \"已复制 JSON。\",\n\t\t\t\t\"stackTab.copiedJsonStatus\": \"已复制预设 JSON\",\n\t\t\t\t\"stackTab.appliedJson\": \"已将预设 JSON 应用到编辑器。\",\n\t\t\t\t\"error.stackJsonNotObject\": \"预设 JSON 必须是对象。\",\n\t\t\t\t\"error.stackJsonNoId\": \"预设 JSON 需要非空字符串 id。\",\n\t\t\t\t\"error.stackJsonNoItems\": \"预设 JSON 需要 items 数组。\",\n\t\t\t\t\"error.itemLabel\": \"条目 {index}\",\n\t\t\t\t\"error.itemNotObject\": \"{label} 必须是对象。\",\n\t\t\t\t\"error.itemKind\": \"{label} 的 kind 必须是 block 或 slot。\",\n\t\t\t\t\"error.itemNoId\": \"{label} 需要非空字符串 id。\",\n\t\t\t\t\"error.itemContent\": \"{label} 块的 content 必须是字符串。\",\n\t\t\t\t\"error.itemSlot\": \"{label} 的 slot 必须是字符串。\",\n\t\t\t\t\"policy.title\": \"工具策略与技能可见性\",\n\t\t\t\t\"policy.meta\": \"精确的 tool 允许列表从全部已注册工具中选择,可以激活当前未激活的工具;deny 规则约束当前激活工具基线。技能规则仅过滤 pi-forge 渲染的模型可见技能,不会阻止显式技能调用。模式支持精确名称和 * 通配符。\",\n\t\t\t\t\"policy.tools\": \"工具\",\n\t\t\t\t\"policy.skills\": \"技能\",\n\t\t\t\t\"policy.resource\": \"资源\",\n\t\t\t\t\"policy.mode\": \"模式\",\n\t\t\t\t\"policy.patterns\": \"模式\",\n\t\t\t\t\"policy.available\": \"可用\",\n\t\t\t\t\"policy.status\": \"状态\",\n\t\t\t\t\"policy.unrestrictedOption\": \"不限\",\n\t\t\t\t\"policy.allow\": \"允许\",\n\t\t\t\t\"policy.deny\": \"拒绝\",\n\t\t\t\t\"policy.noPatterns\": \"未选择模式。\",\n\t\t\t\t\"policy.removePatternTitle\": \"移除所选模式\",\n\t\t\t\t\"policy.availableKind\": \"可用{kind}\",\n\t\t\t\t\"policy.filterPlaceholder\": \"输入以过滤或添加\",\n\t\t\t\t\"policy.noMatching\": \"没有匹配的未选{kind}。\",\n\t\t\t\t\"policy.noRegistered\": \"没有已注册的{kind}。\",\n\t\t\t\t\"policy.unrestricted\": \"{kind}不受限。\",\n\t\t\t\t\"policy.allowListActiveOne\": \"允许列表已生效:{count} 个模式。\",\n\t\t\t\t\"policy.allowListActiveMany\": \"允许列表已生效:{count} 个模式。\",\n\t\t\t\t\"policy.denyListActiveOne\": \"拒绝列表已生效:{count} 个模式。\",\n\t\t\t\t\"policy.denyListActiveMany\": \"拒绝列表已生效:{count} 个模式。\",\n\t\t\t\t\"policy.sourceLabel\": \"来源:{source}\",\n\t\t\t\t\"policy.currentlyActive\": \"当前已激活\",\n\t\t\t\t\"policy.registeredInactive\": \"已注册,当前未激活;精确的允许列表可将其激活\",\n\t\t\t\t\"policy.hiddenFromModel\": \"对模型调用隐藏\",\n\t\t\t\t\"policy.suffixHidden\": \"(隐藏)\",\n\t\t\t\t\"error.duplicatePattern\": \"{kind}.{mode} 存在重复模式:{pattern}\",\n\t\t\t\t\"regex.title\": \"正则规则\",\n\t\t\t\t\"regex.meta\": \"按顺序执行的 JavaScript RegExp 替换,作用于外发提示词文本和最终定稿的助手消息。\",\n\t\t\t\t\"regex.addRule\": \"添加规则\",\n\t\t\t\t\"regex.addRuleTitle\": \"添加一条正则规则\",\n\t\t\t\t\"regex.validate\": \"校验\",\n\t\t\t\t\"regex.validateTitle\": \"校验编辑中的预设\",\n\t\t\t\t\"regex.saveNote\": \"保存会将这些规则写入 stack.regex.rules。\",\n\t\t\t\t\"regex.up\": \"上移\",\n\t\t\t\t\"regex.upTitle\": \"上移此规则\",\n\t\t\t\t\"regex.down\": \"下移\",\n\t\t\t\t\"regex.downTitle\": \"下移此规则\",\n\t\t\t\t\"regex.enabled\": \"启用\",\n\t\t\t\t\"regex.id\": \"规则 ID\",\n\t\t\t\t\"regex.name\": \"名称\",\n\t\t\t\t\"regex.idPlaceholder\": \"trim-ooc\",\n\t\t\t\t\"regex.namePlaceholder\": \"可读标签\",\n\t\t\t\t\"regex.stage\": \"阶段\",\n\t\t\t\t\"regex.effect\": \"效果\",\n\t\t\t\t\"regex.frequency\": \"频率\",\n\t\t\t\t\"regex.frequencyTitle\": \"turn:每个用户轮次的第一次请求时运行;request:也在 tool 结果后续请求上对完整自然上下文运行\",\n\t\t\t\t\"regex.flags\": \"标志\",\n\t\t\t\t\"regex.flagsPlaceholder\": \"gimsu\",\n\t\t\t\t\"regex.targets\": \"目标\",\n\t\t\t\t\"regex.targetsTitle\": \"仅 compiled;留空表示默认\",\n\t\t\t\t\"regex.roles\": \"角色\",\n\t\t\t\t\"regex.rolesTitle\": \"仅消息规则;留空表示所有角色\",\n\t\t\t\t\"regex.maxMessages\": \"最大消息数\",\n\t\t\t\t\"regex.maxChars\": \"最大字符数\",\n\t\t\t\t\"regex.minDepth\": \"最小深度\",\n\t\t\t\t\"regex.maxDepth\": \"最大深度\",\n\t\t\t\t\"regex.trimStrings\": \"裁剪字符串\",\n\t\t\t\t\"regex.trimStringsPlaceholder\": \"每行一个\",\n\t\t\t\t\"regex.pattern\": \"模式\",\n\t\t\t\t\"regex.patternPlaceholder\": \"\\\\(OOC:[^)]+\\\\)\",\n\t\t\t\t\"regex.replace\": \"替换为\",\n\t\t\t\t\"regex.deleteTitle\": \"删除此正则规则\",\n\t\t\t\t\"regex.warnFinalize\": \"警告:finalize 在流式输出之后运行,会替换已存储的助手消息记录。请使用 stage \\\"compiled\\\" 且目标为 \\\"messages\\\"。\",\n\t\t\t\t\"regex.warnMatch\": \"警告:{{match}} 不是 pi-forge 的替换语法。请使用 $& 或 $0 表示完整匹配。\",\n\t\t\t\t\"regex.ruleLabel\": \"规则 {index}\",\n\t\t\t\t\"regex.errorId\": \"正则规则 {index} 需要填写 ID。\",\n\t\t\t\t\"regex.errorDuplicateId\": \"正则规则 ID 重复:{id}\",\n\t\t\t\t\"regex.errorPattern\": \"正则规则 {label} 需要填写模式。\",\n\t\t\t\t\"regex.errorPositiveInteger\": \"正则规则 {label} 的 {field} 必须是正整数。\",\n\t\t\t\t\"regex.errorNonNegativeInteger\": \"正则规则 {label} 的 {field} 必须是非负整数。\",\n\t\t\t\t\"regex.errorDepthOrder\": \"正则规则 {label} 的 maxDepth 必须大于或等于 minDepth。\",\n\t\t\t\t\"common.delete\": \"删除\",\n\t\t\t\t\"common.none\": \"(无)\",\n\t\t\t\t\"profiles.subheading\": \"一次性应用模型、思考级别与预设;Profile 不会持续持有运行时状态。\",\n\t\t\t\t\"profiles.working\": \"处理中\",\n\t\t\t\t\"profiles.count\": \"{count} 个配置\",\n\t\t\t\t\"profiles.scopeTitle\": \"新建配置的作用域\",\n\t\t\t\t\"profiles.scopeProject\": \"项目\",\n\t\t\t\t\"profiles.scopeGlobal\": \"全局\",\n\t\t\t\t\"profiles.newProfile\": \"新建配置\",\n\t\t\t\t\"profiles.refresh\": \"刷新\",\n\t\t\t\t\"profiles.untrustedWarning\": \"此项目不受信任;仅显示用户全局代理配置,且无法应用配置。\",\n\t\t\t\t\"profiles.empty\": \"未找到代理配置。\",\n\t\t\t\t\"profiles.autoBadge\": \"自动\",\n\t\t\t\t\"profiles.lastAppliedBadge\": \"上次应用\",\n\t\t\t\t\"profiles.shadows\": \"遮蔽 {selector}\",\n\t\t\t\t\"profiles.shadowedBy\": \"被 {selector} 遮蔽\",\n\t\t\t\t\"profiles.ready\": \"就绪\",\n\t\t\t\t\"profiles.readyToApply\": \"可以应用\",\n\t\t\t\t\"profiles.preflightFailed\": \"预检失败\",\n\t\t\t\t\"profiles.edit\": \"编辑\",\n\t\t\t\t\"profiles.applyOnce\": \"应用一次\",\n\t\t\t\t\"profiles.applyOnceTitle\": \"应用此配置一次\",\n\t\t\t\t\"profiles.applyBlockedTitle\": \"请先解决预检错误再应用\",\n\t\t\t\t\"profiles.transition\": \"一次性切换\",\n\t\t\t\t\"profiles.currentRuntime\": \"当前运行时\",\n\t\t\t\t\"profiles.profileTarget\": \"配置目标\",\n\t\t\t\t\"profiles.model\": \"模型\",\n\t\t\t\t\"profiles.thinking\": \"思考级别\",\n\t\t\t\t\"profiles.promptStack\": \"预设\",\n\t\t\t\t\"profiles.effectiveTools\": \"预设策略后的有效工具\",\n\t\t\t\t\"profiles.resolutionDiagnostics\": \"解析诊断\",\n\t\t\t\t\"profiles.emptyMainPre\": \"在此创建项目配置,或使用 \",\n\t\t\t\t\"profiles.emptyMainPost\": \" 捕获当前运行时。\",\n\t\t\t\t\"profiles.runtimeProvenance\": \"运行时与来源\",\n\t\t\t\t\"profiles.current\": \"当前\",\n\t\t\t\t\"profiles.lastApplied\": \"上次应用\",\n\t\t\t\t\"profiles.sourceDefinition\": \"源定义\",\n\t\t\t\t\"profiles.driftModel\": \"模型:{label}\",\n\t\t\t\t\"profiles.driftThinking\": \"思考级别:{label}\",\n\t\t\t\t\"profiles.driftStack\": \"预设:{label}\",\n\t\t\t\t\"profiles.drifted\": \"已漂移\",\n\t\t\t\t\"profiles.unchanged\": \"未变化\",\n\t\t\t\t\"profiles.noneApplied\": \"本会话尚未应用任何配置。\",\n\t\t\t\t\"profiles.created\": \"已创建 {id}\",\n\t\t\t\t\"profiles.saved\": \"已保存 {id}\",\n\t\t\t\t\"profiles.appliedOnce\": \"已应用 {id} 一次\",\n\t\t\t\t\"profiles.refreshFailed\": \" 运行时刷新失败:{detail}\",\n\t\t\t\t\"profiles.confirmDelete\": \"删除代理配置 {id}?\\n\\n{path}\\n\\nsubagents.json 中的委派设置由可选的 pi-forge-subagents 包管理,不会被移除。\",\n\t\t\t\t\"profiles.deleted\": \"已删除 {id}\",\n\t\t\t\t\"profileEditor.scopeGlobal\": \"用户全局\",\n\t\t\t\t\"profileEditor.scopeProject\": \"项目本地\",\n\t\t\t\t\"profileEditor.confirmDiscard\": \"放弃未保存的代理配置修改?\",\n\t\t\t\t\"profileEditor.validationErrorOne\": \"{count} 个校验错误\",\n\t\t\t\t\"profileEditor.validationErrorMany\": \"{count} 个校验错误\",\n\t\t\t\t\"profileEditor.validWithWarningOne\": \"有效,有 {count} 个警告\",\n\t\t\t\t\"profileEditor.validWithWarningMany\": \"有效,有 {count} 个警告\",\n\t\t\t\t\"profileEditor.validReady\": \"有效,可以应用\",\n\t\t\t\t\"profileEditor.newTitle\": \"新建代理配置\",\n\t\t\t\t\"profileEditor.editTitle\": \"编辑 {id}\",\n\t\t\t\t\"profileEditor.note\": \"配置应用会单独预检;保存仅更新{scope}定义。\",\n\t\t\t\t\"profileEditor.cancel\": \"取消\",\n\t\t\t\t\"profileEditor.createSave\": \"创建配置\",\n\t\t\t\t\"profileEditor.editSave\": \"保存配置\",\n\t\t\t\t\"profileEditor.id\": \"配置 ID\",\n\t\t\t\t\"profileEditor.idPlaceholder\": \"focused-agent\",\n\t\t\t\t\"profileEditor.namePlaceholder\": \"专注代理\",\n\t\t\t\t\"profileEditor.idHint\": \"允许字母、数字、点、下划线和连字符;创建后不可变。作用域按存储位置区分;此配置的规范选择器为 {scope}:{id}。\",\n\t\t\t\t\"profileEditor.descriptionPlaceholder\": \"此配置的用途。\",\n\t\t\t\t\"profileEditor.modelProvider\": \"模型 provider\",\n\t\t\t\t\"profileEditor.modelId\": \"模型 ID\",\n\t\t\t\t\"profileEditor.authUnavailable\": \"(认证不可用)\",\n\t\t\t\t\"profileEditor.authWarning\": \"此模型没有已配置的认证;应用配置将无法通过预检。\",\n\t\t\t\t\"profileEditor.thinkingLevel\": \"思考级别\",\n\t\t\t\t\"profileEditor.globalStackHint\": \"全局 Profile 只能引用用户全局预设。同作用域预设可以存为相对裸 ID,不影响其全局解析。\",\n\t\t\t\t\"profileEditor.projectStackHint\": \"项目 Profile 可以引用项目预设或显式限定的全局预设。\",\n\t\t\t\t\"profileEditor.autoActivate\": \"在新会话中自动激活\",\n\t\t\t\t\"profileEditor.autoActivateHint\": \"每个{scope}只允许一个配置请求自动激活。\",\n\t\t\t\t\"diff.dockAria\": \"预览停靠栏\",\n\t\t\t\t\"diff.draftTab\": \"草稿差异\",\n\t\t\t\t\"diff.runTab\": \"运行差异\",\n\t\t\t\t\"diff.focus\": \"专注\",\n\t\t\t\t\"diff.split\": \"分栏\",\n\t\t\t\t\"diff.focusTitle\": \"使用完整编辑器宽度\",\n\t\t\t\t\"diff.splitTitle\": \"返回分栏编辑器\",\n\t\t\t\t\"diff.compiledDraft\": \"编译草稿\",\n\t\t\t\t\"diff.compiledMeta\": \"估算约 {tokens} token(字符数/4)· {chars} 字符\",\n\t\t\t\t\"diff.refreshing\": \"正在刷新…\",\n\t\t\t\t\"diff.noPreview\": \"无预览\",\n\t\t\t\t\"diff.loadingPreview\": \"正在加载预览…\",\n\t\t\t\t\"diff.selectStackHint\": \"选择一个预设以查看其编译后的提示词。\",\n\t\t\t\t\"diff.selectStackToPreview\": \"选择一个预设以预览。\",\n\t\t\t\t\"diff.draftChangedRefreshing\": \"草稿已修改;正在刷新…\",\n\t\t\t\t\"diff.draftRefreshed\": \"编译草稿已刷新。\",\n\t\t\t\t\"diff.previewNoSections\": \"预览未返回结构化片段。\",\n\t\t\t\t\"diff.compilerDiagnostics\": \"编译诊断({count})\",\n\t\t\t\t\"diff.draftTitle\": \"编译草稿 vs 已保存输出\",\n\t\t\t\t\"diff.runTitle\": \"最近一次运行 vs 上一次运行\",\n\t\t\t\t\"diff.noChanges\": \"无变化\",\n\t\t\t\t\"diff.changedBlocks\": \"{count} 个块已变化\",\n\t\t\t\t\"diff.noDraftComparison\": \"没有草稿对比\",\n\t\t\t\t\"diff.noCapturedRuns\": \"没有已捕获的运行\",\n\t\t\t\t\"diff.draftEmpty\": \"选择一个已保存的预设,将其当前草稿与磁盘版本对比。\",\n\t\t\t\t\"diff.runEmpty\": \"尚未捕获 provider 轮次。发送一条提示词;最近的轮次会自动显示在这里。\",\n\t\t\t\t\"diff.estimatedDelta\": \"估算 Δ 约 {delta} token\",\n\t\t\t\t\"diff.changed\": \"{count} 已变化\",\n\t\t\t\t\"diff.displayOptionsAria\": \"差异显示选项\",\n\t\t\t\t\"diff.unified\": \"统一\",\n\t\t\t\t\"diff.lines\": \"行数\",\n\t\t\t\t\"diff.lineContextAria\": \"差异行上下文\",\n\t\t\t\t\"diff.changesOnly\": \"仅变化\",\n\t\t\t\t\"diff.threeLinesContext\": \"3 行上下文\",\n\t\t\t\t\"diff.allLines\": \"全部行\",\n\t\t\t\t\"diff.showUnchanged\": \"显示 {count} 个未变化项\",\n\t\t\t\t\"diff.runMetadata\": \"运行元数据\",\n\t\t\t\t\"diff.turn\": \"轮次\",\n\t\t\t\t\"diff.providerModel\": \"Provider/模型\",\n\t\t\t\t\"diff.usagePending\": \"等待用量数据\",\n\t\t\t\t\"diff.actualPromptTokens\": \"实际提示词 token\",\n\t\t\t\t\"diff.actualCacheReadWrite\": \"实际缓存读 / 写\",\n\t\t\t\t\"diff.actualCacheHitRate\": \"实际缓存命中率\",\n\t\t\t\t\"diff.actualUncached\": \"实际未缓存输入 / 输出\",\n\t\t\t\t\"diff.estimatedPrefix\": \"估算可复用前缀\",\n\t\t\t\t\"diff.prefixValue\": \"约 {tokens} token({percent}%)\",\n\t\t\t\t\"diff.cacheNotReportedNote\": \"Pi 尚未观测到此模型的 provider 缓存读写报告,因此无法区分真实命中率为零与未上报。\",\n\t\t\t\t\"diff.estimateNote\": \"估算值基于捕获文本长度(字符数/4);实际值来自 Pi 返回的 provider 用量。\",\n\t\t\t\t\"diff.draftSame\": \"草稿与已保存提示词编译结果相同。\",\n\t\t\t\t\"diff.runSame\": \"最近两次运行捕获的内容相同。\",\n\t\t\t\t\"diff.unifiedAria\": \"统一行差异\",\n\t\t\t\t\"diff.splitAria\": \"分栏行差异\",\n\t\t\t\t\"diff.before\": \"之前\",\n\t\t\t\t\"diff.after\": \"之后\",\n\t\t\t\t\"diff.blockTokensDelta\": \"估算 Δ 约 {delta} token\",\n\t\t\t\t\"diff.blockTokens\": \"估算约 {count} token\",\n\t\t\t\t\"diff.metadataChanged\": \"Provider 可见的元数据已变化;文本未变。{detail}\",\n\t\t\t\t\"diff.roleUnchanged\": \"角色未变({role});另一个序列化的 provider 字段发生了变化。\",\n\t\t\t\t\"diff.roleChanged\": \"角色已变化:{before} → {after}。\",\n\t\t\t\t\"diff.notReported\": \"未上报\",\n\t\t\t\t\"diff.sectionMeta\": \"{rolePrefix}{chars} 字符 · 估算约 {tokens} token\",\n\t\t\t\t\"schema.key\": \"键\",\n\t\t\t\t\"schema.keyUnavailable\": \"{key} · 配置不可用\",\n\t\t\t\t\"schema.allHaveEntries\": \"每个可用的{key}都已有条目。\",\n\t\t\t\t\"schema.needKey\": \"每个条目都需要键。\",\n\t\t\t\t\"schema.uniqueKeys\": \"条目键必须唯一。\",\n\t\t\t\t\"schema.addEntry\": \"添加条目\",\n\t\t\t\t\"schema.addEntryTitle\": \"添加一个{key}条目\",\n\t\t\t\t\"schema.oneEntryPer\": \"每个{key}一条。\",\n\t\t\t\t\"schema.deleteEntryTitle\": \"删除此条目\",\n\t\t\t\t\"schema.noEntries\": \"暂无条目。\",\n\t\t\t\t\"settings.ready\": \"设置已就绪\",\n\t\t\t\t\"settings.saving\": \"正在保存\",\n\t\t\t\t\"settings.saved\": \"已保存\",\n\t\t\t\t\"settings.providerRetrying\": \"Provider 已重启;正在重试\",\n\t\t\t\t\"settings.editTab\": \"编辑{title}\",\n\t\t\t\t\"settings.navAria\": \"插件设置\"\n\t\t\t}\n\t\t};\n\t\teditorLocale = /* @__PURE__ */ ref(initialLocale());\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\tinit_i18n();\n\tvar _hoisted_1$9 = { class: \"profile-editor profile-card\" };\n\tvar _hoisted_2$9 = { class: \"profile-editor-head\" };\n\tvar _hoisted_3$9 = { class: \"profile-editor-title\" };\n\tvar _hoisted_4$9 = { class: \"profile-editor-note\" };\n\tvar _hoisted_5$9 = {\n\t\tkey: 0,\n\t\tclass: \"profile-editor-dirty\"\n\t};\n\tvar _hoisted_6$9 = [\"disabled\"];\n\tvar _hoisted_7$9 = [\"disabled\"];\n\tvar _hoisted_8$9 = [\"disabled\"];\n\tvar _hoisted_9$9 = { class: \"profile-form\" };\n\tvar _hoisted_10$9 = { class: \"profile-field\" };\n\tvar _hoisted_11$9 = [\"readonly\", \"placeholder\"];\n\tvar _hoisted_12$9 = { class: \"profile-field\" };\n\tvar _hoisted_13$9 = [\"placeholder\"];\n\tvar _hoisted_14$9 = { class: \"profile-field profile-field-wide\" };\n\tvar _hoisted_15$9 = [\"placeholder\"];\n\tvar _hoisted_16$9 = { class: \"profile-field\" };\n\tvar _hoisted_17$8 = { id: \"profileProviderOptions\" };\n\tvar _hoisted_18$7 = [\"value\"];\n\tvar _hoisted_19$7 = { class: \"profile-field\" };\n\tvar _hoisted_20$7 = { id: \"profileModelOptions\" };\n\tvar _hoisted_21$7 = [\"value\", \"label\"];\n\tvar _hoisted_22$7 = {\n\t\tkey: 0,\n\t\tclass: \"profile-field-warning\",\n\t\t\"data-model-auth-warning\": \"\"\n\t};\n\tvar _hoisted_23$7 = { class: \"profile-field\" };\n\tvar _hoisted_24$7 = [\"value\"];\n\tvar _hoisted_25$7 = { class: \"profile-field\" };\n\tvar _hoisted_26$7 = { value: \"\" };\n\tvar _hoisted_27$6 = [\"value\"];\n\tvar _hoisted_28$6 = { key: 0 };\n\tvar _hoisted_29$6 = { key: 1 };\n\tvar _hoisted_30$6 = { class: \"profile-check profile-field-wide\" };\n\tvar _hoisted_31$6 = {\n\t\tkey: 1,\n\t\tclass: \"profile-editor-validation\"\n\t};\n\tvar _hoisted_32$6 = { class: \"profile-diagnostics\" };\n\tvar _hoisted_33$6 = {\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(() => t(editScope.value === \"global\" ? \"profileEditor.scopeGlobal\" : \"profileEditor.scopeProject\"));\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(t(\"profileEditor.confirmDiscard\"))) 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 ? tp(\"profileEditor.validationErrorOne\", \"profileEditor.validationErrorMany\", result.errors) : result.warnings ? tp(\"profileEditor.validWithWarningOne\", \"profileEditor.validWithWarningMany\", result.warnings) : t(\"profileEditor.validReady\");\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$9, [\n\t\t\t\t\tcreateBaseVNode(\"header\", _hoisted_2$9, [\n\t\t\t\t\t\tcreateBaseVNode(\"div\", null, [createBaseVNode(\"div\", _hoisted_3$9, toDisplayString(__props.mode === \"create\" ? unref(t)(\"profileEditor.newTitle\") : unref(t)(\"profileEditor.editTitle\", { id: __props.sourceSelector || __props.source?.id || \"\" })), 1), createBaseVNode(\"div\", _hoisted_4$9, toDisplayString(unref(t)(\"profileEditor.note\", { scope: scopeLabel.value })), 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$9, toDisplayString(unref(t)(\"chrome.unsaved\")), 1)) : 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}, toDisplayString(unref(t)(\"profileEditor.cancel\")), 9, _hoisted_6$9),\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}, toDisplayString(unref(t)(\"regex.validate\")), 9, _hoisted_7$9),\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\" ? unref(t)(\"profileEditor.createSave\") : unref(t)(\"profileEditor.editSave\")), 9, _hoisted_8$9)\n\t\t\t\t\t]),\n\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_9$9, [\n\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_10$9, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, toDisplayString(unref(t)(\"profileEditor.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: unref(t)(\"profileEditor.idPlaceholder\"),\n\t\t\t\t\t\t\t\tautocomplete: \"off\"\n\t\t\t\t\t\t\t}, null, 8, _hoisted_11$9), [[vModelText, draft.id]]),\n\t\t\t\t\t\t\tcreateBaseVNode(\"small\", null, toDisplayString(unref(t)(\"profileEditor.idHint\", {\n\t\t\t\t\t\t\t\tscope: editScope.value,\n\t\t\t\t\t\t\t\tid: draft.id || \"<id>\"\n\t\t\t\t\t\t\t})), 1)\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_12$9, [createBaseVNode(\"span\", null, toDisplayString(unref(t)(\"metadata.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: unref(t)(\"profileEditor.namePlaceholder\"),\n\t\t\t\t\t\t\tautocomplete: \"off\"\n\t\t\t\t\t\t}, null, 8, _hoisted_13$9), [[vModelText, draft.name]])]),\n\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_14$9, [createBaseVNode(\"span\", null, toDisplayString(unref(t)(\"metadata.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: unref(t)(\"profileEditor.descriptionPlaceholder\")\n\t\t\t\t\t\t}, null, 8, _hoisted_15$9), [[vModelText, draft.description]])]),\n\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_16$9, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, toDisplayString(unref(t)(\"profileEditor.modelProvider\")), 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_17$8, [(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_18$7);\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_19$7, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, toDisplayString(unref(t)(\"profileEditor.modelId\")), 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_20$7, [(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 ? \"\" : unref(t)(\"profileEditor.authUnavailable\")}`\n\t\t\t\t\t\t\t\t}, null, 8, _hoisted_21$7);\n\t\t\t\t\t\t\t}), 128))]),\n\t\t\t\t\t\t\ttypedModelUnavailable.value ? (openBlock(), createElementBlock(\"small\", _hoisted_22$7, toDisplayString(unref(t)(\"profileEditor.authWarning\")), 1)) : createCommentVNode(\"v-if\", true)\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_23$7, [createBaseVNode(\"span\", null, toDisplayString(unref(t)(\"profileEditor.thinkingLevel\")), 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_24$7);\n\t\t\t\t\t\t}), 64))], 512), [[vModelSelect, draft.thinkingLevel]])]),\n\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_25$7, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, toDisplayString(unref(t)(\"profiles.promptStack\")), 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}, [createBaseVNode(\"option\", _hoisted_26$7, toDisplayString(unref(t)(\"common.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_27$6);\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_28$6, toDisplayString(unref(t)(\"profileEditor.globalStackHint\")), 1)) : (openBlock(), createElementBlock(\"small\", _hoisted_29$6, toDisplayString(unref(t)(\"profileEditor.projectStackHint\")), 1))\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_30$6, [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, [createBaseVNode(\"strong\", null, toDisplayString(unref(t)(\"profileEditor.autoActivate\")), 1), createBaseVNode(\"small\", null, toDisplayString(unref(t)(\"profileEditor.autoActivateHint\", { scope: editScope.value })), 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_31$6, [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 ? unref(t)(\"profiles.readyToApply\") : unref(t)(\"profiles.preflightFailed\")) + \" · \" + toDisplayString(unref(tp)(\"diag.errorOne\", \"diag.errorMany\", validation.value.errors)) + \" · \" + toDisplayString(unref(tp)(\"diag.warningOne\", \"diag.warningMany\", validation.value.warnings)), 3), createBaseVNode(\"div\", _hoisted_32$6, [!validation.value.diagnostics.length ? (openBlock(), createElementBlock(\"div\", _hoisted_33$6, toDisplayString(unref(t)(\"diag.noDiagnostics\")), 1)) : 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-9cfe5c37\"]]);\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\tinit_i18n();\n\tvar _hoisted_1$8 = { class: \"profile-surface\" };\n\tvar _hoisted_2$8 = { class: \"profile-toolbar\" };\n\tvar _hoisted_3$8 = { class: \"profile-heading\" };\n\tvar _hoisted_4$8 = { class: \"profile-subheading\" };\n\tvar _hoisted_5$8 = {\n\t\tid: \"profilesStatus\",\n\t\tclass: \"status\"\n\t};\n\tvar _hoisted_6$8 = [\"title\", \"disabled\"];\n\tvar _hoisted_7$8 = { value: \"project\" };\n\tvar _hoisted_8$8 = { value: \"global\" };\n\tvar _hoisted_9$8 = [\"disabled\"];\n\tvar _hoisted_10$8 = [\"disabled\"];\n\tvar _hoisted_11$8 = {\n\t\tkey: 0,\n\t\tclass: \"profile-message error\"\n\t};\n\tvar _hoisted_12$8 = {\n\t\tkey: 1,\n\t\tclass: \"profile-message warning\"\n\t};\n\tvar _hoisted_13$8 = {\n\t\tkey: 2,\n\t\tclass: \"profile-layout\"\n\t};\n\tvar _hoisted_14$8 = { class: \"profile-sidebar\" };\n\tvar _hoisted_15$8 = { class: \"side-head\" };\n\tvar _hoisted_16$8 = { class: \"side-title\" };\n\tvar _hoisted_17$7 = { class: \"cwd\" };\n\tvar _hoisted_18$6 = { class: \"profile-list\" };\n\tvar _hoisted_19$6 = [\n\t\t\"disabled\",\n\t\t\"data-profile-id\",\n\t\t\"data-profile-selector\",\n\t\t\"onClick\"\n\t];\n\tvar _hoisted_20$6 = { class: \"profile-row-title\" };\n\tvar _hoisted_21$6 = {\n\t\tkey: 0,\n\t\tclass: \"badge shadow\"\n\t};\n\tvar _hoisted_22$6 = {\n\t\tkey: 1,\n\t\tclass: \"badge\"\n\t};\n\tvar _hoisted_23$6 = {\n\t\tkey: 2,\n\t\tclass: \"badge\"\n\t};\n\tvar _hoisted_24$6 = { class: \"profile-row-name\" };\n\tvar _hoisted_25$6 = { class: \"profile-row-meta\" };\n\tvar _hoisted_26$6 = {\n\t\tkey: 0,\n\t\tclass: \"profile-empty\"\n\t};\n\tvar _hoisted_27$5 = { class: \"profile-main\" };\n\tvar _hoisted_28$5 = { class: \"profile-card profile-summary-card\" };\n\tvar _hoisted_29$5 = { class: \"profile-title\" };\n\tvar _hoisted_30$5 = { class: \"profile-selector\" };\n\tvar _hoisted_31$5 = { class: \"profile-path\" };\n\tvar _hoisted_32$5 = { class: \"profile-summary-actions\" };\n\tvar _hoisted_33$5 = [\"disabled\", \"title\"];\n\tvar _hoisted_34$5 = [\"disabled\"];\n\tvar _hoisted_35$5 = {\n\t\tkey: 0,\n\t\tclass: \"profile-description\"\n\t};\n\tvar _hoisted_36$5 = { class: \"profile-card\" };\n\tvar _hoisted_37$5 = { class: \"profile-card-title\" };\n\tvar _hoisted_38$5 = { class: \"profile-transition-grid\" };\n\tvar _hoisted_39$5 = { class: \"profile-transition-head\" };\n\tvar _hoisted_40$5 = { class: \"profile-transition-head\" };\n\tvar _hoisted_41$4 = { class: \"profile-detail-row\" };\n\tvar _hoisted_42$3 = { class: \"profile-card\" };\n\tvar _hoisted_43$3 = { class: \"profile-card-title\" };\n\tvar _hoisted_44$3 = { class: \"profile-diagnostics\" };\n\tvar _hoisted_45$2 = {\n\t\tkey: 0,\n\t\tclass: \"diagnostic info\"\n\t};\n\tvar _hoisted_46$2 = {\n\t\tkey: 2,\n\t\tclass: \"profile-card profile-empty\"\n\t};\n\tvar _hoisted_47$2 = { class: \"profile-card profile-runtime-card\" };\n\tvar _hoisted_48$2 = { class: \"profile-card-title\" };\n\tvar _hoisted_49$2 = { class: \"profile-detail-row\" };\n\tvar _hoisted_50$2 = { class: \"profile-detail-row\" };\n\tvar _hoisted_51$2 = { class: \"profile-detail-row\" };\n\tvar _hoisted_52$1 = { class: \"profile-drift\" };\n\tvar _hoisted_53$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 = t(editorMode.value === \"create\" ? \"profiles.created\" : \"profiles.saved\", { id: profileSelectorLabel(saved) });\n\t\t\t\tprofileActionError.value = \"\";\n\t\t\t\teditorMode.value = void 0;\n\t\t\t}\n\t\t\tfunction profileSelectorLabel(entry) {\n\t\t\t\tif (!entry) return \"profile\";\n\t\t\t\treturn entry.scope === \"global\" ? entry.selector : entry.profile.id;\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 = t(\"profiles.appliedOnce\", { id: target.profile.id });\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 += t(\"profiles.refreshFailed\", { 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(t(\"profiles.confirmDelete\", {\n\t\t\t\t\tid: target.profile.id,\n\t\t\t\t\tpath: target.filePath\n\t\t\t\t}))) 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 = t(\"profiles.deleted\", { id: 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}` : t(\"common.none\");\n\t\t\t}\n\t\t\tfunction promptStackLabel(value) {\n\t\t\t\treturn value ?? t(\"common.none\");\n\t\t\t}\n\t\t\tfunction profileState(entry) {\n\t\t\t\tif (entry.errors > 0) return tp(\"diag.errorOne\", \"diag.errorMany\", entry.errors);\n\t\t\t\tif (entry.warnings > 0) return tp(\"diag.warningOne\", \"diag.warningMany\", entry.warnings);\n\t\t\t\treturn t(\"profiles.ready\");\n\t\t\t}\n\t\t\tfunction driftLabel(changed) {\n\t\t\t\treturn changed ? t(\"profiles.drifted\") : t(\"profiles.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\" ? t(\"profiles.shadows\", { selector: other.selector }) : t(\"profiles.shadowedBy\", { selector: other.selector });\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(\"header\", _hoisted_2$8, [\n\t\t\t\t\t\tcreateBaseVNode(\"div\", null, [createBaseVNode(\"div\", _hoisted_3$8, toDisplayString(unref(t)(\"nav.profiles\")), 1), createBaseVNode(\"div\", _hoisted_4$8, toDisplayString(unref(t)(\"profiles.subheading\")), 1)]),\n\t\t\t\t\t\t_cache[4] || (_cache[4] = createBaseVNode(\"span\", { class: \"action-spacer\" }, null, -1)),\n\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_5$8, toDisplayString(loading.value || profileActionBusy.value ? unref(t)(\"profiles.working\") : loadError.value || profileActionError.value || profileActionStatus.value || unref(t)(\"profiles.count\", { count: collection.value?.profiles.length || 0 })), 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: unref(t)(\"profiles.scopeTitle\"),\n\t\t\t\t\t\t\tdisabled: loading.value || profileActionBusy.value || !!editorMode.value\n\t\t\t\t\t\t}, [createBaseVNode(\"option\", _hoisted_7$8, toDisplayString(unref(t)(\"profiles.scopeProject\")), 1), createBaseVNode(\"option\", _hoisted_8$8, toDisplayString(unref(t)(\"profiles.scopeGlobal\")), 1)], 8, _hoisted_6$8), [[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}, toDisplayString(unref(t)(\"profiles.newProfile\")), 9, _hoisted_9$8),\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}, toDisplayString(unref(t)(\"profiles.refresh\")), 9, _hoisted_10$8)\n\t\t\t\t\t]),\n\t\t\t\t\tloadError.value ? (openBlock(), createElementBlock(\"div\", _hoisted_11$8, toDisplayString(loadError.value), 1)) : collection.value && !collection.value.trusted ? (openBlock(), createElementBlock(\"div\", _hoisted_12$8, toDisplayString(unref(t)(\"profiles.untrustedWarning\")), 1)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\tcollection.value ? (openBlock(), createElementBlock(\"div\", _hoisted_13$8, [createBaseVNode(\"aside\", _hoisted_14$8, [createBaseVNode(\"div\", _hoisted_15$8, [createBaseVNode(\"div\", _hoisted_16$8, toDisplayString(unref(t)(\"nav.profiles\")), 1), createBaseVNode(\"div\", _hoisted_17$7, toDisplayString(collection.value.profileDirectory), 1)]), createBaseVNode(\"div\", _hoisted_18$6, [(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\t\"data-profile-selector\": entry.selector,\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_20$6, [\n\t\t\t\t\t\t\t\tcreateTextVNode(toDisplayString(profileSelectorLabel(entry)) + \" \", 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", { class: normalizeClass([\"badge scope\", entry.scope]) }, toDisplayString(entry.scope === \"global\" ? unref(t)(\"chrome.scopeGlobal\") : unref(t)(\"chrome.scopeProject\")), 3),\n\t\t\t\t\t\t\t\tshadowRelationship(entry) ? (openBlock(), createElementBlock(\"span\", _hoisted_21$6, toDisplayString(shadowRelationship(entry)), 1)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\t\tentry.profile.autoActivate ? (openBlock(), createElementBlock(\"span\", _hoisted_22$6, toDisplayString(unref(t)(\"profiles.autoBadge\")), 1)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\t\tentry.lastApplied ? (openBlock(), createElementBlock(\"span\", _hoisted_23$6, toDisplayString(unref(t)(\"profiles.lastAppliedBadge\")), 1)) : createCommentVNode(\"v-if\", true)\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_24$6, toDisplayString(entry.profile.name || unref(t)(\"stackList.unnamed\")), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_25$6, 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_19$6);\n\t\t\t\t\t}), 128)), !collection.value.profiles.length ? (openBlock(), createElementBlock(\"div\", _hoisted_26$6, toDisplayString(unref(t)(\"profiles.empty\")), 1)) : createCommentVNode(\"v-if\", true)])]), createBaseVNode(\"main\", _hoisted_27$5, [editorMode.value ? (openBlock(), createBlock$1(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_28$5, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_29$5, toDisplayString(selected.value.profile.name || selected.value.profile.id), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_30$5, [createBaseVNode(\"code\", null, toDisplayString(selected.value.selector), 1)]),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_31$5, toDisplayString(selected.value.filePath), 1)\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_32$5, [\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 ? unref(t)(\"profiles.readyToApply\") : unref(t)(\"profiles.preflightFailed\")), 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}, toDisplayString(unref(t)(\"profiles.edit\")), 1),\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 ? unref(t)(\"profiles.applyOnceTitle\") : unref(t)(\"profiles.applyBlockedTitle\"),\n\t\t\t\t\t\t\t\t\tonClick: applySelectedProfile\n\t\t\t\t\t\t\t\t}, toDisplayString(unref(t)(\"profiles.applyOnce\")), 9, _hoisted_33$5),\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}, toDisplayString(unref(t)(\"common.delete\")), 9, _hoisted_34$5)\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\tselected.value.profile.description ? (openBlock(), createElementBlock(\"p\", _hoisted_35$5, 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_36$5, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_37$5, toDisplayString(unref(t)(\"profiles.transition\")), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_38$5, [\n\t\t\t\t\t\t\t\t_cache[5] || (_cache[5] = createBaseVNode(\"div\", { class: \"profile-transition-head\" }, null, -1)),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_39$5, toDisplayString(unref(t)(\"profiles.currentRuntime\")), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_40$5, toDisplayString(unref(t)(\"profiles.profileTarget\")), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, toDisplayString(unref(t)(\"profiles.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\tcreateBaseVNode(\"div\", null, toDisplayString(unref(t)(\"profiles.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\tcreateBaseVNode(\"div\", null, toDisplayString(unref(t)(\"profiles.promptStack\")), 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_41$4, [createBaseVNode(\"span\", null, toDisplayString(unref(t)(\"profiles.effectiveTools\")), 1), createBaseVNode(\"code\", null, toDisplayString(selected.value.preview.target.effectiveTools.join(\", \") || unref(t)(\"common.none\")), 1)])\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tcreateBaseVNode(\"section\", _hoisted_42$3, [createBaseVNode(\"div\", _hoisted_43$3, toDisplayString(unref(t)(\"profiles.resolutionDiagnostics\")), 1), createBaseVNode(\"div\", _hoisted_44$3, [!selected.value.preview.diagnostics.length ? (openBlock(), createElementBlock(\"div\", _hoisted_45$2, toDisplayString(unref(t)(\"diag.noDiagnostics\")), 1)) : 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_46$2, [\n\t\t\t\t\t\tcreateTextVNode(toDisplayString(unref(t)(\"profiles.emptyMainPre\")), 1),\n\t\t\t\t\t\t_cache[6] || (_cache[6] = createBaseVNode(\"code\", null, \"/profile save <id>\", -1)),\n\t\t\t\t\t\tcreateTextVNode(toDisplayString(unref(t)(\"profiles.emptyMainPost\")), 1)\n\t\t\t\t\t])) : createCommentVNode(\"v-if\", true), createBaseVNode(\"section\", _hoisted_47$2, [\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_48$2, toDisplayString(unref(t)(\"profiles.runtimeProvenance\")), 1),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_49$2, [createBaseVNode(\"span\", null, toDisplayString(unref(t)(\"profiles.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_50$2, [createBaseVNode(\"span\", null, toDisplayString(unref(t)(\"profiles.lastApplied\")), 1), createBaseVNode(\"code\", null, toDisplayString(collection.value.status.lastApplied.provenance.profileId), 1)]),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_51$2, [createBaseVNode(\"span\", null, toDisplayString(unref(t)(\"profiles.sourceDefinition\")), 1), createBaseVNode(\"code\", null, toDisplayString(collection.value.status.lastApplied.sourceState), 1)]),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_52$1, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, toDisplayString(unref(t)(\"profiles.driftModel\", { label: driftLabel(collection.value.status.lastApplied.drift.model.changed) })), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, toDisplayString(unref(t)(\"profiles.driftThinking\", { label: driftLabel(collection.value.status.lastApplied.drift.thinkingLevel.changed) })), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, toDisplayString(unref(t)(\"profiles.driftStack\", { label: 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_53$1, toDisplayString(unref(t)(\"profiles.noneApplied\")), 1))\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-e0385a21\"]]);\n\t//#endregion\n\t//#region src/web-editor/schema-form.ts\n\tfunction cloneJson$1(value) {\n\t\treturn JSON.parse(JSON.stringify(value));\n\t}\n\tfunction isPlainObject(value) {\n\t\treturn value !== null && typeof value === \"object\" && !Array.isArray(value);\n\t}\n\t/** Normalizes enum option lists to a uniform {value,label} shape. */\n\tfunction enumOptions(field) {\n\t\treturn (field.options ?? []).map((option) => {\n\t\t\tif (typeof option === \"string\") return {\n\t\t\t\tvalue: option,\n\t\t\t\tlabel: option\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tvalue: option.value,\n\t\t\t\tlabel: option.label ?? option.value\n\t\t\t};\n\t\t});\n\t}\n\tfunction defaultValueForField(field) {\n\t\tif (field.default !== void 0) return cloneJson$1(field.default);\n\t\tswitch (field.type) {\n\t\t\tcase \"boolean\": return false;\n\t\t\tcase \"number\": return 0;\n\t\t\tcase \"enum\": return enumOptions(field)[0]?.value ?? \"\";\n\t\t\tcase \"string\": return \"\";\n\t\t\tcase \"record\": return {};\n\t\t}\n\t}\n\t/** Builds a complete values object with every field present and defaulted. */\n\tfunction defaultValues(schema) {\n\t\tconst values = {};\n\t\tfor (const field of schema.fields) values[field.key] = defaultValueForField(field);\n\t\treturn values;\n\t}\n\t/** Shortcut used by default: copy values from the source, but only schema keys. */\n\tfunction normalizeValues(schema, values) {\n\t\tconst result = defaultValues(schema);\n\t\tfor (const field of schema.fields) if (values[field.key] !== void 0) result[field.key] = coerceFieldValue(field, values[field.key]);\n\t\treturn result;\n\t}\n\tfunction coerceFieldValue(field, value) {\n\t\tswitch (field.type) {\n\t\t\tcase \"boolean\": return value === true || value === 1 || value === \"true\" || value === \"1\";\n\t\t\tcase \"number\": {\n\t\t\t\tif (value === \"\" || value === null || value === void 0) return void 0;\n\t\t\t\tconst num = typeof value === \"number\" ? value : Number(value);\n\t\t\t\treturn Number.isFinite(num) ? num : void 0;\n\t\t\t}\n\t\t\tcase \"string\": return value === null || value === void 0 ? \"\" : String(value);\n\t\t\tcase \"enum\":\n\t\t\t\tif (typeof value === \"string\" && enumOptions(field).some((option) => option.value === value)) return value;\n\t\t\t\treturn enumOptions(field)[0]?.value ?? \"\";\n\t\t\tcase \"record\": return coerceRecordValue(field, value);\n\t\t}\n\t}\n\tfunction validateValues(schema, values) {\n\t\tconst errors = {};\n\t\tfor (const field of schema.fields) if (field.type === \"record\") validateRecordFieldInto(field, values[field.key], field.key, errors);\n\t\telse {\n\t\t\tconst fieldError = validateField(field, values[field.key]);\n\t\t\tif (fieldError) errors[field.key] = fieldError;\n\t\t}\n\t\treturn { errors };\n\t}\n\tfunction validateField(field, value) {\n\t\tswitch (field.type) {\n\t\t\tcase \"boolean\": return \"\";\n\t\t\tcase \"number\": return validateNumberField(field, value);\n\t\t\tcase \"enum\": return validateEnumField(field, value);\n\t\t\tcase \"string\": return validateStringField(field, value);\n\t\t\tcase \"record\": return \"\";\n\t\t}\n\t}\n\tfunction validateNumberField(field, value) {\n\t\tconst label = field.label;\n\t\tif (value === \"\" || value === null || value === void 0) return field.required ? `${label} is required.` : \"\";\n\t\tconst num = typeof value === \"number\" ? value : Number(value);\n\t\tif (!Number.isFinite(num)) return `${label} must be a number.`;\n\t\tif (field.min !== void 0 && num < field.min) return field.max !== void 0 ? `${label} must be between ${field.min} and ${field.max}.` : `${label} must be at least ${field.min}.`;\n\t\tif (field.max !== void 0 && num > field.max) return field.min !== void 0 ? `${label} must be between ${field.min} and ${field.max}.` : `${label} must be at most ${field.max}.`;\n\t\treturn \"\";\n\t}\n\tfunction validateEnumField(field, value) {\n\t\tif (typeof value !== \"string\" || !value) return field.required ? `${field.label} is required.` : \"\";\n\t\tif (!enumOptions(field).some((option) => option.value === value)) return `${field.label} has an invalid value.`;\n\t\treturn \"\";\n\t}\n\tfunction validateStringField(field, value) {\n\t\tif (value === null || value === void 0 || value === \"\") return field.required ? `${field.label} is required.` : \"\";\n\t\tconst text = String(value);\n\t\tif (field.maxLength !== void 0 && text.length > field.maxLength) return `${field.label} must be at most ${field.maxLength} characters.`;\n\t\tif (field.pattern) try {\n\t\t\tif (!new RegExp(field.pattern).test(text)) return `${field.label} does not match the required format.`;\n\t\t} catch {}\n\t\treturn \"\";\n\t}\n\tfunction validateRecordFieldInto(field, value, path, errors) {\n\t\tif (!isPlainObject(value)) {\n\t\t\terrors[path] = \"Must be a table of entries.\";\n\t\t\treturn;\n\t\t}\n\t\tconst seen = /* @__PURE__ */ new Set();\n\t\tfor (const [rowKey, rowValue] of Object.entries(value)) {\n\t\t\tconst rowPath = `${path}.${rowKey}`;\n\t\t\tconst key = rowKey.trim();\n\t\t\tif (!key) {\n\t\t\t\terrors[path] = errors[path] ?? \"Every entry needs a key.\";\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (seen.has(key)) {\n\t\t\t\terrors[path] = errors[path] ?? \"Entry keys must be unique.\";\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tseen.add(key);\n\t\t\tif (!isPlainObject(rowValue)) {\n\t\t\t\terrors[rowPath] = \"Must be an object.\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor (const rowField of field.recordFields ?? []) {\n\t\t\t\tconst rowFieldError = validateField(rowField, rowValue[rowField.key]);\n\t\t\t\tif (rowFieldError) errors[`${rowPath}.${rowField.key}`] = rowFieldError;\n\t\t\t}\n\t\t}\n\t}\n\tfunction coerceRecordValue(field, value) {\n\t\tif (!isPlainObject(value)) return {};\n\t\tconst result = {};\n\t\tfor (const [rowKey, rowValue] of Object.entries(value)) {\n\t\t\tconst key = rowKey.trim();\n\t\t\tif (!key) continue;\n\t\t\tconst row = isPlainObject(rowValue) ? rowValue : {};\n\t\t\tconst coercedRow = {};\n\t\t\tfor (const rowField of field.recordFields ?? []) coercedRow[rowField.key] = coerceFieldValue(rowField, row[rowField.key]);\n\t\t\tresult[key] = coercedRow;\n\t\t}\n\t\treturn result;\n\t}\n\t//#endregion\n\t//#region src/web-editor/client/components/SchemaForm.vue?vue&type=script&setup=true&lang.ts\n\tinit_vue_runtime_esm_bundler();\n\tinit_i18n();\n\tvar _hoisted_1$7 = { class: \"schema-form\" };\n\tvar _hoisted_2$7 = {\n\t\tkey: 0,\n\t\tclass: \"tab-section-title\"\n\t};\n\tvar _hoisted_3$7 = {\n\t\tkey: 1,\n\t\tclass: \"tab-section-meta\"\n\t};\n\tvar _hoisted_4$7 = [\"data-field\"];\n\tvar _hoisted_5$7 = {\n\t\tkey: 0,\n\t\tclass: \"tab-section-meta\"\n\t};\n\tvar _hoisted_6$7 = {\n\t\tkey: 1,\n\t\tclass: \"field\"\n\t};\n\tvar _hoisted_7$7 = { class: \"checkline\" };\n\tvar _hoisted_8$7 = [\n\t\t\"data-field-input\",\n\t\t\"checked\",\n\t\t\"onChange\"\n\t];\n\tvar _hoisted_9$7 = { class: \"field\" };\n\tvar _hoisted_10$7 = [\n\t\t\"data-field-input\",\n\t\t\"value\",\n\t\t\"placeholder\",\n\t\t\"onInput\"\n\t];\n\tvar _hoisted_11$7 = {\n\t\tkey: 0,\n\t\tclass: \"schema-field-error\",\n\t\t\"data-field-error\": \"\"\n\t};\n\tvar _hoisted_12$7 = { class: \"field\" };\n\tvar _hoisted_13$7 = [\n\t\t\"data-field-input\",\n\t\t\"value\",\n\t\t\"min\",\n\t\t\"max\",\n\t\t\"placeholder\",\n\t\t\"onInput\"\n\t];\n\tvar _hoisted_14$7 = {\n\t\tkey: 0,\n\t\tclass: \"schema-field-error\",\n\t\t\"data-field-error\": \"\"\n\t};\n\tvar _hoisted_15$7 = { class: \"field\" };\n\tvar _hoisted_16$7 = [\n\t\t\"data-field-input\",\n\t\t\"value\",\n\t\t\"onChange\"\n\t];\n\tvar _hoisted_17$6 = [\"value\"];\n\tvar _hoisted_18$5 = {\n\t\tkey: 0,\n\t\tclass: \"schema-field-error\",\n\t\t\"data-field-error\": \"\"\n\t};\n\tvar _hoisted_19$5 = { class: \"field\" };\n\tvar _hoisted_20$5 = { class: \"modal-toolbar\" };\n\tvar _hoisted_21$5 = [\n\t\t\"data-add-record\",\n\t\t\"title\",\n\t\t\"disabled\",\n\t\t\"onClick\"\n\t];\n\tvar _hoisted_22$5 = { class: \"modal-meta\" };\n\tvar _hoisted_23$5 = {\n\t\tkey: 0,\n\t\tclass: \"schema-field-error\",\n\t\t\"data-field-error\": \"\"\n\t};\n\tvar _hoisted_24$5 = [\"data-record-table\"];\n\tvar _hoisted_25$5 = { class: \"data-row header schema-record-row\" };\n\tvar _hoisted_26$5 = [\"data-record-row\"];\n\tvar _hoisted_27$4 = { class: \"field\" };\n\tvar _hoisted_28$4 = [\n\t\t\"data-record-key\",\n\t\t\"value\",\n\t\t\"onChange\"\n\t];\n\tvar _hoisted_29$4 = [\"value\"];\n\tvar _hoisted_30$4 = [\n\t\t\"data-record-key\",\n\t\t\"value\",\n\t\t\"placeholder\",\n\t\t\"onInput\"\n\t];\n\tvar _hoisted_31$4 = {\n\t\tkey: 0,\n\t\tclass: \"record-cell-label\"\n\t};\n\tvar _hoisted_32$4 = {\n\t\tkey: 1,\n\t\tclass: \"checkline\"\n\t};\n\tvar _hoisted_33$4 = [\n\t\t\"data-record-input\",\n\t\t\"checked\",\n\t\t\"onChange\"\n\t];\n\tvar _hoisted_34$4 = [\n\t\t\"data-record-input\",\n\t\t\"value\",\n\t\t\"onChange\"\n\t];\n\tvar _hoisted_35$4 = [\"value\"];\n\tvar _hoisted_36$4 = [\n\t\t\"data-record-input\",\n\t\t\"value\",\n\t\t\"min\",\n\t\t\"max\",\n\t\t\"onInput\"\n\t];\n\tvar _hoisted_37$4 = [\n\t\t\"data-record-input\",\n\t\t\"value\",\n\t\t\"placeholder\",\n\t\t\"onInput\"\n\t];\n\tvar _hoisted_38$4 = {\n\t\tkey: 5,\n\t\tclass: \"schema-field-error\",\n\t\t\"data-field-error\": \"\"\n\t};\n\tvar _hoisted_39$4 = [\n\t\t\"data-delete-record\",\n\t\t\"title\",\n\t\t\"onClick\"\n\t];\n\tvar _hoisted_40$4 = {\n\t\tkey: 0,\n\t\tclass: \"record-empty\"\n\t};\n\t//#endregion\n\t//#region src/web-editor/client/components/SchemaForm.vue\n\tvar SchemaForm_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({\n\t\t__name: \"SchemaForm\",\n\t\tprops: {\n\t\t\tschema: {},\n\t\t\tvalues: {}\n\t\t},\n\t\temits: [\"change\", \"status\"],\n\t\tsetup(__props, { emit: __emit }) {\n\t\t\tconst props = __props;\n\t\t\tconst emit = __emit;\n\t\t\tconst recordRows = /* @__PURE__ */ reactive({});\n\t\t\tconst recordCollisions = /* @__PURE__ */ reactive({});\n\t\t\tconst errors = /* @__PURE__ */ ref({});\n\t\t\tlet nextRecordId = 1;\n\t\t\tfunction recordRowsForField(field) {\n\t\t\t\tconst record = props.values[field.key];\n\t\t\t\tconst rows = [];\n\t\t\t\tif (isPlainObject(record)) for (const [key, value] of Object.entries(record)) rows.push({\n\t\t\t\t\t__id: nextRecordId++,\n\t\t\t\t\tkey,\n\t\t\t\t\tvalue: isPlainObject(value) ? { ...value } : {}\n\t\t\t\t});\n\t\t\t\treturn rows;\n\t\t\t}\n\t\t\tfunction initRecordRows() {\n\t\t\t\tfor (const field of props.schema.fields) if (field.type === \"record\") recordRows[field.key] = recordRowsForField(field);\n\t\t\t}\n\t\t\tinitRecordRows();\n\t\t\tfunction report() {\n\t\t\t\tconst merged = { ...validateValues(props.schema, props.values).errors };\n\t\t\t\tfor (const [key, message] of Object.entries(recordCollisions)) if (message) merged[key] = message;\n\t\t\t\terrors.value = merged;\n\t\t\t\tconst first = Object.keys(merged)[0] ? merged[Object.keys(merged)[0]] : \"\";\n\t\t\t\temit(\"change\", first, props.values);\n\t\t\t}\n\t\t\twatch(() => props.values, () => report(), {\n\t\t\t\tdeep: true,\n\t\t\t\tflush: \"sync\"\n\t\t\t});\n\t\t\terrors.value = { ...validateValues(props.schema, props.values).errors };\n\t\t\tfunction setBoolean(field, event) {\n\t\t\t\tprops.values[field.key] = event.target.checked;\n\t\t\t}\n\t\t\tfunction setString(field, event) {\n\t\t\t\tprops.values[field.key] = event.target.value;\n\t\t\t}\n\t\t\tfunction setNumber(field, event) {\n\t\t\t\tconst raw = event.target.value;\n\t\t\t\tconst num = Number(raw);\n\t\t\t\tprops.values[field.key] = raw === \"\" ? \"\" : Number.isFinite(num) ? num : raw;\n\t\t\t}\n\t\t\tfunction setEnum(field, event) {\n\t\t\t\tprops.values[field.key] = event.target.value;\n\t\t\t}\n\t\t\tfunction stringValue(field) {\n\t\t\t\tconst value = props.values[field.key];\n\t\t\t\treturn typeof value === \"string\" ? value : value === null || value === void 0 ? \"\" : String(value);\n\t\t\t}\n\t\t\tfunction numberValue(field) {\n\t\t\t\tconst value = props.values[field.key];\n\t\t\t\tif (value === void 0 || value === null || value === \"\") return \"\";\n\t\t\t\treturn String(value);\n\t\t\t}\n\t\t\tfunction enumValue(field) {\n\t\t\t\tconst value = props.values[field.key];\n\t\t\t\treturn typeof value === \"string\" ? value : enumOptions(field)[0]?.value ?? \"\";\n\t\t\t}\n\t\t\tfunction booleanValue(field) {\n\t\t\t\treturn props.values[field.key] === true;\n\t\t\t}\n\t\t\tfunction placeholder(field) {\n\t\t\t\treturn field.placeholder ?? \"\";\n\t\t\t}\n\t\t\tfunction recordKeyLabel(field) {\n\t\t\t\treturn field.keyLabel ?? t(\"schema.key\");\n\t\t\t}\n\t\t\tfunction recordKeyOptions(field, row) {\n\t\t\t\tconst rows = recordRows[field.key] ?? [];\n\t\t\t\tconst used = new Set(rows.filter((candidate) => candidate !== row).map((candidate) => candidate.key));\n\t\t\t\tconst options = (field.keyOptions ?? []).map((option) => typeof option === \"string\" ? {\n\t\t\t\t\tvalue: option,\n\t\t\t\t\tlabel: option\n\t\t\t\t} : {\n\t\t\t\t\tvalue: option.value,\n\t\t\t\t\tlabel: option.label ?? option.value\n\t\t\t\t});\n\t\t\t\tif (row?.key && !options.some((option) => option.value === row.key)) options.push({\n\t\t\t\t\tvalue: row.key,\n\t\t\t\t\tlabel: t(\"schema.keyUnavailable\", { key: row.key })\n\t\t\t\t});\n\t\t\t\treturn options.filter((option) => !used.has(option.value));\n\t\t\t}\n\t\t\tfunction canAddRecordRow(field) {\n\t\t\t\treturn field.keyOptions === void 0 || recordKeyOptions(field).length > 0;\n\t\t\t}\n\t\t\tfunction addRecordRow(field) {\n\t\t\t\tconst rows = recordRows[field.key] ??= [];\n\t\t\t\tconst existing = new Set(rows.map((row) => row.key.trim()).filter(Boolean));\n\t\t\t\tlet key;\n\t\t\t\tif (field.keyOptions !== void 0) {\n\t\t\t\t\tconst option = recordKeyOptions(field)[0];\n\t\t\t\t\tif (!option) {\n\t\t\t\t\t\temit(\"status\", t(\"schema.allHaveEntries\", { key: recordKeyLabel(field).toLowerCase() }), \"error\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tkey = option.value;\n\t\t\t\t} else {\n\t\t\t\t\tconst base = field.keyPlaceholder || \"entry\";\n\t\t\t\t\tkey = base;\n\t\t\t\t\tlet suffix = 2;\n\t\t\t\t\twhile (existing.has(key)) key = `${base}-${suffix++}`;\n\t\t\t\t}\n\t\t\t\tconst value = {};\n\t\t\t\tfor (const rowField of field.recordFields ?? []) value[rowField.key] = defaultValueForField(rowField);\n\t\t\t\trows.push({\n\t\t\t\t\t__id: nextRecordId++,\n\t\t\t\t\tkey,\n\t\t\t\t\tvalue\n\t\t\t\t});\n\t\t\t\tsyncRecord(field);\n\t\t\t}\n\t\t\tfunction removeRecordRow(field, index) {\n\t\t\t\tconst rows = recordRows[field.key];\n\t\t\t\tif (!rows) return;\n\t\t\t\trows.splice(index, 1);\n\t\t\t\tsyncRecord(field);\n\t\t\t}\n\t\t\tfunction setRecordRowKey(field, index, event) {\n\t\t\t\tconst rows = recordRows[field.key];\n\t\t\t\tif (!rows) return;\n\t\t\t\trows[index].key = event.target.value;\n\t\t\t\tsyncRecord(field);\n\t\t\t}\n\t\t\tfunction syncRecord(field) {\n\t\t\t\tconst rows = recordRows[field.key] ?? [];\n\t\t\t\tconst next = {};\n\t\t\t\tconst seen = /* @__PURE__ */ new Set();\n\t\t\t\tlet collision = \"\";\n\t\t\t\tfor (const row of rows) {\n\t\t\t\t\tconst key = row.key.trim();\n\t\t\t\t\tif (!key) {\n\t\t\t\t\t\tcollision ||= t(\"schema.needKey\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (seen.has(key)) {\n\t\t\t\t\t\tcollision ||= t(\"schema.uniqueKeys\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tseen.add(key);\n\t\t\t\t\tnext[key] = { ...row.value };\n\t\t\t\t}\n\t\t\t\tif (collision) {\n\t\t\t\t\trecordCollisions[field.key] = collision;\n\t\t\t\t\treport();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tdelete recordCollisions[field.key];\n\t\t\t\tprops.values[field.key] = next;\n\t\t\t}\n\t\t\tfunction recordCellText(row, rowField) {\n\t\t\t\tconst value = row.value[rowField.key];\n\t\t\t\tif (value === void 0 || value === null || value === \"\") return \"\";\n\t\t\t\treturn String(value);\n\t\t\t}\n\t\t\tfunction recordCellBoolean(row, rowField) {\n\t\t\t\treturn row.value[rowField.key] === true;\n\t\t\t}\n\t\t\tfunction recordCellEnum(row, rowField) {\n\t\t\t\tconst value = row.value[rowField.key];\n\t\t\t\treturn typeof value === \"string\" ? value : enumOptions(rowField)[0]?.value ?? \"\";\n\t\t\t}\n\t\t\tfunction setRecordCellString(field, row, rowField, event) {\n\t\t\t\trow.value[rowField.key] = event.target.value;\n\t\t\t\tsyncRecord(field);\n\t\t\t}\n\t\t\tfunction setRecordCellNumber(field, row, rowField, event) {\n\t\t\t\tconst raw = event.target.value;\n\t\t\t\tconst num = Number(raw);\n\t\t\t\trow.value[rowField.key] = raw === \"\" ? \"\" : Number.isFinite(num) ? num : raw;\n\t\t\t\tsyncRecord(field);\n\t\t\t}\n\t\t\tfunction setRecordCellEnum(field, row, rowField, event) {\n\t\t\t\trow.value[rowField.key] = event.target.value;\n\t\t\t\tsyncRecord(field);\n\t\t\t}\n\t\t\tfunction setRecordCellBoolean(field, row, rowField, event) {\n\t\t\t\trow.value[rowField.key] = event.target.checked;\n\t\t\t\tsyncRecord(field);\n\t\t\t}\n\t\t\tfunction recordRowError(field, row, rowField) {\n\t\t\t\treturn errors.value[`${field.key}.${row.key}.${rowField.key}`] ?? \"\";\n\t\t\t}\n\t\t\treturn (_ctx, _cache) => {\n\t\t\t\treturn openBlock(), createElementBlock(\"div\", _hoisted_1$7, [createBaseVNode(\"div\", null, [props.schema.title ? (openBlock(), createElementBlock(\"div\", _hoisted_2$7, toDisplayString(props.schema.title), 1)) : createCommentVNode(\"v-if\", true), props.schema.description ? (openBlock(), createElementBlock(\"div\", _hoisted_3$7, toDisplayString(props.schema.description), 1)) : createCommentVNode(\"v-if\", true)]), (openBlock(true), createElementBlock(Fragment, null, renderList(props.schema.fields, (field) => {\n\t\t\t\t\treturn openBlock(), createElementBlock(\"div\", {\n\t\t\t\t\t\tkey: field.key,\n\t\t\t\t\t\tclass: \"tab-section schema-field\",\n\t\t\t\t\t\t\"data-field\": field.key\n\t\t\t\t\t}, [\n\t\t\t\t\t\tfield.description ? (openBlock(), createElementBlock(\"div\", _hoisted_5$7, toDisplayString(field.description), 1)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\tcreateCommentVNode(\" boolean \"),\n\t\t\t\t\t\tfield.type === \"boolean\" ? (openBlock(), createElementBlock(\"div\", _hoisted_6$7, [createBaseVNode(\"label\", _hoisted_7$7, [createBaseVNode(\"input\", {\n\t\t\t\t\t\t\ttype: \"checkbox\",\n\t\t\t\t\t\t\t\"data-field-input\": field.key,\n\t\t\t\t\t\t\tchecked: booleanValue(field),\n\t\t\t\t\t\t\tonChange: ($event) => setBoolean(field, $event)\n\t\t\t\t\t\t}, null, 40, _hoisted_8$7), createTextVNode(\" \" + toDisplayString(field.label), 1)])])) : field.type === \"string\" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createCommentVNode(\" string \"), createBaseVNode(\"div\", _hoisted_9$7, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"label\", null, toDisplayString(field.label), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\t\t\"data-field-input\": field.key,\n\t\t\t\t\t\t\t\tvalue: stringValue(field),\n\t\t\t\t\t\t\t\tplaceholder: placeholder(field),\n\t\t\t\t\t\t\t\tonInput: ($event) => setString(field, $event)\n\t\t\t\t\t\t\t}, null, 40, _hoisted_10$7),\n\t\t\t\t\t\t\terrors.value[field.key] ? (openBlock(), createElementBlock(\"div\", _hoisted_11$7, toDisplayString(errors.value[field.key]), 1)) : createCommentVNode(\"v-if\", true)\n\t\t\t\t\t\t])], 2112)) : field.type === \"number\" ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [createCommentVNode(\" number \"), createBaseVNode(\"div\", _hoisted_12$7, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"label\", null, toDisplayString(field.label), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t\t\t\"data-field-input\": field.key,\n\t\t\t\t\t\t\t\tvalue: numberValue(field),\n\t\t\t\t\t\t\t\tmin: field.min,\n\t\t\t\t\t\t\t\tmax: field.max,\n\t\t\t\t\t\t\t\tplaceholder: placeholder(field),\n\t\t\t\t\t\t\t\tonInput: ($event) => setNumber(field, $event)\n\t\t\t\t\t\t\t}, null, 40, _hoisted_13$7),\n\t\t\t\t\t\t\terrors.value[field.key] ? (openBlock(), createElementBlock(\"div\", _hoisted_14$7, toDisplayString(errors.value[field.key]), 1)) : createCommentVNode(\"v-if\", true)\n\t\t\t\t\t\t])], 2112)) : field.type === \"enum\" ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [createCommentVNode(\" enum \"), createBaseVNode(\"div\", _hoisted_15$7, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"label\", null, toDisplayString(field.label), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"select\", {\n\t\t\t\t\t\t\t\t\"data-field-input\": field.key,\n\t\t\t\t\t\t\t\tvalue: enumValue(field),\n\t\t\t\t\t\t\t\tonChange: ($event) => setEnum(field, $event)\n\t\t\t\t\t\t\t}, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(enumOptions)(field), (option) => {\n\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"option\", {\n\t\t\t\t\t\t\t\t\tkey: option.value,\n\t\t\t\t\t\t\t\t\tvalue: option.value\n\t\t\t\t\t\t\t\t}, toDisplayString(option.label || option.value), 9, _hoisted_17$6);\n\t\t\t\t\t\t\t}), 128))], 40, _hoisted_16$7),\n\t\t\t\t\t\t\terrors.value[field.key] ? (openBlock(), createElementBlock(\"div\", _hoisted_18$5, toDisplayString(errors.value[field.key]), 1)) : createCommentVNode(\"v-if\", true)\n\t\t\t\t\t\t])], 2112)) : field.type === \"record\" ? (openBlock(), createElementBlock(Fragment, { key: 5 }, [createCommentVNode(\" record (per-profile table) \"), createBaseVNode(\"div\", _hoisted_19$5, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"label\", null, toDisplayString(field.label), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_20$5, [\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\t\"data-icon\": \"+\",\n\t\t\t\t\t\t\t\t\t\"data-add-record\": field.key,\n\t\t\t\t\t\t\t\t\ttitle: unref(t)(\"schema.addEntryTitle\", { key: recordKeyLabel(field).toLowerCase() }),\n\t\t\t\t\t\t\t\t\tdisabled: !canAddRecordRow(field),\n\t\t\t\t\t\t\t\t\tonClick: ($event) => addRecordRow(field)\n\t\t\t\t\t\t\t\t}, toDisplayString(unref(t)(\"schema.addEntry\")), 9, _hoisted_21$5),\n\t\t\t\t\t\t\t\t_cache[0] || (_cache[0] = createBaseVNode(\"span\", { class: \"modal-spacer\" }, null, -1)),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_22$5, toDisplayString(unref(t)(\"schema.oneEntryPer\", { key: recordKeyLabel(field).toLowerCase() })), 1)\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\terrors.value[field.key] ? (openBlock(), createElementBlock(\"div\", _hoisted_23$5, toDisplayString(errors.value[field.key]), 1)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", {\n\t\t\t\t\t\t\t\tclass: \"data-table\",\n\t\t\t\t\t\t\t\t\"data-record-table\": field.key\n\t\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_25$5, [\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, toDisplayString(recordKeyLabel(field)), 1),\n\t\t\t\t\t\t\t\t\t(openBlock(true), createElementBlock(Fragment, null, renderList(field.recordFields ?? [], (rowField) => {\n\t\t\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"div\", { key: rowField.key }, toDisplayString(rowField.label), 1);\n\t\t\t\t\t\t\t\t\t}), 128)),\n\t\t\t\t\t\t\t\t\t_cache[1] || (_cache[1] = createBaseVNode(\"div\", null, null, -1))\n\t\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\t\t(openBlock(true), createElementBlock(Fragment, null, renderList(recordRows[field.key] ?? [], (row, index) => {\n\t\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"div\", {\n\t\t\t\t\t\t\t\t\t\tkey: row.__id,\n\t\t\t\t\t\t\t\t\t\tclass: \"data-row schema-record-row\",\n\t\t\t\t\t\t\t\t\t\t\"data-record-row\": index\n\t\t\t\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_27$4, [field.keyOptions !== void 0 ? (openBlock(), createElementBlock(\"select\", {\n\t\t\t\t\t\t\t\t\t\t\tkey: 0,\n\t\t\t\t\t\t\t\t\t\t\t\"data-record-key\": field.key,\n\t\t\t\t\t\t\t\t\t\t\tvalue: row.key,\n\t\t\t\t\t\t\t\t\t\t\tonChange: ($event) => setRecordRowKey(field, index, $event)\n\t\t\t\t\t\t\t\t\t\t}, [(openBlock(true), createElementBlock(Fragment, null, renderList(recordKeyOptions(field, row), (option) => {\n\t\t\t\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"option\", {\n\t\t\t\t\t\t\t\t\t\t\t\tkey: option.value,\n\t\t\t\t\t\t\t\t\t\t\t\tvalue: option.value\n\t\t\t\t\t\t\t\t\t\t\t}, toDisplayString(option.label), 9, _hoisted_29$4);\n\t\t\t\t\t\t\t\t\t\t}), 128))], 40, _hoisted_28$4)) : (openBlock(), createElementBlock(\"input\", {\n\t\t\t\t\t\t\t\t\t\t\tkey: 1,\n\t\t\t\t\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\t\t\t\t\t\"data-record-key\": field.key,\n\t\t\t\t\t\t\t\t\t\t\tvalue: row.key,\n\t\t\t\t\t\t\t\t\t\t\tplaceholder: field.keyPlaceholder,\n\t\t\t\t\t\t\t\t\t\t\tonInput: ($event) => setRecordRowKey(field, index, $event)\n\t\t\t\t\t\t\t\t\t\t}, null, 40, _hoisted_30$4))]),\n\t\t\t\t\t\t\t\t\t\t(openBlock(true), createElementBlock(Fragment, null, renderList(field.recordFields ?? [], (rowField) => {\n\t\t\t\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"div\", {\n\t\t\t\t\t\t\t\t\t\t\t\tkey: rowField.key,\n\t\t\t\t\t\t\t\t\t\t\t\tclass: \"field\"\n\t\t\t\t\t\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\t\t\t\t\t\trowField.type !== \"boolean\" ? (openBlock(), createElementBlock(\"label\", _hoisted_31$4, toDisplayString(rowField.label), 1)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\t\t\t\t\t\trowField.type === \"boolean\" ? (openBlock(), createElementBlock(\"label\", _hoisted_32$4, [createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype: \"checkbox\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"data-record-input\": `${field.key}.${row.key}.${rowField.key}`,\n\t\t\t\t\t\t\t\t\t\t\t\t\tchecked: recordCellBoolean(row, rowField),\n\t\t\t\t\t\t\t\t\t\t\t\t\tonChange: ($event) => setRecordCellBoolean(field, row, rowField, $event)\n\t\t\t\t\t\t\t\t\t\t\t\t}, null, 40, _hoisted_33$4), createTextVNode(\" \" + toDisplayString(rowField.label), 1)])) : rowField.type === \"enum\" ? (openBlock(), createElementBlock(\"select\", {\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey: 2,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"data-record-input\": `${field.key}.${row.key}.${rowField.key}`,\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue: recordCellEnum(row, rowField),\n\t\t\t\t\t\t\t\t\t\t\t\t\tonChange: ($event) => setRecordCellEnum(field, row, rowField, $event)\n\t\t\t\t\t\t\t\t\t\t\t\t}, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(enumOptions)(rowField), (option) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"option\", {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey: option.value,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue: option.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t}, toDisplayString(option.label || option.value), 9, _hoisted_35$4);\n\t\t\t\t\t\t\t\t\t\t\t\t}), 128))], 40, _hoisted_34$4)) : rowField.type === \"number\" ? (openBlock(), createElementBlock(\"input\", {\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey: 3,\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"data-record-input\": `${field.key}.${row.key}.${rowField.key}`,\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue: recordCellText(row, rowField),\n\t\t\t\t\t\t\t\t\t\t\t\t\tmin: rowField.min,\n\t\t\t\t\t\t\t\t\t\t\t\t\tmax: rowField.max,\n\t\t\t\t\t\t\t\t\t\t\t\t\tonInput: ($event) => setRecordCellNumber(field, row, rowField, $event)\n\t\t\t\t\t\t\t\t\t\t\t\t}, null, 40, _hoisted_36$4)) : (openBlock(), createElementBlock(\"input\", {\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey: 4,\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"data-record-input\": `${field.key}.${row.key}.${rowField.key}`,\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue: recordCellText(row, rowField),\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder: rowField.placeholder,\n\t\t\t\t\t\t\t\t\t\t\t\t\tonInput: ($event) => setRecordCellString(field, row, rowField, $event)\n\t\t\t\t\t\t\t\t\t\t\t\t}, null, 40, _hoisted_37$4)),\n\t\t\t\t\t\t\t\t\t\t\t\trecordRowError(field, row, rowField) ? (openBlock(), createElementBlock(\"div\", _hoisted_38$4, toDisplayString(recordRowError(field, row, rowField)), 1)) : createCommentVNode(\"v-if\", true)\n\t\t\t\t\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t\t\t\t\t}), 128)),\n\t\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, [createBaseVNode(\"button\", {\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: \"danger\",\n\t\t\t\t\t\t\t\t\t\t\t\"data-icon\": \"×\",\n\t\t\t\t\t\t\t\t\t\t\t\"data-delete-record\": field.key,\n\t\t\t\t\t\t\t\t\t\t\ttitle: unref(t)(\"schema.deleteEntryTitle\"),\n\t\t\t\t\t\t\t\t\t\t\tonClick: ($event) => removeRecordRow(field, index)\n\t\t\t\t\t\t\t\t\t\t}, toDisplayString(unref(t)(\"common.delete\")), 9, _hoisted_39$4)])\n\t\t\t\t\t\t\t\t\t], 8, _hoisted_26$5);\n\t\t\t\t\t\t\t\t}), 128)),\n\t\t\t\t\t\t\t\t!(recordRows[field.key] ?? []).length ? (openBlock(), createElementBlock(\"div\", _hoisted_40$4, toDisplayString(unref(t)(\"schema.noEntries\")), 1)) : createCommentVNode(\"v-if\", true)\n\t\t\t\t\t\t\t], 8, _hoisted_24$5)\n\t\t\t\t\t\t])], 2112)) : createCommentVNode(\"v-if\", true)\n\t\t\t\t\t], 8, _hoisted_4$7);\n\t\t\t\t}), 128))]);\n\t\t\t};\n\t\t}\n\t}), [[\"__scopeId\", \"data-v-f9733942\"]]);\n\t//#endregion\n\t//#region src/web-editor/client/vue-schema-form-host.ts\n\tinit_vue_runtime_esm_bundler();\n\t/**\n\t* Generic schema-form host, mirroring the existing vue-item/vue-metadata/vue-tab\n\t* host pattern: it owns the form draft, mounts the self-contained SchemaForm\n\t* component into a root element, and bridges change events back to the owner.\n\t*/\n\tfunction createVueSchemaFormHost(deps) {\n\t\tlet app;\n\t\tlet draft;\n\t\tlet error = \"\";\n\t\tfunction mount(root) {\n\t\t\tunmount();\n\t\t\tconst schema = deps.getSchema();\n\t\t\tdraft = /* @__PURE__ */ reactive(normalizeValues(schema, cloneJson$1(deps.getValues())));\n\t\t\tapp = createApp(SchemaForm_default, {\n\t\t\t\tschema,\n\t\t\t\tvalues: draft,\n\t\t\t\tonChange: (nextError, values) => {\n\t\t\t\t\terror = nextError;\n\t\t\t\t\tdeps.markDirty();\n\t\t\t\t\tif (nextError) deps.setStatus(nextError, \"error\");\n\t\t\t\t\tdeps.onChange?.(cloneJson$1(values), nextError);\n\t\t\t\t},\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\terror = \"\";\n\t\t}\n\t\tfunction reset() {\n\t\t\terror = \"\";\n\t\t}\n\t\tfunction getError() {\n\t\t\treturn error;\n\t\t}\n\t\t/** Deep clone of the current form draft, or undefined before mounting. */\n\t\tfunction getValues() {\n\t\t\treturn draft === void 0 ? void 0 : cloneJson$1(draft);\n\t\t}\n\t\treturn {\n\t\t\tmount,\n\t\t\tunmount,\n\t\t\treset,\n\t\t\tgetError,\n\t\t\tgetValues\n\t\t};\n\t}\n\t//#endregion\n\t//#region src/web-editor/client/contribution-settings.ts\n\tfunction settingsContributionButtonId(tabId) {\n\t\treturn `settings-${encodeURIComponent(tabId)}TabBtn`;\n\t}\n\tfunction uniqueContributionDescriptors(tabs) {\n\t\tconst seen = /* @__PURE__ */ new Set();\n\t\treturn tabs.filter((tab) => {\n\t\t\tif (seen.has(tab.tabId)) return false;\n\t\t\tseen.add(tab.tabId);\n\t\t\treturn true;\n\t\t});\n\t}\n\t//#endregion\n\t//#region src/web-editor/client/contrib-tab-host.ts\n\tinit_api();\n\tinit_i18n();\n\tfunction startContributionTabs(options = {}) {\n\t\tconst api = createEditorApi(new URLSearchParams(location.search).get(\"token\") || \"\");\n\t\tconst nav = document.getElementById(\"contribSettingsNav\");\n\t\tconst panel = document.getElementById(\"contribSettingsPanel\");\n\t\tif (!nav || !panel) return () => {};\n\t\tconst navElement = nav;\n\t\tconst panelElement = panel;\n\t\tlet disposed = false;\n\t\tlet activeTabId;\n\t\tlet descriptors = [];\n\t\tlet providerKey;\n\t\tconst saveTimers = /* @__PURE__ */ new Map();\n\t\tconst editRevisions = /* @__PURE__ */ new Map();\n\t\tconst savedRevisions = /* @__PURE__ */ new Map();\n\t\tconst draftValues = /* @__PURE__ */ new Map();\n\t\tconst tabStatuses = /* @__PURE__ */ new Map();\n\t\tconst queuedSaves = /* @__PURE__ */ new Map();\n\t\tconst saveOrder = [];\n\t\tlet saveInFlight = false;\n\t\tlet refreshTimer;\n\t\tlet refreshSequence = 0;\n\t\tlet committedSaveEpoch = 0;\n\t\tlet schemaFormHost;\n\t\tconst statusElement = document.getElementById(\"settingsStatus\");\n\t\tlet placeholderActive = true;\n\t\tfunction setStatus(text, tone = \"\") {\n\t\t\tif (!statusElement) return;\n\t\t\tplaceholderActive = false;\n\t\t\tstatusElement.textContent = text;\n\t\t\tstatusElement.style.color = tone === \"error\" ? \"var(--error)\" : tone === \"success\" ? \"var(--success)\" : \"var(--muted)\";\n\t\t}\n\t\tfunction setTabStatus(tabId, text, tone = \"\") {\n\t\t\ttabStatuses.set(tabId, {\n\t\t\t\ttext,\n\t\t\t\ttone\n\t\t\t});\n\t\t\tif (activeTabId === tabId) setStatus(text, tone);\n\t\t}\n\t\tfunction showActiveStatus() {\n\t\t\tif (!activeTabId) return;\n\t\t\tconst status = tabStatuses.get(activeTabId);\n\t\t\tif (status) setStatus(status.text, status.tone);\n\t\t\telse setStatus(t(\"settings.ready\"));\n\t\t}\n\t\tfunction isDirty(tabId) {\n\t\t\treturn (editRevisions.get(tabId) ?? 0) !== (savedRevisions.get(tabId) ?? 0);\n\t\t}\n\t\tfunction setContributionActive() {\n\t\t\tfor (const button of navElement.querySelectorAll(\"[data-contrib-tab]\")) button.classList.toggle(\"active\", button.dataset.contribTab === activeTabId);\n\t\t}\n\t\tfunction clearActiveState() {\n\t\t\tactiveTabId = void 0;\n\t\t\tschemaFormHost?.unmount();\n\t\t\tschemaFormHost = void 0;\n\t\t\tsetContributionActive();\n\t\t\tpanelElement.replaceChildren();\n\t\t}\n\t\tfunction activate(tab) {\n\t\t\tactiveTabId = tab.tabId;\n\t\t\tsetContributionActive();\n\t\t\tmount(tab);\n\t\t\tshowActiveStatus();\n\t\t}\n\t\tfunction mount(tab) {\n\t\t\tschemaFormHost?.unmount();\n\t\t\tschemaFormHost = createVueSchemaFormHost({\n\t\t\t\tgetSchema: () => tab.schema,\n\t\t\t\tgetValues: () => draftValues.get(tab.tabId) ?? tab.values,\n\t\t\t\tmarkDirty: () => {},\n\t\t\t\tsetStatus: (text, tone) => setTabStatus(tab.tabId, text, tone),\n\t\t\t\tonChange: (values, error) => {\n\t\t\t\t\tdraftValues.set(tab.tabId, cloneJson$1(values));\n\t\t\t\t\tconst revision = (editRevisions.get(tab.tabId) ?? 0) + 1;\n\t\t\t\t\teditRevisions.set(tab.tabId, revision);\n\t\t\t\t\tcancelQueuedSave(tab.tabId);\n\t\t\t\t\tif (error) {\n\t\t\t\t\t\tclearSaveTimer(tab.tabId);\n\t\t\t\t\t\tsetTabStatus(tab.tabId, error, \"error\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tsetTabStatus(tab.tabId, t(\"status.unsavedChanges\"));\n\t\t\t\t\tclearSaveTimer(tab.tabId);\n\t\t\t\t\tconst timer = window.setTimeout(() => {\n\t\t\t\t\t\tsaveTimers.delete(tab.tabId);\n\t\t\t\t\t\tenqueueSave({\n\t\t\t\t\t\t\ttabId: tab.tabId,\n\t\t\t\t\t\t\tvalues,\n\t\t\t\t\t\t\trevision\n\t\t\t\t\t\t});\n\t\t\t\t\t}, 250);\n\t\t\t\t\tsaveTimers.set(tab.tabId, timer);\n\t\t\t\t}\n\t\t\t});\n\t\t\tschemaFormHost.mount(panelElement);\n\t\t}\n\t\tfunction clearSaveTimer(tabId) {\n\t\t\tconst timer = saveTimers.get(tabId);\n\t\t\tif (timer !== void 0) window.clearTimeout(timer);\n\t\t\tsaveTimers.delete(tabId);\n\t\t}\n\t\tfunction enqueueSave(job) {\n\t\t\tif (!queuedSaves.has(job.tabId)) saveOrder.push(job.tabId);\n\t\t\tqueuedSaves.set(job.tabId, job);\n\t\t\tdrainSaveQueue();\n\t\t}\n\t\tfunction cancelQueuedSave(tabId) {\n\t\t\tif (!queuedSaves.delete(tabId)) return;\n\t\t\tconst index = saveOrder.indexOf(tabId);\n\t\t\tif (index >= 0) saveOrder.splice(index, 1);\n\t\t}\n\t\tasync function drainSaveQueue() {\n\t\t\tif (saveInFlight) return;\n\t\t\tsaveInFlight = true;\n\t\t\ttry {\n\t\t\t\twhile (!disposed && saveOrder.length > 0) {\n\t\t\t\t\tconst tabId = saveOrder.shift();\n\t\t\t\t\tconst job = queuedSaves.get(tabId);\n\t\t\t\t\tqueuedSaves.delete(tabId);\n\t\t\t\t\tif (job) await save(job);\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tsaveInFlight = false;\n\t\t\t}\n\t\t}\n\t\tasync function save(job) {\n\t\t\tconst { tabId, values, revision } = job;\n\t\t\tconst requestProviderKey = providerKey;\n\t\t\tif (revision === editRevisions.get(tabId)) setTabStatus(tabId, t(\"settings.saving\"));\n\t\t\ttry {\n\t\t\t\tconst response = await api(`/api/contrib/${encodeURIComponent(tabId)}`, {\n\t\t\t\t\tmethod: \"PUT\",\n\t\t\t\t\tbody: values\n\t\t\t\t});\n\t\t\t\tif (disposed || revision !== editRevisions.get(tabId)) return;\n\t\t\t\tif (requestProviderKey !== providerKey) {\n\t\t\t\t\tconst latestValues = draftValues.get(tabId) ?? values;\n\t\t\t\t\tsetTabStatus(tabId, t(\"settings.providerRetrying\"));\n\t\t\t\t\tenqueueSave({\n\t\t\t\t\t\ttabId,\n\t\t\t\t\t\tvalues: cloneJson$1(latestValues),\n\t\t\t\t\t\trevision\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst canonicalValues = response.values ?? values;\n\t\t\t\tconst mountedValues = activeTabId === tabId ? schemaFormHost?.getValues() : void 0;\n\t\t\t\tcommittedSaveEpoch += 1;\n\t\t\t\tdraftValues.set(tabId, cloneJson$1(canonicalValues));\n\t\t\t\tsavedRevisions.set(tabId, revision);\n\t\t\t\tconst current = descriptors.find((candidate) => candidate.tabId === tabId);\n\t\t\t\tif (current) current.values = canonicalValues;\n\t\t\t\tif (current && mountedValues && JSON.stringify(mountedValues) !== JSON.stringify(canonicalValues)) mount(current);\n\t\t\t\tsetTabStatus(tabId, t(\"settings.saved\"), \"success\");\n\t\t\t} catch (error) {\n\t\t\t\tif (!disposed && revision === editRevisions.get(tabId)) setTabStatus(tabId, error instanceof Error ? error.message : String(error), \"error\");\n\t\t\t}\n\t\t}\n\t\tfunction renderButtons() {\n\t\t\tfor (const button of navElement.querySelectorAll(\"[data-contrib-tab]\")) button.remove();\n\t\t\tfor (const tab of descriptors) {\n\t\t\t\tconst button = document.createElement(\"button\");\n\t\t\t\tbutton.type = \"button\";\n\t\t\t\tbutton.className = \"\";\n\t\t\t\tbutton.id = settingsContributionButtonId(tab.tabId);\n\t\t\t\tbutton.dataset.contribTab = tab.tabId;\n\t\t\t\tbutton.dataset.icon = tab.icon;\n\t\t\t\tbutton.title = t(\"settings.editTab\", { title: tab.title });\n\t\t\t\tbutton.textContent = tab.title;\n\t\t\t\tbutton.onclick = () => {\n\t\t\t\t\tconst descriptor = descriptors.find((candidate) => candidate.tabId === tab.tabId);\n\t\t\t\t\tif (descriptor) activate(descriptor);\n\t\t\t\t};\n\t\t\t\tnavElement.appendChild(button);\n\t\t\t}\n\t\t\tsetContributionActive();\n\t\t}\n\t\tasync function refresh() {\n\t\t\tif (disposed) return;\n\t\t\tconst sequence = ++refreshSequence;\n\t\t\tconst saveEpochAtStart = committedSaveEpoch;\n\t\t\ttry {\n\t\t\t\tconst data = await api(\"/api/contrib\");\n\t\t\t\tif (disposed || sequence !== refreshSequence || saveEpochAtStart !== committedSaveEpoch) return;\n\t\t\t\tconst nextProviderKey = typeof data.providerKey === \"string\" ? data.providerKey : null;\n\t\t\t\tconst providerChanged = providerKey !== nextProviderKey;\n\t\t\t\tproviderKey = nextProviderKey;\n\t\t\t\tconst previousDescriptors = new Map(descriptors.map((descriptor) => [descriptor.tabId, descriptor]));\n\t\t\t\tdescriptors = uniqueContributionDescriptors(Array.isArray(data.tabs) ? data.tabs : []);\n\t\t\t\tfor (const descriptor of descriptors) if (!draftValues.has(descriptor.tabId) || !isDirty(descriptor.tabId)) {\n\t\t\t\t\tdraftValues.set(descriptor.tabId, cloneJson$1(descriptor.values));\n\t\t\t\t\tif (providerChanged) {\n\t\t\t\t\t\teditRevisions.set(descriptor.tabId, 0);\n\t\t\t\t\t\tsavedRevisions.set(descriptor.tabId, 0);\n\t\t\t\t\t\ttabStatuses.delete(descriptor.tabId);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\toptions.onAvailabilityChanged?.(descriptors.length > 0);\n\t\t\t\trenderButtons();\n\t\t\t\tif (activeTabId) if (!descriptors.some((descriptor) => descriptor.tabId === activeTabId)) clearActiveState();\n\t\t\t\telse {\n\t\t\t\t\tconst descriptor = descriptors.find((candidate) => candidate.tabId === activeTabId);\n\t\t\t\t\tconst previous = previousDescriptors.get(activeTabId);\n\t\t\t\t\tconst schemaChanged = !!descriptor && JSON.stringify(previous?.schema) !== JSON.stringify(descriptor.schema);\n\t\t\t\t\tconst cleanValuesChanged = !!descriptor && !isDirty(activeTabId) && JSON.stringify(previous?.values) !== JSON.stringify(descriptor.values);\n\t\t\t\t\tif (descriptor && (!schemaFormHost || providerChanged || schemaChanged || cleanValuesChanged)) mount(descriptor);\n\t\t\t\t\tshowActiveStatus();\n\t\t\t\t}\n\t\t\t\telse if (descriptors[0]) activate(descriptors[0]);\n\t\t\t\tif (descriptors.length > 0 && placeholderActive) setStatus(t(\"settings.ready\"));\n\t\t\t} catch (error) {\n\t\t\t\tif (disposed || sequence !== refreshSequence || saveEpochAtStart !== committedSaveEpoch) return;\n\t\t\t\tclearActiveState();\n\t\t\t\tdescriptors = [];\n\t\t\t\toptions.onAvailabilityChanged?.(false);\n\t\t\t\trenderButtons();\n\t\t\t\tsetStatus(error instanceof Error ? error.message : String(error), \"error\");\n\t\t\t}\n\t\t}\n\t\trefresh();\n\t\trefreshTimer = window.setInterval(() => {\n\t\t\trefresh();\n\t\t}, 1e3);\n\t\treturn () => {\n\t\t\tdisposed = true;\n\t\t\trefreshSequence += 1;\n\t\t\tif (refreshTimer !== void 0) window.clearInterval(refreshTimer);\n\t\t\tfor (const timer of saveTimers.values()) window.clearTimeout(timer);\n\t\t\tsaveTimers.clear();\n\t\t\tqueuedSaves.clear();\n\t\t\tsaveOrder.length = 0;\n\t\t\tclearActiveState();\n\t\t\toptions.onAvailabilityChanged?.(false);\n\t\t\tfor (const button of navElement.querySelectorAll(\"[data-contrib-tab]\")) button.remove();\n\t\t};\n\t}\n\t//#endregion\n\t//#region src/web-editor/client/tab-registry.ts\n\t/** Human-readable button id for a tab, e.g. \"regex\" -> \"regexTabBtn\". */\n\tfunction editorTabButtonId(id) {\n\t\treturn `${id}TabBtn`;\n\t}\n\tfunction getEditorTab(id) {\n\t\treturn EDITOR_TABS.find((tab) => tab.id === id);\n\t}\n\t/**\n\t* Copies only the given optional stack fields from `source` into `target`,\n\t* deleting them from `target` when absent from `source`. Mirrors the previous\n\t* per-tab draft synchronization in vue-tab-host.\n\t*/\n\tfunction copyStackFields(target, source, fields) {\n\t\tconst targetRecord = target;\n\t\tconst sourceRecord = source;\n\t\tfor (const key of fields) if (key in sourceRecord) targetRecord[key] = sourceRecord[key];\n\t\telse delete targetRecord[key];\n\t}\n\tvar EDITOR_TABS;\n\tvar init_tab_registry = __esmMin((() => {\n\t\tEDITOR_TABS = [\n\t\t\t{\n\t\t\t\tid: \"items\",\n\t\t\t\tlabelKey: \"tab.items\",\n\t\t\t\ticon: \"☰\",\n\t\t\t\ttitleKey: \"tab.itemsTitle\",\n\t\t\t\tmount: \"legacy\",\n\t\t\t\tstackFields: [],\n\t\t\t\tinternalDock: false\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"regex\",\n\t\t\t\tlabelKey: \"tab.regex\",\n\t\t\t\ticon: \".*\",\n\t\t\t\ttitleKey: \"tab.regexTitle\",\n\t\t\t\tmount: \"vue\",\n\t\t\t\tstackFields: [\"regex\"],\n\t\t\t\tinternalDock: false\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"policy\",\n\t\t\t\tlabelKey: \"tab.policy\",\n\t\t\t\ticon: \"⊕\",\n\t\t\t\ttitleKey: \"tab.policyTitle\",\n\t\t\t\tmount: \"vue\",\n\t\t\t\tstackFields: [\"tools\", \"skills\"],\n\t\t\t\tinternalDock: false\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"stack\",\n\t\t\t\tlabelKey: \"tab.stack\",\n\t\t\t\ticon: \"{}\",\n\t\t\t\ttitleKey: \"tab.stackTitle\",\n\t\t\t\tmount: \"vue\",\n\t\t\t\tstackFields: [\n\t\t\t\t\t\"context\",\n\t\t\t\t\t\"variables\",\n\t\t\t\t\t\"parameters\"\n\t\t\t\t],\n\t\t\t\tinternalDock: false\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"preview\",\n\t\t\t\tlabelKey: \"tab.preview\",\n\t\t\t\ticon: \"◱\",\n\t\t\t\ttitleKey: \"tab.previewTitle\",\n\t\t\t\tmount: \"vue\",\n\t\t\t\tstackFields: [],\n\t\t\t\tinternalDock: true\n\t\t\t}\n\t\t];\n\t}));\n\t//#endregion\n\t//#region src/context-diff.ts\n\tinit_tab_registry();\n\t/** Estimate tokens from characters using the same chars/4 approximation as payload capture. */\n\tfunction estimateApproxTokens(text) {\n\t\treturn Math.max(1, Math.ceil(text.length / 4));\n\t}\n\t/** Pure string hash used as the block identity shortcut. */\n\tfunction hashText(text) {\n\t\tlet hash = 2166136261;\n\t\tfor (let i = 0; i < text.length; i++) {\n\t\t\thash ^= text.charCodeAt(i);\n\t\t\thash = Math.imul(hash, 16777619);\n\t\t}\n\t\treturn (hash >>> 0).toString(16).padStart(8, \"0\");\n\t}\n\tfunction createBlock(key, role, text, serialized) {\n\t\tconst serializedHashInput = stringifyHashInput(serialized === void 0 ? {\n\t\t\trole,\n\t\t\ttext\n\t\t} : {\n\t\t\trole,\n\t\t\ttext,\n\t\t\tserialized\n\t\t});\n\t\treturn {\n\t\t\tkey,\n\t\t\trole,\n\t\t\ttext,\n\t\t\tchars: text.length,\n\t\t\tapproxTokens: estimateApproxTokens(text),\n\t\t\thash: hashText(serializedHashInput)\n\t\t};\n\t}\n\tfunction createTurnSnapshot(input) {\n\t\treturn {\n\t\t\tturnId: input.turnId,\n\t\t\tcapturedAt: input.capturedAt ?? \"\",\n\t\t\tstackId: input.stackId ?? \"\",\n\t\t\tblocks: input.blocks ?? []\n\t\t};\n\t}\n\tfunction turnApproxTokens(turn) {\n\t\tconst chars = turn.blocks.reduce((sum, block) => sum + block.chars, 0);\n\t\treturn chars === 0 ? 0 : Math.ceil(chars / 4);\n\t}\n\tfunction commonPrefixLength(a, b) {\n\t\tconst max = Math.min(a.length, b.length);\n\t\tlet index = 0;\n\t\twhile (index < max && a.charCodeAt(index) === b.charCodeAt(index)) index++;\n\t\treturn index;\n\t}\n\tfunction stringifyHashInput(value) {\n\t\ttry {\n\t\t\tconst serialized = JSON.stringify(value);\n\t\t\treturn serialized === void 0 ? String(value) : serialized;\n\t\t} catch {\n\t\t\treturn String(value);\n\t\t}\n\t}\n\t/**\n\t* A block hash includes fields that affect the provider wire request, while\n\t* the visible block text remains the useful prompt excerpt. When a hash\n\t* differs because metadata changed without changing the excerpt, no part of\n\t* that excerpt is safe to count as a reusable prefix.\n\t*/\n\tfunction safeCommonPrefixLength(before, after) {\n\t\tif (before.role !== after.role || before.text === after.text) return 0;\n\t\treturn commonPrefixLength(before.text, after.text);\n\t}\n\tfunction classify(before, after) {\n\t\tif (before && after) {\n\t\t\tif (before.hash === after.hash) return {\n\t\t\t\tstatus: \"same\",\n\t\t\t\tbefore,\n\t\t\t\tafter,\n\t\t\t\ttokenDelta: 0\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tstatus: \"modified\",\n\t\t\t\tbefore,\n\t\t\t\tafter,\n\t\t\t\ttokenDelta: 0\n\t\t\t};\n\t\t}\n\t\tif (before) return {\n\t\t\tstatus: \"removed\",\n\t\t\tbefore,\n\t\t\ttokenDelta: 0\n\t\t};\n\t\treturn {\n\t\t\tstatus: \"added\",\n\t\t\tafter,\n\t\t\ttokenDelta: 0\n\t\t};\n\t}\n\t/**\n\t* Allocate the request-level chars/4 delta across changed blocks. Per-block\n\t* token deltas are deliberately based on character deltas, with the single\n\t* request-level rounding remainder distributed across blocks so the chips and\n\t* summary describe the same integer total.\n\t*/\n\tfunction assignTokenDeltas(blocks, deltaTokens) {\n\t\tconst candidates = blocks.map((block) => ({\n\t\t\tblock,\n\t\t\tcharDelta: (block.after?.chars ?? 0) - (block.before?.chars ?? 0)\n\t\t})).filter(({ block, charDelta }) => block.status !== \"same\" && charDelta !== 0);\n\t\tif (candidates.length === 0) return;\n\t\tlet allocated = 0;\n\t\tfor (const candidate of candidates) {\n\t\t\tcandidate.block.tokenDelta = Math.trunc(candidate.charDelta / 4);\n\t\t\tallocated += candidate.block.tokenDelta;\n\t\t}\n\t\tlet remainder = deltaTokens - allocated;\n\t\tif (remainder === 0) return;\n\t\tconst direction = remainder > 0 ? 1 : -1;\n\t\tconst preferred = candidates.filter(({ charDelta }) => direction > 0 ? charDelta > 0 : charDelta < 0);\n\t\tconst targets = preferred.length > 0 ? preferred : candidates;\n\t\tconst wholeShare = Math.trunc(Math.abs(remainder) / targets.length);\n\t\tif (wholeShare > 0) {\n\t\t\tfor (const target of targets) target.block.tokenDelta += direction * wholeShare;\n\t\t\tremainder -= direction * wholeShare * targets.length;\n\t\t}\n\t\tfor (let index = 0; remainder !== 0; index++) {\n\t\t\ttargets[index % targets.length].block.tokenDelta += direction;\n\t\t\tremainder -= direction;\n\t\t}\n\t}\n\tfunction summarize(blocks, netTokens) {\n\t\tlet sameBlocks = 0;\n\t\tlet addedBlocks = 0;\n\t\tlet removedBlocks = 0;\n\t\tlet modifiedBlocks = 0;\n\t\tlet addedTokens = 0;\n\t\tlet removedTokens = 0;\n\t\tfor (const block of blocks) switch (block.status) {\n\t\t\tcase \"same\":\n\t\t\t\tsameBlocks++;\n\t\t\t\tbreak;\n\t\t\tcase \"added\":\n\t\t\t\taddedBlocks++;\n\t\t\t\tif (block.tokenDelta > 0) addedTokens += block.tokenDelta;\n\t\t\t\tif (block.tokenDelta < 0) removedTokens += -block.tokenDelta;\n\t\t\t\tbreak;\n\t\t\tcase \"removed\":\n\t\t\t\tremovedBlocks++;\n\t\t\t\tif (block.tokenDelta > 0) addedTokens += block.tokenDelta;\n\t\t\t\tif (block.tokenDelta < 0) removedTokens += -block.tokenDelta;\n\t\t\t\tbreak;\n\t\t\tcase \"modified\":\n\t\t\t\tmodifiedBlocks++;\n\t\t\t\tif (block.tokenDelta > 0) addedTokens += block.tokenDelta;\n\t\t\t\telse removedTokens += -block.tokenDelta;\n\t\t\t\tbreak;\n\t\t}\n\t\treturn {\n\t\t\tsameBlocks,\n\t\t\taddedBlocks,\n\t\t\tremovedBlocks,\n\t\t\tmodifiedBlocks,\n\t\t\tchangedBlocks: addedBlocks + removedBlocks + modifiedBlocks,\n\t\t\taddedTokens,\n\t\t\tremovedTokens,\n\t\t\tnetTokens\n\t\t};\n\t}\n\tfunction hasUniqueStableKeys(blocks) {\n\t\tconst keys = blocks.map((block) => block.key);\n\t\treturn keys.every((key) => key.length > 0) && new Set(keys).size === keys.length;\n\t}\n\tfunction alignBlocks(beforeBlocks, afterBlocks) {\n\t\tconst afterKeys = new Set(afterBlocks.map((block) => block.key));\n\t\tif (!(hasUniqueStableKeys(beforeBlocks) && hasUniqueStableKeys(afterBlocks) && beforeBlocks.some((block) => afterKeys.has(block.key)))) return alignPositional(beforeBlocks, afterBlocks);\n\t\tconst beforeByKey = new Map(beforeBlocks.map((block) => [block.key, block]));\n\t\tconst beforeIndexByKey = new Map(beforeBlocks.map((block, index) => [block.key, index]));\n\t\tconst aligned = [];\n\t\tlet beforeCursor = 0;\n\t\tlet afterCursor = 0;\n\t\tfor (let afterIndex = 0; afterIndex < afterBlocks.length; afterIndex++) {\n\t\t\tconst after = afterBlocks[afterIndex];\n\t\t\tconst beforeIndex = beforeIndexByKey.get(after.key);\n\t\t\tif (beforeIndex === void 0 || beforeIndex < beforeCursor) continue;\n\t\t\taligned.push(...alignPositional(beforeBlocks.slice(beforeCursor, beforeIndex), afterBlocks.slice(afterCursor, afterIndex)));\n\t\t\taligned.push({\n\t\t\t\tbefore: beforeByKey.get(after.key),\n\t\t\t\tafter\n\t\t\t});\n\t\t\tbeforeCursor = beforeIndex + 1;\n\t\t\tafterCursor = afterIndex + 1;\n\t\t}\n\t\taligned.push(...alignPositional(beforeBlocks.slice(beforeCursor), afterBlocks.slice(afterCursor)));\n\t\treturn aligned;\n\t}\n\tfunction alignPositional(beforeBlocks, afterBlocks) {\n\t\tconst maxLength = Math.max(beforeBlocks.length, afterBlocks.length);\n\t\treturn Array.from({ length: maxLength }, (_, index) => ({\n\t\t\tbefore: beforeBlocks[index],\n\t\t\tafter: afterBlocks[index]\n\t\t}));\n\t}\n\t/**\n\t* Diff two consecutive turn snapshots.\n\t*\n\t* The cache-boundary walk compares block arrays positionally while hashes\n\t* match. This preserves the serialized-prefix meaning even when a later\n\t* block is moved. Classification uses stable block keys after the boundary so\n\t* a middle insertion does not make every following block look modified.\n\t*/\n\tfunction diffTurns(previous, current) {\n\t\tconst beforeBlocks = previous?.blocks ?? [];\n\t\tconst afterBlocks = current.blocks;\n\t\tconst diffBlocks = alignBlocks(beforeBlocks, afterBlocks).map(({ before, after }) => classify(before, after));\n\t\tlet prefixChars = 0;\n\t\tlet boundaryCrossed = false;\n\t\tfor (let index = 0; index < Math.max(beforeBlocks.length, afterBlocks.length); index++) {\n\t\t\tconst before = beforeBlocks[index];\n\t\t\tconst after = afterBlocks[index];\n\t\t\tif (!boundaryCrossed) {\n\t\t\t\tif (before && after && before.hash === after.hash) {\n\t\t\t\t\tprefixChars += after.chars;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (before && after) prefixChars += safeCommonPrefixLength(before, after);\n\t\t\t\tboundaryCrossed = true;\n\t\t\t}\n\t\t}\n\t\tconst currentTokens = turnApproxTokens(current);\n\t\tconst previousTokens = previous ? turnApproxTokens(previous) : 0;\n\t\tconst currentChars = afterBlocks.reduce((sum, block) => sum + block.chars, 0);\n\t\tconst prefixTokens = !boundaryCrossed || prefixChars >= currentChars ? currentTokens : Math.min(currentTokens, Math.floor(prefixChars / 4));\n\t\tconst deltaTokens = currentTokens - previousTokens;\n\t\tassignTokenDeltas(diffBlocks, deltaTokens);\n\t\treturn {\n\t\t\tblocks: diffBlocks,\n\t\t\tprefixTokens,\n\t\t\tprefixRatio: currentTokens === 0 ? 0 : prefixTokens / currentTokens,\n\t\t\tdeltaTokens,\n\t\t\tsummary: summarize(diffBlocks, deltaTokens)\n\t\t};\n\t}\n\t//#endregion\n\t//#region src/web-editor/line-diff.ts\n\tvar MAX_LCS_CELLS = 5e5;\n\tvar MAX_INLINE_DIFF_CHARS = 5e4;\n\tvar GRAPHEME_SEGMENTER = new Intl.Segmenter(void 0, { granularity: \"grapheme\" });\n\tfunction diffTextLines(beforeText, afterText) {\n\t\tconst operations = lineOperations(splitLines(beforeText), splitLines(afterText));\n\t\tlet beforeLine = 1;\n\t\tlet afterLine = 1;\n\t\tconst annotated = annotateInlineChanges(operations.map((operation) => {\n\t\t\tconst row = {\n\t\t\t\tkind: operation.kind,\n\t\t\t\ttext: operation.text,\n\t\t\t\tparts: [{\n\t\t\t\t\ttext: operation.text,\n\t\t\t\t\tchanged: operation.kind !== \"same\"\n\t\t\t\t}]\n\t\t\t};\n\t\t\tif (operation.kind !== \"added\") row.beforeLine = beforeLine++;\n\t\t\tif (operation.kind !== \"removed\") row.afterLine = afterLine++;\n\t\t\treturn row;\n\t\t}));\n\t\tconst beforeLacksFinalNewline = beforeText.length > 0 && !beforeText.endsWith(\"\\n\");\n\t\tif (beforeLacksFinalNewline !== (afterText.length > 0 && !afterText.endsWith(\"\\n\"))) annotated.push({\n\t\t\tkind: \"note\",\n\t\t\ttext: \"No newline at end of file\",\n\t\t\tparts: [{\n\t\t\t\ttext: \"No newline at end of file\",\n\t\t\t\tchanged: false\n\t\t\t}],\n\t\t\tnoteSide: beforeLacksFinalNewline ? \"before\" : \"after\"\n\t\t});\n\t\treturn annotated;\n\t}\n\t/** `contextLines = 0` means changed lines only; `null` means the complete file. */\n\tfunction filterLineRows(rows, contextLines) {\n\t\tif (contextLines === null) return [...rows];\n\t\tconst context = Math.max(0, Math.floor(contextLines));\n\t\tconst keep = rows.map(() => false);\n\t\tfor (let index = 0; index < rows.length; index++) {\n\t\t\tif (rows[index].kind === \"same\") continue;\n\t\t\tfor (let nearby = Math.max(0, index - context); nearby <= Math.min(rows.length - 1, index + context); nearby++) keep[nearby] = true;\n\t\t}\n\t\tconst result = [];\n\t\tlet previousKept = -1;\n\t\tfor (let index = 0; index < rows.length; index++) {\n\t\t\tif (!keep[index]) continue;\n\t\t\tif (previousKept >= 0 && index > previousKept + 1) result.push({ kind: \"separator\" });\n\t\t\tresult.push(rows[index]);\n\t\t\tpreviousKept = index;\n\t\t}\n\t\treturn result;\n\t}\n\tfunction buildSplitLineRows(rows) {\n\t\tconst result = [];\n\t\tfor (let index = 0; index < rows.length;) {\n\t\t\tconst row = rows[index];\n\t\t\tif (row.kind === \"separator\") {\n\t\t\t\tresult.push({ kind: \"separator\" });\n\t\t\t\tindex++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (row.kind === \"same\") {\n\t\t\t\tresult.push({\n\t\t\t\t\tkind: \"line\",\n\t\t\t\t\tbefore: row,\n\t\t\t\t\tafter: row\n\t\t\t\t});\n\t\t\t\tindex++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst removed = [];\n\t\t\tconst added = [];\n\t\t\twhile (index < rows.length && rows[index].kind !== \"same\" && rows[index].kind !== \"separator\") {\n\t\t\t\tconst changed = rows[index];\n\t\t\t\tif (changed.kind === \"removed\" || changed.kind === \"note\" && changed.noteSide === \"before\") removed.push(changed);\n\t\t\t\telse added.push(changed);\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\tfor (let pair = 0; pair < Math.max(removed.length, added.length); pair++) result.push({\n\t\t\t\tkind: \"line\",\n\t\t\t\tbefore: removed[pair],\n\t\t\t\tafter: added[pair]\n\t\t\t});\n\t\t}\n\t\treturn result;\n\t}\n\tfunction splitLines(text) {\n\t\tif (text === \"\") return [];\n\t\tconst lines = text.split(\"\\n\");\n\t\tif (text.endsWith(\"\\n\")) lines.pop();\n\t\treturn lines;\n\t}\n\tfunction lineOperations(before, after) {\n\t\tlet prefix = 0;\n\t\twhile (prefix < before.length && prefix < after.length && before[prefix] === after[prefix]) prefix++;\n\t\tlet suffix = 0;\n\t\twhile (suffix < before.length - prefix && suffix < after.length - prefix && before[before.length - suffix - 1] === after[after.length - suffix - 1]) suffix++;\n\t\tconst beforeMiddle = before.slice(prefix, before.length - suffix);\n\t\tconst afterMiddle = after.slice(prefix, after.length - suffix);\n\t\tconst result = before.slice(0, prefix).map((text) => ({\n\t\t\tkind: \"same\",\n\t\t\ttext\n\t\t}));\n\t\tresult.push(...diffMiddle(beforeMiddle, afterMiddle));\n\t\tresult.push(...before.slice(before.length - suffix).map((text) => ({\n\t\t\tkind: \"same\",\n\t\t\ttext\n\t\t})));\n\t\treturn result;\n\t}\n\tfunction diffMiddle(before, after) {\n\t\tif (before.length === 0) return after.map((text) => ({\n\t\t\tkind: \"added\",\n\t\t\ttext\n\t\t}));\n\t\tif (after.length === 0) return before.map((text) => ({\n\t\t\tkind: \"removed\",\n\t\t\ttext\n\t\t}));\n\t\tif ((before.length + 1) * (after.length + 1) > MAX_LCS_CELLS) return [...before.map((text) => ({\n\t\t\tkind: \"removed\",\n\t\t\ttext\n\t\t})), ...after.map((text) => ({\n\t\t\tkind: \"added\",\n\t\t\ttext\n\t\t}))];\n\t\tconst width = after.length + 1;\n\t\tconst matrix = new Uint32Array((before.length + 1) * width);\n\t\tfor (let beforeIndex = before.length - 1; beforeIndex >= 0; beforeIndex--) for (let afterIndex = after.length - 1; afterIndex >= 0; afterIndex--) {\n\t\t\tconst offset = beforeIndex * width + afterIndex;\n\t\t\tmatrix[offset] = before[beforeIndex] === after[afterIndex] ? matrix[(beforeIndex + 1) * width + afterIndex + 1] + 1 : Math.max(matrix[(beforeIndex + 1) * width + afterIndex], matrix[offset + 1]);\n\t\t}\n\t\tconst result = [];\n\t\tlet beforeIndex = 0;\n\t\tlet afterIndex = 0;\n\t\twhile (beforeIndex < before.length && afterIndex < after.length) if (before[beforeIndex] === after[afterIndex]) {\n\t\t\tresult.push({\n\t\t\t\tkind: \"same\",\n\t\t\t\ttext: before[beforeIndex]\n\t\t\t});\n\t\t\tbeforeIndex++;\n\t\t\tafterIndex++;\n\t\t} else if (matrix[(beforeIndex + 1) * width + afterIndex] >= matrix[beforeIndex * width + afterIndex + 1]) result.push({\n\t\t\tkind: \"removed\",\n\t\t\ttext: before[beforeIndex++]\n\t\t});\n\t\telse result.push({\n\t\t\tkind: \"added\",\n\t\t\ttext: after[afterIndex++]\n\t\t});\n\t\twhile (beforeIndex < before.length) result.push({\n\t\t\tkind: \"removed\",\n\t\t\ttext: before[beforeIndex++]\n\t\t});\n\t\twhile (afterIndex < after.length) result.push({\n\t\t\tkind: \"added\",\n\t\t\ttext: after[afterIndex++]\n\t\t});\n\t\treturn result;\n\t}\n\tfunction annotateInlineChanges(rows) {\n\t\tconst result = rows.map((row) => ({\n\t\t\t...row,\n\t\t\tparts: [...row.parts]\n\t\t}));\n\t\tfor (let index = 0; index < result.length;) {\n\t\t\tif (result[index].kind === \"same\") {\n\t\t\t\tindex++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst start = index;\n\t\t\twhile (index < result.length && result[index].kind !== \"same\") index++;\n\t\t\tconst removed = result.slice(start, index).filter((row) => row.kind === \"removed\");\n\t\t\tconst added = result.slice(start, index).filter((row) => row.kind === \"added\");\n\t\t\tfor (let pair = 0; pair < Math.min(removed.length, added.length); pair++) {\n\t\t\t\tconst [beforeParts, afterParts] = inlineParts(removed[pair].text, added[pair].text);\n\t\t\t\tremoved[pair].parts = beforeParts;\n\t\t\t\tadded[pair].parts = afterParts;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\tfunction inlineParts(before, after) {\n\t\tif (before.length + after.length > MAX_INLINE_DIFF_CHARS) return [[{\n\t\t\ttext: before,\n\t\t\tchanged: true\n\t\t}], [{\n\t\t\ttext: after,\n\t\t\tchanged: true\n\t\t}]];\n\t\tconst beforeGraphemes = splitGraphemes(before);\n\t\tconst afterGraphemes = splitGraphemes(after);\n\t\tlet prefix = 0;\n\t\twhile (prefix < beforeGraphemes.length && prefix < afterGraphemes.length && beforeGraphemes[prefix] === afterGraphemes[prefix]) prefix++;\n\t\tlet suffix = 0;\n\t\twhile (suffix < beforeGraphemes.length - prefix && suffix < afterGraphemes.length - prefix && beforeGraphemes[beforeGraphemes.length - suffix - 1] === afterGraphemes[afterGraphemes.length - suffix - 1]) suffix++;\n\t\treturn [partsForLine(beforeGraphemes, prefix, suffix), partsForLine(afterGraphemes, prefix, suffix)];\n\t}\n\tfunction partsForLine(graphemes, prefix, suffix) {\n\t\tconst parts = [];\n\t\tif (prefix > 0) parts.push({\n\t\t\ttext: graphemes.slice(0, prefix).join(\"\"),\n\t\t\tchanged: false\n\t\t});\n\t\tparts.push({\n\t\t\ttext: graphemes.slice(prefix, graphemes.length - suffix).join(\"\"),\n\t\t\tchanged: true\n\t\t});\n\t\tif (suffix > 0) parts.push({\n\t\t\ttext: graphemes.slice(graphemes.length - suffix).join(\"\"),\n\t\t\tchanged: false\n\t\t});\n\t\treturn parts;\n\t}\n\tfunction splitGraphemes(text) {\n\t\treturn Array.from(GRAPHEME_SEGMENTER.segment(text), (part) => part.segment);\n\t}\n\t//#endregion\n\t//#region src/web-editor/client/preview-diff.ts\n\tfunction previewSections(value) {\n\t\treturn value ? [value.system, ...value.messages || []] : [];\n\t}\n\t/** Converts compiled preview sections into stable blocks for saved-vs-draft alignment. */\n\tfunction previewToTurnSnapshot(value, turnId) {\n\t\treturn createTurnSnapshot({\n\t\t\tturnId,\n\t\t\tstackId: value.stackId,\n\t\t\tblocks: previewSections(value).map((section) => createBlock(section.diffKey ?? section.id, section.role ?? \"\", section.content))\n\t\t});\n\t}\n\t//#endregion\n\t//#region src/web-editor/client/components/ContextDiffPanel.vue?vue&type=script&setup=true&lang.ts\n\tinit_vue_runtime_esm_bundler();\n\tinit_api();\n\tinit_i18n();\n\tvar _hoisted_1$6 = { class: \"context-diff-dock\" };\n\tvar _hoisted_2$6 = [\"aria-label\"];\n\tvar _hoisted_3$6 = [\"aria-selected\"];\n\tvar _hoisted_4$6 = [\"aria-selected\"];\n\tvar _hoisted_5$6 = [\"aria-selected\"];\n\tvar _hoisted_6$6 = [\"title\"];\n\tvar _hoisted_7$6 = {\n\t\tclass: \"context-diff-compiled\",\n\t\trole: \"tabpanel\"\n\t};\n\tvar _hoisted_8$6 = { class: \"context-diff-panel-head\" };\n\tvar _hoisted_9$6 = { class: \"context-diff-title\" };\n\tvar _hoisted_10$6 = { class: \"context-diff-meta\" };\n\tvar _hoisted_11$6 = { key: 0 };\n\tvar _hoisted_12$6 = { key: 1 };\n\tvar _hoisted_13$6 = {\n\t\tkey: 2,\n\t\tclass: \"error\"\n\t};\n\tvar _hoisted_14$6 = { key: 3 };\n\tvar _hoisted_15$6 = {\n\t\tkey: 0,\n\t\tclass: \"context-diff-diagnostics\"\n\t};\n\tvar _hoisted_16$6 = {\n\t\tkey: 1,\n\t\tclass: \"context-diff-error\"\n\t};\n\tvar _hoisted_17$5 = {\n\t\tkey: 2,\n\t\tclass: \"section-text\"\n\t};\n\tvar _hoisted_18$4 = {\n\t\tkey: 3,\n\t\tclass: \"context-diff-empty\"\n\t};\n\tvar _hoisted_19$4 = {\n\t\tkey: 4,\n\t\tclass: \"context-diff-sections\"\n\t};\n\tvar _hoisted_20$4 = { class: \"section-title\" };\n\tvar _hoisted_21$4 = { class: \"section-meta\" };\n\tvar _hoisted_22$4 = [\"onClick\"];\n\tvar _hoisted_23$4 = { class: \"section-text\" };\n\tvar _hoisted_24$4 = {\n\t\tclass: \"context-diff-diff\",\n\t\trole: \"tabpanel\"\n\t};\n\tvar _hoisted_25$4 = { class: \"context-diff-panel-head\" };\n\tvar _hoisted_26$4 = { class: \"context-diff-title\" };\n\tvar _hoisted_27$3 = { class: \"context-diff-meta\" };\n\tvar _hoisted_28$3 = { key: 0 };\n\tvar _hoisted_29$3 = { key: 1 };\n\tvar _hoisted_30$3 = {\n\t\tkey: 2,\n\t\tclass: \"error\"\n\t};\n\tvar _hoisted_31$3 = {\n\t\tkey: 3,\n\t\tclass: \"error\"\n\t};\n\tvar _hoisted_32$3 = { key: 4 };\n\tvar _hoisted_33$3 = { key: 5 };\n\tvar _hoisted_34$3 = {\n\t\tkey: 0,\n\t\tclass: \"context-diff-error\"\n\t};\n\tvar _hoisted_35$3 = {\n\t\tkey: 1,\n\t\tclass: \"context-diff-error\"\n\t};\n\tvar _hoisted_36$3 = {\n\t\tkey: 2,\n\t\tclass: \"context-diff-empty\"\n\t};\n\tvar _hoisted_37$3 = { class: \"context-diff-summary\" };\n\tvar _hoisted_38$3 = [\"aria-label\"];\n\tvar _hoisted_39$3 = { class: \"diff-layout-buttons\" };\n\tvar _hoisted_40$3 = [\"aria-pressed\"];\n\tvar _hoisted_41$3 = [\"aria-pressed\"];\n\tvar _hoisted_42$2 = [\"aria-label\"];\n\tvar _hoisted_43$2 = { value: \"0\" };\n\tvar _hoisted_44$2 = { value: \"3\" };\n\tvar _hoisted_45$1 = { value: \"all\" };\n\tvar _hoisted_46$1 = {\n\t\tkey: 0,\n\t\tclass: \"unchanged-toggle\"\n\t};\n\tvar _hoisted_47$1 = {\n\t\tkey: 0,\n\t\tclass: \"context-diff-details\"\n\t};\n\tvar _hoisted_48$1 = { class: \"run-metadata-grid\" };\n\tvar _hoisted_49$1 = {\n\t\tkey: 0,\n\t\tclass: \"metadata-note\"\n\t};\n\tvar _hoisted_50$1 = { class: \"metadata-note\" };\n\tvar _hoisted_51$1 = {\n\t\tkey: 1,\n\t\tclass: \"context-diff-empty compact\"\n\t};\n\tvar _hoisted_52 = {\n\t\tkey: 2,\n\t\tclass: \"context-diff-blocks\"\n\t};\n\tvar _hoisted_53 = { class: \"block-content\" };\n\tvar _hoisted_54 = { class: \"block-head\" };\n\tvar _hoisted_55 = { class: \"block-status\" };\n\tvar _hoisted_56 = { class: \"block-key\" };\n\tvar _hoisted_57 = {\n\t\tkey: 0,\n\t\tclass: \"block-role\"\n\t};\n\tvar _hoisted_58 = { class: \"block-token-chip\" };\n\tvar _hoisted_59 = {\n\t\tkey: 0,\n\t\tclass: \"metadata-only-change\"\n\t};\n\tvar _hoisted_60 = [\"aria-label\"];\n\tvar _hoisted_61 = {\n\t\tkey: 0,\n\t\tclass: \"git-line-separator\",\n\t\trole: \"row\"\n\t};\n\tvar _hoisted_62 = { class: \"line-number old\" };\n\tvar _hoisted_63 = { class: \"line-number new\" };\n\tvar _hoisted_64 = { class: \"line-marker\" };\n\tvar _hoisted_65 = {\n\t\tkey: 0,\n\t\tclass: \"note-side\"\n\t};\n\tvar _hoisted_66 = { key: 0 };\n\tvar _hoisted_67 = [\"aria-label\"];\n\tvar _hoisted_68 = { class: \"split-header\" };\n\tvar _hoisted_69 = {\n\t\tkey: 0,\n\t\tclass: \"git-line-separator split-separator\",\n\t\trole: \"row\"\n\t};\n\tvar _hoisted_70 = {\n\t\tkey: 1,\n\t\tclass: \"split-line\",\n\t\trole: \"row\"\n\t};\n\tvar _hoisted_71 = { class: \"line-number\" };\n\tvar _hoisted_72 = { class: \"line-marker\" };\n\tvar _hoisted_73 = { key: 0 };\n\tvar _hoisted_74 = { class: \"line-number\" };\n\tvar _hoisted_75 = { class: \"line-marker\" };\n\tvar _hoisted_76 = { key: 0 };\n\t//#endregion\n\t//#region src/web-editor/client/components/ContextDiffPanel.vue\n\tvar ContextDiffPanel_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({\n\t\t__name: \"ContextDiffPanel\",\n\t\tprops: {\n\t\t\tgetStackDraft: { type: Function },\n\t\t\tsubscribeStackDraft: { type: Function },\n\t\t\tonStatus: { type: Function },\n\t\t\tonExpandedChanged: { type: Function }\n\t\t},\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 mode = /* @__PURE__ */ ref(\"compiled\");\n\t\t\tconst preview = /* @__PURE__ */ ref(null);\n\t\t\tconst savedPreview = /* @__PURE__ */ ref(null);\n\t\t\tconst previewText = /* @__PURE__ */ ref(\"\");\n\t\t\tconst previewDiagnostics = /* @__PURE__ */ ref([]);\n\t\t\tconst draftDiff = /* @__PURE__ */ ref(null);\n\t\t\tconst previewError = /* @__PURE__ */ ref(\"\");\n\t\t\tconst previewLoading = /* @__PURE__ */ ref(false);\n\t\t\tconst previewStatus = /* @__PURE__ */ ref(\"\");\n\t\t\tconst contextDiff = /* @__PURE__ */ ref(null);\n\t\t\tconst contextDiffError = /* @__PURE__ */ ref(\"\");\n\t\t\tconst contextDiffLoading = /* @__PURE__ */ ref(false);\n\t\t\tconst showUnchanged = /* @__PURE__ */ ref(false);\n\t\t\tconst diffLayout = /* @__PURE__ */ ref(\"unified\");\n\t\t\tconst lineContext = /* @__PURE__ */ ref(\"3\");\n\t\t\tconst expanded = /* @__PURE__ */ ref(false);\n\t\t\tlet previewTimer;\n\t\t\tlet pollTimer;\n\t\t\tlet stopDraftSubscription;\n\t\t\tlet previewSequence = 0;\n\t\t\tlet previewAbort;\n\t\t\tlet contextDiffSequence = 0;\n\t\t\tlet contextDiffAbort;\n\t\t\tconst compiledSections = computed(() => previewSections(preview.value));\n\t\t\tconst latestDiff = computed(() => contextDiff.value?.latestDiff ?? null);\n\t\t\tconst latestTurn = computed(() => contextDiff.value?.latest?.turn ?? null);\n\t\t\tconst activeDiff = computed(() => mode.value === \"draft\" ? draftDiff.value : latestDiff.value);\n\t\t\tconst diffBlocks = computed(() => activeDiff.value?.blocks ?? []);\n\t\t\tconst visibleDiffBlocks = computed(() => showUnchanged.value ? diffBlocks.value : diffBlocks.value.filter((block) => block.status !== \"same\"));\n\t\t\tconst hiddenUnchangedCount = computed(() => diffBlocks.value.filter((block) => block.status === \"same\").length);\n\t\t\tconst deltaText = computed(() => {\n\t\t\t\tconst delta = activeDiff.value?.deltaTokens ?? 0;\n\t\t\t\treturn `${delta > 0 ? \"+\" : \"\"}${delta}`;\n\t\t\t});\n\t\t\tconst deltaClass = computed(() => {\n\t\t\t\tconst delta = activeDiff.value?.deltaTokens ?? 0;\n\t\t\t\treturn delta > 0 ? \"positive\" : delta < 0 ? \"negative\" : \"neutral\";\n\t\t\t});\n\t\t\tconst prefixPercent = computed(() => Math.round((latestDiff.value?.prefixRatio ?? 0) * 100));\n\t\t\tconst changedBlocks = computed(() => activeDiff.value?.summary.changedBlocks ?? 0);\n\t\t\tconst latestUsage = computed(() => contextDiff.value?.latest?.usage ?? null);\n\t\t\tonMounted(() => {\n\t\t\t\tstopDraftSubscription = props.subscribeStackDraft?.(schedulePreviewRefresh);\n\t\t\t\trefreshPreview();\n\t\t\t\trefreshContextDiff();\n\t\t\t\tpollTimer = window.setInterval(() => {\n\t\t\t\t\trefreshContextDiff();\n\t\t\t\t\tschedulePollingPreviewRefresh();\n\t\t\t\t}, 2e3);\n\t\t\t});\n\t\t\tonUnmounted(() => {\n\t\t\t\tif (previewTimer !== void 0) window.clearTimeout(previewTimer);\n\t\t\t\tif (pollTimer !== void 0) window.clearInterval(pollTimer);\n\t\t\t\tstopDraftSubscription?.();\n\t\t\t\tinvalidatePreviewRequest();\n\t\t\t\tinvalidateContextDiffRequest();\n\t\t\t\tprops.onExpandedChanged?.(false);\n\t\t\t});\n\t\t\tfunction toggleExpanded() {\n\t\t\t\texpanded.value = !expanded.value;\n\t\t\t\tprops.onExpandedChanged?.(expanded.value);\n\t\t\t}\n\t\t\tfunction schedulePreviewRefresh() {\n\t\t\t\tinvalidatePreviewRequest();\n\t\t\t\tpreview.value = null;\n\t\t\t\tsavedPreview.value = null;\n\t\t\t\tpreviewText.value = \"\";\n\t\t\t\tpreviewDiagnostics.value = [];\n\t\t\t\tdraftDiff.value = null;\n\t\t\t\tpreviewLoading.value = true;\n\t\t\t\tpreviewStatus.value = t(\"diff.draftChangedRefreshing\");\n\t\t\t\tschedulePreviewTimer();\n\t\t\t}\n\t\t\tfunction schedulePollingPreviewRefresh() {\n\t\t\t\tschedulePreviewTimer();\n\t\t\t}\n\t\t\tfunction schedulePreviewTimer() {\n\t\t\t\tif (previewTimer !== void 0) window.clearTimeout(previewTimer);\n\t\t\t\tpreviewTimer = window.setTimeout(() => {\n\t\t\t\t\tpreviewTimer = void 0;\n\t\t\t\t\trefreshPreview();\n\t\t\t\t}, 500);\n\t\t\t}\n\t\t\tfunction invalidatePreviewRequest() {\n\t\t\t\tconst sequence = ++previewSequence;\n\t\t\t\tpreviewAbort?.abort();\n\t\t\t\tpreviewAbort = void 0;\n\t\t\t\tpreviewLoading.value = false;\n\t\t\t\treturn sequence;\n\t\t\t}\n\t\t\tasync function refreshPreview() {\n\t\t\t\tconst sequence = invalidatePreviewRequest();\n\t\t\t\tconst draft = props.getStackDraft?.();\n\t\t\t\tif (!draft) {\n\t\t\t\t\tpreview.value = null;\n\t\t\t\t\tsavedPreview.value = null;\n\t\t\t\t\tpreviewText.value = \"\";\n\t\t\t\t\tpreviewDiagnostics.value = [];\n\t\t\t\t\tdraftDiff.value = null;\n\t\t\t\t\tpreviewError.value = \"\";\n\t\t\t\t\tpreviewStatus.value = t(\"diff.selectStackToPreview\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tpreviewLoading.value = true;\n\t\t\t\tpreviewError.value = \"\";\n\t\t\t\tpreviewStatus.value = \"\";\n\t\t\t\tconst controller = new AbortController();\n\t\t\t\tpreviewAbort = controller;\n\t\t\t\ttry {\n\t\t\t\t\tconst loaded = await api(`/api/stacks/${encodeURIComponent(draft.selector)}`, { signal: controller.signal });\n\t\t\t\t\tconst previewPath = `/api/stacks/${encodeURIComponent(draft.selector)}/preview`;\n\t\t\t\t\tconst [draftData, savedData] = await Promise.all([api(previewPath, {\n\t\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\t\tbody: { stack: draft.stack },\n\t\t\t\t\t\tsignal: controller.signal\n\t\t\t\t\t}), api(previewPath, {\n\t\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\t\tbody: { stack: loaded.stack },\n\t\t\t\t\t\tsignal: controller.signal\n\t\t\t\t\t})]);\n\t\t\t\t\tif (sequence !== previewSequence) return;\n\t\t\t\t\tpreview.value = draftData.preview ?? null;\n\t\t\t\t\tsavedPreview.value = savedData.preview ?? null;\n\t\t\t\t\tpreviewText.value = draftData.text ?? \"\";\n\t\t\t\t\tpreviewDiagnostics.value = draftData.diagnostics ?? [];\n\t\t\t\t\tdraftDiff.value = preview.value && savedPreview.value ? diffTurns(previewToTurnSnapshot(savedPreview.value, \"saved\"), previewToTurnSnapshot(preview.value, \"draft\")) : null;\n\t\t\t\t\tpreviewStatus.value = preview.value ? t(\"diff.draftRefreshed\") : t(\"diff.previewNoSections\");\n\t\t\t\t\tprops.onStatus?.(previewStatus.value, preview.value ? \"success\" : \"warning\");\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (controller.signal.aborted || sequence !== previewSequence) return;\n\t\t\t\t\tpreviewError.value = error instanceof Error ? error.message : String(error);\n\t\t\t\t\tprops.onStatus?.(previewError.value, \"error\");\n\t\t\t\t} finally {\n\t\t\t\t\tif (sequence === previewSequence) previewLoading.value = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tasync function refreshContextDiff() {\n\t\t\t\tconst sequence = invalidateContextDiffRequest();\n\t\t\t\tcontextDiffLoading.value = true;\n\t\t\t\tcontextDiffError.value = \"\";\n\t\t\t\tconst controller = new AbortController();\n\t\t\t\tcontextDiffAbort = controller;\n\t\t\t\ttry {\n\t\t\t\t\tconst next = await api(\"/api/context-diff\", { signal: controller.signal });\n\t\t\t\t\tif (sequence !== contextDiffSequence) return;\n\t\t\t\t\tcontextDiff.value = next;\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (controller.signal.aborted || sequence !== contextDiffSequence) return;\n\t\t\t\t\tcontextDiffError.value = error instanceof Error ? error.message : String(error);\n\t\t\t\t} finally {\n\t\t\t\t\tif (sequence === contextDiffSequence) contextDiffLoading.value = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction invalidateContextDiffRequest() {\n\t\t\t\tconst sequence = ++contextDiffSequence;\n\t\t\t\tcontextDiffAbort?.abort();\n\t\t\t\tcontextDiffAbort = void 0;\n\t\t\t\tcontextDiffLoading.value = false;\n\t\t\t\treturn sequence;\n\t\t\t}\n\t\t\tfunction blockKey(block) {\n\t\t\t\treturn block.after?.key ?? block.before?.key ?? \"\";\n\t\t\t}\n\t\t\tfunction blockRole(block) {\n\t\t\t\treturn block.after?.role ?? block.before?.role ?? \"\";\n\t\t\t}\n\t\t\tfunction blockTokenText(block) {\n\t\t\t\tif (block.status !== \"same\") {\n\t\t\t\t\tconst delta = block.tokenDelta;\n\t\t\t\t\treturn t(\"diff.blockTokensDelta\", { delta: `${delta > 0 ? \"+\" : \"\"}${delta}` });\n\t\t\t\t}\n\t\t\t\treturn t(\"diff.blockTokens\", { count: block.after?.approxTokens ?? 0 });\n\t\t\t}\n\t\t\tfunction blockLineRows(block) {\n\t\t\t\treturn filterLineRows(diffTextLines(block.before?.text ?? \"\", block.after?.text ?? \"\"), block.status === \"same\" || lineContext.value === \"all\" ? null : Number(lineContext.value));\n\t\t\t}\n\t\t\tfunction blockSplitRows(block) {\n\t\t\t\treturn buildSplitLineRows(blockLineRows(block));\n\t\t\t}\n\t\t\tfunction lineMarker(row) {\n\t\t\t\treturn row.kind === \"added\" ? \"+\" : row.kind === \"removed\" ? \"−\" : row.kind === \"note\" ? \"\\\\\" : \" \";\n\t\t\t}\n\t\t\tfunction eofNoteSide(row) {\n\t\t\t\treturn row.noteSide === \"before\" ? t(\"diff.before\") : t(\"diff.after\");\n\t\t\t}\n\t\t\tfunction metadataOnlyChange(block) {\n\t\t\t\treturn block.status === \"modified\" && block.before?.text === block.after?.text && block.before?.hash !== block.after?.hash;\n\t\t\t}\n\t\t\tfunction metadataChangeText(block) {\n\t\t\t\tconst beforeRole = block.before?.role ?? \"—\";\n\t\t\t\tconst afterRole = block.after?.role ?? \"—\";\n\t\t\t\treturn t(\"diff.metadataChanged\", { detail: beforeRole === afterRole ? t(\"diff.roleUnchanged\", { role: afterRole }) : t(\"diff.roleChanged\", {\n\t\t\t\t\tbefore: beforeRole,\n\t\t\t\t\tafter: afterRole\n\t\t\t\t}) });\n\t\t\t}\n\t\t\tfunction formatUsageTokens(value) {\n\t\t\t\treturn value === void 0 ? \"—\" : value.toLocaleString();\n\t\t\t}\n\t\t\tfunction cacheHitText() {\n\t\t\t\tconst usage = latestUsage.value;\n\t\t\t\tif (!usage) return \"—\";\n\t\t\t\tif (usage.cacheHitRatio === null) return t(\"diff.notReported\");\n\t\t\t\treturn `${(usage.cacheHitRatio * 100).toFixed(1)}%`;\n\t\t\t}\n\t\t\tfunction sectionMeta(section) {\n\t\t\t\treturn t(\"diff.sectionMeta\", {\n\t\t\t\t\trolePrefix: section.role ? `${section.role} · ` : \"\",\n\t\t\t\t\tchars: section.chars,\n\t\t\t\t\ttokens: section.approxTokens\n\t\t\t\t});\n\t\t\t}\n\t\t\tasync function copyPreviewText(text) {\n\t\t\t\tif (!text) return;\n\t\t\t\tif (navigator.clipboard && window.isSecureContext) await navigator.clipboard.writeText(text);\n\t\t\t\telse {\n\t\t\t\t\tconst area = document.createElement(\"textarea\");\n\t\t\t\t\tarea.value = text;\n\t\t\t\t\tarea.style.position = \"fixed\";\n\t\t\t\t\tarea.style.left = \"-9999px\";\n\t\t\t\t\tdocument.body.appendChild(area);\n\t\t\t\t\tarea.select();\n\t\t\t\t\tdocument.execCommand(\"copy\");\n\t\t\t\t\tarea.remove();\n\t\t\t\t}\n\t\t\t\tprops.onStatus?.(t(\"inspector.copiedText\"), \"success\");\n\t\t\t}\n\t\t\tfunction turnLabel() {\n\t\t\t\tconst turn = latestTurn.value;\n\t\t\t\tif (!turn) return \"—\";\n\t\t\t\treturn turn.turnId.replace(/^turn-/, \"\");\n\t\t\t}\n\t\t\treturn (_ctx, _cache) => {\n\t\t\t\treturn openBlock(), createElementBlock(\"div\", _hoisted_1$6, [\n\t\t\t\t\tcreateBaseVNode(\"div\", {\n\t\t\t\t\t\tclass: \"context-diff-mode-tabs\",\n\t\t\t\t\t\trole: \"tablist\",\n\t\t\t\t\t\t\"aria-label\": unref(t)(\"diff.dockAria\")\n\t\t\t\t\t}, [\n\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\tclass: normalizeClass({ active: mode.value === \"compiled\" }),\n\t\t\t\t\t\t\trole: \"tab\",\n\t\t\t\t\t\t\t\"aria-selected\": mode.value === \"compiled\",\n\t\t\t\t\t\t\tonClick: _cache[0] || (_cache[0] = ($event) => mode.value = \"compiled\")\n\t\t\t\t\t\t}, toDisplayString(unref(t)(\"tab.preview\")), 11, _hoisted_3$6),\n\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\tclass: normalizeClass({ active: mode.value === \"draft\" }),\n\t\t\t\t\t\t\trole: \"tab\",\n\t\t\t\t\t\t\t\"aria-selected\": mode.value === \"draft\",\n\t\t\t\t\t\t\tonClick: _cache[1] || (_cache[1] = ($event) => mode.value = \"draft\")\n\t\t\t\t\t\t}, toDisplayString(unref(t)(\"diff.draftTab\")), 11, _hoisted_4$6),\n\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\tclass: normalizeClass({ active: mode.value === \"run\" }),\n\t\t\t\t\t\t\trole: \"tab\",\n\t\t\t\t\t\t\t\"aria-selected\": mode.value === \"run\",\n\t\t\t\t\t\t\tonClick: _cache[2] || (_cache[2] = ($event) => mode.value = \"run\")\n\t\t\t\t\t\t}, toDisplayString(unref(t)(\"diff.runTab\")), 11, _hoisted_5$6),\n\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\tclass: \"context-diff-expand\",\n\t\t\t\t\t\t\ttitle: expanded.value ? unref(t)(\"diff.splitTitle\") : unref(t)(\"diff.focusTitle\"),\n\t\t\t\t\t\t\tonClick: toggleExpanded\n\t\t\t\t\t\t}, toDisplayString(expanded.value ? unref(t)(\"diff.split\") : unref(t)(\"diff.focus\")), 9, _hoisted_6$6)\n\t\t\t\t\t], 8, _hoisted_2$6),\n\t\t\t\t\twithDirectives(createBaseVNode(\"div\", _hoisted_7$6, [\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_8$6, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_9$6, toDisplayString(unref(t)(\"diff.compiledDraft\")), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_10$6, [preview.value ? (openBlock(), createElementBlock(\"span\", _hoisted_11$6, toDisplayString(unref(t)(\"diff.compiledMeta\", {\n\t\t\t\t\t\t\t\ttokens: preview.value.approxTokens,\n\t\t\t\t\t\t\t\tchars: preview.value.totalChars\n\t\t\t\t\t\t\t})), 1)) : previewLoading.value ? (openBlock(), createElementBlock(\"span\", _hoisted_12$6, toDisplayString(unref(t)(\"diff.refreshing\")), 1)) : previewError.value ? (openBlock(), createElementBlock(\"span\", _hoisted_13$6, toDisplayString(previewError.value), 1)) : (openBlock(), createElementBlock(\"span\", _hoisted_14$6, toDisplayString(unref(t)(\"diff.noPreview\")), 1))]),\n\t\t\t\t\t\t\tpreviewText.value ? (openBlock(), createElementBlock(\"button\", {\n\t\t\t\t\t\t\t\tkey: 0,\n\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\tclass: \"context-diff-copy-full\",\n\t\t\t\t\t\t\t\tonClick: _cache[3] || (_cache[3] = ($event) => copyPreviewText(previewText.value))\n\t\t\t\t\t\t\t}, toDisplayString(unref(t)(\"inspector.copyFull\")), 1)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\tclass: \"context-diff-refresh\",\n\t\t\t\t\t\t\t\tonClick: schedulePreviewRefresh\n\t\t\t\t\t\t\t}, toDisplayString(unref(t)(\"profiles.refresh\")), 1)\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tpreviewDiagnostics.value.length ? (openBlock(), createElementBlock(\"div\", _hoisted_15$6, [createBaseVNode(\"strong\", null, toDisplayString(unref(t)(\"diff.compilerDiagnostics\", { count: previewDiagnostics.value.length })), 1), (openBlock(true), createElementBlock(Fragment, null, renderList(previewDiagnostics.value, (diagnostic, index) => {\n\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"div\", {\n\t\t\t\t\t\t\t\tkey: index,\n\t\t\t\t\t\t\t\tclass: normalizeClass([\"context-diff-diagnostic\", diagnostic.level])\n\t\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\t\tcreateTextVNode(toDisplayString(diagnostic.level.toUpperCase()), 1),\n\t\t\t\t\t\t\t\tdiagnostic.itemId ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(\" · \" + toDisplayString(diagnostic.itemId), 1)], 64)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\t\tcreateTextVNode(\": \" + toDisplayString(diagnostic.message), 1)\n\t\t\t\t\t\t\t], 2);\n\t\t\t\t\t\t}), 128))])) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\tpreviewError.value ? (openBlock(), createElementBlock(\"div\", _hoisted_16$6, toDisplayString(previewError.value), 1)) : compiledSections.value.length === 0 && previewText.value ? (openBlock(), createElementBlock(\"pre\", _hoisted_17$5, toDisplayString(previewText.value), 1)) : compiledSections.value.length === 0 ? (openBlock(), createElementBlock(\"div\", _hoisted_18$4, toDisplayString(previewLoading.value ? unref(t)(\"diff.loadingPreview\") : unref(t)(\"diff.selectStackHint\")), 1)) : (openBlock(), createElementBlock(\"div\", _hoisted_19$4, [(openBlock(true), createElementBlock(Fragment, null, renderList(compiledSections.value, (section) => {\n\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"details\", {\n\t\t\t\t\t\t\t\tkey: section.id,\n\t\t\t\t\t\t\t\tclass: \"context-diff-section\",\n\t\t\t\t\t\t\t\topen: \"\"\n\t\t\t\t\t\t\t}, [createBaseVNode(\"summary\", null, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_20$4, toDisplayString(section.title || section.id), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_21$4, toDisplayString(sectionMeta(section)), 1),\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: \"context-diff-copy-section\",\n\t\t\t\t\t\t\t\t\tonClick: withModifiers(($event) => copyPreviewText(section.content), [\"prevent\", \"stop\"])\n\t\t\t\t\t\t\t\t}, toDisplayString(unref(t)(\"inspector.copy\")), 9, _hoisted_22$4)\n\t\t\t\t\t\t\t]), createBaseVNode(\"pre\", _hoisted_23$4, toDisplayString(section.content), 1)]);\n\t\t\t\t\t\t}), 128))]))\n\t\t\t\t\t], 512), [[vShow, mode.value === \"compiled\"]]),\n\t\t\t\t\twithDirectives(createBaseVNode(\"div\", _hoisted_24$4, [createBaseVNode(\"div\", _hoisted_25$4, [\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_26$4, toDisplayString(mode.value === \"draft\" ? unref(t)(\"diff.draftTitle\") : unref(t)(\"diff.runTitle\")), 1),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_27$3, [mode.value === \"draft\" && previewLoading.value ? (openBlock(), createElementBlock(\"span\", _hoisted_28$3, toDisplayString(unref(t)(\"diff.refreshing\")), 1)) : mode.value === \"run\" && contextDiffLoading.value ? (openBlock(), createElementBlock(\"span\", _hoisted_29$3, toDisplayString(unref(t)(\"diff.refreshing\")), 1)) : mode.value === \"draft\" && previewError.value ? (openBlock(), createElementBlock(\"span\", _hoisted_30$3, toDisplayString(previewError.value), 1)) : mode.value === \"run\" && contextDiffError.value ? (openBlock(), createElementBlock(\"span\", _hoisted_31$3, toDisplayString(contextDiffError.value), 1)) : activeDiff.value ? (openBlock(), createElementBlock(\"span\", _hoisted_32$3, toDisplayString(changedBlocks.value === 0 ? unref(t)(\"diff.noChanges\") : unref(t)(\"diff.changedBlocks\", { count: changedBlocks.value })), 1)) : (openBlock(), createElementBlock(\"span\", _hoisted_33$3, toDisplayString(mode.value === \"draft\" ? unref(t)(\"diff.noDraftComparison\") : unref(t)(\"diff.noCapturedRuns\")), 1))]),\n\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\tclass: \"context-diff-refresh\",\n\t\t\t\t\t\t\tonClick: _cache[4] || (_cache[4] = ($event) => mode.value === \"draft\" ? schedulePreviewRefresh() : refreshContextDiff())\n\t\t\t\t\t\t}, toDisplayString(unref(t)(\"profiles.refresh\")), 1)\n\t\t\t\t\t]), mode.value === \"draft\" && previewError.value ? (openBlock(), createElementBlock(\"div\", _hoisted_34$3, toDisplayString(previewError.value), 1)) : mode.value === \"run\" && contextDiffError.value ? (openBlock(), createElementBlock(\"div\", _hoisted_35$3, toDisplayString(contextDiffError.value), 1)) : !activeDiff.value ? (openBlock(), createElementBlock(\"div\", _hoisted_36$3, toDisplayString(mode.value === \"draft\" ? unref(t)(\"diff.draftEmpty\") : unref(t)(\"diff.runEmpty\")), 1)) : (openBlock(), createElementBlock(Fragment, { key: 3 }, [\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_37$3, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"span\", { class: normalizeClass([\"summary-delta\", deltaClass.value]) }, toDisplayString(unref(t)(\"diff.estimatedDelta\", { delta: deltaText.value })), 3),\n\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, toDisplayString(unref(t)(\"diff.changed\", { count: changedBlocks.value })), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", {\n\t\t\t\t\t\t\t\tclass: \"diff-view-controls\",\n\t\t\t\t\t\t\t\t\"aria-label\": unref(t)(\"diff.displayOptionsAria\")\n\t\t\t\t\t\t\t}, [createBaseVNode(\"div\", _hoisted_39$3, [createBaseVNode(\"button\", {\n\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\tclass: normalizeClass({ active: diffLayout.value === \"unified\" }),\n\t\t\t\t\t\t\t\t\"aria-pressed\": diffLayout.value === \"unified\",\n\t\t\t\t\t\t\t\tonClick: _cache[5] || (_cache[5] = ($event) => diffLayout.value = \"unified\")\n\t\t\t\t\t\t\t}, toDisplayString(unref(t)(\"diff.unified\")), 11, _hoisted_40$3), createBaseVNode(\"button\", {\n\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\tclass: normalizeClass({ active: diffLayout.value === \"split\" }),\n\t\t\t\t\t\t\t\t\"aria-pressed\": diffLayout.value === \"split\",\n\t\t\t\t\t\t\t\tonClick: _cache[6] || (_cache[6] = ($event) => diffLayout.value = \"split\")\n\t\t\t\t\t\t\t}, toDisplayString(unref(t)(\"diff.split\")), 11, _hoisted_41$3)]), createBaseVNode(\"label\", null, [createBaseVNode(\"span\", null, toDisplayString(unref(t)(\"diff.lines\")), 1), withDirectives(createBaseVNode(\"select\", {\n\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": _cache[7] || (_cache[7] = ($event) => lineContext.value = $event),\n\t\t\t\t\t\t\t\t\"aria-label\": unref(t)(\"diff.lineContextAria\")\n\t\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"option\", _hoisted_43$2, toDisplayString(unref(t)(\"diff.changesOnly\")), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"option\", _hoisted_44$2, toDisplayString(unref(t)(\"diff.threeLinesContext\")), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"option\", _hoisted_45$1, toDisplayString(unref(t)(\"diff.allLines\")), 1)\n\t\t\t\t\t\t\t], 8, _hoisted_42$2), [[vModelSelect, lineContext.value]])])], 8, _hoisted_38$3),\n\t\t\t\t\t\t\thiddenUnchangedCount.value ? (openBlock(), createElementBlock(\"label\", _hoisted_46$1, [withDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": _cache[8] || (_cache[8] = ($event) => showUnchanged.value = $event),\n\t\t\t\t\t\t\t\ttype: \"checkbox\"\n\t\t\t\t\t\t\t}, null, 512), [[vModelCheckbox, showUnchanged.value]]), createTextVNode(\" \" + toDisplayString(unref(t)(\"diff.showUnchanged\", { count: hiddenUnchangedCount.value })), 1)])) : createCommentVNode(\"v-if\", true)\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tmode.value === \"run\" ? (openBlock(), createElementBlock(\"details\", _hoisted_47$1, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"summary\", null, toDisplayString(unref(t)(\"diff.runMetadata\")), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_48$1, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, toDisplayString(unref(t)(\"diff.turn\")), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"strong\", null, toDisplayString(turnLabel()), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, toDisplayString(unref(t)(\"diff.providerModel\")), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"strong\", null, toDisplayString(latestUsage.value ? `${latestUsage.value.provider}/${latestUsage.value.model}` : unref(t)(\"diff.usagePending\")), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, toDisplayString(unref(t)(\"diff.actualPromptTokens\")), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"strong\", null, toDisplayString(formatUsageTokens(latestUsage.value?.promptTokens)), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, toDisplayString(unref(t)(\"diff.actualCacheReadWrite\")), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"strong\", null, toDisplayString(formatUsageTokens(latestUsage.value?.cacheRead)) + \" / \" + toDisplayString(formatUsageTokens(latestUsage.value?.cacheWrite)), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, toDisplayString(unref(t)(\"diff.actualCacheHitRate\")), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"strong\", null, toDisplayString(cacheHitText()), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, toDisplayString(unref(t)(\"diff.actualUncached\")), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"strong\", null, toDisplayString(formatUsageTokens(latestUsage.value?.input)) + \" / \" + toDisplayString(formatUsageTokens(latestUsage.value?.output)), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, toDisplayString(unref(t)(\"diff.estimatedPrefix\")), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"strong\", null, toDisplayString(unref(t)(\"diff.prefixValue\", {\n\t\t\t\t\t\t\t\t\ttokens: latestDiff.value?.prefixTokens ?? 0,\n\t\t\t\t\t\t\t\t\tpercent: prefixPercent.value\n\t\t\t\t\t\t\t\t})), 1)\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\tlatestUsage.value?.cacheStatus === \"not-reported\" ? (openBlock(), createElementBlock(\"p\", _hoisted_49$1, toDisplayString(unref(t)(\"diff.cacheNotReportedNote\")), 1)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\tcreateBaseVNode(\"p\", _hoisted_50$1, toDisplayString(unref(t)(\"diff.estimateNote\")), 1)\n\t\t\t\t\t\t])) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\tvisibleDiffBlocks.value.length === 0 ? (openBlock(), createElementBlock(\"div\", _hoisted_51$1, toDisplayString(mode.value === \"draft\" ? unref(t)(\"diff.draftSame\") : unref(t)(\"diff.runSame\")), 1)) : (openBlock(), createElementBlock(\"div\", _hoisted_52, [(openBlock(true), createElementBlock(Fragment, null, renderList(visibleDiffBlocks.value, (block, index) => {\n\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"div\", {\n\t\t\t\t\t\t\t\tkey: `${blockKey(block)}-${index}`,\n\t\t\t\t\t\t\t\tclass: normalizeClass([\"context-diff-block\", block.status])\n\t\t\t\t\t\t\t}, [_cache[9] || (_cache[9] = createBaseVNode(\"span\", { class: \"block-gutter\" }, null, -1)), createBaseVNode(\"div\", _hoisted_53, [createBaseVNode(\"div\", _hoisted_54, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_55, toDisplayString(block.status), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_56, toDisplayString(blockKey(block)), 1),\n\t\t\t\t\t\t\t\tblockRole(block) ? (openBlock(), createElementBlock(\"span\", _hoisted_57, toDisplayString(blockRole(block)), 1)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_58, toDisplayString(blockTokenText(block)), 1)\n\t\t\t\t\t\t\t]), metadataOnlyChange(block) ? (openBlock(), createElementBlock(\"div\", _hoisted_59, toDisplayString(metadataChangeText(block)), 1)) : diffLayout.value === \"unified\" ? (openBlock(), createElementBlock(\"div\", {\n\t\t\t\t\t\t\t\tkey: 1,\n\t\t\t\t\t\t\t\tclass: \"git-diff unified\",\n\t\t\t\t\t\t\t\trole: \"table\",\n\t\t\t\t\t\t\t\t\"aria-label\": unref(t)(\"diff.unifiedAria\")\n\t\t\t\t\t\t\t}, [(openBlock(true), createElementBlock(Fragment, null, renderList(blockLineRows(block), (row, rowIndex) => {\n\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(Fragment, { key: rowIndex }, [row.kind === \"separator\" ? (openBlock(), createElementBlock(\"div\", _hoisted_61, \"⋯\")) : (openBlock(), createElementBlock(\"div\", {\n\t\t\t\t\t\t\t\t\tkey: 1,\n\t\t\t\t\t\t\t\t\tclass: normalizeClass([\"git-line\", row.kind]),\n\t\t\t\t\t\t\t\t\trole: \"row\"\n\t\t\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_62, toDisplayString(row.beforeLine ?? \"\"), 1),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_63, toDisplayString(row.afterLine ?? \"\"), 1),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_64, toDisplayString(lineMarker(row)), 1),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"code\", null, [row.kind === \"note\" ? (openBlock(), createElementBlock(\"span\", _hoisted_65, toDisplayString(eofNoteSide(row)) + \" · \", 1)) : createCommentVNode(\"v-if\", true), (openBlock(true), createElementBlock(Fragment, null, renderList(row.parts, (part, partIndex) => {\n\t\t\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(Fragment, { key: partIndex }, [part.changed && row.kind !== \"same\" ? (openBlock(), createElementBlock(\"mark\", _hoisted_66, toDisplayString(part.text), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(part.text), 1)], 64))], 64);\n\t\t\t\t\t\t\t\t\t}), 128))])\n\t\t\t\t\t\t\t\t], 2))], 64);\n\t\t\t\t\t\t\t}), 128))], 8, _hoisted_60)) : (openBlock(), createElementBlock(\"div\", {\n\t\t\t\t\t\t\t\tkey: 2,\n\t\t\t\t\t\t\t\tclass: \"git-diff split\",\n\t\t\t\t\t\t\t\trole: \"table\",\n\t\t\t\t\t\t\t\t\"aria-label\": unref(t)(\"diff.splitAria\")\n\t\t\t\t\t\t\t}, [createBaseVNode(\"div\", _hoisted_68, [createBaseVNode(\"span\", null, toDisplayString(unref(t)(\"diff.before\")), 1), createBaseVNode(\"span\", null, toDisplayString(unref(t)(\"diff.after\")), 1)]), (openBlock(true), createElementBlock(Fragment, null, renderList(blockSplitRows(block), (row, rowIndex) => {\n\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(Fragment, { key: rowIndex }, [row.kind === \"separator\" ? (openBlock(), createElementBlock(\"div\", _hoisted_69, \"⋯\")) : (openBlock(), createElementBlock(\"div\", _hoisted_70, [createBaseVNode(\"div\", { class: normalizeClass([\"git-line\", row.before?.kind ?? \"blank\"]) }, [\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_71, toDisplayString(row.before?.beforeLine ?? \"\"), 1),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_72, toDisplayString(row.before ? lineMarker(row.before) : \"\"), 1),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"code\", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(row.before?.parts ?? [], (part, partIndex) => {\n\t\t\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(Fragment, { key: partIndex }, [part.changed && row.before?.kind !== \"same\" ? (openBlock(), createElementBlock(\"mark\", _hoisted_73, toDisplayString(part.text), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(part.text), 1)], 64))], 64);\n\t\t\t\t\t\t\t\t\t}), 128))])\n\t\t\t\t\t\t\t\t], 2), createBaseVNode(\"div\", { class: normalizeClass([\"git-line\", row.after?.kind ?? \"blank\"]) }, [\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_74, toDisplayString(row.after?.afterLine ?? \"\"), 1),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_75, toDisplayString(row.after ? lineMarker(row.after) : \"\"), 1),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"code\", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(row.after?.parts ?? [], (part, partIndex) => {\n\t\t\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(Fragment, { key: partIndex }, [part.changed && row.after?.kind !== \"same\" ? (openBlock(), createElementBlock(\"mark\", _hoisted_76, toDisplayString(part.text), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(part.text), 1)], 64))], 64);\n\t\t\t\t\t\t\t\t\t}), 128))])\n\t\t\t\t\t\t\t\t], 2)]))], 64);\n\t\t\t\t\t\t\t}), 128))], 8, _hoisted_67))])], 2);\n\t\t\t\t\t\t}), 128))]))\n\t\t\t\t\t], 64))], 512), [[vShow, mode.value === \"draft\" || mode.value === \"run\"]])\n\t\t\t\t]);\n\t\t\t};\n\t\t}\n\t}), [[\"__scopeId\", \"data-v-21a80ca0\"]]);\n\t//#endregion\n\t//#region src/web-editor/client/vue-context-diff-host.ts\n\tinit_vue_runtime_esm_bundler();\n\t/** Mounts the self-contained preview/diff dock component into a root element. */\n\tfunction createVueContextDiffHost(deps) {\n\t\tlet app;\n\t\tfunction mount(root) {\n\t\t\tunmount();\n\t\t\tapp = createApp(ContextDiffPanel_default, {\n\t\t\t\tgetStackDraft: deps.getStackDraft,\n\t\t\t\tsubscribeStackDraft: deps.subscribeStackDraft,\n\t\t\t\tonStatus: deps.setStatus,\n\t\t\t\tonExpandedChanged: deps.setExpanded\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\t//#endregion\n\t//#region src/web-editor/client/editor-view-coordinator.ts\n\t/**\n\t* Synchronously announces the next editor view before its host mounts.\n\t*\n\t* The stack editor is split across legacy tab and Preview dock hosts. A single\n\t* activation signal lets the inactive Vue host unmount before view state changes.\n\t*/\n\tfunction activateEditorView(viewId) {\n\t\tactiveViewId = viewId;\n\t\tfor (const listener of [...listeners]) listener(viewId);\n\t}\n\tfunction currentEditorView() {\n\t\treturn activeViewId;\n\t}\n\tfunction subscribeEditorView(listener) {\n\t\tlisteners.add(listener);\n\t\treturn () => listeners.delete(listener);\n\t}\n\tvar activeViewId, listeners;\n\tvar init_editor_view_coordinator = __esmMin((() => {\n\t\tactiveViewId = \"items\";\n\t\tlisteners = /* @__PURE__ */ new Set();\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/context-diff-tab-host.ts\n\tinit_editor_view_coordinator();\n\tfunction startContextDiffTabs(deps) {\n\t\tconst nav = document.querySelector(\".view-tabs\");\n\t\tconst dockArea = document.getElementById(\"editorDockArea\");\n\t\tconst workspace = document.getElementById(\"workspace\");\n\t\tconst legacyPanel = document.getElementById(\"tabPanel\");\n\t\tconst panel = document.getElementById(\"contextDiffPanel\");\n\t\tconst status = document.getElementById(\"status\");\n\t\tif (!nav || !dockArea || !workspace || !legacyPanel || !panel) return () => {};\n\t\tconst definition = getEditorTab(\"preview\");\n\t\tif (!definition?.internalDock) return () => {};\n\t\tconst definitionId = definition.id;\n\t\tconst button = document.querySelector(`[data-dock-tab=\"${definitionId}\"]`);\n\t\tif (!button) return () => {};\n\t\tconst navElement = nav;\n\t\tconst dockAreaElement = dockArea;\n\t\tconst workspaceElement = workspace;\n\t\tconst legacyPanelElement = legacyPanel;\n\t\tconst panelElement = panel;\n\t\tconst buttonElement = button;\n\t\tconst statusElement = status;\n\t\tlet active = false;\n\t\tlet contextDiffHost;\n\t\tfunction setStatus(text, tone = \"\") {\n\t\t\tif (!statusElement) return;\n\t\t\tstatusElement.textContent = text;\n\t\t\tstatusElement.style.color = tone === \"error\" ? \"var(--error)\" : tone === \"success\" ? \"var(--success)\" : \"var(--muted)\";\n\t\t}\n\t\tfunction setActiveButton(activeState) {\n\t\t\tbuttonElement.classList.toggle(\"active\", activeState);\n\t\t}\n\t\tfunction clearLegacyActive() {\n\t\t\tfor (const element of navElement.querySelectorAll(\"[data-tab]\")) element.classList.remove(\"active\");\n\t\t}\n\t\tfunction clearActiveState() {\n\t\t\tif (!active) return;\n\t\t\tactive = false;\n\t\t\tsetActiveButton(false);\n\t\t\tdockAreaElement.classList.remove(\"dock-open\");\n\t\t\tdockAreaElement.classList.remove(\"dock-focus\");\n\t\t\tpanelElement.classList.remove(\"open\");\n\t\t\tcontextDiffHost?.unmount();\n\t\t\tcontextDiffHost = void 0;\n\t\t}\n\t\tfunction activate() {\n\t\t\tactivateEditorView(definitionId);\n\t\t\tactive = true;\n\t\t\tclearLegacyActive();\n\t\t\tsetActiveButton(true);\n\t\t\tworkspaceElement.style.display = \"\";\n\t\t\tlegacyPanelElement.classList.remove(\"open\");\n\t\t\tdockAreaElement.classList.add(\"dock-open\");\n\t\t\tpanelElement.classList.add(\"open\");\n\t\t\tif (!contextDiffHost) contextDiffHost = createVueContextDiffHost({\n\t\t\t\tgetStackDraft: deps.getStackDraft,\n\t\t\t\tsubscribeStackDraft: deps.subscribeStackDraft,\n\t\t\t\tsetStatus,\n\t\t\t\tsetExpanded: (expanded) => dockAreaElement.classList.toggle(\"dock-focus\", expanded)\n\t\t\t});\n\t\t\tcontextDiffHost.mount(panelElement);\n\t\t}\n\t\tbuttonElement.onclick = (event) => {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tif (active) {\n\t\t\t\tdocument.querySelector(\"[data-tab=\\\"items\\\"]\")?.click();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tactivate();\n\t\t};\n\t\tconst stopEditorView = subscribeEditorView((viewId) => {\n\t\t\tif (viewId !== definitionId) clearActiveState();\n\t\t});\n\t\treturn () => {\n\t\t\tbuttonElement.onclick = null;\n\t\t\tstopEditorView();\n\t\t\tclearActiveState();\n\t\t\tdockAreaElement.classList.remove(\"dock-focus\");\n\t\t};\n\t}\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\"&\": \"&amp;\",\n\t\t\t\"<\": \"&lt;\",\n\t\t\t\">\": \"&gt;\",\n\t\t\t\"\\\"\": \"&quot;\",\n\t\t\t\"'\": \"&#039;\"\n\t\t})[character]);\n\t}\n\tfunction attr(value) {\n\t\treturn escapeHtml(value).replace(/`/g, \"&#096;\");\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(t(\"inspector.validationComplete\"), \"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(t(\"inspector.armed\"));\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(t(\"inspector.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 = t(\"inspector.armedButton\");\n\t\t\t\tbutton.classList.add(\"primary\");\n\t\t\t\tbutton.title = t(\"inspector.armedButtonTitle\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (payloadSnapshot.status === \"captured\") {\n\t\t\t\tbutton.textContent = t(\"inspector.viewPayload\");\n\t\t\t\tbutton.title = t(\"inspector.viewPayloadTitle\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tbutton.textContent = t(\"chrome.armPayload\");\n\t\t\tbutton.title = t(\"inspector.armTitle\");\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 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=\\\"\" + attr(t(\"inspector.payloadTitle\")) + \"\\\"><div class=\\\"preview-head\\\"><div><div class=\\\"preview-title\\\">\" + escapeHtml(t(\"inspector.payloadTitle\")) + \"</div><div class=\\\"preview-meta\\\">\" + escapeHtml(t(\"inspector.noPayload\")) + \"</div></div><div class=\\\"preview-actions\\\"><button data-payload-arm=\\\"true\\\" data-icon=\\\"◆\\\" title=\\\"\" + attr(t(\"inspector.armNextTitle\")) + \"\\\">\" + escapeHtml(t(\"inspector.armNext\")) + \"</button><button data-preview-close=\\\"true\\\" data-icon=\\\"×\\\" title=\\\"\" + attr(t(\"inspector.closePayload\")) + \"\\\">\" + escapeHtml(t(\"modal.close\")) + \"</button></div></div><div class=\\\"preview-body\\\"><div class=\\\"empty\\\">\" + escapeHtml(t(\"inspector.armEmptyBody\")) + \"</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 ? t(\"inspector.armedAt\", { time: snapshot.armedAt }) : t(\"inspector.armedWaiting\");\n\t\t\t\tpreviewCopyTexts = [];\n\t\t\t\tpane.innerHTML = \"<div class=\\\"preview-dialog\\\" role=\\\"dialog\\\" aria-modal=\\\"true\\\" aria-label=\\\"\" + attr(t(\"inspector.payloadTitle\")) + \"\\\"><div class=\\\"preview-head\\\"><div><div class=\\\"preview-title\\\">\" + escapeHtml(t(\"inspector.armedTitle\")) + \"</div><div class=\\\"preview-meta\\\">\" + escapeHtml(meta) + \"</div></div><div class=\\\"preview-actions\\\"><button class=\\\"danger\\\" data-payload-clear=\\\"true\\\" data-icon=\\\"×\\\" title=\\\"\" + attr(t(\"inspector.clearArmedTitle\")) + \"\\\">\" + escapeHtml(t(\"inspector.clear\")) + \"</button><button data-preview-close=\\\"true\\\" data-icon=\\\"×\\\" title=\\\"\" + attr(t(\"inspector.closePayload\")) + \"\\\">\" + escapeHtml(t(\"modal.close\")) + \"</button></div></div><div class=\\\"preview-body\\\"><div class=\\\"empty\\\">\" + escapeHtml(t(\"inspector.armedBody\")) + \"</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=\\\"\" + attr(t(\"inspector.copySectionTitle\")) + \"\\\" onclick=\\\"event.preventDefault()\\\">\" + escapeHtml(t(\"inspector.copy\")) + \"</button></summary><pre class=\\\"preview-text\\\">\" + escapeHtml(section.content || \"\") + \"</pre></details>\";\n\t\t\t}).join(\"\");\n\t\t\tconst metaParts = [\n\t\t\t\tt(\"inspector.chars\", { count: formatCount(capture.chars) }),\n\t\t\t\t\"~\" + formatCount(capture.approxTokens) + \" tokens\",\n\t\t\t\tcapture.stackId ? t(\"inspector.stackId\", { id: capture.stackId }) : void 0,\n\t\t\t\tcapture.truncated ? t(\"inspector.truncated\") : void 0\n\t\t\t].filter(Boolean);\n\t\t\tpane.innerHTML = \"<div class=\\\"preview-dialog\\\" role=\\\"dialog\\\" aria-modal=\\\"true\\\" aria-label=\\\"\" + attr(t(\"inspector.payloadTitle\")) + \"\\\"><div class=\\\"preview-head\\\"><div><div class=\\\"preview-title\\\">\" + escapeHtml(t(\"inspector.payloadTitle\")) + \"</div><div class=\\\"preview-meta\\\">\" + escapeHtml(metaParts.join(\" · \") + (capture.capturedAt ? \" · \" + capture.capturedAt : \"\")) + \"</div></div><div class=\\\"preview-actions\\\"><button class=\\\"preview-copy\\\" data-copy-index=\\\"0\\\" data-icon=\\\"□\\\" title=\\\"\" + attr(t(\"inspector.copyPayloadTitle\")) + \"\\\">\" + escapeHtml(t(\"inspector.copyFull\")) + \"</button><button data-payload-arm=\\\"true\\\" data-icon=\\\"◆\\\" title=\\\"\" + attr(t(\"inspector.armNextTitle\")) + \"\\\">\" + escapeHtml(t(\"inspector.armAgain\")) + \"</button><button class=\\\"danger\\\" data-payload-clear=\\\"true\\\" data-icon=\\\"×\\\" title=\\\"\" + attr(t(\"inspector.clearCapturedTitle\")) + \"\\\">\" + escapeHtml(t(\"inspector.clear\")) + \"</button><button data-preview-close=\\\"true\\\" data-icon=\\\"×\\\" title=\\\"\" + attr(t(\"inspector.closePayload\")) + \"\\\">\" + escapeHtml(t(\"modal.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 ? t(\"inspector.stringifyError\") : capture.truncated ? t(\"inspector.rawTruncated\") : t(\"inspector.rawPayload\"),\n\t\t\t\tmeta: t(\"inspector.chars\", { count: formatCount((capture.text || \"\").length) }),\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) + \" · \" + t(\"inspector.chars\", { count: formatCount(content.length) }),\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(t(\"inspector.copiedText\"), \"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\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\tinit_i18n();\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$5, _hoisted_8$5, _hoisted_9$5, _hoisted_10$5, _hoisted_11$5, _hoisted_12$5, _hoisted_13$5, _hoisted_14$5, _hoisted_15$5, _hoisted_16$5, _hoisted_17$4, _hoisted_18$3, _hoisted_19$3, _hoisted_20$3, _hoisted_21$3, _hoisted_22$3, _hoisted_23$3, _hoisted_24$3, _hoisted_25$3, _hoisted_26$3, _hoisted_27$2, _hoisted_28$2, _hoisted_29$2, _hoisted_30$2, _hoisted_31$2, _hoisted_32$2, _hoisted_33$2, _hoisted_34$2, _hoisted_35$2, _hoisted_36$2, _hoisted_37$2, _hoisted_38$2, _hoisted_39$2, _hoisted_40$2, _hoisted_41$2, 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\tinit_i18n();\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$5 = { class: \"field\" };\n\t\t_hoisted_8$5 = [\"value\"];\n\t\t_hoisted_9$5 = { class: \"field\" };\n\t\t_hoisted_10$5 = [\"value\"];\n\t\t_hoisted_11$5 = [\"value\"];\n\t\t_hoisted_12$5 = {\n\t\t\tkey: 0,\n\t\t\tclass: \"field\"\n\t\t};\n\t\t_hoisted_13$5 = [\"value\"];\n\t\t_hoisted_14$5 = [\"value\"];\n\t\t_hoisted_15$5 = { class: \"item-body\" };\n\t\t_hoisted_16$5 = {\n\t\t\tkey: 0,\n\t\t\tclass: \"field content-field\"\n\t\t};\n\t\t_hoisted_17$4 = [\"value\"];\n\t\t_hoisted_18$3 = {\n\t\t\tkey: 1,\n\t\t\tclass: \"field wide slot-options\"\n\t\t};\n\t\t_hoisted_19$3 = { class: \"segmented\" };\n\t\t_hoisted_20$3 = [\"value\"];\n\t\t_hoisted_21$3 = {\n\t\t\tkey: 1,\n\t\t\tclass: \"options-grid\"\n\t\t};\n\t\t_hoisted_22$3 = [\"title\"];\n\t\t_hoisted_23$3 = [\"checked\"];\n\t\t_hoisted_24$3 = [\"title\"];\n\t\t_hoisted_25$3 = [\"checked\"];\n\t\t_hoisted_26$3 = [\"title\"];\n\t\t_hoisted_27$2 = [\"checked\"];\n\t\t_hoisted_28$2 = [\"title\"];\n\t\t_hoisted_29$2 = [\"value\"];\n\t\t_hoisted_30$2 = [\"title\"];\n\t\t_hoisted_31$2 = [\"value\"];\n\t\t_hoisted_32$2 = [\"title\"];\n\t\t_hoisted_33$2 = [\"value\"];\n\t\t_hoisted_34$2 = [\"title\"];\n\t\t_hoisted_35$2 = [\"value\"];\n\t\t_hoisted_36$2 = [\"title\"];\n\t\t_hoisted_37$2 = [\"value\"];\n\t\t_hoisted_38$2 = [\"title\"];\n\t\t_hoisted_39$2 = [\"checked\"];\n\t\t_hoisted_40$2 = {\n\t\t\tkey: 3,\n\t\t\tclass: \"wide option-note\"\n\t\t};\n\t\t_hoisted_41$2 = { class: \"wide option-note\" };\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\tconst slotOptions = computed(() => {\n\t\t\t\t\tconst names = [...props.slotNames];\n\t\t\t\t\tif (item.slot && !names.includes(item.slot)) names.push(item.slot);\n\t\t\t\t\treturn names;\n\t\t\t\t});\n\t\t\t\tfunction slotLabel(name) {\n\t\t\t\t\treturn props.slotNames.includes(name) ? name : t(\"item.slotUnregistered\", { name });\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\tconst known = `item.opt.${key}`;\n\t\t\t\t\tconst translated = t(known);\n\t\t\t\t\treturn translated === known ? t(\"item.opt.advanced\") : translated;\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, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"item.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, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"item.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$5, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"item.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$5)]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_9$5, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"item.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 || unref(t)(\"item.roleNone\")), 9, _hoisted_11$5);\n\t\t\t\t\t\t}), 128))], 40, _hoisted_10$5)]),\n\t\t\t\t\t\titem.kind === \"slot\" ? (openBlock(), createElementBlock(\"div\", _hoisted_12$5, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"item.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(slotOptions.value, (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(slotLabel(slot)), 9, _hoisted_14$5);\n\t\t\t\t\t\t}), 128))], 40, _hoisted_13$5)])) : createCommentVNode(\"v-if\", true)\n\t\t\t\t\t]), createBaseVNode(\"div\", _hoisted_15$5, [item.kind === \"block\" ? (openBlock(), createElementBlock(\"div\", _hoisted_16$5, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"item.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$4)])) : (openBlock(), createElementBlock(\"div\", _hoisted_18$3, [\n\t\t\t\t\t\tcreateBaseVNode(\"label\", null, toDisplayString(unref(t)(\"item.slotOptions\")), 1),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_19$3, [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}, toDisplayString(unref(t)(\"item.form\")), 3), 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$3)) : (openBlock(), createElementBlock(\"div\", _hoisted_21$3, [\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$3), createTextVNode(\" \" + toDisplayString(unref(t)(\"item.includeLastUserMessage\")), 1)], 8, _hoisted_22$3),\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$3), createTextVNode(\" \" + toDisplayString(unref(t)(\"item.stripAssistantThinking\")), 1)], 8, _hoisted_24$3),\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$2), createTextVNode(\" \" + toDisplayString(unref(t)(\"item.includeSummaries\")), 1)], 8, _hoisted_26$3),\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}, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"item.toolHistory\")), 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[19] || (_cache[19] = [createBaseVNode(\"option\", { value: \"keep\" }, \"keep\", -1), createBaseVNode(\"option\", { value: \"drop\" }, \"drop\", -1)])], 40, _hoisted_29$2)], 8, _hoisted_28$2),\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}, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"item.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$2)], 8, _hoisted_30$2),\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}, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"item.maxMessages\")), 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$2)], 8, _hoisted_32$2),\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}, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"item.maxChars\")), 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$2)], 8, _hoisted_34$2)\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}, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"item.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[20] || (_cache[20] = [createBaseVNode(\"option\", { value: \"xml\" }, \"xml\", -1), createBaseVNode(\"option\", { value: \"plain\" }, \"plain\", -1)])], 40, _hoisted_37$2)], 8, _hoisted_36$2)) : 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$2), createTextVNode(\" \" + toDisplayString(unref(t)(\"item.includeTime\")), 1)], 8, _hoisted_38$2)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\tstructuredOptionCount.value === 0 ? (openBlock(), createElementBlock(\"div\", _hoisted_40$2, toDisplayString(unref(t)(\"item.noStructuredOptions\")), 1)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_41$2, toDisplayString(unref(t)(\"item.unknownKeysPreserved\")), 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.getSlotNames(),\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(t(\"error.invalidItemOptionsShort\"), \"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_i18n();\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$4, _hoisted_8$4, _hoisted_9$4, _hoisted_10$4, _hoisted_11$4, _hoisted_12$4, _hoisted_13$4, _hoisted_14$4, _hoisted_15$4, _hoisted_16$4, _hoisted_17$3, 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\tinit_i18n();\n\t\t_hoisted_1$4 = { class: \"metadata-head\" };\n\t\t_hoisted_2$4 = [\n\t\t\t\"data-icon\",\n\t\t\t\"aria-expanded\",\n\t\t\t\"title\"\n\t\t];\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\", \"title\"];\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 = { class: \"field\" };\n\t\t_hoisted_12$4 = { class: \"checkline\" };\n\t\t_hoisted_13$4 = [\"checked\"];\n\t\t_hoisted_14$4 = { class: \"field wide\" };\n\t\t_hoisted_15$4 = [\"value\"];\n\t\t_hoisted_16$4 = { class: \"field wide\" };\n\t\t_hoisted_17$3 = [\"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 || t(\"metadata.noId\"),\n\t\t\t\t\tprops.stack.name || t(\"stackList.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, [createBaseVNode(\"button\", {\n\t\t\t\t\t\tid: \"metadataToggleBtn\",\n\t\t\t\t\t\t\"data-icon\": collapsed.value ? \"▸\" : \"▾\",\n\t\t\t\t\t\t\"aria-expanded\": !collapsed.value,\n\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\ttitle: unref(t)(\"metadata.toggleTitle\"),\n\t\t\t\t\t\tonClick: toggleMetadata\n\t\t\t\t\t}, toDisplayString(unref(t)(\"metadata.title\")), 9, _hoisted_2$4), createBaseVNode(\"div\", _hoisted_3$4, toDisplayString(summary.value), 1)]), withDirectives(createBaseVNode(\"div\", _hoisted_4$4, [\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_5$4, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"metadata.stackId\")), 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: unref(t)(\"metadata.stackIdTitle\")\n\t\t\t\t\t\t}, null, 8, _hoisted_6$4)]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_7$4, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"metadata.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$4)]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_9$4, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"metadata.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[4] || (_cache[4] = [\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$4)]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_11$4, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"metadata.autoActivate\")), 1), createBaseVNode(\"label\", _hoisted_12$4, [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$4), createTextVNode(\" \" + toDisplayString(unref(t)(\"metadata.enabled\")), 1)])]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_14$4, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"metadata.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$4)]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_16$4, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"metadata.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$3)])\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 ? t(\"status.metadataHidden\") : t(\"status.metadataShown\"));\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_i18n();\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$3, _hoisted_8$3, _hoisted_9$3, _hoisted_10$3, _hoisted_11$3, _hoisted_12$3, _hoisted_13$3, _hoisted_14$3, _hoisted_15$3, _hoisted_16$3, _hoisted_17$2, _hoisted_18$2, _hoisted_19$2, _hoisted_20$2, _hoisted_21$2, _hoisted_22$2, _hoisted_23$2, _hoisted_24$2, _hoisted_25$2, _hoisted_26$2, 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\tinit_i18n();\n\t\t_hoisted_1$3 = { class: \"tab-section\" };\n\t\t_hoisted_2$3 = { class: \"tab-section-title\" };\n\t\t_hoisted_3$3 = { class: \"tab-section-meta\" };\n\t\t_hoisted_4$3 = {\n\t\t\tid: \"policyRows\",\n\t\t\tclass: \"data-table\"\n\t\t};\n\t\t_hoisted_5$3 = { class: \"data-row header policy-row\" };\n\t\t_hoisted_6$3 = [\"data-policy-kind\", \"data-policy-mode\"];\n\t\t_hoisted_7$3 = { class: \"policy-title\" };\n\t\t_hoisted_8$3 = { class: \"modal-meta\" };\n\t\t_hoisted_9$3 = { class: \"field\" };\n\t\t_hoisted_10$3 = { class: \"segmented policy-mode\" };\n\t\t_hoisted_11$3 = [\"data-policy-mode-option\", \"onClick\"];\n\t\t_hoisted_12$3 = { class: \"field\" };\n\t\t_hoisted_13$3 = {\n\t\t\tclass: \"selected-patterns\",\n\t\t\t\"data-selected-patterns\": \"\"\n\t\t};\n\t\t_hoisted_14$3 = {\n\t\t\tkey: 0,\n\t\t\tclass: \"selected-pattern-empty\"\n\t\t};\n\t\t_hoisted_15$3 = [\n\t\t\t\"data-remove-policy-pattern\",\n\t\t\t\"title\",\n\t\t\t\"onClick\"\n\t\t];\n\t\t_hoisted_16$3 = [\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_17$2 = { class: \"resource-picker\" };\n\t\t_hoisted_18$2 = { key: 0 };\n\t\t_hoisted_19$2 = [\n\t\t\t\"list\",\n\t\t\t\"placeholder\",\n\t\t\t\"value\",\n\t\t\t\"onInput\",\n\t\t\t\"onKeydown\"\n\t\t];\n\t\t_hoisted_20$2 = [\"id\"];\n\t\t_hoisted_21$2 = [\"value\"];\n\t\t_hoisted_22$2 = {\n\t\t\tclass: \"resource-list\",\n\t\t\t\"data-resource-list\": \"\"\n\t\t};\n\t\t_hoisted_23$2 = {\n\t\t\tkey: 0,\n\t\t\tclass: \"resource-empty\"\n\t\t};\n\t\t_hoisted_24$2 = [\n\t\t\t\"data-resource-name\",\n\t\t\t\"title\",\n\t\t\t\"onClick\"\n\t\t];\n\t\t_hoisted_25$2 = {\n\t\t\tkey: 1,\n\t\t\tclass: \"resource-empty\"\n\t\t};\n\t\t_hoisted_26$2 = {\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 = [{ kind: \"tools\" }, { kind: \"skills\" }];\n\t\t\t\tfunction kindLabel(kind) {\n\t\t\t\t\treturn t(kind === \"tools\" ? \"policy.tools\" : \"policy.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(t(\"error.duplicatePattern\", {\n\t\t\t\t\t\t\tkind,\n\t\t\t\t\t\t\tmode: row.mode,\n\t\t\t\t\t\t\tpattern: duplicate\n\t\t\t\t\t\t}));\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 tp(\"policy.allowListActiveOne\", \"policy.allowListActiveMany\", patterns.length);\n\t\t\t\t\tif (mode === \"allow\" && patterns.length) return t(\"policy.unrestricted\", { kind: kindLabel(kind) });\n\t\t\t\t\tif (mode === \"deny\" && patterns.length) return tp(\"policy.denyListActiveOne\", \"policy.denyListActiveMany\", patterns.length);\n\t\t\t\t\treturn t(\"policy.unrestricted\", { kind: kindLabel(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 ? t(\"policy.sourceLabel\", { source: resource.source }) : \"\",\n\t\t\t\t\t\tresource.active ? t(\"policy.currentlyActive\") : t(\"policy.registeredInactive\"),\n\t\t\t\t\t\tresource.hidden ? t(\"policy.hiddenFromModel\") : \"\"\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 ? t(\"policy.suffixHidden\") : \"\";\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\tcreateBaseVNode(\"div\", _hoisted_2$3, toDisplayString(unref(t)(\"policy.title\")), 1),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_3$3, toDisplayString(unref(t)(\"policy.meta\")), 1),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_4$3, [createBaseVNode(\"div\", _hoisted_5$3, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, toDisplayString(unref(t)(\"policy.resource\")), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, toDisplayString(unref(t)(\"policy.mode\")), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, toDisplayString(unref(t)(\"policy.patterns\")), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, toDisplayString(unref(t)(\"policy.available\")), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, toDisplayString(unref(t)(\"policy.status\")), 1)\n\t\t\t\t\t\t]), (openBlock(), createElementBlock(Fragment, null, renderList(policyKinds, ({ kind }) => {\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_7$3, toDisplayString(kindLabel(kind)), 1), createBaseVNode(\"div\", _hoisted_8$3, toDisplayString(kind), 1)]),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_9$3, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"policy.mode\")), 1), createBaseVNode(\"div\", _hoisted_10$3, [(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\tlabelKey: \"policy.unrestrictedOption\"\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\tlabelKey: \"policy.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\tlabelKey: \"policy.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(unref(t)(option.labelKey)), 11, _hoisted_11$3);\n\t\t\t\t\t\t\t\t}), 64))])]),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_12$3, [\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"label\", null, toDisplayString(unref(t)(\"policy.patterns\")), 1),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_13$3, [!selectedPatterns(kind).length ? (openBlock(), createElementBlock(\"span\", _hoisted_14$3, toDisplayString(unref(t)(\"policy.noPatterns\")), 1)) : (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: unref(t)(\"policy.removePatternTitle\"),\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[0] || (_cache[0] = createBaseVNode(\"span\", { \"aria-hidden\": \"true\" }, \"x\", -1))], 8, _hoisted_15$3);\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_16$3)\n\t\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_17$2, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"policy.availableKind\", { kind: kindLabel(kind) })), 1), props.resources[kind]?.length ? (openBlock(), createElementBlock(\"div\", _hoisted_18$2, [\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: unref(t)(\"policy.filterPlaceholder\"),\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_19$2),\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_21$2);\n\t\t\t\t\t\t\t\t\t}), 128))], 8, _hoisted_20$2),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_22$2, [!availableResources(kind).length ? (openBlock(), createElementBlock(\"div\", _hoisted_23$2, toDisplayString(unref(t)(\"policy.noMatching\", { kind: kindLabel(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_24$2);\n\t\t\t\t\t\t\t\t\t}), 128))])\n\t\t\t\t\t\t\t\t])) : (openBlock(), createElementBlock(\"div\", _hoisted_25$2, toDisplayString(unref(t)(\"policy.noRegistered\", { kind: kindLabel(kind) })), 1))]),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_26$2, toDisplayString(policySummary(kind)), 1)\n\t\t\t\t\t\t\t], 8, _hoisted_6$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$2, _hoisted_8$2, _hoisted_9$2, _hoisted_10$2, _hoisted_11$2, _hoisted_12$2, _hoisted_13$2, _hoisted_14$2, _hoisted_15$2, _hoisted_16$2, _hoisted_17$1, _hoisted_18$1, _hoisted_19$1, _hoisted_20$1, _hoisted_21$1, _hoisted_22$1, _hoisted_23$1, _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$1, _hoisted_45, _hoisted_46, _hoisted_47, _hoisted_48, _hoisted_49, _hoisted_50, _hoisted_51, 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\tinit_i18n();\n\t\t_hoisted_1$2 = { class: \"tab-section\" };\n\t\t_hoisted_2$2 = { class: \"tab-section-title\" };\n\t\t_hoisted_3$2 = { class: \"tab-section-meta\" };\n\t\t_hoisted_4$2 = { class: \"modal-toolbar\" };\n\t\t_hoisted_5$2 = [\"title\"];\n\t\t_hoisted_6$2 = [\"title\"];\n\t\t_hoisted_7$2 = { class: \"modal-meta\" };\n\t\t_hoisted_8$2 = {\n\t\t\tid: \"regexRows\",\n\t\t\tclass: \"data-table\"\n\t\t};\n\t\t_hoisted_9$2 = { class: \"regex-controls\" };\n\t\t_hoisted_10$2 = [\"title\", \"onClick\"];\n\t\t_hoisted_11$2 = [\"title\", \"onClick\"];\n\t\t_hoisted_12$2 = { class: \"regex-fields\" };\n\t\t_hoisted_13$2 = [\"value\"];\n\t\t_hoisted_14$2 = { class: \"checkline\" };\n\t\t_hoisted_15$2 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_16$2 = { class: \"field\" };\n\t\t_hoisted_17$1 = [\"onUpdate:modelValue\", \"placeholder\"];\n\t\t_hoisted_18$1 = { class: \"field\" };\n\t\t_hoisted_19$1 = [\"onUpdate:modelValue\", \"placeholder\"];\n\t\t_hoisted_20$1 = { class: \"field\" };\n\t\t_hoisted_21$1 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_22$1 = [\"value\"];\n\t\t_hoisted_23$1 = { class: \"field\" };\n\t\t_hoisted_24$1 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_25$1 = [\"value\"];\n\t\t_hoisted_26$1 = { class: \"field\" };\n\t\t_hoisted_27$1 = [\"onUpdate:modelValue\", \"title\"];\n\t\t_hoisted_28$1 = [\"value\"];\n\t\t_hoisted_29$1 = { class: \"field\" };\n\t\t_hoisted_30$1 = [\"onUpdate:modelValue\", \"placeholder\"];\n\t\t_hoisted_31$1 = { class: \"field span-2\" };\n\t\t_hoisted_32$1 = [\"title\"];\n\t\t_hoisted_33$1 = [\"onUpdate:modelValue\", \"value\"];\n\t\t_hoisted_34$1 = { class: \"field span-2\" };\n\t\t_hoisted_35$1 = [\"title\"];\n\t\t_hoisted_36$1 = [\"onUpdate:modelValue\", \"value\"];\n\t\t_hoisted_37$1 = { class: \"field\" };\n\t\t_hoisted_38$1 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_39$1 = { class: \"field\" };\n\t\t_hoisted_40$1 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_41$1 = { class: \"field\" };\n\t\t_hoisted_42$1 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_43$1 = { class: \"field\" };\n\t\t_hoisted_44$1 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_45 = { class: \"field span-2\" };\n\t\t_hoisted_46 = [\"onUpdate:modelValue\", \"placeholder\"];\n\t\t_hoisted_47 = { class: \"field span-3\" };\n\t\t_hoisted_48 = [\"onUpdate:modelValue\", \"placeholder\"];\n\t\t_hoisted_49 = { class: \"field span-3\" };\n\t\t_hoisted_50 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_51 = [\"title\", \"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 regexFrequencies = [\"turn\", \"request\"];\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\t\"toolResult\"\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\tfrequency: selectedChoice(rule.frequency, regexFrequencies, \"turn\"),\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 || t(\"regex.ruleLabel\", { index: index + 1 });\n\t\t\t\t\t\tif (!rule.id) errors.push(t(\"regex.errorId\", { index: index + 1 }));\n\t\t\t\t\t\telse if (seen.has(rule.id)) errors.push(t(\"regex.errorDuplicateId\", { id: rule.id }));\n\t\t\t\t\t\tseen.add(rule.id);\n\t\t\t\t\t\tif (!rule.pattern) errors.push(t(\"regex.errorPattern\", { label }));\n\t\t\t\t\t\tif (hasInputValue(row.maxMessages) && !rule.maxMessages) errors.push(t(\"regex.errorPositiveInteger\", {\n\t\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t\tfield: \"maxMessages\"\n\t\t\t\t\t\t}));\n\t\t\t\t\t\tif (hasInputValue(row.maxChars) && !rule.maxChars) errors.push(t(\"regex.errorPositiveInteger\", {\n\t\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t\tfield: \"maxChars\"\n\t\t\t\t\t\t}));\n\t\t\t\t\t\tif (hasInputValue(row.minDepth) && rule.minDepth === void 0) errors.push(t(\"regex.errorNonNegativeInteger\", {\n\t\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t\tfield: \"minDepth\"\n\t\t\t\t\t\t}));\n\t\t\t\t\t\tif (hasInputValue(row.maxDepth) && rule.maxDepth === void 0) errors.push(t(\"regex.errorNonNegativeInteger\", {\n\t\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t\tfield: \"maxDepth\"\n\t\t\t\t\t\t}));\n\t\t\t\t\t\tif (rule.minDepth !== void 0 && rule.maxDepth !== void 0 && rule.maxDepth < rule.minDepth) errors.push(t(\"regex.errorDepthOrder\", { label }));\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\"frequency\",\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\tif (rule.effect !== \"finalize\") rule.frequency = form.frequency || \"turn\";\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 t(\"regex.warnFinalize\");\n\t\t\t\t\tif (typeof rule.replace === \"string\" && /\\{\\{\\s*match\\s*\\}\\}/i.test(rule.replace)) return t(\"regex.warnMatch\");\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\tcreateBaseVNode(\"div\", _hoisted_2$2, toDisplayString(unref(t)(\"regex.title\")), 1),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_3$2, toDisplayString(unref(t)(\"regex.meta\")), 1),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_4$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: unref(t)(\"regex.addRuleTitle\"),\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}, toDisplayString(unref(t)(\"regex.addRule\")), 9, _hoisted_5$2),\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: unref(t)(\"regex.validateTitle\"),\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}, toDisplayString(unref(t)(\"regex.validate\")), 9, _hoisted_6$2),\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\tcreateBaseVNode(\"span\", _hoisted_7$2, toDisplayString(unref(t)(\"regex.saveNote\")), 1)\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_8$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_9$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: unref(t)(\"regex.upTitle\"),\n\t\t\t\t\t\t\t\t\tonClick: ($event) => moveRule(index, -1)\n\t\t\t\t\t\t\t\t}, toDisplayString(unref(t)(\"regex.up\")), 9, _hoisted_10$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: unref(t)(\"regex.downTitle\"),\n\t\t\t\t\t\t\t\t\tonClick: ($event) => moveRule(index, 1)\n\t\t\t\t\t\t\t\t}, toDisplayString(unref(t)(\"regex.down\")), 9, _hoisted_11$2)]),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_12$2, [\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_13$2),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_14$2, [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_15$2), [[vModelCheckbox, row.enabled]]), createTextVNode(\" \" + toDisplayString(unref(t)(\"regex.enabled\")), 1)]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_16$2, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"regex.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: unref(t)(\"regex.idPlaceholder\")\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_17$1), [[vModelText, row.id]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_18$1, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"regex.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: unref(t)(\"regex.namePlaceholder\")\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_19$1), [[vModelText, row.name]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_20$1, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"regex.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_22$1);\n\t\t\t\t\t\t\t\t\t}), 64))], 8, _hoisted_21$1), [[vModelSelect, row.stage]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_23$1, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"regex.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_25$1);\n\t\t\t\t\t\t\t\t\t}), 64))], 8, _hoisted_24$1), [[vModelSelect, row.effect]])]),\n\t\t\t\t\t\t\t\t\twithDirectives(createBaseVNode(\"div\", _hoisted_26$1, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"regex.frequency\")), 1), withDirectives(createBaseVNode(\"select\", {\n\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.frequency = $event,\n\t\t\t\t\t\t\t\t\t\t\"data-regex-frequency\": \"\",\n\t\t\t\t\t\t\t\t\t\ttitle: unref(t)(\"regex.frequencyTitle\")\n\t\t\t\t\t\t\t\t\t}, [(openBlock(), createElementBlock(Fragment, null, renderList(regexFrequencies, (frequency) => {\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: frequency,\n\t\t\t\t\t\t\t\t\t\t\tvalue: frequency\n\t\t\t\t\t\t\t\t\t\t}, toDisplayString(frequency), 9, _hoisted_28$1);\n\t\t\t\t\t\t\t\t\t}), 64))], 8, _hoisted_27$1), [[vModelSelect, row.frequency]])], 512), [[vShow, row.effect !== \"finalize\"]]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_29$1, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"regex.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: unref(t)(\"regex.flagsPlaceholder\")\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_30$1), [[vModelText, row.flags]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_31$1, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"regex.targets\")), 1), createBaseVNode(\"div\", {\n\t\t\t\t\t\t\t\t\t\tclass: \"regex-checks\",\n\t\t\t\t\t\t\t\t\t\ttitle: unref(t)(\"regex.targetsTitle\")\n\t\t\t\t\t\t\t\t\t}, [(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_33$1), [[vModelCheckbox, row.targets]]), createTextVNode(\" \" + toDisplayString(target), 1)]);\n\t\t\t\t\t\t\t\t\t}), 64))], 8, _hoisted_32$1)]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_34$1, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"regex.roles\")), 1), createBaseVNode(\"div\", {\n\t\t\t\t\t\t\t\t\t\tclass: \"regex-checks\",\n\t\t\t\t\t\t\t\t\t\ttitle: unref(t)(\"regex.rolesTitle\")\n\t\t\t\t\t\t\t\t\t}, [(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_36$1), [[vModelCheckbox, row.roles]]), createTextVNode(\" \" + toDisplayString(role), 1)]);\n\t\t\t\t\t\t\t\t\t}), 64))], 8, _hoisted_35$1)]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_37$1, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"item.maxMessages\")), 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_38$1), [[vModelText, row.maxMessages]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_39$1, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"item.maxChars\")), 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_40$1), [[vModelText, row.maxChars]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_41$1, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"regex.minDepth\")), 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_42$1), [[vModelText, row.minDepth]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_43$1, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"regex.maxDepth\")), 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_44$1), [[vModelText, row.maxDepth]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_45, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"regex.trimStrings\")), 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: unref(t)(\"regex.trimStringsPlaceholder\")\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_46), [[vModelText, row.trimStrings]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_47, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"regex.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: unref(t)(\"regex.patternPlaceholder\")\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_48), [[vModelText, row.pattern]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_49, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"regex.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_50), [[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: unref(t)(\"regex.deleteTitle\"),\n\t\t\t\t\t\t\t\t\tonClick: ($event) => deleteRule(index)\n\t\t\t\t\t\t\t\t}, toDisplayString(unref(t)(\"stackTab.deleteVariable\")), 9, _hoisted_51)\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$1, _hoisted_8$1, _hoisted_9$1, _hoisted_10$1, _hoisted_11$1, _hoisted_12$1, _hoisted_13$1, _hoisted_14$1, _hoisted_15$1, _hoisted_16$1, _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, _hoisted_44, 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\tinit_i18n();\n\t\t_hoisted_1$1 = { class: \"tab-section\" };\n\t\t_hoisted_2$1 = { class: \"tab-section-title\" };\n\t\t_hoisted_3$1 = { class: \"tab-section-meta\" };\n\t\t_hoisted_4$1 = [\"title\"];\n\t\t_hoisted_5$1 = [\"checked\"];\n\t\t_hoisted_6$1 = { class: \"option-note\" };\n\t\t_hoisted_7$1 = [\"title\"];\n\t\t_hoisted_8$1 = [\"checked\"];\n\t\t_hoisted_9$1 = { class: \"option-note\" };\n\t\t_hoisted_10$1 = [\"title\"];\n\t\t_hoisted_11$1 = [\"checked\"];\n\t\t_hoisted_12$1 = {\n\t\t\tclass: \"field\",\n\t\t\tfor: \"mergeSeparatorInput\"\n\t\t};\n\t\t_hoisted_13$1 = { class: \"field-label\" };\n\t\t_hoisted_14$1 = [\n\t\t\t\"placeholder\",\n\t\t\t\"value\",\n\t\t\t\"disabled\"\n\t\t];\n\t\t_hoisted_15$1 = { class: \"option-note\" };\n\t\t_hoisted_16$1 = { class: \"tab-section\" };\n\t\t_hoisted_17 = { class: \"tab-section-title\" };\n\t\t_hoisted_18 = { class: \"tab-section-meta\" };\n\t\t_hoisted_19 = { class: \"extension-catalog-grid\" };\n\t\t_hoisted_20 = {\n\t\t\tid: \"macroCatalog\",\n\t\t\tclass: \"extension-catalog\"\n\t\t};\n\t\t_hoisted_21 = {\n\t\t\tkey: 0,\n\t\t\tclass: \"option-note\"\n\t\t};\n\t\t_hoisted_22 = [\"textContent\"];\n\t\t_hoisted_23 = {\n\t\t\tid: \"slotCatalog\",\n\t\t\tclass: \"extension-catalog\"\n\t\t};\n\t\t_hoisted_24 = {\n\t\t\tkey: 0,\n\t\t\tclass: \"option-note\"\n\t\t};\n\t\t_hoisted_25 = { class: \"tab-section\" };\n\t\t_hoisted_26 = { class: \"tab-section-title\" };\n\t\t_hoisted_27 = { class: \"tab-section-meta\" };\n\t\t_hoisted_28 = { class: \"modal-toolbar\" };\n\t\t_hoisted_29 = [\"title\"];\n\t\t_hoisted_30 = { class: \"modal-meta\" };\n\t\t_hoisted_31 = {\n\t\t\tid: \"variablesRows\",\n\t\t\tclass: \"data-table\"\n\t\t};\n\t\t_hoisted_32 = { key: 0 };\n\t\t_hoisted_33 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_34 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_35 = [\"value\", \"onChange\"];\n\t\t_hoisted_36 = { value: \"text\" };\n\t\t_hoisted_37 = [\"title\", \"onClick\"];\n\t\t_hoisted_38 = { class: \"tab-section\" };\n\t\t_hoisted_39 = { class: \"tab-section-title\" };\n\t\t_hoisted_40 = { class: \"tab-section-meta\" };\n\t\t_hoisted_41 = { class: \"modal-toolbar\" };\n\t\t_hoisted_42 = [\"title\"];\n\t\t_hoisted_43 = [\"title\"];\n\t\t_hoisted_44 = {\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\tresources: {},\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(t(\"stackTab.rawDraft\"));\n\t\t\t\tconst mergeEnabled = /* @__PURE__ */ ref(props.stack.context?.mergeConsecutiveRoles === true);\n\t\t\t\tconst customSeparatorEnabled = /* @__PURE__ */ ref(Object.hasOwn(props.stack.context ?? {}, \"mergeSeparator\"));\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 = t(\"stackTab.rawDraft\");\n\t\t\t\t\tmergeEnabled.value = props.stack.context?.mergeConsecutiveRoles === true;\n\t\t\t\t\tcustomSeparatorEnabled.value = Object.hasOwn(props.stack.context ?? {}, \"mergeSeparator\");\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: props.stack.schemaVersion === 2 && typeof value !== \"string\" ? JSON.stringify(value) : String(value ?? \"\"),\n\t\t\t\t\t\tformat: props.stack.schemaVersion === 2 && typeof value !== \"string\" ? \"json\" : \"text\"\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 updateContext(mutate) {\n\t\t\t\t\tconst context = { ...props.stack.context && typeof props.stack.context === \"object\" ? props.stack.context : {} };\n\t\t\t\t\tmutate(context);\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 setMergeConsecutiveRoles(event) {\n\t\t\t\t\tconst checked = event.target.checked;\n\t\t\t\t\tmergeEnabled.value = checked;\n\t\t\t\t\tupdateContext((context) => {\n\t\t\t\t\t\tif (checked) context.mergeConsecutiveRoles = true;\n\t\t\t\t\t\telse delete context.mergeConsecutiveRoles;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tfunction setMergeSeparator(event) {\n\t\t\t\t\tconst value = event.target.value;\n\t\t\t\t\tupdateContext((context) => {\n\t\t\t\t\t\tcontext.mergeSeparator = value;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tfunction setCustomMergeSeparator(event) {\n\t\t\t\t\tconst checked = event.target.checked;\n\t\t\t\t\tcustomSeparatorEnabled.value = checked;\n\t\t\t\t\tupdateContext((context) => {\n\t\t\t\t\t\tif (checked) {\n\t\t\t\t\t\t\tif (typeof context.mergeSeparator !== \"string\") context.mergeSeparator = \"\\n\\n\";\n\t\t\t\t\t\t} else delete context.mergeSeparator;\n\t\t\t\t\t});\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\tformat: \"text\"\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\tlet jsonError = \"\";\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\tif (props.stack.schemaVersion === 2 && row.format === \"json\") try {\n\t\t\t\t\t\t\tvariables[name] = JSON.parse(row.value);\n\t\t\t\t\t\t} catch {\n\t\t\t\t\t\t\tjsonError ||= t(\"stackTab.invalidParameterJson\", { name });\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse variables[name] = row.value;\n\t\t\t\t\t}\n\t\t\t\t\tif (!jsonError && 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 (props.stack.schemaVersion !== 2) 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 ? t(\"stackTab.duplicateVarNames\") : jsonError;\n\t\t\t\t\temit(\"change\", stackError.value);\n\t\t\t\t}\n\t\t\t\tfunction setVariableFormat(row, format) {\n\t\t\t\t\tif (format === row.format) return;\n\t\t\t\t\tif (format === \"json\") row.value = JSON.stringify(row.value);\n\t\t\t\t\telse try {\n\t\t\t\t\t\tconst parsed = JSON.parse(row.value);\n\t\t\t\t\t\trow.value = typeof parsed === \"string\" ? parsed : JSON.stringify(parsed);\n\t\t\t\t\t} catch {}\n\t\t\t\t\trow.format = format;\n\t\t\t\t\tsyncVariables();\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 = t(\"stackTab.copiedJson\");\n\t\t\t\t\t\temit(\"status\", t(\"stackTab.copiedJsonStatus\"), \"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 = t(\"stackTab.appliedJson\");\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(t(\"error.stackJsonNotObject\"));\n\t\t\t\t\tconst candidate = stack;\n\t\t\t\t\tif (typeof candidate.id !== \"string\" || !candidate.id.trim()) throw new Error(t(\"error.stackJsonNoId\"));\n\t\t\t\t\tif (!Array.isArray(candidate.items)) throw new Error(t(\"error.stackJsonNoItems\"));\n\t\t\t\t\tcandidate.items.forEach((item, index) => {\n\t\t\t\t\t\tconst label = t(\"error.itemLabel\", { index: index + 1 });\n\t\t\t\t\t\tif (!item || typeof item !== \"object\" || Array.isArray(item)) throw new Error(t(\"error.itemNotObject\", { label }));\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(t(\"error.itemKind\", { label }));\n\t\t\t\t\t\tif (typeof candidateItem.id !== \"string\" || !candidateItem.id.trim()) throw new Error(t(\"error.itemNoId\", { label }));\n\t\t\t\t\t\tif (candidateItem.kind === \"block\" && typeof candidateItem.content !== \"string\") throw new Error(t(\"error.itemContent\", { label }));\n\t\t\t\t\t\tif (candidateItem.kind === \"slot\" && typeof candidateItem.slot !== \"string\") throw new Error(t(\"error.itemSlot\", { label }));\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\tcreateBaseVNode(\"div\", _hoisted_2$1, toDisplayString(unref(t)(\"stackTab.contextOptions\")), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_3$1, toDisplayString(unref(t)(\"stackTab.contextMeta\")), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"label\", {\n\t\t\t\t\t\t\t\tclass: \"checkline\",\n\t\t\t\t\t\t\t\ttitle: unref(t)(\"stackTab.allowDuplicateTitle\")\n\t\t\t\t\t\t\t}, [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_5$1), createTextVNode(\" \" + toDisplayString(unref(t)(\"stackTab.allowDuplicate\")), 1)], 8, _hoisted_4$1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_6$1, toDisplayString(unref(t)(\"stackTab.allowDuplicateNote\")), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"label\", {\n\t\t\t\t\t\t\t\tclass: \"checkline\",\n\t\t\t\t\t\t\t\ttitle: unref(t)(\"stackTab.mergeTitle\")\n\t\t\t\t\t\t\t}, [createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\tid: \"mergeConsecutiveRolesInput\",\n\t\t\t\t\t\t\t\ttype: \"checkbox\",\n\t\t\t\t\t\t\t\tchecked: props.stack.context?.mergeConsecutiveRoles === true,\n\t\t\t\t\t\t\t\tonChange: setMergeConsecutiveRoles\n\t\t\t\t\t\t\t}, null, 40, _hoisted_8$1), createTextVNode(\" \" + toDisplayString(unref(t)(\"stackTab.merge\")), 1)], 8, _hoisted_7$1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_9$1, toDisplayString(unref(t)(\"stackTab.mergeNote\")), 1),\n\t\t\t\t\t\t\tmergeEnabled.value ? (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: unref(t)(\"stackTab.customMergeSeparatorTitle\")\n\t\t\t\t\t\t\t\t}, [createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\tid: \"customMergeSeparatorInput\",\n\t\t\t\t\t\t\t\t\ttype: \"checkbox\",\n\t\t\t\t\t\t\t\t\tchecked: customSeparatorEnabled.value,\n\t\t\t\t\t\t\t\t\tonChange: setCustomMergeSeparator\n\t\t\t\t\t\t\t\t}, null, 40, _hoisted_11$1), createTextVNode(\" \" + toDisplayString(unref(t)(\"stackTab.customMergeSeparator\")), 1)], 8, _hoisted_10$1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_12$1, [createBaseVNode(\"span\", _hoisted_13$1, toDisplayString(unref(t)(\"stackTab.mergeSeparator\")), 1), createBaseVNode(\"textarea\", {\n\t\t\t\t\t\t\t\t\tid: \"mergeSeparatorInput\",\n\t\t\t\t\t\t\t\t\trows: \"2\",\n\t\t\t\t\t\t\t\t\tplaceholder: unref(t)(\"stackTab.mergeSeparatorPlaceholder\"),\n\t\t\t\t\t\t\t\t\tvalue: props.stack.context?.mergeSeparator ?? \"\\n\\n\",\n\t\t\t\t\t\t\t\t\tdisabled: !customSeparatorEnabled.value,\n\t\t\t\t\t\t\t\t\tonChange: setMergeSeparator\n\t\t\t\t\t\t\t\t}, null, 40, _hoisted_14$1)]),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_15$1, toDisplayString(unref(t)(\"stackTab.mergeSeparatorNote\")), 1)\n\t\t\t\t\t\t\t], 64)) : createCommentVNode(\"v-if\", true)\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_16$1, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_17, toDisplayString(unref(t)(\"stackTab.extensions\")), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_18, toDisplayString(unref(t)(\"stackTab.extensionsMeta\")), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_19, [createBaseVNode(\"div\", _hoisted_20, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"strong\", null, toDisplayString(unref(t)(\"stackTab.registeredMacros\")), 1),\n\t\t\t\t\t\t\t\tprops.resources.macros.length === 0 ? (openBlock(), createElementBlock(\"div\", _hoisted_21, toDisplayString(unref(t)(\"common.none\")), 1)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\t\t(openBlock(true), createElementBlock(Fragment, null, renderList(props.resources.macros, (macro) => {\n\t\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"div\", {\n\t\t\t\t\t\t\t\t\t\tkey: macro.name,\n\t\t\t\t\t\t\t\t\t\tclass: \"extension-catalog-entry\"\n\t\t\t\t\t\t\t\t\t}, [createBaseVNode(\"code\", { textContent: toDisplayString(`{{ extensions.${macro.name} }}`) }, null, 8, _hoisted_22), createBaseVNode(\"span\", null, toDisplayString(macro.description || macro.source || \"\"), 1)]);\n\t\t\t\t\t\t\t\t}), 128))\n\t\t\t\t\t\t\t]), createBaseVNode(\"div\", _hoisted_23, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"strong\", null, toDisplayString(unref(t)(\"stackTab.availableSlots\")), 1),\n\t\t\t\t\t\t\t\tprops.resources.slots.length === 0 ? (openBlock(), createElementBlock(\"div\", _hoisted_24, toDisplayString(unref(t)(\"common.none\")), 1)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\t\t(openBlock(true), createElementBlock(Fragment, null, renderList(props.resources.slots, (slot) => {\n\t\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"div\", {\n\t\t\t\t\t\t\t\t\t\tkey: slot.name,\n\t\t\t\t\t\t\t\t\t\tclass: \"extension-catalog-entry\"\n\t\t\t\t\t\t\t\t\t}, [createBaseVNode(\"code\", null, toDisplayString(slot.name), 1), createBaseVNode(\"span\", null, toDisplayString(slot.description || slot.source || \"\"), 1)]);\n\t\t\t\t\t\t\t\t}), 128))\n\t\t\t\t\t\t\t])])\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_25, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_26, toDisplayString(unref(t)(\"stackTab.parameters\")), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_27, [\n\t\t\t\t\t\t\t\tcreateTextVNode(toDisplayString(unref(t)(\"stackTab.parametersMetaPre\")), 1),\n\t\t\t\t\t\t\t\t_cache[1] || (_cache[1] = createBaseVNode(\"code\", null, \"parameters\", -1)),\n\t\t\t\t\t\t\t\tcreateTextVNode(toDisplayString(unref(t)(\"stackTab.parametersMetaMid\")), 1),\n\t\t\t\t\t\t\t\t_cache[2] || (_cache[2] = createBaseVNode(\"code\", null, \"variables\", -1)),\n\t\t\t\t\t\t\t\tcreateTextVNode(toDisplayString(unref(t)(\"stackTab.parametersMetaPost\")), 1)\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_28, [\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: unref(t)(\"stackTab.addVariableTitle\"),\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}, toDisplayString(unref(t)(\"stackTab.addVariable\")), 9, _hoisted_29),\n\t\t\t\t\t\t\t\t_cache[3] || (_cache[3] = createBaseVNode(\"span\", { class: \"modal-spacer\" }, null, -1)),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_30, toDisplayString(unref(t)(\"stackTab.variablesSavedNote\")), 1)\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_31, [createBaseVNode(\"div\", { class: normalizeClass([\n\t\t\t\t\t\t\t\t\"data-row\",\n\t\t\t\t\t\t\t\t\"header\",\n\t\t\t\t\t\t\t\t\"variable-row\",\n\t\t\t\t\t\t\t\t{ \"parameter-row\": props.stack.schemaVersion === 2 }\n\t\t\t\t\t\t\t]) }, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, toDisplayString(unref(t)(\"item.name\")), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, toDisplayString(unref(t)(\"stackTab.value\")), 1),\n\t\t\t\t\t\t\t\tprops.stack.schemaVersion === 2 ? (openBlock(), createElementBlock(\"div\", _hoisted_32, toDisplayString(unref(t)(\"stackTab.valueType\")), 1)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\t\t_cache[4] || (_cache[4] = createBaseVNode(\"div\", null, null, -1))\n\t\t\t\t\t\t\t], 2), (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: normalizeClass([\n\t\t\t\t\t\t\t\t\t\t\"data-row\",\n\t\t\t\t\t\t\t\t\t\t\"variable-row\",\n\t\t\t\t\t\t\t\t\t\t{ \"parameter-row\": props.stack.schemaVersion === 2 }\n\t\t\t\t\t\t\t\t\t]),\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_33), [[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_34), [[vModelText, row.value]]),\n\t\t\t\t\t\t\t\t\tprops.stack.schemaVersion === 2 ? (openBlock(), createElementBlock(\"select\", {\n\t\t\t\t\t\t\t\t\t\tkey: 0,\n\t\t\t\t\t\t\t\t\t\t\"data-var-format\": \"\",\n\t\t\t\t\t\t\t\t\t\tvalue: row.format,\n\t\t\t\t\t\t\t\t\t\tonChange: ($event) => setVariableFormat(row, $event.target.value)\n\t\t\t\t\t\t\t\t\t}, [createBaseVNode(\"option\", _hoisted_36, toDisplayString(unref(t)(\"stackTab.textValue\")), 1), _cache[5] || (_cache[5] = createBaseVNode(\"option\", { value: \"json\" }, \"JSON\", -1))], 40, _hoisted_35)) : createCommentVNode(\"v-if\", true),\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: unref(t)(\"stackTab.deleteVariableTitle\"),\n\t\t\t\t\t\t\t\t\t\tonClick: ($event) => deleteVariable(index)\n\t\t\t\t\t\t\t\t\t}, toDisplayString(unref(t)(\"stackTab.deleteVariable\")), 9, _hoisted_37)\n\t\t\t\t\t\t\t\t], 2);\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_38, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_39, toDisplayString(unref(t)(\"stackTab.stackJson\")), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_40, toDisplayString(unref(t)(\"stackTab.stackJsonMeta\")), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_41, [\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: unref(t)(\"stackTab.copyJsonTitle\"),\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}, toDisplayString(unref(t)(\"inspector.copy\")), 9, _hoisted_42),\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: unref(t)(\"stackTab.applyJsonTitle\"),\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}, toDisplayString(unref(t)(\"stackTab.applyJson\")), 9, _hoisted_43),\n\t\t\t\t\t\t\t\t_cache[6] || (_cache[6] = createBaseVNode(\"span\", { class: \"modal-spacer\" }, null, -1)),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_44, 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\tfunction mount(kind, root) {\n\t\t\tunmount();\n\t\t\tconst stack = deps.getStack();\n\t\t\tconst definition = getEditorTab(kind);\n\t\t\tif (!stack || !definition || definition.mount === \"legacy\") return;\n\t\t\tdraft = cloneJson(stack);\n\t\t\tconst input = {\n\t\t\t\tstack: draft,\n\t\t\t\tresources: deps.getResources(),\n\t\t\t\tonChange: (error) => {\n\t\t\t\t\tsyncDraft(kind);\n\t\t\t\t\terrors[kind] = error;\n\t\t\t\t\tdeps.markDirty();\n\t\t\t\t\tif (errors[kind]) deps.setStatus(errors[kind], \"error\");\n\t\t\t\t},\n\t\t\t\tonStatus: deps.setStatus,\n\t\t\t\tcopyText: deps.copyText,\n\t\t\t\tapplyStack: deps.applyStack,\n\t\t\t\tvalidateStack: deps.validateStack\n\t\t\t};\n\t\t\tconst factory = vueTabMounts[kind];\n\t\t\tif (!factory) return;\n\t\t\tconst { component, props } = factory(input);\n\t\t\tapp = createApp(component, props);\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\tfor (const key of Object.keys(errors)) delete errors[key];\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 definition = getEditorTab(kind);\n\t\t\tif (!definition) return;\n\t\t\tcopyStackFields(stack, cloneJson(draft), definition.stackFields);\n\t\t}\n\t\treturn {\n\t\t\t/** Generic entry point for any registered vue tab id. */\n\t\t\tmount,\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\tvar vueTabMounts;\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\tinit_tab_registry();\n\t\tvueTabMounts = {\n\t\t\tregex: (input) => ({\n\t\t\t\tcomponent: RegexEditor_default,\n\t\t\t\tprops: {\n\t\t\t\t\tstack: input.stack,\n\t\t\t\t\tonChange: input.onChange,\n\t\t\t\t\tonValidate: input.validateStack\n\t\t\t\t}\n\t\t\t}),\n\t\t\tpolicy: (input) => ({\n\t\t\t\tcomponent: PolicyEditor_default,\n\t\t\t\tprops: {\n\t\t\t\t\tstack: input.stack,\n\t\t\t\t\tresources: input.resources,\n\t\t\t\t\tonChange: input.onChange,\n\t\t\t\t\tonStatus: input.onStatus\n\t\t\t\t}\n\t\t\t}),\n\t\t\tstack: (input) => ({\n\t\t\t\tcomponent: StackEditor_default,\n\t\t\t\tprops: {\n\t\t\t\t\tstack: input.stack,\n\t\t\t\t\tresources: input.resources,\n\t\t\t\t\tcopyText: input.copyText,\n\t\t\t\t\tonApply: () => input.applyStack(cloneJson(input.stack)),\n\t\t\t\t\tonChange: input.onChange,\n\t\t\t\t\tonStatus: input.onStatus\n\t\t\t\t}\n\t\t\t})\n\t\t};\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/legacy-editor.ts\n\tvar legacy_editor_exports = /* @__PURE__ */ __exportAll({\n\t\tgetLegacyEditorDraft: () => getLegacyEditorDraft,\n\t\trefreshLegacyEditorLocale: () => refreshLegacyEditorLocale,\n\t\tstartLegacyEditor: () => startLegacyEditor,\n\t\tsubscribeLegacyEditorDraft: () => subscribeLegacyEditorDraft\n\t});\n\tfunction getLegacyEditorDraft() {\n\t\tif (!currentStack || !selectedId) return void 0;\n\t\treturn {\n\t\t\tselector: selectedId,\n\t\t\tstack: structuredClone(currentStack)\n\t\t};\n\t}\n\tfunction subscribeLegacyEditorDraft(listener) {\n\t\tdraftListeners.add(listener);\n\t\treturn () => draftListeners.delete(listener);\n\t}\n\tfunction notifyDraftChanged() {\n\t\tfor (const listener of [...draftListeners]) listener();\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(t(\"status.unsavedChanges\"));\n\t\tnotifyDraftChanged();\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\"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], [data-dock-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\teditorResources = normalizeEditorResources(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\teditorResources = normalizeEditorResources(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(t(\"confirm.discardChanges\"))) 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(t(\"status.loaded\", { id: loadedStack.id }));\n\t\tnotifyDraftChanged();\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\tif (currentEditorView() === \"preview\") {\n\t\t\trenderItemList();\n\t\t\trenderItemEditor();\n\t\t\treturn;\n\t\t}\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\\\">\" + escapeHtml(t(\"stackList.empty\")) + \"</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\\\">\" + escapeHtml(t(\"stackList.errorCount\", { count: stack.errors })) + \"</span>\" : stack.warnings ? \"<span class=\\\"badge warning\\\">\" + escapeHtml(t(\"stackList.warningCount\", { count: stack.warnings })) + \"</span>\" : \"\";\n\t\t\tconst scopeBadge = stack.scope === \"global\" ? \"<span class=\\\"badge\\\">\" + escapeHtml(t(\"stackList.global\")) + \"</span>\" : \"\";\n\t\t\trow.innerHTML = \"<div class=\\\"stack-name\\\">\" + escapeHtml(stack.id) + (stack.active ? \"<span class=\\\"badge\\\">\" + escapeHtml(t(\"stackList.active\")) + \"</span>\" : \"\") + scopeBadge + diag + \"</div><div class=\\\"stack-meta\\\">\" + escapeHtml(stack.name || t(\"stackList.unnamed\")) + \"</div><div class=\\\"stack-meta\\\">\" + escapeHtml(t(\"stackList.itemCount\", { count: stack.itemCount })) + \" | \" + 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 normalizeEditorResources(value) {\n\t\treturn {\n\t\t\ttools: normalizeResourceList(value?.tools),\n\t\t\tskills: normalizeResourceList(value?.skills),\n\t\t\tmacros: normalizeExtensionResourceList(value?.macros),\n\t\t\tslots: normalizeExtensionResourceList(value?.slots)\n\t\t};\n\t}\n\tfunction normalizeExtensionResourceList(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\tdependencies: Array.isArray(resource.dependencies) ? resource.dependencies.filter((dependency) => typeof dependency === \"string\") : []\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 = t(\"itemList.total\", { count: currentStack.items.length });\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=\\\"\" + attr(t(\"itemList.dragToReorder\")) + \"\\\">≡</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=\\\"\" + attr(t(\"itemList.toggleItem\")) + \"\\\">\" + escapeHtml(enabled ? t(\"itemList.on\") : t(\"itemList.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\\\">\" + escapeHtml(t(\"itemEditor.none\")) + \"</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(t(\"status.appliedStack\"), \"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(t(\"confirm.deleteItem\", { id: 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(t(\"status.saved\", { id: 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(t(\"confirm.overwriteStack\", { message: error.message || \"Preset already exists.\" }))) 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\tsetStatus(t(actionLabel, { id: data.stack?.id || stack.id }), \"success\");\n\t}\n\tasync function createNewStack() {\n\t\tif (dirty && !confirm(t(\"confirm.discardChanges\"))) return;\n\t\tconst promptedId = prompt(t(\"prompt.newStackId\"), uniqueStackId(\"new-preset\"));\n\t\tif (promptedId === null) return;\n\t\tconst id = sanitizeStackId(promptedId);\n\t\tif (!id) throw new Error(t(\"error.stackIdEmpty\"));\n\t\tif (id !== promptedId.trim() && !confirm(t(\"confirm.useStackId\", { id }))) return;\n\t\tconst promptedName = prompt(t(\"prompt.stackDisplayName\"), \"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(t(\"confirm.activateNewStack\")), \"status.created\", { scope });\n\t}\n\tfunction defaultNewStack(id, name) {\n\t\treturn {\n\t\t\tschemaVersion: 2,\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(t(\"error.importNotObject\"));\n\t\tconst stack = imported;\n\t\tif (!stack.id || typeof stack.id !== \"string\") {\n\t\t\tconst promptedId = prompt(t(\"prompt.stackId\"), 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(t(\"error.importNoItems\"));\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(t(\"confirm.activateImportedStack\")), \"status.imported\", { scope });\n\t}\n\tasync function forkStack() {\n\t\tconst source = stackForSubmit();\n\t\tconst forkId = prompt(t(\"prompt.forkStackId\"), uniqueForkId(source.id || \"preset\"));\n\t\tif (!forkId) return;\n\t\tconst forkName = prompt(t(\"prompt.forkDisplayName\"), (source.name || source.id || \"Preset\") + \" 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(t(\"confirm.activateFork\")), \"status.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 || \"preset\") + \".json\", json, \"application/json\")) {\n\t\t\tsetStatus(t(\"status.exported\", { id: stack.id || \"preset\" }), \"success\");\n\t\t\treturn;\n\t\t}\n\t\tawait copyTextToClipboard(json);\n\t\tsetStatus(t(\"status.copiedJson\", { id: stack.id || \"preset\" }), \"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(t(\"status.activated\", { id: 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(t(\"status.stackDisabled\"), \"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 = t(\"confirm.deleteStack\", { id: displayId });\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(t(\"status.deleted\", { id: displayId }), \"success\");\n\t\t} else {\n\t\t\trenderStackList();\n\t\t\trenderEmpty();\n\t\t\tsetStatus(t(\"status.deletedNoneRemain\", { id: displayId }), \"success\");\n\t\t}\n\t}\n\tasync function reloadFromDisk() {\n\t\tif (dirty && !confirm(t(\"confirm.discardChanges\"))) return;\n\t\tstacks = (await api(\"/api/reload\", { method: \"POST\" })).stacks || [];\n\t\trenderStackList();\n\t\tawait loadStacks(selectedId);\n\t\tsetStatus(t(\"status.reloaded\"), \"success\");\n\t}\n\tfunction stackForSubmit() {\n\t\tif (!currentStack) throw new Error(t(\"error.noStackSelected\"));\n\t\tconst itemOptionsError = vueItemHost.getError();\n\t\tif (itemOptionsError) throw new Error(t(\"error.invalidItemOptions\", { message: 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 countText = (one, many, count) => count === 1 ? t(one, { count }) : t(many, { count });\n\t\tconst summary = !latestDiagnostics.length ? t(\"diag.none\") : [errors ? countText(\"diag.errorOne\", \"diag.errorMany\", errors) : \"\", warnings ? countText(\"diag.warningOne\", \"diag.warningMany\", warnings) : \"\"].filter(Boolean).join(\" · \") || countText(\"diag.noteOne\", \"diag.noteMany\", latestDiagnostics.length);\n\t\tconst body = !latestDiagnostics.length ? \"<div class=\\\"diagnostic info\\\">\" + escapeHtml(t(\"diag.noDiagnostics\")) + \"</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=\\\"\" + attr(t(\"diag.toggle\")) + \"\\\"><span class=\\\"diagnostics-title\\\">\" + escapeHtml(t(\"diag.title\", { 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\tnotifyDraftChanged();\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\\\">\" + escapeHtml(t(\"empty.title\")) + \"</div><div>\" + escapeHtml(t(\"empty.body\")) + \"</div><div class=\\\"empty-actions\\\"><button id=\\\"emptyNewStackBtn\\\" class=\\\"primary\\\" data-icon=\\\"+\\\" title=\\\"\" + attr(t(\"chrome.newStackTitle\")) + \"\\\">\" + escapeHtml(t(\"chrome.newStack\")) + \"</button><button id=\\\"emptyImportBtn\\\" data-icon=\\\"⇪\\\" title=\\\"\" + attr(t(\"chrome.importTitle\")) + \"\\\">\" + escapeHtml(t(\"chrome.import\")) + \"</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(t(\"status.noStacks\"));\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 || t(\"stackList.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 ? t(\"chrome.showSidebar\") : t(\"chrome.hideSidebar\");\n\t\tsetStatus(sidebarCollapsed ? t(\"status.sidebarHidden\") : t(\"status.sidebarShown\"));\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) el(\"previewTabBtn\").click();\n\t\t}\n\t}\n\t/**\n\t* Re-render all legacy surfaces after a locale switch. State is already in\n\t* memory; this simply regenerates the imperative DOM with the new strings.\n\t*/\n\tfunction refreshLegacyEditorLocale() {\n\t\tif (!editorStarted) return;\n\t\tel(\"sidebarToggleBtn\").title = sidebarCollapsed ? t(\"chrome.showSidebar\") : t(\"chrome.hideSidebar\");\n\t\tif (currentStack) renderAll(latestDiagnostics);\n\t\telse if (!stacks.length) renderEmpty();\n\t\telse renderStackList();\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(\"payloadBtn\").onclick = () => run(openPayloadCapture);\n\t\tconst moreActions = el(\"moreActions\");\n\t\tmoreActions.onclick = (event) => {\n\t\t\tif (event.target.closest(\"button\")) moreActions.open = false;\n\t\t};\n\t\tconst closeMoreActions = (event) => {\n\t\t\tif (moreActions.open && !moreActions.contains(event.target)) moreActions.open = false;\n\t\t};\n\t\tdocument.querySelectorAll(\"[data-tab]\").forEach((button) => {\n\t\t\tbutton.onclick = () => {\n\t\t\t\tactivateEditorView(button.dataset.tab || \"items\");\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\tdocument.addEventListener(\"click\", closeMoreActions);\n\t\twindow.addEventListener(\"keydown\", handleEditorShortcut);\n\t\twindow.addEventListener(\"pi-forge:profile-applied\", handleProfileApplied);\n\t\tconst stopEditorView = subscribeEditorView((viewId) => {\n\t\t\tif ([\n\t\t\t\t\"items\",\n\t\t\t\t\"regex\",\n\t\t\t\t\"policy\",\n\t\t\t\t\"stack\"\n\t\t\t].includes(viewId)) return;\n\t\t\tvueTabHost.unmount();\n\t\t});\n\t\tconst previousBeforeUnload = window.onbeforeunload;\n\t\tconst beforeUnload = () => dirty ? t(\"status.unsavedChanges\") : 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\tdocument.removeEventListener(\"click\", closeMoreActions);\n\t\t\twindow.removeEventListener(\"keydown\", handleEditorShortcut);\n\t\t\twindow.removeEventListener(\"pi-forge:profile-applied\", handleProfileApplied);\n\t\t\tmoreActions.onclick = null;\n\t\t\tstopEditorView();\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\tdraftListeners.clear();\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\teditorResources = {\n\t\t\ttools: [],\n\t\t\tskills: [],\n\t\t\tmacros: [],\n\t\t\tslots: []\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, editorResources, latestDiagnostics, diagnosticsCollapsed, activeTab, metadataCollapsed, editorStarted, editorIsActive, draftListeners, builtInSlotNames, roles, validateStack, 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\tinit_editor_view_coordinator();\n\t\tinit_i18n();\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\teditorResources = {\n\t\t\ttools: [],\n\t\t\tskills: [],\n\t\t\tmacros: [],\n\t\t\tslots: []\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\tdraftListeners = /* @__PURE__ */ new Set();\n\t\tbuiltInSlotNames = [\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, 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: () => editorResources,\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\tgetSlotNames: () => editorResources.slots.length > 0 ? editorResources.slots.map((slot) => slot.name) : builtInSlotNames,\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_api();\n\tinit_i18n();\n\tinit_tab_registry();\n\tinit_theme();\n\tvar _hoisted_1 = { class: \"app-root\" };\n\tvar _hoisted_2 = [\"aria-label\"];\n\tvar _hoisted_3 = [\"aria-current\"];\n\tvar _hoisted_4 = [\"aria-current\"];\n\tvar _hoisted_5 = [\"aria-current\"];\n\tvar _hoisted_6 = [\"data-icon\", \"title\"];\n\tvar _hoisted_7 = [\"title\", \"value\"];\n\tvar _hoisted_8 = { class: \"editor-surface\" };\n\tvar _hoisted_9 = {\n\t\tid: \"shell\",\n\t\tclass: \"shell\"\n\t};\n\tvar _hoisted_10 = { class: \"main\" };\n\tvar _hoisted_11 = {\n\t\tclass: \"view-tabs\",\n\t\t\"aria-label\": \"Preset editor sections\",\n\t\t\"data-i18n-aria\": \"nav.stackSectionsAria\"\n\t};\n\tvar _hoisted_12 = [\n\t\t\"id\",\n\t\t\"data-tab\",\n\t\t\"data-dock-tab\",\n\t\t\"data-icon\",\n\t\t\"title\",\n\t\t\"data-i18n\",\n\t\t\"data-i18n-title\"\n\t];\n\tvar _hoisted_13 = {\n\t\tid: \"settingsSurface\",\n\t\tclass: \"settings-surface\"\n\t};\n\tvar _hoisted_14 = { class: \"settings-surface-head\" };\n\tvar _hoisted_15 = { class: \"settings-surface-body\" };\n\tvar _hoisted_16 = [\"aria-label\"];\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\tlet stopContributionTabs;\n\t\t\tlet stopContextDiffTabs;\n\t\t\tlet refreshLegacyLocale;\n\t\t\tconst activeSurface = /* @__PURE__ */ ref(\"stacks\");\n\t\t\tconst hasContributionSettings = /* @__PURE__ */ ref(false);\n\t\t\tconst api = createEditorApi(new URLSearchParams(location.search).get(\"token\") || \"\");\n\t\t\tconst localeSetting = /* @__PURE__ */ ref(\"auto\");\n\t\t\tfunction resolveLocaleSetting(setting) {\n\t\t\t\tif (setting === \"auto\") return navigator.language.toLowerCase().startsWith(\"zh\") ? \"zh-CN\" : \"en\";\n\t\t\t\treturn setting;\n\t\t\t}\n\t\t\tasync function loadLocaleSetting() {\n\t\t\t\ttry {\n\t\t\t\t\tconst locale = (await api(\"/api/editor-config\"))?.locale;\n\t\t\t\t\tif (locale === \"en\" || locale === \"zh-CN\" || locale === \"auto\") {\n\t\t\t\t\t\tlocaleSetting.value = locale;\n\t\t\t\t\t\tsetEditorLocale(resolveLocaleSetting(locale));\n\t\t\t\t\t}\n\t\t\t\t} catch {}\n\t\t\t}\n\t\t\tasync function changeLocaleSetting(setting) {\n\t\t\t\tlocaleSetting.value = setting;\n\t\t\t\tsetEditorLocale(resolveLocaleSetting(setting));\n\t\t\t\ttry {\n\t\t\t\t\tawait api(\"/api/editor-config\", {\n\t\t\t\t\t\tmethod: \"PUT\",\n\t\t\t\t\t\tbody: { locale: setting }\n\t\t\t\t\t});\n\t\t\t\t} catch {}\n\t\t\t}\n\t\t\twatch(editorLocale, () => {\n\t\t\t\ttranslateDom(document);\n\t\t\t\trefreshLegacyLocale?.();\n\t\t\t});\n\t\t\tonMounted(async () => {\n\t\t\t\tapplyEditorTheme(editorTheme.value);\n\t\t\t\ttry {\n\t\t\t\t\tconst { getLegacyEditorDraft, refreshLegacyEditorLocale, startLegacyEditor, subscribeLegacyEditorDraft } = 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\trefreshLegacyLocale = refreshLegacyEditorLocale;\n\t\t\t\t\ttranslateDom(document);\n\t\t\t\t\tloadLocaleSetting();\n\t\t\t\t\tstopContributionTabs = startContributionTabs({ onAvailabilityChanged: (available) => {\n\t\t\t\t\t\thasContributionSettings.value = available;\n\t\t\t\t\t\tif (!available && activeSurface.value === \"settings\") activeSurface.value = \"stacks\";\n\t\t\t\t\t} });\n\t\t\t\t\tstopContextDiffTabs = startContextDiffTabs({\n\t\t\t\t\t\tgetStackDraft: getLegacyEditorDraft,\n\t\t\t\t\t\tsubscribeStackDraft: subscribeLegacyEditorDraft\n\t\t\t\t\t});\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\tstopContextDiffTabs?.();\n\t\t\t\tstopContributionTabs?.();\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\", {\n\t\t\t\t\t\tclass: \"surface-nav\",\n\t\t\t\t\t\t\"aria-label\": unref(t)(\"nav.editorSectionsAria\")\n\t\t\t\t\t}, [\n\t\t\t\t\t\t_cache[7] || (_cache[7] = 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}, toDisplayString(unref(t)(\"nav.stacks\")), 11, _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}, toDisplayString(unref(t)(\"nav.profiles\")), 11, _hoisted_4),\n\t\t\t\t\t\twithDirectives(createBaseVNode(\"button\", {\n\t\t\t\t\t\t\tid: \"settingsSurfaceBtn\",\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\tclass: normalizeClass({ active: activeSurface.value === \"settings\" }),\n\t\t\t\t\t\t\t\"aria-current\": activeSurface.value === \"settings\" ? \"page\" : void 0,\n\t\t\t\t\t\t\tonClick: _cache[2] || (_cache[2] = ($event) => activeSurface.value = \"settings\")\n\t\t\t\t\t\t}, toDisplayString(unref(t)(\"nav.settings\")), 11, _hoisted_5), [[vShow, hasContributionSettings.value]]),\n\t\t\t\t\t\t_cache[8] || (_cache[8] = 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\" ? unref(t)(\"nav.themeToLight\") : unref(t)(\"nav.themeToDark\"),\n\t\t\t\t\t\t\tonClick: _cache[3] || (_cache[3] = (...args) => unref(toggleEditorTheme) && unref(toggleEditorTheme)(...args))\n\t\t\t\t\t\t}, toDisplayString(unref(editorTheme) === \"dark\" ? unref(t)(\"nav.themeLight\") : unref(t)(\"nav.themeDark\")), 9, _hoisted_6),\n\t\t\t\t\t\tcreateBaseVNode(\"select\", {\n\t\t\t\t\t\t\tid: \"localeSelect\",\n\t\t\t\t\t\t\tclass: \"locale-select\",\n\t\t\t\t\t\t\ttitle: unref(t)(\"nav.locale\"),\n\t\t\t\t\t\t\tvalue: localeSetting.value,\n\t\t\t\t\t\t\tonChange: _cache[4] || (_cache[4] = ($event) => changeLocaleSetting($event.target.value))\n\t\t\t\t\t\t}, [..._cache[6] || (_cache[6] = [\n\t\t\t\t\t\t\tcreateBaseVNode(\"option\", { value: \"auto\" }, \"Auto\", -1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"option\", { value: \"en\" }, \"English\", -1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"option\", { value: \"zh-CN\" }, \"中文\", -1)\n\t\t\t\t\t\t])], 40, _hoisted_7)\n\t\t\t\t\t], 8, _hoisted_2),\n\t\t\t\t\twithDirectives(createBaseVNode(\"section\", _hoisted_8, [_cache[5] || (setBlockTracking(-1, true), (_cache[5] = createBaseVNode(\"div\", { class: \"legacy-editor-root\" }, [\n\t\t\t\t\t\t_cache[12] || (_cache[12] = createStaticVNode(\"<header class=\\\"topbar\\\"><button id=\\\"sidebarToggleBtn\\\" class=\\\"icon\\\" data-icon=\\\"☰\\\" title=\\\"Toggle presets sidebar\\\" aria-label=\\\"Toggle presets sidebar\\\" data-i18n-title=\\\"chrome.toggleSidebar\\\" data-i18n-aria=\\\"chrome.toggleSidebar\\\"></button><div class=\\\"brand\\\" data-i18n=\\\"chrome.brand\\\">pi-forge preset editor</div><div id=\\\"status\\\" class=\\\"status\\\" data-i18n=\\\"chrome.loading\\\">Loading</div><span id=\\\"dirtyBadge\\\" class=\\\"dirty-badge\\\" title=\\\"The current preset has unsaved edits\\\" data-i18n=\\\"chrome.unsaved\\\" data-i18n-title=\\\"chrome.unsavedTitle\\\">Unsaved</span><button id=\\\"reloadBtn\\\" data-icon=\\\"↻\\\" title=\\\"Reload presets from disk\\\" data-i18n=\\\"chrome.reload\\\" data-i18n-title=\\\"chrome.reloadTitle\\\">Reload</button><button id=\\\"disableBtn\\\" data-icon=\\\"■\\\" title=\\\"Disable the active preset\\\" data-i18n=\\\"chrome.disableStack\\\" data-i18n-title=\\\"chrome.disableStackTitle\\\">Disable preset</button></header>\", 1)),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_9, [_cache[11] || (_cache[11] = createStaticVNode(\"<aside class=\\\"sidebar\\\"><div class=\\\"side-head\\\"><div class=\\\"side-title\\\" data-i18n=\\\"nav.stacks\\\">Presets</div><div id=\\\"cwd\\\" class=\\\"cwd\\\"></div></div><div id=\\\"stackList\\\" class=\\\"stack-list\\\"></div></aside>\", 1)), createBaseVNode(\"main\", _hoisted_10, [\n\t\t\t\t\t\t\t_cache[9] || (_cache[9] = createStaticVNode(\"<div class=\\\"main-actions\\\"><div class=\\\"new-stack-control\\\"><select id=\\\"stackCreateScope\\\" aria-label=\\\"Preset scope\\\" title=\\\"Scope for new presets, imports, and forks\\\" data-i18n-title=\\\"chrome.scopeTitle\\\" data-i18n-aria=\\\"chrome.scopeAria\\\"><option value=\\\"project\\\" data-i18n=\\\"chrome.scopeProject\\\">Project</option><option value=\\\"global\\\" data-i18n=\\\"chrome.scopeGlobal\\\">Global</option></select><button id=\\\"newStackBtn\\\" data-icon=\\\"+\\\" title=\\\"Create a new preset (Ctrl/Cmd+N)\\\" data-i18n=\\\"chrome.newStack\\\" data-i18n-title=\\\"chrome.newStackTitle\\\">New preset</button></div><button id=\\\"activateBtn\\\" class=\\\"primary\\\" data-icon=\\\"▶\\\" title=\\\"Make this preset active for the current Pi session\\\" data-i18n=\\\"chrome.activate\\\" data-i18n-title=\\\"chrome.activateTitle\\\">Activate</button><button id=\\\"saveBtn\\\" class=\\\"primary\\\" data-icon=\\\"✓\\\" title=\\\"Save the edited preset JSON to disk (Ctrl/Cmd+S)\\\" data-i18n=\\\"chrome.save\\\" data-i18n-title=\\\"chrome.saveTitle\\\">Save</button><button id=\\\"validateBtn\\\" data-icon=\\\"!\\\" title=\\\"Validate the edited preset without saving (Ctrl/Cmd+Shift+Enter)\\\" data-i18n=\\\"chrome.validate\\\" data-i18n-title=\\\"chrome.validateTitle\\\">Validate</button><span class=\\\"action-spacer\\\"></span><details id=\\\"moreActions\\\" class=\\\"action-menu\\\"><summary data-icon=\\\"⋯\\\" title=\\\"Show less-used preset actions\\\" data-i18n=\\\"chrome.more\\\" data-i18n-title=\\\"chrome.moreTitle\\\">More</summary><div class=\\\"action-menu-popover\\\"><button id=\\\"payloadBtn\\\" data-icon=\\\"◆\\\" title=\\\"Capture the next provider payload in the browser\\\" data-i18n=\\\"chrome.armPayload\\\" data-i18n-title=\\\"chrome.armPayloadTitle\\\">Arm payload</button><button id=\\\"forkBtn\\\" data-icon=\\\"⑂\\\" title=\\\"Create a new preset from the current edits\\\" data-i18n=\\\"chrome.fork\\\" data-i18n-title=\\\"chrome.forkTitle\\\">Fork</button><button id=\\\"importBtn\\\" data-icon=\\\"⇪\\\" title=\\\"Import Pi Forge preset JSON\\\" data-i18n=\\\"chrome.import\\\" data-i18n-title=\\\"chrome.importTitle\\\">Import JSON</button><button id=\\\"exportBtn\\\" data-icon=\\\"⇩\\\" title=\\\"Download the current preset JSON, or copy it if download is unavailable\\\" data-i18n=\\\"chrome.export\\\" data-i18n-title=\\\"chrome.exportTitle\\\">Export JSON</button><button id=\\\"deleteStackBtn\\\" class=\\\"danger\\\" data-icon=\\\"×\\\" title=\\\"Delete the selected preset JSON file\\\" data-i18n=\\\"chrome.deleteStack\\\" data-i18n-title=\\\"chrome.deleteStackTitle\\\">Delete preset</button></div></details><input id=\\\"importFileInput\\\" type=\\\"file\\\" accept=\\\"application/json,.json\\\" hidden></div><section id=\\\"metadataPanel\\\" class=\\\"metadata-panel\\\"><div id=\\\"metadataHost\\\"></div></section>\", 2)),\n\t\t\t\t\t\t\tcreateBaseVNode(\"nav\", _hoisted_11, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(EDITOR_TABS), (tab) => {\n\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"button\", {\n\t\t\t\t\t\t\t\t\tkey: tab.id,\n\t\t\t\t\t\t\t\t\tid: unref(editorTabButtonId)(tab.id),\n\t\t\t\t\t\t\t\t\t\"data-tab\": tab.internalDock ? void 0 : tab.id,\n\t\t\t\t\t\t\t\t\t\"data-dock-tab\": tab.internalDock ? tab.id : void 0,\n\t\t\t\t\t\t\t\t\tclass: normalizeClass({ active: tab.id === \"items\" }),\n\t\t\t\t\t\t\t\t\t\"data-icon\": tab.icon,\n\t\t\t\t\t\t\t\t\ttitle: unref(t)(tab.titleKey),\n\t\t\t\t\t\t\t\t\t\"data-i18n\": tab.labelKey,\n\t\t\t\t\t\t\t\t\t\"data-i18n-title\": tab.titleKey\n\t\t\t\t\t\t\t\t}, toDisplayString(unref(t)(tab.labelKey)), 11, _hoisted_12);\n\t\t\t\t\t\t\t}), 128))]),\n\t\t\t\t\t\t\t_cache[10] || (_cache[10] = createStaticVNode(\"<div id=\\\"editorDockArea\\\" class=\\\"editor-dock-area\\\"><section id=\\\"workspace\\\" class=\\\"workspace\\\"><div class=\\\"items-pane\\\"><div class=\\\"pane-head\\\"><span data-i18n=\\\"chrome.items\\\">Stack 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\\\" data-i18n=\\\"chrome.addBlock\\\" data-i18n-title=\\\"chrome.addBlockTitle\\\">Add block</button><button id=\\\"addSlotBtn\\\" data-icon=\\\"+\\\" title=\\\"Add a runtime slot item\\\" data-i18n=\\\"chrome.addSlot\\\" data-i18n-title=\\\"chrome.addSlotTitle\\\">Add slot</button><span class=\\\"item-tools-spacer\\\"></span><button id=\\\"deleteItemBtn\\\" class=\\\"danger\\\" data-icon=\\\"×\\\" title=\\\"Delete the selected Stack item\\\" data-i18n=\\\"chrome.deleteItem\\\" data-i18n-title=\\\"chrome.deleteItemTitle\\\">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><section id=\\\"contextDiffPanel\\\" class=\\\"context-diff-panel\\\"></section></div>\", 1))\n\t\t\t\t\t\t])]),\n\t\t\t\t\t\t_cache[13] || (_cache[13] = createBaseVNode(\"div\", {\n\t\t\t\t\t\t\tid: \"preview\",\n\t\t\t\t\t\t\tclass: \"preview\"\n\t\t\t\t\t\t}, null, -1)),\n\t\t\t\t\t\t_cache[14] || (_cache[14] = createBaseVNode(\"div\", {\n\t\t\t\t\t\t\tid: \"stackModal\",\n\t\t\t\t\t\t\tclass: \"modal\"\n\t\t\t\t\t\t}, null, -1))\n\t\t\t\t\t])).cacheIndex = 5, setBlockTracking(1), _cache[5])], 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\twithDirectives(createBaseVNode(\"section\", _hoisted_13, [createBaseVNode(\"header\", _hoisted_14, [createBaseVNode(\"div\", null, [createBaseVNode(\"h1\", null, toDisplayString(unref(t)(\"settings.pluginSettings\")), 1), createBaseVNode(\"p\", null, toDisplayString(unref(t)(\"settings.pluginSettingsMeta\")), 1)]), _cache[15] || (_cache[15] = createBaseVNode(\"div\", {\n\t\t\t\t\t\tid: \"settingsStatus\",\n\t\t\t\t\t\tclass: \"settings-surface-status\",\n\t\t\t\t\t\t\"data-i18n\": \"settings.loading\"\n\t\t\t\t\t}, \"Loading settings…\", -1))]), createBaseVNode(\"div\", _hoisted_15, [createBaseVNode(\"nav\", {\n\t\t\t\t\t\tid: \"contribSettingsNav\",\n\t\t\t\t\t\tclass: \"settings-nav\",\n\t\t\t\t\t\t\"aria-label\": unref(t)(\"settings.navAria\")\n\t\t\t\t\t}, null, 8, _hoisted_16), _cache[16] || (_cache[16] = createBaseVNode(\"main\", {\n\t\t\t\t\t\tid: \"contribSettingsPanel\",\n\t\t\t\t\t\tclass: \"settings-panel\"\n\t\t\t\t\t}, null, -1))])], 512), [[vShow, activeSurface.value === \"settings\"]])\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$1, 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$1 = (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$1(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$1(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$1(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$1(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/i18n.ts\n\tfunction detectLocale() {\n\t\tconst lang = typeof navigator !== \"undefined\" ? navigator.language : \"\";\n\t\treturn lang && lang.toLowerCase().startsWith(\"zh\") ? \"zh-CN\" : \"en\";\n\t}\n\tfunction initialLocale() {\n\t\tconst docLang = typeof document !== \"undefined\" ? document.documentElement.lang : \"\";\n\t\treturn docLang === \"zh-CN\" || docLang === \"en\" ? docLang : detectLocale();\n\t}\n\tfunction t(key, params) {\n\t\tlet text = (dictionaries[editorLocale.value] ?? dictionaries.en)[key] ?? dictionaries.en[key] ?? key;\n\t\tif (params) for (const [name, value] of Object.entries(params)) text = text.replaceAll(`{${name}}`, String(value));\n\t\treturn text;\n\t}\n\t/** Plural helper: English switches one/many; zh-CN uses a single form. */\n\tfunction tp(one, many, count, params = {}) {\n\t\treturn t(editorLocale.value === \"en\" && count === 1 ? one : many, {\n\t\t\t...params,\n\t\t\tcount\n\t\t});\n\t}\n\tfunction setEditorLocale(locale) {\n\t\teditorLocale.value = locale;\n\t\tif (typeof document !== \"undefined\") document.documentElement.lang = locale;\n\t}\n\t/**\n\t* Imperative translation pass for DOM regions Vue does not own (the v-once\n\t* legacy stack-editor chrome). Elements opt in with data-i18n (textContent)\n\t* and data-i18n-title (title attribute).\n\t*/\n\tfunction translateDom(root) {\n\t\tfor (const element of root.querySelectorAll(\"[data-i18n]\")) element.textContent = t(element.dataset.i18n);\n\t\tfor (const element of root.querySelectorAll(\"[data-i18n-title]\")) element.title = t(element.dataset.i18nTitle);\n\t\tfor (const element of root.querySelectorAll(\"[data-i18n-aria]\")) element.setAttribute(\"aria-label\", t(element.dataset.i18nAria));\n\t}\n\tvar dictionaries, editorLocale;\n\tvar init_i18n = __esmMin((() => {\n\t\tinit_vue_runtime_esm_bundler();\n\t\tdictionaries = {\n\t\t\ten: {\n\t\t\t\t\"nav.stacks\": \"Presets\",\n\t\t\t\t\"nav.profiles\": \"Agent profiles\",\n\t\t\t\t\"nav.settings\": \"Settings\",\n\t\t\t\t\"nav.themeToLight\": \"Switch to light theme\",\n\t\t\t\t\"nav.themeToDark\": \"Switch to dark theme\",\n\t\t\t\t\"nav.themeLight\": \"Light\",\n\t\t\t\t\"nav.themeDark\": \"Dark\",\n\t\t\t\t\"nav.locale\": \"Language\",\n\t\t\t\t\"nav.editorSectionsAria\": \"Pi Forge editor sections\",\n\t\t\t\t\"nav.stackSectionsAria\": \"Preset editor sections\",\n\t\t\t\t\"chrome.toggleSidebar\": \"Toggle presets sidebar\",\n\t\t\t\t\"chrome.brand\": \"pi-forge preset editor\",\n\t\t\t\t\"chrome.loading\": \"Loading\",\n\t\t\t\t\"chrome.unsaved\": \"Unsaved\",\n\t\t\t\t\"chrome.unsavedTitle\": \"The current preset has unsaved edits\",\n\t\t\t\t\"chrome.reload\": \"Reload\",\n\t\t\t\t\"chrome.reloadTitle\": \"Reload presets from disk\",\n\t\t\t\t\"chrome.disableStack\": \"Disable preset\",\n\t\t\t\t\"chrome.disableStackTitle\": \"Disable the active preset\",\n\t\t\t\t\"chrome.scopeTitle\": \"Scope for new presets, imports, and forks\",\n\t\t\t\t\"chrome.scopeAria\": \"Preset scope\",\n\t\t\t\t\"chrome.scopeProject\": \"Project\",\n\t\t\t\t\"chrome.scopeGlobal\": \"Global\",\n\t\t\t\t\"chrome.newStack\": \"New preset\",\n\t\t\t\t\"chrome.newStackTitle\": \"Create a new preset (Ctrl/Cmd+N)\",\n\t\t\t\t\"chrome.activate\": \"Activate\",\n\t\t\t\t\"chrome.activateTitle\": \"Make this preset active for the current Pi session\",\n\t\t\t\t\"chrome.save\": \"Save\",\n\t\t\t\t\"chrome.saveTitle\": \"Save the edited preset JSON to disk (Ctrl/Cmd+S)\",\n\t\t\t\t\"chrome.validate\": \"Validate\",\n\t\t\t\t\"chrome.validateTitle\": \"Validate the edited preset without saving (Ctrl/Cmd+Shift+Enter)\",\n\t\t\t\t\"chrome.preview\": \"Preview\",\n\t\t\t\t\"chrome.previewTitle\": \"Preview the compiled prompt without sending it (Ctrl/Cmd+Enter)\",\n\t\t\t\t\"chrome.more\": \"More\",\n\t\t\t\t\"chrome.moreTitle\": \"Show less-used preset actions\",\n\t\t\t\t\"chrome.armPayload\": \"Arm payload\",\n\t\t\t\t\"chrome.armPayloadTitle\": \"Capture the next provider payload in the browser\",\n\t\t\t\t\"chrome.fork\": \"Fork\",\n\t\t\t\t\"chrome.forkTitle\": \"Create a new preset from the current edits\",\n\t\t\t\t\"chrome.import\": \"Import JSON\",\n\t\t\t\t\"chrome.importTitle\": \"Import pi-forge preset JSON\",\n\t\t\t\t\"chrome.export\": \"Export JSON\",\n\t\t\t\t\"chrome.exportTitle\": \"Download the current preset JSON, or copy it if download is unavailable\",\n\t\t\t\t\"chrome.deleteStack\": \"Delete preset\",\n\t\t\t\t\"chrome.deleteStackTitle\": \"Delete the selected preset JSON file\",\n\t\t\t\t\"chrome.items\": \"Stack items\",\n\t\t\t\t\"chrome.addBlock\": \"Add block\",\n\t\t\t\t\"chrome.addBlockTitle\": \"Add a prompt block item\",\n\t\t\t\t\"chrome.addSlot\": \"Add slot\",\n\t\t\t\t\"chrome.addSlotTitle\": \"Add a runtime slot item\",\n\t\t\t\t\"chrome.deleteItem\": \"Delete item\",\n\t\t\t\t\"chrome.deleteItemTitle\": \"Delete the selected Stack item\",\n\t\t\t\t\"tab.items\": \"Stack\",\n\t\t\t\t\"tab.itemsTitle\": \"Edit the ordered Block and Slot Stack\",\n\t\t\t\t\"tab.regex\": \"Regex\",\n\t\t\t\t\"tab.regexTitle\": \"Edit regex transform rules\",\n\t\t\t\t\"tab.policy\": \"Policy\",\n\t\t\t\t\"tab.policyTitle\": \"Edit active-tool policy and model-visible skill filtering\",\n\t\t\t\t\"tab.stack\": \"Advanced\",\n\t\t\t\t\"tab.stackTitle\": \"Edit context options, parameters, extensions, and raw preset JSON\",\n\t\t\t\t\"tab.preview\": \"Preview\",\n\t\t\t\t\"tab.previewTitle\": \"Compiled prompt, unsaved draft diff, and recent run diff\",\n\t\t\t\t\"settings.pluginSettings\": \"Plugin settings\",\n\t\t\t\t\"settings.pluginSettingsMeta\": \"Configuration pages contributed by installed Pi Forge plugins.\",\n\t\t\t\t\"settings.loading\": \"Loading settings…\",\n\t\t\t\t\"status.unsavedChanges\": \"Unsaved changes\",\n\t\t\t\t\"status.loaded\": \"Loaded {id}\",\n\t\t\t\t\"status.appliedStack\": \"Applied preset JSON to editor\",\n\t\t\t\t\"status.saved\": \"Saved {id}\",\n\t\t\t\t\"status.created\": \"Created {id}\",\n\t\t\t\t\"status.imported\": \"Imported {id}\",\n\t\t\t\t\"status.forked\": \"Forked {id}\",\n\t\t\t\t\"status.exported\": \"Exported {id}\",\n\t\t\t\t\"status.copiedJson\": \"Copied {id} JSON\",\n\t\t\t\t\"status.activated\": \"Activated {id}\",\n\t\t\t\t\"status.stackDisabled\": \"Preset disabled\",\n\t\t\t\t\"status.deleted\": \"Deleted {id}\",\n\t\t\t\t\"status.deletedNoneRemain\": \"Deleted {id}; no presets remain\",\n\t\t\t\t\"status.reloaded\": \"Reloaded from disk\",\n\t\t\t\t\"status.noStacks\": \"No presets found\",\n\t\t\t\t\"status.sidebarHidden\": \"Presets sidebar hidden\",\n\t\t\t\t\"status.sidebarShown\": \"Presets sidebar shown\",\n\t\t\t\t\"stackList.empty\": \"No presets in this project.\",\n\t\t\t\t\"stackList.active\": \"active\",\n\t\t\t\t\"stackList.global\": \"global\",\n\t\t\t\t\"stackList.unnamed\": \"(unnamed)\",\n\t\t\t\t\"stackList.errorCount\": \"{count} error\",\n\t\t\t\t\"stackList.warningCount\": \"{count} warning\",\n\t\t\t\t\"stackList.itemCount\": \"{count} items\",\n\t\t\t\t\"itemList.total\": \"{count} total\",\n\t\t\t\t\"itemList.dragToReorder\": \"Drag to reorder\",\n\t\t\t\t\"itemList.toggleItem\": \"Toggle item\",\n\t\t\t\t\"itemList.on\": \"On\",\n\t\t\t\t\"itemList.off\": \"Off\",\n\t\t\t\t\"itemEditor.none\": \"No item selected.\",\n\t\t\t\t\"modal.close\": \"Close\",\n\t\t\t\t\"modal.closeTitle\": \"Close this dialog\",\n\t\t\t\t\"confirm.discardChanges\": \"Discard unsaved changes?\",\n\t\t\t\t\"confirm.deleteItem\": \"Delete item {id}?\",\n\t\t\t\t\"confirm.overwriteStack\": \"{message}\\n\\nOverwrite it?\",\n\t\t\t\t\"confirm.useStackId\": \"Use preset id '{id}'?\",\n\t\t\t\t\"confirm.activateNewStack\": \"Activate new preset now?\",\n\t\t\t\t\"confirm.activateImportedStack\": \"Activate imported preset now?\",\n\t\t\t\t\"confirm.activateFork\": \"Activate fork now?\",\n\t\t\t\t\"confirm.deleteStack\": \"Delete preset '{id}'?\\n\\nThis removes its JSON file from preset storage.\",\n\t\t\t\t\"prompt.newStackId\": \"New preset id\",\n\t\t\t\t\"prompt.stackId\": \"Preset id\",\n\t\t\t\t\"prompt.stackDisplayName\": \"Preset display name\",\n\t\t\t\t\"prompt.forkStackId\": \"New fork preset id\",\n\t\t\t\t\"prompt.forkDisplayName\": \"Fork display name\",\n\t\t\t\t\"error.stackIdEmpty\": \"Preset id must not be empty.\",\n\t\t\t\t\"error.importNotObject\": \"Imported JSON must be an object.\",\n\t\t\t\t\"error.importNoItems\": \"Imported preset must contain an items array.\",\n\t\t\t\t\"error.noStackSelected\": \"No preset selected.\",\n\t\t\t\t\"error.invalidItemOptions\": \"Invalid item options JSON: {message}\",\n\t\t\t\t\"diag.none\": \"none\",\n\t\t\t\t\"diag.errorOne\": \"{count} error\",\n\t\t\t\t\"diag.errorMany\": \"{count} errors\",\n\t\t\t\t\"diag.warningOne\": \"{count} warning\",\n\t\t\t\t\"diag.warningMany\": \"{count} warnings\",\n\t\t\t\t\"diag.noteOne\": \"{count} note\",\n\t\t\t\t\"diag.noteMany\": \"{count} notes\",\n\t\t\t\t\"diag.noDiagnostics\": \"No diagnostics.\",\n\t\t\t\t\"diag.title\": \"Diagnostics · {summary}\",\n\t\t\t\t\"diag.toggle\": \"Toggle the diagnostics panel\",\n\t\t\t\t\"empty.title\": \"No presets found.\",\n\t\t\t\t\"empty.body\": \"Create a preset in this project, or import an existing pi-forge JSON file.\",\n\t\t\t\t\"chrome.showSidebar\": \"Show presets sidebar\",\n\t\t\t\t\"chrome.hideSidebar\": \"Hide presets sidebar\",\n\t\t\t\t\"inspector.validationComplete\": \"Validation complete\",\n\t\t\t\t\"inspector.armed\": \"Payload capture armed; send the next Pi prompt\",\n\t\t\t\t\"inspector.cleared\": \"Payload capture cleared\",\n\t\t\t\t\"inspector.armedButton\": \"Payload armed\",\n\t\t\t\t\"inspector.armedButtonTitle\": \"Waiting for the next provider payload\",\n\t\t\t\t\"inspector.viewPayload\": \"View payload\",\n\t\t\t\t\"inspector.viewPayloadTitle\": \"Open the latest captured provider payload\",\n\t\t\t\t\"inspector.armTitle\": \"Capture the next provider payload in this editor\",\n\t\t\t\t\"inspector.copy\": \"Copy\",\n\t\t\t\t\"inspector.copyFullTitle\": \"Copy the full preview text\",\n\t\t\t\t\"inspector.sectionMeta\": \"{chars} chars · ~{tokens} tokens\",\n\t\t\t\t\"inspector.copySectionTitle\": \"Copy this preview section\",\n\t\t\t\t\"inspector.copyFull\": \"Copy full\",\n\t\t\t\t\"inspector.payloadTitle\": \"Provider payload\",\n\t\t\t\t\"inspector.noPayload\": \"No payload captured.\",\n\t\t\t\t\"inspector.armNext\": \"Arm next\",\n\t\t\t\t\"inspector.armNextTitle\": \"Capture the next provider payload\",\n\t\t\t\t\"inspector.closePayload\": \"Close the payload inspector\",\n\t\t\t\t\"inspector.armEmptyBody\": \"Arm capture, then send the next prompt in Pi. The provider payload will appear here before it is sent.\",\n\t\t\t\t\"inspector.armedAt\": \"Armed at {time}\",\n\t\t\t\t\"inspector.armedWaiting\": \"Waiting for next provider request\",\n\t\t\t\t\"inspector.armedTitle\": \"Payload capture armed\",\n\t\t\t\t\"inspector.clear\": \"Clear\",\n\t\t\t\t\"inspector.clearArmedTitle\": \"Clear the armed payload capture\",\n\t\t\t\t\"inspector.armedBody\": \"Send the next prompt in Pi. The exact provider payload will be captured here and redacted before display.\",\n\t\t\t\t\"inspector.stackId\": \"preset {id}\",\n\t\t\t\t\"inspector.truncated\": \"truncated\",\n\t\t\t\t\"inspector.copyPayloadTitle\": \"Copy the full redacted payload\",\n\t\t\t\t\"inspector.armAgain\": \"Arm again\",\n\t\t\t\t\"inspector.clearCapturedTitle\": \"Clear the captured payload\",\n\t\t\t\t\"inspector.stringifyError\": \"Stringify error\",\n\t\t\t\t\"inspector.rawTruncated\": \"Raw truncated payload\",\n\t\t\t\t\"inspector.rawPayload\": \"Raw payload\",\n\t\t\t\t\"inspector.chars\": \"{count} chars\",\n\t\t\t\t\"inspector.copiedText\": \"Copied text\",\n\t\t\t\t\"error.invalidItemOptionsShort\": \"Invalid item options JSON\",\n\t\t\t\t\"status.metadataHidden\": \"Preset metadata hidden\",\n\t\t\t\t\"status.metadataShown\": \"Preset metadata shown\",\n\t\t\t\t\"metadata.toggleTitle\": \"Show or hide preset metadata\",\n\t\t\t\t\"metadata.title\": \"Metadata\",\n\t\t\t\t\"metadata.noId\": \"(no id)\",\n\t\t\t\t\"metadata.stackId\": \"Preset ID\",\n\t\t\t\t\"metadata.stackIdTitle\": \"Preset IDs are immutable; use Fork to create a new ID.\",\n\t\t\t\t\"metadata.name\": \"Name\",\n\t\t\t\t\"metadata.mode\": \"Mode\",\n\t\t\t\t\"metadata.autoActivate\": \"Auto activate\",\n\t\t\t\t\"metadata.enabled\": \"enabled\",\n\t\t\t\t\"metadata.description\": \"Description\",\n\t\t\t\t\"metadata.file\": \"File\",\n\t\t\t\t\"item.kind\": \"Kind\",\n\t\t\t\t\"item.id\": \"ID\",\n\t\t\t\t\"item.name\": \"Name\",\n\t\t\t\t\"item.role\": \"Role\",\n\t\t\t\t\"item.roleNone\": \"(none)\",\n\t\t\t\t\"item.slot\": \"Slot\",\n\t\t\t\t\"item.slotUnregistered\": \"{name} (unregistered)\",\n\t\t\t\t\"item.content\": \"Content\",\n\t\t\t\t\"item.slotOptions\": \"Slot options\",\n\t\t\t\t\"item.form\": \"Form\",\n\t\t\t\t\"item.includeLastUserMessage\": \"Include last user message\",\n\t\t\t\t\"item.stripAssistantThinking\": \"Strip assistant thinking\",\n\t\t\t\t\"item.includeSummaries\": \"Include summaries\",\n\t\t\t\t\"item.toolHistory\": \"Tool history\",\n\t\t\t\t\"item.roles\": \"Roles\",\n\t\t\t\t\"item.maxMessages\": \"Max messages\",\n\t\t\t\t\"item.maxChars\": \"Max chars\",\n\t\t\t\t\"item.format\": \"Format\",\n\t\t\t\t\"item.includeTime\": \"Include current time\",\n\t\t\t\t\"item.noStructuredOptions\": \"This slot has no structured options yet. Use JSON mode for advanced settings.\",\n\t\t\t\t\"item.unknownKeysPreserved\": \"Unknown option keys are preserved. Use JSON mode for advanced settings.\",\n\t\t\t\t\"item.opt.includeLastUserMessage\": \"Keep the latest user message inside the inserted chat history.\",\n\t\t\t\t\"item.opt.stripAssistantThinking\": \"Remove prior assistant thinking blocks from inserted chat history while keeping visible text, tool calls, and tool results.\",\n\t\t\t\t\"item.opt.includeSummaries\": \"Keep Pi branch and compaction summary messages inside inserted chat history.\",\n\t\t\t\t\"item.opt.toolMode\": \"Keep tool calls/results or drop prior tool history from inserted chat history.\",\n\t\t\t\t\"item.opt.roles\": \"Optional comma-separated message roles to keep, such as user, assistant, toolResult, compactionSummary.\",\n\t\t\t\t\"item.opt.maxMessages\": \"Keep only the most recent N chat-history messages after filtering.\",\n\t\t\t\t\"item.opt.maxChars\": \"Keep only the most recent chat-history messages within an approximate character budget.\",\n\t\t\t\t\"item.opt.includeTime\": \"Render the current time in HH:MM:SS after the current date.\",\n\t\t\t\t\"item.opt.format\": \"Choose XML or compact plain text rendering.\",\n\t\t\t\t\"item.opt.advanced\": \"Advanced slot option.\",\n\t\t\t\t\"stackTab.contextOptions\": \"Context options\",\n\t\t\t\t\"stackTab.contextMeta\": \"Advanced behavior for how the ordered Stack rewrites Pi conversation context.\",\n\t\t\t\t\"stackTab.allowDuplicateTitle\": \"Allow multiple enabled chat-history slots. When off, only the first enabled chat-history slot is expanded.\",\n\t\t\t\t\"stackTab.allowDuplicate\": \"Allow duplicate chat-history slots\",\n\t\t\t\t\"stackTab.allowDuplicateNote\": \"Keep this off unless you intentionally want the same conversation history injected more than once.\",\n\t\t\t\t\"stackTab.mergeTitle\": \"Merge runs of consecutive Stack items that share the same role into a single message. Chat history and custom-role items are never merged.\",\n\t\t\t\t\"stackTab.merge\": \"Merge consecutive same-role items\",\n\t\t\t\t\"stackTab.mergeNote\": \"Only Stack-authored user/assistant items merge; chat history and custom-role items are hard boundaries.\",\n\t\t\t\t\"stackTab.customMergeSeparator\": \"Use a custom merge separator\",\n\t\t\t\t\"stackTab.customMergeSeparatorTitle\": \"Enable to store a separator explicitly, including an empty string.\",\n\t\t\t\t\"stackTab.mergeSeparator\": \"Merge separator\",\n\t\t\t\t\"stackTab.mergeSeparatorPlaceholder\": \"May be empty\",\n\t\t\t\t\"stackTab.mergeSeparatorNote\": \"Inserted verbatim between merged message texts. An empty custom separator joins texts directly; turn custom mode off to use the default blank line.\",\n\t\t\t\t\"stackTab.parameters\": \"Preset parameters\",\n\t\t\t\t\"stackTab.parametersMetaPre\": \"Immutable static values; schema v2 uses \",\n\t\t\t\t\"stackTab.parametersMetaMid\": \", v1 uses \",\n\t\t\t\t\"stackTab.parametersMetaPost\": \".\",\n\t\t\t\t\"stackTab.addVariable\": \"Add parameter\",\n\t\t\t\t\"stackTab.addVariableTitle\": \"Add a static preset parameter\",\n\t\t\t\t\"stackTab.variablesSavedNote\": \"Saved in stack.parameters (v2) / stack.variables (v1).\",\n\t\t\t\t\"stackTab.value\": \"Value\",\n\t\t\t\t\"stackTab.valueType\": \"Type\",\n\t\t\t\t\"stackTab.textValue\": \"Text\",\n\t\t\t\t\"stackTab.invalidParameterJson\": \"Parameter {name} must contain valid JSON.\",\n\t\t\t\t\"stackTab.extensions\": \"Available extensions\",\n\t\t\t\t\"stackTab.extensionsMeta\": \"Registrations currently loaded by pi-forge. Custom macros use the shown forge-v1 path; slots are selectable from item editors.\",\n\t\t\t\t\"stackTab.registeredMacros\": \"Registered macros\",\n\t\t\t\t\"stackTab.availableSlots\": \"Available slots\",\n\t\t\t\t\"stackTab.deleteVariable\": \"Delete\",\n\t\t\t\t\"stackTab.deleteVariableTitle\": \"Delete this preset parameter\",\n\t\t\t\t\"stackTab.stackJson\": \"Preset JSON\",\n\t\t\t\t\"stackTab.stackJsonMeta\": \"Raw recovery view for advanced fields. Apply updates the editor; Save writes to disk.\",\n\t\t\t\t\"stackTab.copyJsonTitle\": \"Copy this JSON to the clipboard\",\n\t\t\t\t\"stackTab.applyJson\": \"Apply to editor\",\n\t\t\t\t\"stackTab.applyJsonTitle\": \"Apply this JSON to the editor without saving\",\n\t\t\t\t\"stackTab.rawDraft\": \"Unsaved preset JSON draft.\",\n\t\t\t\t\"stackTab.duplicateVarNames\": \"Duplicate preset parameter names.\",\n\t\t\t\t\"stackTab.copiedJson\": \"Copied JSON.\",\n\t\t\t\t\"stackTab.copiedJsonStatus\": \"Copied preset JSON\",\n\t\t\t\t\"stackTab.appliedJson\": \"Applied preset JSON to editor.\",\n\t\t\t\t\"error.stackJsonNotObject\": \"Preset JSON must be an object.\",\n\t\t\t\t\"error.stackJsonNoId\": \"Preset JSON needs a non-empty string id.\",\n\t\t\t\t\"error.stackJsonNoItems\": \"Preset JSON needs an items array.\",\n\t\t\t\t\"error.itemLabel\": \"Item {index}\",\n\t\t\t\t\"error.itemNotObject\": \"{label} must be an object.\",\n\t\t\t\t\"error.itemKind\": \"{label} kind must be block or slot.\",\n\t\t\t\t\"error.itemNoId\": \"{label} needs a non-empty string id.\",\n\t\t\t\t\"error.itemContent\": \"{label} block content must be a string.\",\n\t\t\t\t\"error.itemSlot\": \"{label} slot must be a string.\",\n\t\t\t\t\"policy.title\": \"Tool policy and skill visibility\",\n\t\t\t\t\"policy.meta\": \"A specific tool allow list selects from every registered tool and can activate tools that are currently inactive; deny rules constrain the current active-tool baseline. Skill rules only filter model-visible skills rendered by pi-forge; they do not block explicit skill invocation. Patterns support exact names and * wildcards.\",\n\t\t\t\t\"policy.tools\": \"Tools\",\n\t\t\t\t\"policy.skills\": \"Skills\",\n\t\t\t\t\"policy.resource\": \"Resource\",\n\t\t\t\t\"policy.mode\": \"Mode\",\n\t\t\t\t\"policy.patterns\": \"Patterns\",\n\t\t\t\t\"policy.available\": \"Available\",\n\t\t\t\t\"policy.status\": \"Status\",\n\t\t\t\t\"policy.unrestrictedOption\": \"Unrestricted\",\n\t\t\t\t\"policy.allow\": \"Allow\",\n\t\t\t\t\"policy.deny\": \"Deny\",\n\t\t\t\t\"policy.noPatterns\": \"No selected patterns.\",\n\t\t\t\t\"policy.removePatternTitle\": \"Remove selected pattern\",\n\t\t\t\t\"policy.availableKind\": \"Available {kind}\",\n\t\t\t\t\"policy.filterPlaceholder\": \"Type to filter or add\",\n\t\t\t\t\"policy.noMatching\": \"No matching unselected {kind}.\",\n\t\t\t\t\"policy.noRegistered\": \"No registered {kind} reported.\",\n\t\t\t\t\"policy.unrestricted\": \"Unrestricted {kind}.\",\n\t\t\t\t\"policy.allowListActiveOne\": \"Allow list active: {count} pattern.\",\n\t\t\t\t\"policy.allowListActiveMany\": \"Allow list active: {count} patterns.\",\n\t\t\t\t\"policy.denyListActiveOne\": \"Deny list active: {count} pattern.\",\n\t\t\t\t\"policy.denyListActiveMany\": \"Deny list active: {count} patterns.\",\n\t\t\t\t\"policy.sourceLabel\": \"Source: {source}\",\n\t\t\t\t\"policy.currentlyActive\": \"Currently active\",\n\t\t\t\t\"policy.registeredInactive\": \"Registered, currently inactive; a specific allow list can activate it\",\n\t\t\t\t\"policy.hiddenFromModel\": \"Hidden from model invocation\",\n\t\t\t\t\"policy.suffixHidden\": \" hidden\",\n\t\t\t\t\"error.duplicatePattern\": \"{kind}.{mode} has duplicate pattern: {pattern}\",\n\t\t\t\t\"regex.title\": \"Regex rules\",\n\t\t\t\t\"regex.meta\": \"Ordered JavaScript RegExp replacements for outgoing prompt text and finalized assistant messages.\",\n\t\t\t\t\"regex.addRule\": \"Add rule\",\n\t\t\t\t\"regex.addRuleTitle\": \"Add a regex rule\",\n\t\t\t\t\"regex.validate\": \"Validate\",\n\t\t\t\t\"regex.validateTitle\": \"Validate the edited preset\",\n\t\t\t\t\"regex.saveNote\": \"Save writes these rules to stack.regex.rules.\",\n\t\t\t\t\"regex.up\": \"Up\",\n\t\t\t\t\"regex.upTitle\": \"Move this rule up\",\n\t\t\t\t\"regex.down\": \"Down\",\n\t\t\t\t\"regex.downTitle\": \"Move this rule down\",\n\t\t\t\t\"regex.enabled\": \"Enabled\",\n\t\t\t\t\"regex.id\": \"Rule ID\",\n\t\t\t\t\"regex.name\": \"Name\",\n\t\t\t\t\"regex.idPlaceholder\": \"trim-ooc\",\n\t\t\t\t\"regex.namePlaceholder\": \"Readable label\",\n\t\t\t\t\"regex.stage\": \"Stage\",\n\t\t\t\t\"regex.effect\": \"Effect\",\n\t\t\t\t\"regex.frequency\": \"Frequency\",\n\t\t\t\t\"regex.frequencyTitle\": \"turn: run on the first request of each user turn; request: also run on tool-result follow-up requests over the full natural context\",\n\t\t\t\t\"regex.flags\": \"Flags\",\n\t\t\t\t\"regex.flagsPlaceholder\": \"gimsu\",\n\t\t\t\t\"regex.targets\": \"Targets\",\n\t\t\t\t\"regex.targetsTitle\": \"compiled only; empty means default\",\n\t\t\t\t\"regex.roles\": \"Roles\",\n\t\t\t\t\"regex.rolesTitle\": \"message rules only; empty means all roles\",\n\t\t\t\t\"regex.maxMessages\": \"Max messages\",\n\t\t\t\t\"regex.maxChars\": \"Max chars\",\n\t\t\t\t\"regex.minDepth\": \"Min depth\",\n\t\t\t\t\"regex.maxDepth\": \"Max depth\",\n\t\t\t\t\"regex.trimStrings\": \"Trim strings\",\n\t\t\t\t\"regex.trimStringsPlaceholder\": \"one per line\",\n\t\t\t\t\"regex.pattern\": \"Pattern\",\n\t\t\t\t\"regex.patternPlaceholder\": \"\\\\(OOC:[^)]+\\\\)\",\n\t\t\t\t\"regex.replace\": \"Replace\",\n\t\t\t\t\"regex.deleteTitle\": \"Delete this regex rule\",\n\t\t\t\t\"regex.warnFinalize\": \"Warning: finalize runs after streaming and replaces the stored assistant transcript. Use stage \\\"compiled\\\" with target \\\"messages\\\".\",\n\t\t\t\t\"regex.warnMatch\": \"Warning: {{match}} is not pi-forge replacement syntax. Use $& or $0 for the full match.\",\n\t\t\t\t\"regex.ruleLabel\": \"rule {index}\",\n\t\t\t\t\"regex.errorId\": \"Regex rule {index} needs an id.\",\n\t\t\t\t\"regex.errorDuplicateId\": \"Duplicate regex rule id: {id}\",\n\t\t\t\t\"regex.errorPattern\": \"Regex rule {label} needs a pattern.\",\n\t\t\t\t\"regex.errorPositiveInteger\": \"Regex rule {label} {field} must be a positive integer.\",\n\t\t\t\t\"regex.errorNonNegativeInteger\": \"Regex rule {label} {field} must be a non-negative integer.\",\n\t\t\t\t\"regex.errorDepthOrder\": \"Regex rule {label} maxDepth must be greater than or equal to minDepth.\",\n\t\t\t\t\"common.delete\": \"Delete\",\n\t\t\t\t\"common.none\": \"(none)\",\n\t\t\t\t\"profiles.subheading\": \"One-shot bundles of model, thinking, and Preset. Applying a profile does not continuously own runtime state.\",\n\t\t\t\t\"profiles.working\": \"Working\",\n\t\t\t\t\"profiles.count\": \"{count} profile(s)\",\n\t\t\t\t\"profiles.scopeTitle\": \"Scope for new profiles\",\n\t\t\t\t\"profiles.scopeProject\": \"project\",\n\t\t\t\t\"profiles.scopeGlobal\": \"global\",\n\t\t\t\t\"profiles.newProfile\": \"New profile\",\n\t\t\t\t\"profiles.refresh\": \"Refresh\",\n\t\t\t\t\"profiles.untrustedWarning\": \"This project is not trusted; only user-global agent profiles are shown and applying profiles is disabled.\",\n\t\t\t\t\"profiles.empty\": \"No agent profiles found.\",\n\t\t\t\t\"profiles.autoBadge\": \"auto\",\n\t\t\t\t\"profiles.lastAppliedBadge\": \"last applied\",\n\t\t\t\t\"profiles.shadows\": \"shadows {selector}\",\n\t\t\t\t\"profiles.shadowedBy\": \"shadowed by {selector}\",\n\t\t\t\t\"profiles.ready\": \"ready\",\n\t\t\t\t\"profiles.readyToApply\": \"Ready to apply\",\n\t\t\t\t\"profiles.preflightFailed\": \"Preflight failed\",\n\t\t\t\t\"profiles.edit\": \"Edit\",\n\t\t\t\t\"profiles.applyOnce\": \"Apply once\",\n\t\t\t\t\"profiles.applyOnceTitle\": \"Apply this profile once\",\n\t\t\t\t\"profiles.applyBlockedTitle\": \"Resolve preflight errors before applying\",\n\t\t\t\t\"profiles.transition\": \"One-shot transition\",\n\t\t\t\t\"profiles.currentRuntime\": \"Current runtime\",\n\t\t\t\t\"profiles.profileTarget\": \"Profile target\",\n\t\t\t\t\"profiles.model\": \"Model\",\n\t\t\t\t\"profiles.thinking\": \"Thinking\",\n\t\t\t\t\"profiles.promptStack\": \"Preset\",\n\t\t\t\t\"profiles.effectiveTools\": \"Effective tools after Preset policy\",\n\t\t\t\t\"profiles.resolutionDiagnostics\": \"Resolution diagnostics\",\n\t\t\t\t\"profiles.emptyMainPre\": \"Create a project profile here or capture the current runtime with \",\n\t\t\t\t\"profiles.emptyMainPost\": \".\",\n\t\t\t\t\"profiles.runtimeProvenance\": \"Runtime and provenance\",\n\t\t\t\t\"profiles.current\": \"Current\",\n\t\t\t\t\"profiles.lastApplied\": \"Last applied\",\n\t\t\t\t\"profiles.sourceDefinition\": \"Source definition\",\n\t\t\t\t\"profiles.driftModel\": \"Model: {label}\",\n\t\t\t\t\"profiles.driftThinking\": \"Thinking: {label}\",\n\t\t\t\t\"profiles.driftStack\": \"Preset: {label}\",\n\t\t\t\t\"profiles.drifted\": \"drifted\",\n\t\t\t\t\"profiles.unchanged\": \"unchanged\",\n\t\t\t\t\"profiles.noneApplied\": \"No profile has been applied in this session.\",\n\t\t\t\t\"profiles.created\": \"Created {id}\",\n\t\t\t\t\"profiles.saved\": \"Saved {id}\",\n\t\t\t\t\"profiles.appliedOnce\": \"Applied {id} once\",\n\t\t\t\t\"profiles.refreshFailed\": \" Runtime refresh failed: {detail}\",\n\t\t\t\t\"profiles.confirmDelete\": \"Delete agent profile {id}?\\n\\n{path}\\n\\nDelegation settings in subagents.json are managed by the optional pi-forge-subagents package and are not removed.\",\n\t\t\t\t\"profiles.deleted\": \"Deleted {id}\",\n\t\t\t\t\"profileEditor.scopeGlobal\": \"user-global\",\n\t\t\t\t\"profileEditor.scopeProject\": \"project-local\",\n\t\t\t\t\"profileEditor.confirmDiscard\": \"Discard unsaved agent-profile changes?\",\n\t\t\t\t\"profileEditor.validationErrorOne\": \"{count} validation error\",\n\t\t\t\t\"profileEditor.validationErrorMany\": \"{count} validation errors\",\n\t\t\t\t\"profileEditor.validWithWarningOne\": \"Valid with {count} warning\",\n\t\t\t\t\"profileEditor.validWithWarningMany\": \"Valid with {count} warnings\",\n\t\t\t\t\"profileEditor.validReady\": \"Valid and ready to apply\",\n\t\t\t\t\"profileEditor.newTitle\": \"New agent profile\",\n\t\t\t\t\"profileEditor.editTitle\": \"Edit {id}\",\n\t\t\t\t\"profileEditor.note\": \"Profile application is preflighted separately; saving only updates the {scope} definition.\",\n\t\t\t\t\"profileEditor.cancel\": \"Cancel\",\n\t\t\t\t\"profileEditor.createSave\": \"Create profile\",\n\t\t\t\t\"profileEditor.editSave\": \"Save profile\",\n\t\t\t\t\"profileEditor.id\": \"Profile ID\",\n\t\t\t\t\"profileEditor.idPlaceholder\": \"focused-agent\",\n\t\t\t\t\"profileEditor.namePlaceholder\": \"Focused Agent\",\n\t\t\t\t\"profileEditor.idHint\": \"Letters, numbers, dots, underscores, and hyphens; immutable after creation. Scope is stored by location; this profile's canonical selector is {scope}:{id}.\",\n\t\t\t\t\"profileEditor.descriptionPlaceholder\": \"What this profile is for.\",\n\t\t\t\t\"profileEditor.modelProvider\": \"Model provider\",\n\t\t\t\t\"profileEditor.modelId\": \"Model ID\",\n\t\t\t\t\"profileEditor.authUnavailable\": \" (authentication unavailable)\",\n\t\t\t\t\"profileEditor.authWarning\": \"This model has no configured authentication; applying the profile will fail preflight.\",\n\t\t\t\t\"profileEditor.thinkingLevel\": \"Thinking level\",\n\t\t\t\t\"profileEditor.globalStackHint\": \"Global profiles may only reference user-global Presets. A same-scope Preset may be stored as a relative bare ID without changing its global resolution.\",\n\t\t\t\t\"profileEditor.projectStackHint\": \"Project profiles may reference project Presets or explicitly qualified global Presets.\",\n\t\t\t\t\"profileEditor.autoActivate\": \"Auto-activate on a fresh session\",\n\t\t\t\t\"profileEditor.autoActivateHint\": \"Only one {scope} profile may request auto-activation.\",\n\t\t\t\t\"diff.dockAria\": \"Preview dock\",\n\t\t\t\t\"diff.draftTab\": \"Draft diff\",\n\t\t\t\t\"diff.runTab\": \"Run diff\",\n\t\t\t\t\"diff.focus\": \"Focus\",\n\t\t\t\t\"diff.split\": \"Split\",\n\t\t\t\t\"diff.focusTitle\": \"Use the full editor width\",\n\t\t\t\t\"diff.splitTitle\": \"Return to split editor\",\n\t\t\t\t\"diff.compiledDraft\": \"Compiled draft\",\n\t\t\t\t\"diff.compiledMeta\": \"Estimate ~{tokens} tokens (chars/4) · {chars} chars\",\n\t\t\t\t\"diff.refreshing\": \"Refreshing…\",\n\t\t\t\t\"diff.noPreview\": \"No preview\",\n\t\t\t\t\"diff.loadingPreview\": \"Loading preview…\",\n\t\t\t\t\"diff.selectStackHint\": \"Select a preset to see its compiled prompt.\",\n\t\t\t\t\"diff.selectStackToPreview\": \"Select a preset to preview.\",\n\t\t\t\t\"diff.draftChangedRefreshing\": \"Draft changed; refreshing…\",\n\t\t\t\t\"diff.draftRefreshed\": \"Compiled draft refreshed.\",\n\t\t\t\t\"diff.previewNoSections\": \"Preview returned no structured sections.\",\n\t\t\t\t\"diff.compilerDiagnostics\": \"Compiler diagnostics ({count})\",\n\t\t\t\t\"diff.draftTitle\": \"Compiled draft vs saved output\",\n\t\t\t\t\"diff.runTitle\": \"Latest run vs previous run\",\n\t\t\t\t\"diff.noChanges\": \"No changes\",\n\t\t\t\t\"diff.changedBlocks\": \"{count} changed blocks\",\n\t\t\t\t\"diff.noDraftComparison\": \"No draft comparison\",\n\t\t\t\t\"diff.noCapturedRuns\": \"No captured runs\",\n\t\t\t\t\"diff.draftEmpty\": \"Select a saved preset to compare its current draft with disk.\",\n\t\t\t\t\"diff.runEmpty\": \"No captured provider turns yet. Send a prompt; recent turns appear here automatically.\",\n\t\t\t\t\"diff.estimatedDelta\": \"Estimated Δ ~{delta} tokens\",\n\t\t\t\t\"diff.changed\": \"{count} changed\",\n\t\t\t\t\"diff.displayOptionsAria\": \"Diff display options\",\n\t\t\t\t\"diff.unified\": \"Unified\",\n\t\t\t\t\"diff.lines\": \"Lines\",\n\t\t\t\t\"diff.lineContextAria\": \"Diff line context\",\n\t\t\t\t\"diff.changesOnly\": \"Changes only\",\n\t\t\t\t\"diff.threeLinesContext\": \"3 lines context\",\n\t\t\t\t\"diff.allLines\": \"All lines\",\n\t\t\t\t\"diff.showUnchanged\": \"Show {count} unchanged\",\n\t\t\t\t\"diff.runMetadata\": \"Run metadata\",\n\t\t\t\t\"diff.turn\": \"Turn\",\n\t\t\t\t\"diff.providerModel\": \"Provider/model\",\n\t\t\t\t\"diff.usagePending\": \"usage pending\",\n\t\t\t\t\"diff.actualPromptTokens\": \"Actual prompt tokens\",\n\t\t\t\t\"diff.actualCacheReadWrite\": \"Actual cache read / write\",\n\t\t\t\t\"diff.actualCacheHitRate\": \"Actual cache hit rate\",\n\t\t\t\t\"diff.actualUncached\": \"Actual uncached input / output\",\n\t\t\t\t\"diff.estimatedPrefix\": \"Estimated reusable prefix\",\n\t\t\t\t\"diff.prefixValue\": \"~{tokens} tokens ({percent}%)\",\n\t\t\t\t\"diff.cacheNotReportedNote\": \"Pi has not observed provider-reported cache reads or writes for this model yet, so a real hit rate cannot be distinguished from an unreported zero.\",\n\t\t\t\t\"diff.estimateNote\": \"Estimated values use captured text length (chars/4); actual values come from the provider usage returned by Pi.\",\n\t\t\t\t\"diff.draftSame\": \"Draft and saved prompt compile to the same content.\",\n\t\t\t\t\"diff.runSame\": \"The latest two runs have the same captured content.\",\n\t\t\t\t\"diff.unifiedAria\": \"Unified line diff\",\n\t\t\t\t\"diff.splitAria\": \"Split line diff\",\n\t\t\t\t\"diff.before\": \"Before\",\n\t\t\t\t\"diff.after\": \"After\",\n\t\t\t\t\"diff.blockTokensDelta\": \"est. Δ ~{delta} tokens\",\n\t\t\t\t\"diff.blockTokens\": \"est. ~{count} tokens\",\n\t\t\t\t\"diff.metadataChanged\": \"Provider-visible metadata changed; text is unchanged. {detail}\",\n\t\t\t\t\"diff.roleUnchanged\": \"Role unchanged ({role}); another serialized provider field changed.\",\n\t\t\t\t\"diff.roleChanged\": \"Role changed: {before} → {after}.\",\n\t\t\t\t\"diff.notReported\": \"not reported\",\n\t\t\t\t\"diff.sectionMeta\": \"{rolePrefix}{chars} chars · estimate ~{tokens} tokens\",\n\t\t\t\t\"diff.messageOne\": \"{count} message\",\n\t\t\t\t\"diff.messageMany\": \"{count} messages\",\n\t\t\t\t\"schema.key\": \"Key\",\n\t\t\t\t\"schema.keyUnavailable\": \"{key} · configured profile unavailable\",\n\t\t\t\t\"schema.allHaveEntries\": \"Every available {key} already has an entry.\",\n\t\t\t\t\"schema.needKey\": \"Every entry needs a key.\",\n\t\t\t\t\"schema.uniqueKeys\": \"Entry keys must be unique.\",\n\t\t\t\t\"schema.addEntry\": \"Add entry\",\n\t\t\t\t\"schema.addEntryTitle\": \"Add a {key} entry\",\n\t\t\t\t\"schema.oneEntryPer\": \"One entry per {key}.\",\n\t\t\t\t\"schema.deleteEntryTitle\": \"Delete this entry\",\n\t\t\t\t\"schema.noEntries\": \"No entries yet.\",\n\t\t\t\t\"settings.ready\": \"Settings ready\",\n\t\t\t\t\"settings.saving\": \"Saving\",\n\t\t\t\t\"settings.saved\": \"Saved\",\n\t\t\t\t\"settings.providerRetrying\": \"Provider restarted; retrying\",\n\t\t\t\t\"settings.editTab\": \"Edit {title}\",\n\t\t\t\t\"settings.navAria\": \"Plugin settings\"\n\t\t\t},\n\t\t\t\"zh-CN\": {\n\t\t\t\t\"nav.stacks\": \"预设\",\n\t\t\t\t\"nav.profiles\": \"代理配置\",\n\t\t\t\t\"nav.settings\": \"设置\",\n\t\t\t\t\"nav.themeToLight\": \"切换到浅色主题\",\n\t\t\t\t\"nav.themeToDark\": \"切换到深色主题\",\n\t\t\t\t\"nav.themeLight\": \"浅色\",\n\t\t\t\t\"nav.themeDark\": \"深色\",\n\t\t\t\t\"nav.locale\": \"语言\",\n\t\t\t\t\"nav.editorSectionsAria\": \"Pi Forge 编辑器区域\",\n\t\t\t\t\"nav.stackSectionsAria\": \"预设编辑器区域\",\n\t\t\t\t\"chrome.toggleSidebar\": \"切换预设侧栏\",\n\t\t\t\t\"chrome.brand\": \"pi-forge 预设编辑器\",\n\t\t\t\t\"chrome.loading\": \"加载中\",\n\t\t\t\t\"chrome.unsaved\": \"未保存\",\n\t\t\t\t\"chrome.unsavedTitle\": \"当前预设有未保存的修改\",\n\t\t\t\t\"chrome.reload\": \"重新加载\",\n\t\t\t\t\"chrome.reloadTitle\": \"从磁盘重新加载预设\",\n\t\t\t\t\"chrome.disableStack\": \"停用预设\",\n\t\t\t\t\"chrome.disableStackTitle\": \"停用当前激活的预设\",\n\t\t\t\t\"chrome.scopeTitle\": \"新建预设、导入和派生的目标作用域\",\n\t\t\t\t\"chrome.scopeAria\": \"预设作用域\",\n\t\t\t\t\"chrome.scopeProject\": \"项目\",\n\t\t\t\t\"chrome.scopeGlobal\": \"全局\",\n\t\t\t\t\"chrome.newStack\": \"新建预设\",\n\t\t\t\t\"chrome.newStackTitle\": \"创建新的预设(Ctrl/Cmd+N)\",\n\t\t\t\t\"chrome.activate\": \"激活\",\n\t\t\t\t\"chrome.activateTitle\": \"将此预设设为当前 Pi 会话的激活预设\",\n\t\t\t\t\"chrome.save\": \"保存\",\n\t\t\t\t\"chrome.saveTitle\": \"将编辑后的预设 JSON 保存到磁盘(Ctrl/Cmd+S)\",\n\t\t\t\t\"chrome.validate\": \"校验\",\n\t\t\t\t\"chrome.validateTitle\": \"校验编辑中的预设但不保存(Ctrl/Cmd+Shift+Enter)\",\n\t\t\t\t\"chrome.preview\": \"预览\",\n\t\t\t\t\"chrome.previewTitle\": \"预览编译后的提示词,不发送(Ctrl/Cmd+Enter)\",\n\t\t\t\t\"chrome.more\": \"更多\",\n\t\t\t\t\"chrome.moreTitle\": \"显示不常用的预设操作\",\n\t\t\t\t\"chrome.armPayload\": \"捕获载荷\",\n\t\t\t\t\"chrome.armPayloadTitle\": \"在浏览器中捕获下一次 provider 载荷\",\n\t\t\t\t\"chrome.fork\": \"派生\",\n\t\t\t\t\"chrome.forkTitle\": \"基于当前编辑内容创建新预设\",\n\t\t\t\t\"chrome.import\": \"导入 JSON\",\n\t\t\t\t\"chrome.importTitle\": \"导入 pi-forge 预设 JSON\",\n\t\t\t\t\"chrome.export\": \"导出 JSON\",\n\t\t\t\t\"chrome.exportTitle\": \"下载当前预设 JSON;无法下载时复制到剪贴板\",\n\t\t\t\t\"chrome.deleteStack\": \"删除预设\",\n\t\t\t\t\"chrome.deleteStackTitle\": \"删除所选预设的 JSON 文件\",\n\t\t\t\t\"chrome.items\": \"堆栈条目\",\n\t\t\t\t\"chrome.addBlock\": \"添加块\",\n\t\t\t\t\"chrome.addBlockTitle\": \"添加提示词块条目\",\n\t\t\t\t\"chrome.addSlot\": \"添加槽位\",\n\t\t\t\t\"chrome.addSlotTitle\": \"添加运行时槽位条目\",\n\t\t\t\t\"chrome.deleteItem\": \"删除条目\",\n\t\t\t\t\"chrome.deleteItemTitle\": \"删除所选堆栈条目\",\n\t\t\t\t\"tab.items\": \"堆栈\",\n\t\t\t\t\"tab.itemsTitle\": \"编辑由 Block 和 Slot 组成的有序堆栈\",\n\t\t\t\t\"tab.regex\": \"正则\",\n\t\t\t\t\"tab.regexTitle\": \"编辑正则转换规则\",\n\t\t\t\t\"tab.policy\": \"策略\",\n\t\t\t\t\"tab.policyTitle\": \"编辑激活工具策略与模型可见的技能过滤\",\n\t\t\t\t\"tab.stack\": \"高级\",\n\t\t\t\t\"tab.stackTitle\": \"编辑上下文选项、参数、扩展与预设原始 JSON\",\n\t\t\t\t\"tab.preview\": \"预览\",\n\t\t\t\t\"tab.previewTitle\": \"编译后的提示词、未保存草稿差异与最近一次运行差异\",\n\t\t\t\t\"settings.pluginSettings\": \"插件设置\",\n\t\t\t\t\"settings.pluginSettingsMeta\": \"由已安装的 Pi Forge 插件提供的配置页面。\",\n\t\t\t\t\"settings.loading\": \"正在加载设置…\",\n\t\t\t\t\"status.unsavedChanges\": \"未保存的修改\",\n\t\t\t\t\"status.loaded\": \"已加载 {id}\",\n\t\t\t\t\"status.appliedStack\": \"已将预设 JSON 应用到编辑器\",\n\t\t\t\t\"status.saved\": \"已保存 {id}\",\n\t\t\t\t\"status.created\": \"已创建 {id}\",\n\t\t\t\t\"status.imported\": \"已导入 {id}\",\n\t\t\t\t\"status.forked\": \"已派生 {id}\",\n\t\t\t\t\"status.exported\": \"已导出 {id}\",\n\t\t\t\t\"status.copiedJson\": \"已复制 {id} 的 JSON\",\n\t\t\t\t\"status.activated\": \"已激活 {id}\",\n\t\t\t\t\"status.stackDisabled\": \"预设已停用\",\n\t\t\t\t\"status.deleted\": \"已删除 {id}\",\n\t\t\t\t\"status.deletedNoneRemain\": \"已删除 {id};没有剩余预设\",\n\t\t\t\t\"status.reloaded\": \"已从磁盘重新加载\",\n\t\t\t\t\"status.noStacks\": \"未找到预设\",\n\t\t\t\t\"status.sidebarHidden\": \"预设侧栏已隐藏\",\n\t\t\t\t\"status.sidebarShown\": \"预设侧栏已显示\",\n\t\t\t\t\"stackList.empty\": \"此项目中没有预设。\",\n\t\t\t\t\"stackList.active\": \"当前\",\n\t\t\t\t\"stackList.global\": \"全局\",\n\t\t\t\t\"stackList.unnamed\": \"(未命名)\",\n\t\t\t\t\"stackList.errorCount\": \"{count} 错误\",\n\t\t\t\t\"stackList.warningCount\": \"{count} 警告\",\n\t\t\t\t\"stackList.itemCount\": \"{count} 条目\",\n\t\t\t\t\"itemList.total\": \"共 {count} 条\",\n\t\t\t\t\"itemList.dragToReorder\": \"拖拽以重新排序\",\n\t\t\t\t\"itemList.toggleItem\": \"启用/停用条目\",\n\t\t\t\t\"itemList.on\": \"开\",\n\t\t\t\t\"itemList.off\": \"关\",\n\t\t\t\t\"itemEditor.none\": \"未选择条目。\",\n\t\t\t\t\"modal.close\": \"关闭\",\n\t\t\t\t\"modal.closeTitle\": \"关闭此对话框\",\n\t\t\t\t\"confirm.discardChanges\": \"放弃未保存的修改?\",\n\t\t\t\t\"confirm.deleteItem\": \"删除条目 {id}?\",\n\t\t\t\t\"confirm.overwriteStack\": \"{message}\\n\\n要覆盖它吗?\",\n\t\t\t\t\"confirm.useStackId\": \"使用预设 id“{id}”?\",\n\t\t\t\t\"confirm.activateNewStack\": \"立即激活新预设?\",\n\t\t\t\t\"confirm.activateImportedStack\": \"立即激活导入的预设?\",\n\t\t\t\t\"confirm.activateFork\": \"立即激活派生的预设?\",\n\t\t\t\t\"confirm.deleteStack\": \"删除预设“{id}”?\\n\\n这将从预设存储中删除其 JSON 文件。\",\n\t\t\t\t\"prompt.newStackId\": \"新预设 id\",\n\t\t\t\t\"prompt.stackId\": \"预设 id\",\n\t\t\t\t\"prompt.stackDisplayName\": \"预设显示名称\",\n\t\t\t\t\"prompt.forkStackId\": \"新派生预设 id\",\n\t\t\t\t\"prompt.forkDisplayName\": \"派生预设显示名称\",\n\t\t\t\t\"error.stackIdEmpty\": \"预设 id 不能为空。\",\n\t\t\t\t\"error.importNotObject\": \"导入的 JSON 必须是对象。\",\n\t\t\t\t\"error.importNoItems\": \"导入的预设必须包含 items 数组。\",\n\t\t\t\t\"error.noStackSelected\": \"未选择预设。\",\n\t\t\t\t\"error.invalidItemOptions\": \"条目选项 JSON 无效:{message}\",\n\t\t\t\t\"diag.none\": \"无\",\n\t\t\t\t\"diag.errorOne\": \"{count} 个错误\",\n\t\t\t\t\"diag.errorMany\": \"{count} 个错误\",\n\t\t\t\t\"diag.warningOne\": \"{count} 个警告\",\n\t\t\t\t\"diag.warningMany\": \"{count} 个警告\",\n\t\t\t\t\"diag.noteOne\": \"{count} 条提示\",\n\t\t\t\t\"diag.noteMany\": \"{count} 条提示\",\n\t\t\t\t\"diag.noDiagnostics\": \"没有诊断信息。\",\n\t\t\t\t\"diag.title\": \"诊断 · {summary}\",\n\t\t\t\t\"diag.toggle\": \"切换诊断面板\",\n\t\t\t\t\"empty.title\": \"未找到预设。\",\n\t\t\t\t\"empty.body\": \"在此项目中创建预设,或导入现有的 pi-forge JSON 文件。\",\n\t\t\t\t\"chrome.showSidebar\": \"显示预设侧栏\",\n\t\t\t\t\"chrome.hideSidebar\": \"隐藏预设侧栏\",\n\t\t\t\t\"inspector.validationComplete\": \"校验完成\",\n\t\t\t\t\"inspector.armed\": \"载荷捕获已就绪;请在 Pi 中发送下一条提示词\",\n\t\t\t\t\"inspector.cleared\": \"载荷捕获已清除\",\n\t\t\t\t\"inspector.armedButton\": \"载荷已就绪\",\n\t\t\t\t\"inspector.armedButtonTitle\": \"正在等待下一次 provider 载荷\",\n\t\t\t\t\"inspector.viewPayload\": \"查看载荷\",\n\t\t\t\t\"inspector.viewPayloadTitle\": \"打开最近捕获的 provider 载荷\",\n\t\t\t\t\"inspector.armTitle\": \"在此编辑器中捕获下一次 provider 载荷\",\n\t\t\t\t\"inspector.copy\": \"复制\",\n\t\t\t\t\"inspector.copyFullTitle\": \"复制完整预览文本\",\n\t\t\t\t\"inspector.sectionMeta\": \"{chars} 字符 · 约 {tokens} token\",\n\t\t\t\t\"inspector.copySectionTitle\": \"复制此预览片段\",\n\t\t\t\t\"inspector.copyFull\": \"全部复制\",\n\t\t\t\t\"inspector.payloadTitle\": \"Provider 载荷\",\n\t\t\t\t\"inspector.noPayload\": \"尚未捕获载荷。\",\n\t\t\t\t\"inspector.armNext\": \"准备捕获\",\n\t\t\t\t\"inspector.armNextTitle\": \"捕获下一次 provider 载荷\",\n\t\t\t\t\"inspector.closePayload\": \"关闭载荷检查器\",\n\t\t\t\t\"inspector.armEmptyBody\": \"准备捕获后,在 Pi 中发送下一条提示词。provider 载荷会在发送前显示在这里。\",\n\t\t\t\t\"inspector.armedAt\": \"就绪于 {time}\",\n\t\t\t\t\"inspector.armedWaiting\": \"正在等待下一次 provider 请求\",\n\t\t\t\t\"inspector.armedTitle\": \"载荷捕获已就绪\",\n\t\t\t\t\"inspector.clear\": \"清除\",\n\t\t\t\t\"inspector.clearArmedTitle\": \"清除已就绪的载荷捕获\",\n\t\t\t\t\"inspector.armedBody\": \"在 Pi 中发送下一条提示词。准确的 provider 载荷将被捕获,并在显示前脱敏。\",\n\t\t\t\t\"inspector.stackId\": \"预设 {id}\",\n\t\t\t\t\"inspector.truncated\": \"已截断\",\n\t\t\t\t\"inspector.copyPayloadTitle\": \"复制完整脱敏载荷\",\n\t\t\t\t\"inspector.armAgain\": \"再次捕获\",\n\t\t\t\t\"inspector.clearCapturedTitle\": \"清除已捕获的载荷\",\n\t\t\t\t\"inspector.stringifyError\": \"序列化错误\",\n\t\t\t\t\"inspector.rawTruncated\": \"原始截断载荷\",\n\t\t\t\t\"inspector.rawPayload\": \"原始载荷\",\n\t\t\t\t\"inspector.chars\": \"{count} 字符\",\n\t\t\t\t\"inspector.copiedText\": \"已复制文本\",\n\t\t\t\t\"error.invalidItemOptionsShort\": \"条目选项 JSON 无效\",\n\t\t\t\t\"status.metadataHidden\": \"预设元数据已隐藏\",\n\t\t\t\t\"status.metadataShown\": \"预设元数据已显示\",\n\t\t\t\t\"metadata.toggleTitle\": \"显示或隐藏预设元数据\",\n\t\t\t\t\"metadata.title\": \"元数据\",\n\t\t\t\t\"metadata.noId\": \"(无 id)\",\n\t\t\t\t\"metadata.stackId\": \"预设 ID\",\n\t\t\t\t\"metadata.stackIdTitle\": \"预设 ID 不可变;请使用“派生”创建新 ID。\",\n\t\t\t\t\"metadata.name\": \"名称\",\n\t\t\t\t\"metadata.mode\": \"模式\",\n\t\t\t\t\"metadata.autoActivate\": \"自动激活\",\n\t\t\t\t\"metadata.enabled\": \"启用\",\n\t\t\t\t\"metadata.description\": \"描述\",\n\t\t\t\t\"metadata.file\": \"文件\",\n\t\t\t\t\"item.kind\": \"类型\",\n\t\t\t\t\"item.id\": \"ID\",\n\t\t\t\t\"item.name\": \"名称\",\n\t\t\t\t\"item.role\": \"角色\",\n\t\t\t\t\"item.roleNone\": \"(无)\",\n\t\t\t\t\"item.slot\": \"槽位\",\n\t\t\t\t\"item.slotUnregistered\": \"{name}(未注册)\",\n\t\t\t\t\"item.content\": \"内容\",\n\t\t\t\t\"item.slotOptions\": \"槽位选项\",\n\t\t\t\t\"item.form\": \"表单\",\n\t\t\t\t\"item.includeLastUserMessage\": \"包含最后一条用户消息\",\n\t\t\t\t\"item.stripAssistantThinking\": \"移除助手思考块\",\n\t\t\t\t\"item.includeSummaries\": \"包含摘要\",\n\t\t\t\t\"item.toolHistory\": \"工具历史\",\n\t\t\t\t\"item.roles\": \"角色\",\n\t\t\t\t\"item.maxMessages\": \"最大消息数\",\n\t\t\t\t\"item.maxChars\": \"最大字符数\",\n\t\t\t\t\"item.format\": \"格式\",\n\t\t\t\t\"item.includeTime\": \"包含当前时间\",\n\t\t\t\t\"item.noStructuredOptions\": \"此槽位暂没有结构化选项。高级设置请使用 JSON 模式。\",\n\t\t\t\t\"item.unknownKeysPreserved\": \"未知选项键会被保留。高级设置请使用 JSON 模式。\",\n\t\t\t\t\"item.opt.includeLastUserMessage\": \"在插入的聊天历史中保留最后一条用户消息。\",\n\t\t\t\t\"item.opt.stripAssistantThinking\": \"从插入的聊天历史中移除之前的助手思考块,同时保留可见文本、工具调用和工具结果。\",\n\t\t\t\t\"item.opt.includeSummaries\": \"在插入的聊天历史中保留 Pi 分支摘要和压缩摘要消息。\",\n\t\t\t\t\"item.opt.toolMode\": \"在插入的聊天历史中保留工具调用/结果,或丢弃之前的工具历史。\",\n\t\t\t\t\"item.opt.roles\": \"可选的逗号分隔消息角色过滤,如 user、assistant、toolResult、compactionSummary。\",\n\t\t\t\t\"item.opt.maxMessages\": \"过滤后仅保留最近的 N 条聊天历史消息。\",\n\t\t\t\t\"item.opt.maxChars\": \"仅保留近似字符预算内的最近聊天历史消息。\",\n\t\t\t\t\"item.opt.includeTime\": \"在当前日期后以 HH:MM:SS 渲染当前时间。\",\n\t\t\t\t\"item.opt.format\": \"选择 XML 或紧凑纯文本渲染。\",\n\t\t\t\t\"item.opt.advanced\": \"高级槽位选项。\",\n\t\t\t\t\"stackTab.contextOptions\": \"上下文选项\",\n\t\t\t\t\"stackTab.contextMeta\": \"控制有序堆栈如何改写 Pi 对话上下文的高级行为。\",\n\t\t\t\t\"stackTab.allowDuplicateTitle\": \"允许多个启用的 chat-history 槽位。关闭时仅展开第一个启用的 chat-history 槽位。\",\n\t\t\t\t\"stackTab.allowDuplicate\": \"允许重复的 chat-history 槽位\",\n\t\t\t\t\"stackTab.allowDuplicateNote\": \"除非你确实想多次注入同一段会话历史,否则请保持关闭。\",\n\t\t\t\t\"stackTab.mergeTitle\": \"将角色相同的连续堆栈条目合并为一条消息。聊天历史和 custom role 条目永远不会合并。\",\n\t\t\t\t\"stackTab.merge\": \"合并连续同角色条目\",\n\t\t\t\t\"stackTab.mergeNote\": \"只有堆栈创建的 user/assistant 条目会合并;聊天历史和 custom role 条目是硬边界。\",\n\t\t\t\t\"stackTab.customMergeSeparator\": \"使用自定义合并分隔符\",\n\t\t\t\t\"stackTab.customMergeSeparatorTitle\": \"启用后可显式保存分隔符,包括空字符串。\",\n\t\t\t\t\"stackTab.mergeSeparator\": \"合并分隔符\",\n\t\t\t\t\"stackTab.mergeSeparatorPlaceholder\": \"可以为空\",\n\t\t\t\t\"stackTab.mergeSeparatorNote\": \"原样插入到合并后的消息文本之间。空的自定义分隔符会直接拼接文本;关闭自定义模式可恢复默认空行。\",\n\t\t\t\t\"stackTab.parameters\": \"预设参数\",\n\t\t\t\t\"stackTab.parametersMetaPre\": \"不可变静态值;schema v2 使用 \",\n\t\t\t\t\"stackTab.parametersMetaMid\": \",v1 使用 \",\n\t\t\t\t\"stackTab.parametersMetaPost\": \"。\",\n\t\t\t\t\"stackTab.addVariable\": \"添加参数\",\n\t\t\t\t\"stackTab.addVariableTitle\": \"添加静态预设参数\",\n\t\t\t\t\"stackTab.variablesSavedNote\": \"保存于 stack.parameters(v2)/ stack.variables(v1)。\",\n\t\t\t\t\"stackTab.value\": \"值\",\n\t\t\t\t\"stackTab.valueType\": \"类型\",\n\t\t\t\t\"stackTab.textValue\": \"文本\",\n\t\t\t\t\"stackTab.invalidParameterJson\": \"参数 {name} 必须包含有效的 JSON。\",\n\t\t\t\t\"stackTab.extensions\": \"可用扩展\",\n\t\t\t\t\"stackTab.extensionsMeta\": \"pi-forge 当前加载的注册项。自定义 macro 使用所示 forge-v1 路径;slot 可在条目编辑器中选择。\",\n\t\t\t\t\"stackTab.registeredMacros\": \"已注册 macro\",\n\t\t\t\t\"stackTab.availableSlots\": \"可用 slot\",\n\t\t\t\t\"stackTab.deleteVariable\": \"删除\",\n\t\t\t\t\"stackTab.deleteVariableTitle\": \"删除此预设参数\",\n\t\t\t\t\"stackTab.stackJson\": \"预设 JSON\",\n\t\t\t\t\"stackTab.stackJsonMeta\": \"高级字段的原始恢复视图。Apply 更新编辑器;Save 写入磁盘。\",\n\t\t\t\t\"stackTab.copyJsonTitle\": \"复制此 JSON 到剪贴板\",\n\t\t\t\t\"stackTab.applyJson\": \"应用到编辑器\",\n\t\t\t\t\"stackTab.applyJsonTitle\": \"将此 JSON 应用到编辑器,但不保存\",\n\t\t\t\t\"stackTab.rawDraft\": \"未保存的预设 JSON 草稿。\",\n\t\t\t\t\"stackTab.duplicateVarNames\": \"预设参数名重复。\",\n\t\t\t\t\"stackTab.copiedJson\": \"已复制 JSON。\",\n\t\t\t\t\"stackTab.copiedJsonStatus\": \"已复制预设 JSON\",\n\t\t\t\t\"stackTab.appliedJson\": \"已将预设 JSON 应用到编辑器。\",\n\t\t\t\t\"error.stackJsonNotObject\": \"预设 JSON 必须是对象。\",\n\t\t\t\t\"error.stackJsonNoId\": \"预设 JSON 需要非空字符串 id。\",\n\t\t\t\t\"error.stackJsonNoItems\": \"预设 JSON 需要 items 数组。\",\n\t\t\t\t\"error.itemLabel\": \"条目 {index}\",\n\t\t\t\t\"error.itemNotObject\": \"{label} 必须是对象。\",\n\t\t\t\t\"error.itemKind\": \"{label} 的 kind 必须是 block 或 slot。\",\n\t\t\t\t\"error.itemNoId\": \"{label} 需要非空字符串 id。\",\n\t\t\t\t\"error.itemContent\": \"{label} 块的 content 必须是字符串。\",\n\t\t\t\t\"error.itemSlot\": \"{label} 的 slot 必须是字符串。\",\n\t\t\t\t\"policy.title\": \"工具策略与技能可见性\",\n\t\t\t\t\"policy.meta\": \"精确的 tool 允许列表从全部已注册工具中选择,可以激活当前未激活的工具;deny 规则约束当前激活工具基线。技能规则仅过滤 pi-forge 渲染的模型可见技能,不会阻止显式技能调用。模式支持精确名称和 * 通配符。\",\n\t\t\t\t\"policy.tools\": \"工具\",\n\t\t\t\t\"policy.skills\": \"技能\",\n\t\t\t\t\"policy.resource\": \"资源\",\n\t\t\t\t\"policy.mode\": \"模式\",\n\t\t\t\t\"policy.patterns\": \"模式\",\n\t\t\t\t\"policy.available\": \"可用\",\n\t\t\t\t\"policy.status\": \"状态\",\n\t\t\t\t\"policy.unrestrictedOption\": \"不限\",\n\t\t\t\t\"policy.allow\": \"允许\",\n\t\t\t\t\"policy.deny\": \"拒绝\",\n\t\t\t\t\"policy.noPatterns\": \"未选择模式。\",\n\t\t\t\t\"policy.removePatternTitle\": \"移除所选模式\",\n\t\t\t\t\"policy.availableKind\": \"可用{kind}\",\n\t\t\t\t\"policy.filterPlaceholder\": \"输入以过滤或添加\",\n\t\t\t\t\"policy.noMatching\": \"没有匹配的未选{kind}。\",\n\t\t\t\t\"policy.noRegistered\": \"没有已注册的{kind}。\",\n\t\t\t\t\"policy.unrestricted\": \"{kind}不受限。\",\n\t\t\t\t\"policy.allowListActiveOne\": \"允许列表已生效:{count} 个模式。\",\n\t\t\t\t\"policy.allowListActiveMany\": \"允许列表已生效:{count} 个模式。\",\n\t\t\t\t\"policy.denyListActiveOne\": \"拒绝列表已生效:{count} 个模式。\",\n\t\t\t\t\"policy.denyListActiveMany\": \"拒绝列表已生效:{count} 个模式。\",\n\t\t\t\t\"policy.sourceLabel\": \"来源:{source}\",\n\t\t\t\t\"policy.currentlyActive\": \"当前已激活\",\n\t\t\t\t\"policy.registeredInactive\": \"已注册,当前未激活;精确的允许列表可将其激活\",\n\t\t\t\t\"policy.hiddenFromModel\": \"对模型调用隐藏\",\n\t\t\t\t\"policy.suffixHidden\": \"(隐藏)\",\n\t\t\t\t\"error.duplicatePattern\": \"{kind}.{mode} 存在重复模式:{pattern}\",\n\t\t\t\t\"regex.title\": \"正则规则\",\n\t\t\t\t\"regex.meta\": \"按顺序执行的 JavaScript RegExp 替换,作用于外发提示词文本和最终定稿的助手消息。\",\n\t\t\t\t\"regex.addRule\": \"添加规则\",\n\t\t\t\t\"regex.addRuleTitle\": \"添加一条正则规则\",\n\t\t\t\t\"regex.validate\": \"校验\",\n\t\t\t\t\"regex.validateTitle\": \"校验编辑中的预设\",\n\t\t\t\t\"regex.saveNote\": \"保存会将这些规则写入 stack.regex.rules。\",\n\t\t\t\t\"regex.up\": \"上移\",\n\t\t\t\t\"regex.upTitle\": \"上移此规则\",\n\t\t\t\t\"regex.down\": \"下移\",\n\t\t\t\t\"regex.downTitle\": \"下移此规则\",\n\t\t\t\t\"regex.enabled\": \"启用\",\n\t\t\t\t\"regex.id\": \"规则 ID\",\n\t\t\t\t\"regex.name\": \"名称\",\n\t\t\t\t\"regex.idPlaceholder\": \"trim-ooc\",\n\t\t\t\t\"regex.namePlaceholder\": \"可读标签\",\n\t\t\t\t\"regex.stage\": \"阶段\",\n\t\t\t\t\"regex.effect\": \"效果\",\n\t\t\t\t\"regex.frequency\": \"频率\",\n\t\t\t\t\"regex.frequencyTitle\": \"turn:每个用户轮次的第一次请求时运行;request:也在 tool 结果后续请求上对完整自然上下文运行\",\n\t\t\t\t\"regex.flags\": \"标志\",\n\t\t\t\t\"regex.flagsPlaceholder\": \"gimsu\",\n\t\t\t\t\"regex.targets\": \"目标\",\n\t\t\t\t\"regex.targetsTitle\": \"仅 compiled;留空表示默认\",\n\t\t\t\t\"regex.roles\": \"角色\",\n\t\t\t\t\"regex.rolesTitle\": \"仅消息规则;留空表示所有角色\",\n\t\t\t\t\"regex.maxMessages\": \"最大消息数\",\n\t\t\t\t\"regex.maxChars\": \"最大字符数\",\n\t\t\t\t\"regex.minDepth\": \"最小深度\",\n\t\t\t\t\"regex.maxDepth\": \"最大深度\",\n\t\t\t\t\"regex.trimStrings\": \"裁剪字符串\",\n\t\t\t\t\"regex.trimStringsPlaceholder\": \"每行一个\",\n\t\t\t\t\"regex.pattern\": \"模式\",\n\t\t\t\t\"regex.patternPlaceholder\": \"\\\\(OOC:[^)]+\\\\)\",\n\t\t\t\t\"regex.replace\": \"替换为\",\n\t\t\t\t\"regex.deleteTitle\": \"删除此正则规则\",\n\t\t\t\t\"regex.warnFinalize\": \"警告:finalize 在流式输出之后运行,会替换已存储的助手消息记录。请使用 stage \\\"compiled\\\" 且目标为 \\\"messages\\\"。\",\n\t\t\t\t\"regex.warnMatch\": \"警告:{{match}} 不是 pi-forge 的替换语法。请使用 $& 或 $0 表示完整匹配。\",\n\t\t\t\t\"regex.ruleLabel\": \"规则 {index}\",\n\t\t\t\t\"regex.errorId\": \"正则规则 {index} 需要填写 ID。\",\n\t\t\t\t\"regex.errorDuplicateId\": \"正则规则 ID 重复:{id}\",\n\t\t\t\t\"regex.errorPattern\": \"正则规则 {label} 需要填写模式。\",\n\t\t\t\t\"regex.errorPositiveInteger\": \"正则规则 {label} 的 {field} 必须是正整数。\",\n\t\t\t\t\"regex.errorNonNegativeInteger\": \"正则规则 {label} 的 {field} 必须是非负整数。\",\n\t\t\t\t\"regex.errorDepthOrder\": \"正则规则 {label} 的 maxDepth 必须大于或等于 minDepth。\",\n\t\t\t\t\"common.delete\": \"删除\",\n\t\t\t\t\"common.none\": \"(无)\",\n\t\t\t\t\"profiles.subheading\": \"一次性应用模型、思考级别与预设;Profile 不会持续持有运行时状态。\",\n\t\t\t\t\"profiles.working\": \"处理中\",\n\t\t\t\t\"profiles.count\": \"{count} 个配置\",\n\t\t\t\t\"profiles.scopeTitle\": \"新建配置的作用域\",\n\t\t\t\t\"profiles.scopeProject\": \"项目\",\n\t\t\t\t\"profiles.scopeGlobal\": \"全局\",\n\t\t\t\t\"profiles.newProfile\": \"新建配置\",\n\t\t\t\t\"profiles.refresh\": \"刷新\",\n\t\t\t\t\"profiles.untrustedWarning\": \"此项目不受信任;仅显示用户全局代理配置,且无法应用配置。\",\n\t\t\t\t\"profiles.empty\": \"未找到代理配置。\",\n\t\t\t\t\"profiles.autoBadge\": \"自动\",\n\t\t\t\t\"profiles.lastAppliedBadge\": \"上次应用\",\n\t\t\t\t\"profiles.shadows\": \"遮蔽 {selector}\",\n\t\t\t\t\"profiles.shadowedBy\": \"被 {selector} 遮蔽\",\n\t\t\t\t\"profiles.ready\": \"就绪\",\n\t\t\t\t\"profiles.readyToApply\": \"可以应用\",\n\t\t\t\t\"profiles.preflightFailed\": \"预检失败\",\n\t\t\t\t\"profiles.edit\": \"编辑\",\n\t\t\t\t\"profiles.applyOnce\": \"应用一次\",\n\t\t\t\t\"profiles.applyOnceTitle\": \"应用此配置一次\",\n\t\t\t\t\"profiles.applyBlockedTitle\": \"请先解决预检错误再应用\",\n\t\t\t\t\"profiles.transition\": \"一次性切换\",\n\t\t\t\t\"profiles.currentRuntime\": \"当前运行时\",\n\t\t\t\t\"profiles.profileTarget\": \"配置目标\",\n\t\t\t\t\"profiles.model\": \"模型\",\n\t\t\t\t\"profiles.thinking\": \"思考级别\",\n\t\t\t\t\"profiles.promptStack\": \"预设\",\n\t\t\t\t\"profiles.effectiveTools\": \"预设策略后的有效工具\",\n\t\t\t\t\"profiles.resolutionDiagnostics\": \"解析诊断\",\n\t\t\t\t\"profiles.emptyMainPre\": \"在此创建项目配置,或使用 \",\n\t\t\t\t\"profiles.emptyMainPost\": \" 捕获当前运行时。\",\n\t\t\t\t\"profiles.runtimeProvenance\": \"运行时与来源\",\n\t\t\t\t\"profiles.current\": \"当前\",\n\t\t\t\t\"profiles.lastApplied\": \"上次应用\",\n\t\t\t\t\"profiles.sourceDefinition\": \"源定义\",\n\t\t\t\t\"profiles.driftModel\": \"模型:{label}\",\n\t\t\t\t\"profiles.driftThinking\": \"思考级别:{label}\",\n\t\t\t\t\"profiles.driftStack\": \"预设:{label}\",\n\t\t\t\t\"profiles.drifted\": \"已漂移\",\n\t\t\t\t\"profiles.unchanged\": \"未变化\",\n\t\t\t\t\"profiles.noneApplied\": \"本会话尚未应用任何配置。\",\n\t\t\t\t\"profiles.created\": \"已创建 {id}\",\n\t\t\t\t\"profiles.saved\": \"已保存 {id}\",\n\t\t\t\t\"profiles.appliedOnce\": \"已应用 {id} 一次\",\n\t\t\t\t\"profiles.refreshFailed\": \" 运行时刷新失败:{detail}\",\n\t\t\t\t\"profiles.confirmDelete\": \"删除代理配置 {id}?\\n\\n{path}\\n\\nsubagents.json 中的委派设置由可选的 pi-forge-subagents 包管理,不会被移除。\",\n\t\t\t\t\"profiles.deleted\": \"已删除 {id}\",\n\t\t\t\t\"profileEditor.scopeGlobal\": \"用户全局\",\n\t\t\t\t\"profileEditor.scopeProject\": \"项目本地\",\n\t\t\t\t\"profileEditor.confirmDiscard\": \"放弃未保存的代理配置修改?\",\n\t\t\t\t\"profileEditor.validationErrorOne\": \"{count} 个校验错误\",\n\t\t\t\t\"profileEditor.validationErrorMany\": \"{count} 个校验错误\",\n\t\t\t\t\"profileEditor.validWithWarningOne\": \"有效,有 {count} 个警告\",\n\t\t\t\t\"profileEditor.validWithWarningMany\": \"有效,有 {count} 个警告\",\n\t\t\t\t\"profileEditor.validReady\": \"有效,可以应用\",\n\t\t\t\t\"profileEditor.newTitle\": \"新建代理配置\",\n\t\t\t\t\"profileEditor.editTitle\": \"编辑 {id}\",\n\t\t\t\t\"profileEditor.note\": \"配置应用会单独预检;保存仅更新{scope}定义。\",\n\t\t\t\t\"profileEditor.cancel\": \"取消\",\n\t\t\t\t\"profileEditor.createSave\": \"创建配置\",\n\t\t\t\t\"profileEditor.editSave\": \"保存配置\",\n\t\t\t\t\"profileEditor.id\": \"配置 ID\",\n\t\t\t\t\"profileEditor.idPlaceholder\": \"focused-agent\",\n\t\t\t\t\"profileEditor.namePlaceholder\": \"专注代理\",\n\t\t\t\t\"profileEditor.idHint\": \"允许字母、数字、点、下划线和连字符;创建后不可变。作用域按存储位置区分;此配置的规范选择器为 {scope}:{id}。\",\n\t\t\t\t\"profileEditor.descriptionPlaceholder\": \"此配置的用途。\",\n\t\t\t\t\"profileEditor.modelProvider\": \"模型 provider\",\n\t\t\t\t\"profileEditor.modelId\": \"模型 ID\",\n\t\t\t\t\"profileEditor.authUnavailable\": \"(认证不可用)\",\n\t\t\t\t\"profileEditor.authWarning\": \"此模型没有已配置的认证;应用配置将无法通过预检。\",\n\t\t\t\t\"profileEditor.thinkingLevel\": \"思考级别\",\n\t\t\t\t\"profileEditor.globalStackHint\": \"全局 Profile 只能引用用户全局预设。同作用域预设可以存为相对裸 ID,不影响其全局解析。\",\n\t\t\t\t\"profileEditor.projectStackHint\": \"项目 Profile 可以引用项目预设或显式限定的全局预设。\",\n\t\t\t\t\"profileEditor.autoActivate\": \"在新会话中自动激活\",\n\t\t\t\t\"profileEditor.autoActivateHint\": \"每个{scope}只允许一个配置请求自动激活。\",\n\t\t\t\t\"diff.dockAria\": \"预览停靠栏\",\n\t\t\t\t\"diff.draftTab\": \"草稿差异\",\n\t\t\t\t\"diff.runTab\": \"运行差异\",\n\t\t\t\t\"diff.focus\": \"专注\",\n\t\t\t\t\"diff.split\": \"分栏\",\n\t\t\t\t\"diff.focusTitle\": \"使用完整编辑器宽度\",\n\t\t\t\t\"diff.splitTitle\": \"返回分栏编辑器\",\n\t\t\t\t\"diff.compiledDraft\": \"编译草稿\",\n\t\t\t\t\"diff.compiledMeta\": \"估算约 {tokens} token(字符数/4)· {chars} 字符\",\n\t\t\t\t\"diff.refreshing\": \"正在刷新…\",\n\t\t\t\t\"diff.noPreview\": \"无预览\",\n\t\t\t\t\"diff.loadingPreview\": \"正在加载预览…\",\n\t\t\t\t\"diff.selectStackHint\": \"选择一个预设以查看其编译后的提示词。\",\n\t\t\t\t\"diff.selectStackToPreview\": \"选择一个预设以预览。\",\n\t\t\t\t\"diff.draftChangedRefreshing\": \"草稿已修改;正在刷新…\",\n\t\t\t\t\"diff.draftRefreshed\": \"编译草稿已刷新。\",\n\t\t\t\t\"diff.previewNoSections\": \"预览未返回结构化片段。\",\n\t\t\t\t\"diff.compilerDiagnostics\": \"编译诊断({count})\",\n\t\t\t\t\"diff.draftTitle\": \"编译草稿 vs 已保存输出\",\n\t\t\t\t\"diff.runTitle\": \"最近一次运行 vs 上一次运行\",\n\t\t\t\t\"diff.noChanges\": \"无变化\",\n\t\t\t\t\"diff.changedBlocks\": \"{count} 个块已变化\",\n\t\t\t\t\"diff.noDraftComparison\": \"没有草稿对比\",\n\t\t\t\t\"diff.noCapturedRuns\": \"没有已捕获的运行\",\n\t\t\t\t\"diff.draftEmpty\": \"选择一个已保存的预设,将其当前草稿与磁盘版本对比。\",\n\t\t\t\t\"diff.runEmpty\": \"尚未捕获 provider 轮次。发送一条提示词;最近的轮次会自动显示在这里。\",\n\t\t\t\t\"diff.estimatedDelta\": \"估算 Δ 约 {delta} token\",\n\t\t\t\t\"diff.changed\": \"{count} 已变化\",\n\t\t\t\t\"diff.displayOptionsAria\": \"差异显示选项\",\n\t\t\t\t\"diff.unified\": \"统一\",\n\t\t\t\t\"diff.lines\": \"行数\",\n\t\t\t\t\"diff.lineContextAria\": \"差异行上下文\",\n\t\t\t\t\"diff.changesOnly\": \"仅变化\",\n\t\t\t\t\"diff.threeLinesContext\": \"3 行上下文\",\n\t\t\t\t\"diff.allLines\": \"全部行\",\n\t\t\t\t\"diff.showUnchanged\": \"显示 {count} 个未变化项\",\n\t\t\t\t\"diff.runMetadata\": \"运行元数据\",\n\t\t\t\t\"diff.turn\": \"轮次\",\n\t\t\t\t\"diff.providerModel\": \"Provider/模型\",\n\t\t\t\t\"diff.usagePending\": \"等待用量数据\",\n\t\t\t\t\"diff.actualPromptTokens\": \"实际提示词 token\",\n\t\t\t\t\"diff.actualCacheReadWrite\": \"实际缓存读 / 写\",\n\t\t\t\t\"diff.actualCacheHitRate\": \"实际缓存命中率\",\n\t\t\t\t\"diff.actualUncached\": \"实际未缓存输入 / 输出\",\n\t\t\t\t\"diff.estimatedPrefix\": \"估算可复用前缀\",\n\t\t\t\t\"diff.prefixValue\": \"约 {tokens} token({percent}%)\",\n\t\t\t\t\"diff.cacheNotReportedNote\": \"Pi 尚未观测到此模型的 provider 缓存读写报告,因此无法区分真实命中率为零与未上报。\",\n\t\t\t\t\"diff.estimateNote\": \"估算值基于捕获文本长度(字符数/4);实际值来自 Pi 返回的 provider 用量。\",\n\t\t\t\t\"diff.draftSame\": \"草稿与已保存提示词编译结果相同。\",\n\t\t\t\t\"diff.runSame\": \"最近两次运行捕获的内容相同。\",\n\t\t\t\t\"diff.unifiedAria\": \"统一行差异\",\n\t\t\t\t\"diff.splitAria\": \"分栏行差异\",\n\t\t\t\t\"diff.before\": \"之前\",\n\t\t\t\t\"diff.after\": \"之后\",\n\t\t\t\t\"diff.blockTokensDelta\": \"估算 Δ 约 {delta} token\",\n\t\t\t\t\"diff.blockTokens\": \"估算约 {count} token\",\n\t\t\t\t\"diff.metadataChanged\": \"Provider 可见的元数据已变化;文本未变。{detail}\",\n\t\t\t\t\"diff.roleUnchanged\": \"角色未变({role});另一个序列化的 provider 字段发生了变化。\",\n\t\t\t\t\"diff.roleChanged\": \"角色已变化:{before} → {after}。\",\n\t\t\t\t\"diff.notReported\": \"未上报\",\n\t\t\t\t\"diff.sectionMeta\": \"{rolePrefix}{chars} 字符 · 估算约 {tokens} token\",\n\t\t\t\t\"diff.messageOne\": \"{count} 条消息\",\n\t\t\t\t\"diff.messageMany\": \"{count} 条消息\",\n\t\t\t\t\"schema.key\": \"键\",\n\t\t\t\t\"schema.keyUnavailable\": \"{key} · 配置不可用\",\n\t\t\t\t\"schema.allHaveEntries\": \"每个可用的{key}都已有条目。\",\n\t\t\t\t\"schema.needKey\": \"每个条目都需要键。\",\n\t\t\t\t\"schema.uniqueKeys\": \"条目键必须唯一。\",\n\t\t\t\t\"schema.addEntry\": \"添加条目\",\n\t\t\t\t\"schema.addEntryTitle\": \"添加一个{key}条目\",\n\t\t\t\t\"schema.oneEntryPer\": \"每个{key}一条。\",\n\t\t\t\t\"schema.deleteEntryTitle\": \"删除此条目\",\n\t\t\t\t\"schema.noEntries\": \"暂无条目。\",\n\t\t\t\t\"settings.ready\": \"设置已就绪\",\n\t\t\t\t\"settings.saving\": \"正在保存\",\n\t\t\t\t\"settings.saved\": \"已保存\",\n\t\t\t\t\"settings.providerRetrying\": \"Provider 已重启;正在重试\",\n\t\t\t\t\"settings.editTab\": \"编辑{title}\",\n\t\t\t\t\"settings.navAria\": \"插件设置\"\n\t\t\t}\n\t\t};\n\t\teditorLocale = /* @__PURE__ */ ref(initialLocale());\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\tinit_i18n();\n\tvar _hoisted_1$9 = { class: \"profile-editor profile-card\" };\n\tvar _hoisted_2$9 = { class: \"profile-editor-head\" };\n\tvar _hoisted_3$9 = { class: \"profile-editor-title\" };\n\tvar _hoisted_4$9 = { class: \"profile-editor-note\" };\n\tvar _hoisted_5$9 = {\n\t\tkey: 0,\n\t\tclass: \"profile-editor-dirty\"\n\t};\n\tvar _hoisted_6$9 = [\"disabled\"];\n\tvar _hoisted_7$9 = [\"disabled\"];\n\tvar _hoisted_8$9 = [\"disabled\"];\n\tvar _hoisted_9$9 = { class: \"profile-form\" };\n\tvar _hoisted_10$9 = { class: \"profile-field\" };\n\tvar _hoisted_11$9 = [\"readonly\", \"placeholder\"];\n\tvar _hoisted_12$9 = { class: \"profile-field\" };\n\tvar _hoisted_13$9 = [\"placeholder\"];\n\tvar _hoisted_14$9 = { class: \"profile-field profile-field-wide\" };\n\tvar _hoisted_15$9 = [\"placeholder\"];\n\tvar _hoisted_16$9 = { class: \"profile-field\" };\n\tvar _hoisted_17$8 = { id: \"profileProviderOptions\" };\n\tvar _hoisted_18$7 = [\"value\"];\n\tvar _hoisted_19$7 = { class: \"profile-field\" };\n\tvar _hoisted_20$7 = { id: \"profileModelOptions\" };\n\tvar _hoisted_21$7 = [\"value\", \"label\"];\n\tvar _hoisted_22$7 = {\n\t\tkey: 0,\n\t\tclass: \"profile-field-warning\",\n\t\t\"data-model-auth-warning\": \"\"\n\t};\n\tvar _hoisted_23$7 = { class: \"profile-field\" };\n\tvar _hoisted_24$7 = [\"value\"];\n\tvar _hoisted_25$7 = { class: \"profile-field\" };\n\tvar _hoisted_26$7 = { value: \"\" };\n\tvar _hoisted_27$6 = [\"value\"];\n\tvar _hoisted_28$6 = { key: 0 };\n\tvar _hoisted_29$6 = { key: 1 };\n\tvar _hoisted_30$6 = { class: \"profile-check profile-field-wide\" };\n\tvar _hoisted_31$6 = {\n\t\tkey: 1,\n\t\tclass: \"profile-editor-validation\"\n\t};\n\tvar _hoisted_32$6 = { class: \"profile-diagnostics\" };\n\tvar _hoisted_33$6 = {\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(() => t(editScope.value === \"global\" ? \"profileEditor.scopeGlobal\" : \"profileEditor.scopeProject\"));\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(t(\"profileEditor.confirmDiscard\"))) 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 ? tp(\"profileEditor.validationErrorOne\", \"profileEditor.validationErrorMany\", result.errors) : result.warnings ? tp(\"profileEditor.validWithWarningOne\", \"profileEditor.validWithWarningMany\", result.warnings) : t(\"profileEditor.validReady\");\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$9, [\n\t\t\t\t\tcreateBaseVNode(\"header\", _hoisted_2$9, [\n\t\t\t\t\t\tcreateBaseVNode(\"div\", null, [createBaseVNode(\"div\", _hoisted_3$9, toDisplayString(__props.mode === \"create\" ? unref(t)(\"profileEditor.newTitle\") : unref(t)(\"profileEditor.editTitle\", { id: __props.sourceSelector || __props.source?.id || \"\" })), 1), createBaseVNode(\"div\", _hoisted_4$9, toDisplayString(unref(t)(\"profileEditor.note\", { scope: scopeLabel.value })), 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$9, toDisplayString(unref(t)(\"chrome.unsaved\")), 1)) : 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}, toDisplayString(unref(t)(\"profileEditor.cancel\")), 9, _hoisted_6$9),\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}, toDisplayString(unref(t)(\"regex.validate\")), 9, _hoisted_7$9),\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\" ? unref(t)(\"profileEditor.createSave\") : unref(t)(\"profileEditor.editSave\")), 9, _hoisted_8$9)\n\t\t\t\t\t]),\n\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_9$9, [\n\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_10$9, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, toDisplayString(unref(t)(\"profileEditor.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: unref(t)(\"profileEditor.idPlaceholder\"),\n\t\t\t\t\t\t\t\tautocomplete: \"off\"\n\t\t\t\t\t\t\t}, null, 8, _hoisted_11$9), [[vModelText, draft.id]]),\n\t\t\t\t\t\t\tcreateBaseVNode(\"small\", null, toDisplayString(unref(t)(\"profileEditor.idHint\", {\n\t\t\t\t\t\t\t\tscope: editScope.value,\n\t\t\t\t\t\t\t\tid: draft.id || \"<id>\"\n\t\t\t\t\t\t\t})), 1)\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_12$9, [createBaseVNode(\"span\", null, toDisplayString(unref(t)(\"metadata.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: unref(t)(\"profileEditor.namePlaceholder\"),\n\t\t\t\t\t\t\tautocomplete: \"off\"\n\t\t\t\t\t\t}, null, 8, _hoisted_13$9), [[vModelText, draft.name]])]),\n\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_14$9, [createBaseVNode(\"span\", null, toDisplayString(unref(t)(\"metadata.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: unref(t)(\"profileEditor.descriptionPlaceholder\")\n\t\t\t\t\t\t}, null, 8, _hoisted_15$9), [[vModelText, draft.description]])]),\n\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_16$9, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, toDisplayString(unref(t)(\"profileEditor.modelProvider\")), 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_17$8, [(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_18$7);\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_19$7, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, toDisplayString(unref(t)(\"profileEditor.modelId\")), 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_20$7, [(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 ? \"\" : unref(t)(\"profileEditor.authUnavailable\")}`\n\t\t\t\t\t\t\t\t}, null, 8, _hoisted_21$7);\n\t\t\t\t\t\t\t}), 128))]),\n\t\t\t\t\t\t\ttypedModelUnavailable.value ? (openBlock(), createElementBlock(\"small\", _hoisted_22$7, toDisplayString(unref(t)(\"profileEditor.authWarning\")), 1)) : createCommentVNode(\"v-if\", true)\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_23$7, [createBaseVNode(\"span\", null, toDisplayString(unref(t)(\"profileEditor.thinkingLevel\")), 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_24$7);\n\t\t\t\t\t\t}), 64))], 512), [[vModelSelect, draft.thinkingLevel]])]),\n\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_25$7, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, toDisplayString(unref(t)(\"profiles.promptStack\")), 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}, [createBaseVNode(\"option\", _hoisted_26$7, toDisplayString(unref(t)(\"common.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_27$6);\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_28$6, toDisplayString(unref(t)(\"profileEditor.globalStackHint\")), 1)) : (openBlock(), createElementBlock(\"small\", _hoisted_29$6, toDisplayString(unref(t)(\"profileEditor.projectStackHint\")), 1))\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_30$6, [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, [createBaseVNode(\"strong\", null, toDisplayString(unref(t)(\"profileEditor.autoActivate\")), 1), createBaseVNode(\"small\", null, toDisplayString(unref(t)(\"profileEditor.autoActivateHint\", { scope: editScope.value })), 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_31$6, [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 ? unref(t)(\"profiles.readyToApply\") : unref(t)(\"profiles.preflightFailed\")) + \" · \" + toDisplayString(unref(tp)(\"diag.errorOne\", \"diag.errorMany\", validation.value.errors)) + \" · \" + toDisplayString(unref(tp)(\"diag.warningOne\", \"diag.warningMany\", validation.value.warnings)), 3), createBaseVNode(\"div\", _hoisted_32$6, [!validation.value.diagnostics.length ? (openBlock(), createElementBlock(\"div\", _hoisted_33$6, toDisplayString(unref(t)(\"diag.noDiagnostics\")), 1)) : 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-9cfe5c37\"]]);\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\tinit_i18n();\n\tvar _hoisted_1$8 = { class: \"profile-surface\" };\n\tvar _hoisted_2$8 = { class: \"profile-toolbar\" };\n\tvar _hoisted_3$8 = { class: \"profile-heading\" };\n\tvar _hoisted_4$8 = { class: \"profile-subheading\" };\n\tvar _hoisted_5$8 = {\n\t\tid: \"profilesStatus\",\n\t\tclass: \"status\"\n\t};\n\tvar _hoisted_6$8 = [\"title\", \"disabled\"];\n\tvar _hoisted_7$8 = { value: \"project\" };\n\tvar _hoisted_8$8 = { value: \"global\" };\n\tvar _hoisted_9$8 = [\"disabled\"];\n\tvar _hoisted_10$8 = [\"disabled\"];\n\tvar _hoisted_11$8 = {\n\t\tkey: 0,\n\t\tclass: \"profile-message error\"\n\t};\n\tvar _hoisted_12$8 = {\n\t\tkey: 1,\n\t\tclass: \"profile-message warning\"\n\t};\n\tvar _hoisted_13$8 = {\n\t\tkey: 2,\n\t\tclass: \"profile-layout\"\n\t};\n\tvar _hoisted_14$8 = { class: \"profile-sidebar\" };\n\tvar _hoisted_15$8 = { class: \"side-head\" };\n\tvar _hoisted_16$8 = { class: \"side-title\" };\n\tvar _hoisted_17$7 = { class: \"cwd\" };\n\tvar _hoisted_18$6 = { class: \"profile-list\" };\n\tvar _hoisted_19$6 = [\n\t\t\"disabled\",\n\t\t\"data-profile-id\",\n\t\t\"data-profile-selector\",\n\t\t\"onClick\"\n\t];\n\tvar _hoisted_20$6 = { class: \"profile-row-title\" };\n\tvar _hoisted_21$6 = {\n\t\tkey: 0,\n\t\tclass: \"badge shadow\"\n\t};\n\tvar _hoisted_22$6 = {\n\t\tkey: 1,\n\t\tclass: \"badge\"\n\t};\n\tvar _hoisted_23$6 = {\n\t\tkey: 2,\n\t\tclass: \"badge\"\n\t};\n\tvar _hoisted_24$6 = { class: \"profile-row-name\" };\n\tvar _hoisted_25$6 = { class: \"profile-row-meta\" };\n\tvar _hoisted_26$6 = {\n\t\tkey: 0,\n\t\tclass: \"profile-empty\"\n\t};\n\tvar _hoisted_27$5 = { class: \"profile-main\" };\n\tvar _hoisted_28$5 = { class: \"profile-card profile-summary-card\" };\n\tvar _hoisted_29$5 = { class: \"profile-title\" };\n\tvar _hoisted_30$5 = { class: \"profile-selector\" };\n\tvar _hoisted_31$5 = { class: \"profile-path\" };\n\tvar _hoisted_32$5 = { class: \"profile-summary-actions\" };\n\tvar _hoisted_33$5 = [\"disabled\", \"title\"];\n\tvar _hoisted_34$5 = [\"disabled\"];\n\tvar _hoisted_35$5 = {\n\t\tkey: 0,\n\t\tclass: \"profile-description\"\n\t};\n\tvar _hoisted_36$5 = { class: \"profile-card\" };\n\tvar _hoisted_37$5 = { class: \"profile-card-title\" };\n\tvar _hoisted_38$5 = { class: \"profile-transition-grid\" };\n\tvar _hoisted_39$5 = { class: \"profile-transition-head\" };\n\tvar _hoisted_40$5 = { class: \"profile-transition-head\" };\n\tvar _hoisted_41$4 = { class: \"profile-detail-row\" };\n\tvar _hoisted_42$3 = { class: \"profile-card\" };\n\tvar _hoisted_43$3 = { class: \"profile-card-title\" };\n\tvar _hoisted_44$3 = { class: \"profile-diagnostics\" };\n\tvar _hoisted_45$2 = {\n\t\tkey: 0,\n\t\tclass: \"diagnostic info\"\n\t};\n\tvar _hoisted_46$2 = {\n\t\tkey: 2,\n\t\tclass: \"profile-card profile-empty\"\n\t};\n\tvar _hoisted_47$2 = { class: \"profile-card profile-runtime-card\" };\n\tvar _hoisted_48$2 = { class: \"profile-card-title\" };\n\tvar _hoisted_49$2 = { class: \"profile-detail-row\" };\n\tvar _hoisted_50$2 = { class: \"profile-detail-row\" };\n\tvar _hoisted_51$2 = { class: \"profile-detail-row\" };\n\tvar _hoisted_52$1 = { class: \"profile-drift\" };\n\tvar _hoisted_53$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 = t(editorMode.value === \"create\" ? \"profiles.created\" : \"profiles.saved\", { id: profileSelectorLabel(saved) });\n\t\t\t\tprofileActionError.value = \"\";\n\t\t\t\teditorMode.value = void 0;\n\t\t\t}\n\t\t\tfunction profileSelectorLabel(entry) {\n\t\t\t\tif (!entry) return \"profile\";\n\t\t\t\treturn entry.scope === \"global\" ? entry.selector : entry.profile.id;\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 = t(\"profiles.appliedOnce\", { id: target.profile.id });\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 += t(\"profiles.refreshFailed\", { 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(t(\"profiles.confirmDelete\", {\n\t\t\t\t\tid: target.profile.id,\n\t\t\t\t\tpath: target.filePath\n\t\t\t\t}))) 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 = t(\"profiles.deleted\", { id: 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}` : t(\"common.none\");\n\t\t\t}\n\t\t\tfunction promptStackLabel(value) {\n\t\t\t\treturn value ?? t(\"common.none\");\n\t\t\t}\n\t\t\tfunction profileState(entry) {\n\t\t\t\tif (entry.errors > 0) return tp(\"diag.errorOne\", \"diag.errorMany\", entry.errors);\n\t\t\t\tif (entry.warnings > 0) return tp(\"diag.warningOne\", \"diag.warningMany\", entry.warnings);\n\t\t\t\treturn t(\"profiles.ready\");\n\t\t\t}\n\t\t\tfunction driftLabel(changed) {\n\t\t\t\treturn changed ? t(\"profiles.drifted\") : t(\"profiles.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\" ? t(\"profiles.shadows\", { selector: other.selector }) : t(\"profiles.shadowedBy\", { selector: other.selector });\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(\"header\", _hoisted_2$8, [\n\t\t\t\t\t\tcreateBaseVNode(\"div\", null, [createBaseVNode(\"div\", _hoisted_3$8, toDisplayString(unref(t)(\"nav.profiles\")), 1), createBaseVNode(\"div\", _hoisted_4$8, toDisplayString(unref(t)(\"profiles.subheading\")), 1)]),\n\t\t\t\t\t\t_cache[4] || (_cache[4] = createBaseVNode(\"span\", { class: \"action-spacer\" }, null, -1)),\n\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_5$8, toDisplayString(loading.value || profileActionBusy.value ? unref(t)(\"profiles.working\") : loadError.value || profileActionError.value || profileActionStatus.value || unref(t)(\"profiles.count\", { count: collection.value?.profiles.length || 0 })), 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: unref(t)(\"profiles.scopeTitle\"),\n\t\t\t\t\t\t\tdisabled: loading.value || profileActionBusy.value || !!editorMode.value\n\t\t\t\t\t\t}, [createBaseVNode(\"option\", _hoisted_7$8, toDisplayString(unref(t)(\"profiles.scopeProject\")), 1), createBaseVNode(\"option\", _hoisted_8$8, toDisplayString(unref(t)(\"profiles.scopeGlobal\")), 1)], 8, _hoisted_6$8), [[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}, toDisplayString(unref(t)(\"profiles.newProfile\")), 9, _hoisted_9$8),\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}, toDisplayString(unref(t)(\"profiles.refresh\")), 9, _hoisted_10$8)\n\t\t\t\t\t]),\n\t\t\t\t\tloadError.value ? (openBlock(), createElementBlock(\"div\", _hoisted_11$8, toDisplayString(loadError.value), 1)) : collection.value && !collection.value.trusted ? (openBlock(), createElementBlock(\"div\", _hoisted_12$8, toDisplayString(unref(t)(\"profiles.untrustedWarning\")), 1)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\tcollection.value ? (openBlock(), createElementBlock(\"div\", _hoisted_13$8, [createBaseVNode(\"aside\", _hoisted_14$8, [createBaseVNode(\"div\", _hoisted_15$8, [createBaseVNode(\"div\", _hoisted_16$8, toDisplayString(unref(t)(\"nav.profiles\")), 1), createBaseVNode(\"div\", _hoisted_17$7, toDisplayString(collection.value.profileDirectory), 1)]), createBaseVNode(\"div\", _hoisted_18$6, [(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\t\"data-profile-selector\": entry.selector,\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_20$6, [\n\t\t\t\t\t\t\t\tcreateTextVNode(toDisplayString(profileSelectorLabel(entry)) + \" \", 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", { class: normalizeClass([\"badge scope\", entry.scope]) }, toDisplayString(entry.scope === \"global\" ? unref(t)(\"chrome.scopeGlobal\") : unref(t)(\"chrome.scopeProject\")), 3),\n\t\t\t\t\t\t\t\tshadowRelationship(entry) ? (openBlock(), createElementBlock(\"span\", _hoisted_21$6, toDisplayString(shadowRelationship(entry)), 1)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\t\tentry.profile.autoActivate ? (openBlock(), createElementBlock(\"span\", _hoisted_22$6, toDisplayString(unref(t)(\"profiles.autoBadge\")), 1)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\t\tentry.lastApplied ? (openBlock(), createElementBlock(\"span\", _hoisted_23$6, toDisplayString(unref(t)(\"profiles.lastAppliedBadge\")), 1)) : createCommentVNode(\"v-if\", true)\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_24$6, toDisplayString(entry.profile.name || unref(t)(\"stackList.unnamed\")), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_25$6, 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_19$6);\n\t\t\t\t\t}), 128)), !collection.value.profiles.length ? (openBlock(), createElementBlock(\"div\", _hoisted_26$6, toDisplayString(unref(t)(\"profiles.empty\")), 1)) : createCommentVNode(\"v-if\", true)])]), createBaseVNode(\"main\", _hoisted_27$5, [editorMode.value ? (openBlock(), createBlock$1(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_28$5, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_29$5, toDisplayString(selected.value.profile.name || selected.value.profile.id), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_30$5, [createBaseVNode(\"code\", null, toDisplayString(selected.value.selector), 1)]),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_31$5, toDisplayString(selected.value.filePath), 1)\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_32$5, [\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 ? unref(t)(\"profiles.readyToApply\") : unref(t)(\"profiles.preflightFailed\")), 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}, toDisplayString(unref(t)(\"profiles.edit\")), 1),\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 ? unref(t)(\"profiles.applyOnceTitle\") : unref(t)(\"profiles.applyBlockedTitle\"),\n\t\t\t\t\t\t\t\t\tonClick: applySelectedProfile\n\t\t\t\t\t\t\t\t}, toDisplayString(unref(t)(\"profiles.applyOnce\")), 9, _hoisted_33$5),\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}, toDisplayString(unref(t)(\"common.delete\")), 9, _hoisted_34$5)\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\tselected.value.profile.description ? (openBlock(), createElementBlock(\"p\", _hoisted_35$5, 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_36$5, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_37$5, toDisplayString(unref(t)(\"profiles.transition\")), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_38$5, [\n\t\t\t\t\t\t\t\t_cache[5] || (_cache[5] = createBaseVNode(\"div\", { class: \"profile-transition-head\" }, null, -1)),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_39$5, toDisplayString(unref(t)(\"profiles.currentRuntime\")), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_40$5, toDisplayString(unref(t)(\"profiles.profileTarget\")), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, toDisplayString(unref(t)(\"profiles.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\tcreateBaseVNode(\"div\", null, toDisplayString(unref(t)(\"profiles.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\tcreateBaseVNode(\"div\", null, toDisplayString(unref(t)(\"profiles.promptStack\")), 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_41$4, [createBaseVNode(\"span\", null, toDisplayString(unref(t)(\"profiles.effectiveTools\")), 1), createBaseVNode(\"code\", null, toDisplayString(selected.value.preview.target.effectiveTools.join(\", \") || unref(t)(\"common.none\")), 1)])\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tcreateBaseVNode(\"section\", _hoisted_42$3, [createBaseVNode(\"div\", _hoisted_43$3, toDisplayString(unref(t)(\"profiles.resolutionDiagnostics\")), 1), createBaseVNode(\"div\", _hoisted_44$3, [!selected.value.preview.diagnostics.length ? (openBlock(), createElementBlock(\"div\", _hoisted_45$2, toDisplayString(unref(t)(\"diag.noDiagnostics\")), 1)) : 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_46$2, [\n\t\t\t\t\t\tcreateTextVNode(toDisplayString(unref(t)(\"profiles.emptyMainPre\")), 1),\n\t\t\t\t\t\t_cache[6] || (_cache[6] = createBaseVNode(\"code\", null, \"/profile save <id>\", -1)),\n\t\t\t\t\t\tcreateTextVNode(toDisplayString(unref(t)(\"profiles.emptyMainPost\")), 1)\n\t\t\t\t\t])) : createCommentVNode(\"v-if\", true), createBaseVNode(\"section\", _hoisted_47$2, [\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_48$2, toDisplayString(unref(t)(\"profiles.runtimeProvenance\")), 1),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_49$2, [createBaseVNode(\"span\", null, toDisplayString(unref(t)(\"profiles.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_50$2, [createBaseVNode(\"span\", null, toDisplayString(unref(t)(\"profiles.lastApplied\")), 1), createBaseVNode(\"code\", null, toDisplayString(collection.value.status.lastApplied.provenance.profileId), 1)]),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_51$2, [createBaseVNode(\"span\", null, toDisplayString(unref(t)(\"profiles.sourceDefinition\")), 1), createBaseVNode(\"code\", null, toDisplayString(collection.value.status.lastApplied.sourceState), 1)]),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_52$1, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, toDisplayString(unref(t)(\"profiles.driftModel\", { label: driftLabel(collection.value.status.lastApplied.drift.model.changed) })), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, toDisplayString(unref(t)(\"profiles.driftThinking\", { label: driftLabel(collection.value.status.lastApplied.drift.thinkingLevel.changed) })), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, toDisplayString(unref(t)(\"profiles.driftStack\", { label: 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_53$1, toDisplayString(unref(t)(\"profiles.noneApplied\")), 1))\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-e0385a21\"]]);\n\t//#endregion\n\t//#region src/web-editor/schema-form.ts\n\tfunction cloneJson$1(value) {\n\t\treturn JSON.parse(JSON.stringify(value));\n\t}\n\tfunction isPlainObject(value) {\n\t\treturn value !== null && typeof value === \"object\" && !Array.isArray(value);\n\t}\n\t/** Normalizes enum option lists to a uniform {value,label} shape. */\n\tfunction enumOptions(field) {\n\t\treturn (field.options ?? []).map((option) => {\n\t\t\tif (typeof option === \"string\") return {\n\t\t\t\tvalue: option,\n\t\t\t\tlabel: option\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tvalue: option.value,\n\t\t\t\tlabel: option.label ?? option.value\n\t\t\t};\n\t\t});\n\t}\n\tfunction defaultValueForField(field) {\n\t\tif (field.default !== void 0) return cloneJson$1(field.default);\n\t\tswitch (field.type) {\n\t\t\tcase \"boolean\": return false;\n\t\t\tcase \"number\": return 0;\n\t\t\tcase \"enum\": return enumOptions(field)[0]?.value ?? \"\";\n\t\t\tcase \"string\": return \"\";\n\t\t\tcase \"record\": return {};\n\t\t}\n\t}\n\t/** Builds a complete values object with every field present and defaulted. */\n\tfunction defaultValues(schema) {\n\t\tconst values = {};\n\t\tfor (const field of schema.fields) values[field.key] = defaultValueForField(field);\n\t\treturn values;\n\t}\n\t/** Shortcut used by default: copy values from the source, but only schema keys. */\n\tfunction normalizeValues(schema, values) {\n\t\tconst result = defaultValues(schema);\n\t\tfor (const field of schema.fields) if (values[field.key] !== void 0) result[field.key] = coerceFieldValue(field, values[field.key]);\n\t\treturn result;\n\t}\n\tfunction coerceFieldValue(field, value) {\n\t\tswitch (field.type) {\n\t\t\tcase \"boolean\": return value === true || value === 1 || value === \"true\" || value === \"1\";\n\t\t\tcase \"number\": {\n\t\t\t\tif (value === \"\" || value === null || value === void 0) return void 0;\n\t\t\t\tconst num = typeof value === \"number\" ? value : Number(value);\n\t\t\t\treturn Number.isFinite(num) ? num : void 0;\n\t\t\t}\n\t\t\tcase \"string\": return value === null || value === void 0 ? \"\" : String(value);\n\t\t\tcase \"enum\":\n\t\t\t\tif (typeof value === \"string\" && enumOptions(field).some((option) => option.value === value)) return value;\n\t\t\t\treturn enumOptions(field)[0]?.value ?? \"\";\n\t\t\tcase \"record\": return coerceRecordValue(field, value);\n\t\t}\n\t}\n\tfunction validateValues(schema, values) {\n\t\tconst errors = {};\n\t\tfor (const field of schema.fields) if (field.type === \"record\") validateRecordFieldInto(field, values[field.key], field.key, errors);\n\t\telse {\n\t\t\tconst fieldError = validateField(field, values[field.key]);\n\t\t\tif (fieldError) errors[field.key] = fieldError;\n\t\t}\n\t\treturn { errors };\n\t}\n\tfunction validateField(field, value) {\n\t\tswitch (field.type) {\n\t\t\tcase \"boolean\": return \"\";\n\t\t\tcase \"number\": return validateNumberField(field, value);\n\t\t\tcase \"enum\": return validateEnumField(field, value);\n\t\t\tcase \"string\": return validateStringField(field, value);\n\t\t\tcase \"record\": return \"\";\n\t\t}\n\t}\n\tfunction validateNumberField(field, value) {\n\t\tconst label = field.label;\n\t\tif (value === \"\" || value === null || value === void 0) return field.required ? `${label} is required.` : \"\";\n\t\tconst num = typeof value === \"number\" ? value : Number(value);\n\t\tif (!Number.isFinite(num)) return `${label} must be a number.`;\n\t\tif (field.min !== void 0 && num < field.min) return field.max !== void 0 ? `${label} must be between ${field.min} and ${field.max}.` : `${label} must be at least ${field.min}.`;\n\t\tif (field.max !== void 0 && num > field.max) return field.min !== void 0 ? `${label} must be between ${field.min} and ${field.max}.` : `${label} must be at most ${field.max}.`;\n\t\treturn \"\";\n\t}\n\tfunction validateEnumField(field, value) {\n\t\tif (typeof value !== \"string\" || !value) return field.required ? `${field.label} is required.` : \"\";\n\t\tif (!enumOptions(field).some((option) => option.value === value)) return `${field.label} has an invalid value.`;\n\t\treturn \"\";\n\t}\n\tfunction validateStringField(field, value) {\n\t\tif (value === null || value === void 0 || value === \"\") return field.required ? `${field.label} is required.` : \"\";\n\t\tconst text = String(value);\n\t\tif (field.maxLength !== void 0 && text.length > field.maxLength) return `${field.label} must be at most ${field.maxLength} characters.`;\n\t\tif (field.pattern) try {\n\t\t\tif (!new RegExp(field.pattern).test(text)) return `${field.label} does not match the required format.`;\n\t\t} catch {}\n\t\treturn \"\";\n\t}\n\tfunction validateRecordFieldInto(field, value, path, errors) {\n\t\tif (!isPlainObject(value)) {\n\t\t\terrors[path] = \"Must be a table of entries.\";\n\t\t\treturn;\n\t\t}\n\t\tconst seen = /* @__PURE__ */ new Set();\n\t\tfor (const [rowKey, rowValue] of Object.entries(value)) {\n\t\t\tconst rowPath = `${path}.${rowKey}`;\n\t\t\tconst key = rowKey.trim();\n\t\t\tif (!key) {\n\t\t\t\terrors[path] = errors[path] ?? \"Every entry needs a key.\";\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (seen.has(key)) {\n\t\t\t\terrors[path] = errors[path] ?? \"Entry keys must be unique.\";\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tseen.add(key);\n\t\t\tif (!isPlainObject(rowValue)) {\n\t\t\t\terrors[rowPath] = \"Must be an object.\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor (const rowField of field.recordFields ?? []) {\n\t\t\t\tconst rowFieldError = validateField(rowField, rowValue[rowField.key]);\n\t\t\t\tif (rowFieldError) errors[`${rowPath}.${rowField.key}`] = rowFieldError;\n\t\t\t}\n\t\t}\n\t}\n\tfunction coerceRecordValue(field, value) {\n\t\tif (!isPlainObject(value)) return {};\n\t\tconst result = {};\n\t\tfor (const [rowKey, rowValue] of Object.entries(value)) {\n\t\t\tconst key = rowKey.trim();\n\t\t\tif (!key) continue;\n\t\t\tconst row = isPlainObject(rowValue) ? rowValue : {};\n\t\t\tconst coercedRow = {};\n\t\t\tfor (const rowField of field.recordFields ?? []) coercedRow[rowField.key] = coerceFieldValue(rowField, row[rowField.key]);\n\t\t\tresult[key] = coercedRow;\n\t\t}\n\t\treturn result;\n\t}\n\t//#endregion\n\t//#region src/web-editor/client/components/SchemaForm.vue?vue&type=script&setup=true&lang.ts\n\tinit_vue_runtime_esm_bundler();\n\tinit_i18n();\n\tvar _hoisted_1$7 = { class: \"schema-form\" };\n\tvar _hoisted_2$7 = {\n\t\tkey: 0,\n\t\tclass: \"tab-section-title\"\n\t};\n\tvar _hoisted_3$7 = {\n\t\tkey: 1,\n\t\tclass: \"tab-section-meta\"\n\t};\n\tvar _hoisted_4$7 = [\"data-field\"];\n\tvar _hoisted_5$7 = {\n\t\tkey: 0,\n\t\tclass: \"tab-section-meta\"\n\t};\n\tvar _hoisted_6$7 = {\n\t\tkey: 1,\n\t\tclass: \"field\"\n\t};\n\tvar _hoisted_7$7 = { class: \"checkline\" };\n\tvar _hoisted_8$7 = [\n\t\t\"data-field-input\",\n\t\t\"checked\",\n\t\t\"onChange\"\n\t];\n\tvar _hoisted_9$7 = { class: \"field\" };\n\tvar _hoisted_10$7 = [\n\t\t\"data-field-input\",\n\t\t\"value\",\n\t\t\"placeholder\",\n\t\t\"onInput\"\n\t];\n\tvar _hoisted_11$7 = {\n\t\tkey: 0,\n\t\tclass: \"schema-field-error\",\n\t\t\"data-field-error\": \"\"\n\t};\n\tvar _hoisted_12$7 = { class: \"field\" };\n\tvar _hoisted_13$7 = [\n\t\t\"data-field-input\",\n\t\t\"value\",\n\t\t\"min\",\n\t\t\"max\",\n\t\t\"placeholder\",\n\t\t\"onInput\"\n\t];\n\tvar _hoisted_14$7 = {\n\t\tkey: 0,\n\t\tclass: \"schema-field-error\",\n\t\t\"data-field-error\": \"\"\n\t};\n\tvar _hoisted_15$7 = { class: \"field\" };\n\tvar _hoisted_16$7 = [\n\t\t\"data-field-input\",\n\t\t\"value\",\n\t\t\"onChange\"\n\t];\n\tvar _hoisted_17$6 = [\"value\"];\n\tvar _hoisted_18$5 = {\n\t\tkey: 0,\n\t\tclass: \"schema-field-error\",\n\t\t\"data-field-error\": \"\"\n\t};\n\tvar _hoisted_19$5 = { class: \"field\" };\n\tvar _hoisted_20$5 = { class: \"modal-toolbar\" };\n\tvar _hoisted_21$5 = [\n\t\t\"data-add-record\",\n\t\t\"title\",\n\t\t\"disabled\",\n\t\t\"onClick\"\n\t];\n\tvar _hoisted_22$5 = { class: \"modal-meta\" };\n\tvar _hoisted_23$5 = {\n\t\tkey: 0,\n\t\tclass: \"schema-field-error\",\n\t\t\"data-field-error\": \"\"\n\t};\n\tvar _hoisted_24$5 = [\"data-record-table\"];\n\tvar _hoisted_25$5 = { class: \"data-row header schema-record-row\" };\n\tvar _hoisted_26$5 = [\"data-record-row\"];\n\tvar _hoisted_27$4 = { class: \"field\" };\n\tvar _hoisted_28$4 = [\n\t\t\"data-record-key\",\n\t\t\"value\",\n\t\t\"onChange\"\n\t];\n\tvar _hoisted_29$4 = [\"value\"];\n\tvar _hoisted_30$4 = [\n\t\t\"data-record-key\",\n\t\t\"value\",\n\t\t\"placeholder\",\n\t\t\"onInput\"\n\t];\n\tvar _hoisted_31$4 = {\n\t\tkey: 0,\n\t\tclass: \"record-cell-label\"\n\t};\n\tvar _hoisted_32$4 = {\n\t\tkey: 1,\n\t\tclass: \"checkline\"\n\t};\n\tvar _hoisted_33$4 = [\n\t\t\"data-record-input\",\n\t\t\"checked\",\n\t\t\"onChange\"\n\t];\n\tvar _hoisted_34$4 = [\n\t\t\"data-record-input\",\n\t\t\"value\",\n\t\t\"onChange\"\n\t];\n\tvar _hoisted_35$4 = [\"value\"];\n\tvar _hoisted_36$4 = [\n\t\t\"data-record-input\",\n\t\t\"value\",\n\t\t\"min\",\n\t\t\"max\",\n\t\t\"onInput\"\n\t];\n\tvar _hoisted_37$4 = [\n\t\t\"data-record-input\",\n\t\t\"value\",\n\t\t\"placeholder\",\n\t\t\"onInput\"\n\t];\n\tvar _hoisted_38$4 = {\n\t\tkey: 5,\n\t\tclass: \"schema-field-error\",\n\t\t\"data-field-error\": \"\"\n\t};\n\tvar _hoisted_39$4 = [\n\t\t\"data-delete-record\",\n\t\t\"title\",\n\t\t\"onClick\"\n\t];\n\tvar _hoisted_40$4 = {\n\t\tkey: 0,\n\t\tclass: \"record-empty\"\n\t};\n\t//#endregion\n\t//#region src/web-editor/client/components/SchemaForm.vue\n\tvar SchemaForm_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({\n\t\t__name: \"SchemaForm\",\n\t\tprops: {\n\t\t\tschema: {},\n\t\t\tvalues: {}\n\t\t},\n\t\temits: [\"change\", \"status\"],\n\t\tsetup(__props, { emit: __emit }) {\n\t\t\tconst props = __props;\n\t\t\tconst emit = __emit;\n\t\t\tconst recordRows = /* @__PURE__ */ reactive({});\n\t\t\tconst recordCollisions = /* @__PURE__ */ reactive({});\n\t\t\tconst errors = /* @__PURE__ */ ref({});\n\t\t\tlet nextRecordId = 1;\n\t\t\tfunction recordRowsForField(field) {\n\t\t\t\tconst record = props.values[field.key];\n\t\t\t\tconst rows = [];\n\t\t\t\tif (isPlainObject(record)) for (const [key, value] of Object.entries(record)) rows.push({\n\t\t\t\t\t__id: nextRecordId++,\n\t\t\t\t\tkey,\n\t\t\t\t\tvalue: isPlainObject(value) ? { ...value } : {}\n\t\t\t\t});\n\t\t\t\treturn rows;\n\t\t\t}\n\t\t\tfunction initRecordRows() {\n\t\t\t\tfor (const field of props.schema.fields) if (field.type === \"record\") recordRows[field.key] = recordRowsForField(field);\n\t\t\t}\n\t\t\tinitRecordRows();\n\t\t\tfunction report() {\n\t\t\t\tconst merged = { ...validateValues(props.schema, props.values).errors };\n\t\t\t\tfor (const [key, message] of Object.entries(recordCollisions)) if (message) merged[key] = message;\n\t\t\t\terrors.value = merged;\n\t\t\t\tconst first = Object.keys(merged)[0] ? merged[Object.keys(merged)[0]] : \"\";\n\t\t\t\temit(\"change\", first, props.values);\n\t\t\t}\n\t\t\twatch(() => props.values, () => report(), {\n\t\t\t\tdeep: true,\n\t\t\t\tflush: \"sync\"\n\t\t\t});\n\t\t\terrors.value = { ...validateValues(props.schema, props.values).errors };\n\t\t\tfunction setBoolean(field, event) {\n\t\t\t\tprops.values[field.key] = event.target.checked;\n\t\t\t}\n\t\t\tfunction setString(field, event) {\n\t\t\t\tprops.values[field.key] = event.target.value;\n\t\t\t}\n\t\t\tfunction setNumber(field, event) {\n\t\t\t\tconst raw = event.target.value;\n\t\t\t\tconst num = Number(raw);\n\t\t\t\tprops.values[field.key] = raw === \"\" ? \"\" : Number.isFinite(num) ? num : raw;\n\t\t\t}\n\t\t\tfunction setEnum(field, event) {\n\t\t\t\tprops.values[field.key] = event.target.value;\n\t\t\t}\n\t\t\tfunction stringValue(field) {\n\t\t\t\tconst value = props.values[field.key];\n\t\t\t\treturn typeof value === \"string\" ? value : value === null || value === void 0 ? \"\" : String(value);\n\t\t\t}\n\t\t\tfunction numberValue(field) {\n\t\t\t\tconst value = props.values[field.key];\n\t\t\t\tif (value === void 0 || value === null || value === \"\") return \"\";\n\t\t\t\treturn String(value);\n\t\t\t}\n\t\t\tfunction enumValue(field) {\n\t\t\t\tconst value = props.values[field.key];\n\t\t\t\treturn typeof value === \"string\" ? value : enumOptions(field)[0]?.value ?? \"\";\n\t\t\t}\n\t\t\tfunction booleanValue(field) {\n\t\t\t\treturn props.values[field.key] === true;\n\t\t\t}\n\t\t\tfunction placeholder(field) {\n\t\t\t\treturn field.placeholder ?? \"\";\n\t\t\t}\n\t\t\tfunction recordKeyLabel(field) {\n\t\t\t\treturn field.keyLabel ?? t(\"schema.key\");\n\t\t\t}\n\t\t\tfunction recordKeyOptions(field, row) {\n\t\t\t\tconst rows = recordRows[field.key] ?? [];\n\t\t\t\tconst used = new Set(rows.filter((candidate) => candidate !== row).map((candidate) => candidate.key));\n\t\t\t\tconst options = (field.keyOptions ?? []).map((option) => typeof option === \"string\" ? {\n\t\t\t\t\tvalue: option,\n\t\t\t\t\tlabel: option\n\t\t\t\t} : {\n\t\t\t\t\tvalue: option.value,\n\t\t\t\t\tlabel: option.label ?? option.value\n\t\t\t\t});\n\t\t\t\tif (row?.key && !options.some((option) => option.value === row.key)) options.push({\n\t\t\t\t\tvalue: row.key,\n\t\t\t\t\tlabel: t(\"schema.keyUnavailable\", { key: row.key })\n\t\t\t\t});\n\t\t\t\treturn options.filter((option) => !used.has(option.value));\n\t\t\t}\n\t\t\tfunction canAddRecordRow(field) {\n\t\t\t\treturn field.keyOptions === void 0 || recordKeyOptions(field).length > 0;\n\t\t\t}\n\t\t\tfunction addRecordRow(field) {\n\t\t\t\tconst rows = recordRows[field.key] ??= [];\n\t\t\t\tconst existing = new Set(rows.map((row) => row.key.trim()).filter(Boolean));\n\t\t\t\tlet key;\n\t\t\t\tif (field.keyOptions !== void 0) {\n\t\t\t\t\tconst option = recordKeyOptions(field)[0];\n\t\t\t\t\tif (!option) {\n\t\t\t\t\t\temit(\"status\", t(\"schema.allHaveEntries\", { key: recordKeyLabel(field).toLowerCase() }), \"error\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tkey = option.value;\n\t\t\t\t} else {\n\t\t\t\t\tconst base = field.keyPlaceholder || \"entry\";\n\t\t\t\t\tkey = base;\n\t\t\t\t\tlet suffix = 2;\n\t\t\t\t\twhile (existing.has(key)) key = `${base}-${suffix++}`;\n\t\t\t\t}\n\t\t\t\tconst value = {};\n\t\t\t\tfor (const rowField of field.recordFields ?? []) value[rowField.key] = defaultValueForField(rowField);\n\t\t\t\trows.push({\n\t\t\t\t\t__id: nextRecordId++,\n\t\t\t\t\tkey,\n\t\t\t\t\tvalue\n\t\t\t\t});\n\t\t\t\tsyncRecord(field);\n\t\t\t}\n\t\t\tfunction removeRecordRow(field, index) {\n\t\t\t\tconst rows = recordRows[field.key];\n\t\t\t\tif (!rows) return;\n\t\t\t\trows.splice(index, 1);\n\t\t\t\tsyncRecord(field);\n\t\t\t}\n\t\t\tfunction setRecordRowKey(field, index, event) {\n\t\t\t\tconst rows = recordRows[field.key];\n\t\t\t\tif (!rows) return;\n\t\t\t\trows[index].key = event.target.value;\n\t\t\t\tsyncRecord(field);\n\t\t\t}\n\t\t\tfunction syncRecord(field) {\n\t\t\t\tconst rows = recordRows[field.key] ?? [];\n\t\t\t\tconst next = {};\n\t\t\t\tconst seen = /* @__PURE__ */ new Set();\n\t\t\t\tlet collision = \"\";\n\t\t\t\tfor (const row of rows) {\n\t\t\t\t\tconst key = row.key.trim();\n\t\t\t\t\tif (!key) {\n\t\t\t\t\t\tcollision ||= t(\"schema.needKey\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (seen.has(key)) {\n\t\t\t\t\t\tcollision ||= t(\"schema.uniqueKeys\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tseen.add(key);\n\t\t\t\t\tnext[key] = { ...row.value };\n\t\t\t\t}\n\t\t\t\tif (collision) {\n\t\t\t\t\trecordCollisions[field.key] = collision;\n\t\t\t\t\treport();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tdelete recordCollisions[field.key];\n\t\t\t\tprops.values[field.key] = next;\n\t\t\t}\n\t\t\tfunction recordCellText(row, rowField) {\n\t\t\t\tconst value = row.value[rowField.key];\n\t\t\t\tif (value === void 0 || value === null || value === \"\") return \"\";\n\t\t\t\treturn String(value);\n\t\t\t}\n\t\t\tfunction recordCellBoolean(row, rowField) {\n\t\t\t\treturn row.value[rowField.key] === true;\n\t\t\t}\n\t\t\tfunction recordCellEnum(row, rowField) {\n\t\t\t\tconst value = row.value[rowField.key];\n\t\t\t\treturn typeof value === \"string\" ? value : enumOptions(rowField)[0]?.value ?? \"\";\n\t\t\t}\n\t\t\tfunction setRecordCellString(field, row, rowField, event) {\n\t\t\t\trow.value[rowField.key] = event.target.value;\n\t\t\t\tsyncRecord(field);\n\t\t\t}\n\t\t\tfunction setRecordCellNumber(field, row, rowField, event) {\n\t\t\t\tconst raw = event.target.value;\n\t\t\t\tconst num = Number(raw);\n\t\t\t\trow.value[rowField.key] = raw === \"\" ? \"\" : Number.isFinite(num) ? num : raw;\n\t\t\t\tsyncRecord(field);\n\t\t\t}\n\t\t\tfunction setRecordCellEnum(field, row, rowField, event) {\n\t\t\t\trow.value[rowField.key] = event.target.value;\n\t\t\t\tsyncRecord(field);\n\t\t\t}\n\t\t\tfunction setRecordCellBoolean(field, row, rowField, event) {\n\t\t\t\trow.value[rowField.key] = event.target.checked;\n\t\t\t\tsyncRecord(field);\n\t\t\t}\n\t\t\tfunction recordRowError(field, row, rowField) {\n\t\t\t\treturn errors.value[`${field.key}.${row.key}.${rowField.key}`] ?? \"\";\n\t\t\t}\n\t\t\treturn (_ctx, _cache) => {\n\t\t\t\treturn openBlock(), createElementBlock(\"div\", _hoisted_1$7, [createBaseVNode(\"div\", null, [props.schema.title ? (openBlock(), createElementBlock(\"div\", _hoisted_2$7, toDisplayString(props.schema.title), 1)) : createCommentVNode(\"v-if\", true), props.schema.description ? (openBlock(), createElementBlock(\"div\", _hoisted_3$7, toDisplayString(props.schema.description), 1)) : createCommentVNode(\"v-if\", true)]), (openBlock(true), createElementBlock(Fragment, null, renderList(props.schema.fields, (field) => {\n\t\t\t\t\treturn openBlock(), createElementBlock(\"div\", {\n\t\t\t\t\t\tkey: field.key,\n\t\t\t\t\t\tclass: \"tab-section schema-field\",\n\t\t\t\t\t\t\"data-field\": field.key\n\t\t\t\t\t}, [\n\t\t\t\t\t\tfield.description ? (openBlock(), createElementBlock(\"div\", _hoisted_5$7, toDisplayString(field.description), 1)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\tcreateCommentVNode(\" boolean \"),\n\t\t\t\t\t\tfield.type === \"boolean\" ? (openBlock(), createElementBlock(\"div\", _hoisted_6$7, [createBaseVNode(\"label\", _hoisted_7$7, [createBaseVNode(\"input\", {\n\t\t\t\t\t\t\ttype: \"checkbox\",\n\t\t\t\t\t\t\t\"data-field-input\": field.key,\n\t\t\t\t\t\t\tchecked: booleanValue(field),\n\t\t\t\t\t\t\tonChange: ($event) => setBoolean(field, $event)\n\t\t\t\t\t\t}, null, 40, _hoisted_8$7), createTextVNode(\" \" + toDisplayString(field.label), 1)])])) : field.type === \"string\" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createCommentVNode(\" string \"), createBaseVNode(\"div\", _hoisted_9$7, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"label\", null, toDisplayString(field.label), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\t\t\"data-field-input\": field.key,\n\t\t\t\t\t\t\t\tvalue: stringValue(field),\n\t\t\t\t\t\t\t\tplaceholder: placeholder(field),\n\t\t\t\t\t\t\t\tonInput: ($event) => setString(field, $event)\n\t\t\t\t\t\t\t}, null, 40, _hoisted_10$7),\n\t\t\t\t\t\t\terrors.value[field.key] ? (openBlock(), createElementBlock(\"div\", _hoisted_11$7, toDisplayString(errors.value[field.key]), 1)) : createCommentVNode(\"v-if\", true)\n\t\t\t\t\t\t])], 2112)) : field.type === \"number\" ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [createCommentVNode(\" number \"), createBaseVNode(\"div\", _hoisted_12$7, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"label\", null, toDisplayString(field.label), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t\t\t\"data-field-input\": field.key,\n\t\t\t\t\t\t\t\tvalue: numberValue(field),\n\t\t\t\t\t\t\t\tmin: field.min,\n\t\t\t\t\t\t\t\tmax: field.max,\n\t\t\t\t\t\t\t\tplaceholder: placeholder(field),\n\t\t\t\t\t\t\t\tonInput: ($event) => setNumber(field, $event)\n\t\t\t\t\t\t\t}, null, 40, _hoisted_13$7),\n\t\t\t\t\t\t\terrors.value[field.key] ? (openBlock(), createElementBlock(\"div\", _hoisted_14$7, toDisplayString(errors.value[field.key]), 1)) : createCommentVNode(\"v-if\", true)\n\t\t\t\t\t\t])], 2112)) : field.type === \"enum\" ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [createCommentVNode(\" enum \"), createBaseVNode(\"div\", _hoisted_15$7, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"label\", null, toDisplayString(field.label), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"select\", {\n\t\t\t\t\t\t\t\t\"data-field-input\": field.key,\n\t\t\t\t\t\t\t\tvalue: enumValue(field),\n\t\t\t\t\t\t\t\tonChange: ($event) => setEnum(field, $event)\n\t\t\t\t\t\t\t}, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(enumOptions)(field), (option) => {\n\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"option\", {\n\t\t\t\t\t\t\t\t\tkey: option.value,\n\t\t\t\t\t\t\t\t\tvalue: option.value\n\t\t\t\t\t\t\t\t}, toDisplayString(option.label || option.value), 9, _hoisted_17$6);\n\t\t\t\t\t\t\t}), 128))], 40, _hoisted_16$7),\n\t\t\t\t\t\t\terrors.value[field.key] ? (openBlock(), createElementBlock(\"div\", _hoisted_18$5, toDisplayString(errors.value[field.key]), 1)) : createCommentVNode(\"v-if\", true)\n\t\t\t\t\t\t])], 2112)) : field.type === \"record\" ? (openBlock(), createElementBlock(Fragment, { key: 5 }, [createCommentVNode(\" record (per-profile table) \"), createBaseVNode(\"div\", _hoisted_19$5, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"label\", null, toDisplayString(field.label), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_20$5, [\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\t\"data-icon\": \"+\",\n\t\t\t\t\t\t\t\t\t\"data-add-record\": field.key,\n\t\t\t\t\t\t\t\t\ttitle: unref(t)(\"schema.addEntryTitle\", { key: recordKeyLabel(field).toLowerCase() }),\n\t\t\t\t\t\t\t\t\tdisabled: !canAddRecordRow(field),\n\t\t\t\t\t\t\t\t\tonClick: ($event) => addRecordRow(field)\n\t\t\t\t\t\t\t\t}, toDisplayString(unref(t)(\"schema.addEntry\")), 9, _hoisted_21$5),\n\t\t\t\t\t\t\t\t_cache[0] || (_cache[0] = createBaseVNode(\"span\", { class: \"modal-spacer\" }, null, -1)),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_22$5, toDisplayString(unref(t)(\"schema.oneEntryPer\", { key: recordKeyLabel(field).toLowerCase() })), 1)\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\terrors.value[field.key] ? (openBlock(), createElementBlock(\"div\", _hoisted_23$5, toDisplayString(errors.value[field.key]), 1)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", {\n\t\t\t\t\t\t\t\tclass: \"data-table\",\n\t\t\t\t\t\t\t\t\"data-record-table\": field.key\n\t\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_25$5, [\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, toDisplayString(recordKeyLabel(field)), 1),\n\t\t\t\t\t\t\t\t\t(openBlock(true), createElementBlock(Fragment, null, renderList(field.recordFields ?? [], (rowField) => {\n\t\t\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"div\", { key: rowField.key }, toDisplayString(rowField.label), 1);\n\t\t\t\t\t\t\t\t\t}), 128)),\n\t\t\t\t\t\t\t\t\t_cache[1] || (_cache[1] = createBaseVNode(\"div\", null, null, -1))\n\t\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\t\t(openBlock(true), createElementBlock(Fragment, null, renderList(recordRows[field.key] ?? [], (row, index) => {\n\t\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"div\", {\n\t\t\t\t\t\t\t\t\t\tkey: row.__id,\n\t\t\t\t\t\t\t\t\t\tclass: \"data-row schema-record-row\",\n\t\t\t\t\t\t\t\t\t\t\"data-record-row\": index\n\t\t\t\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_27$4, [field.keyOptions !== void 0 ? (openBlock(), createElementBlock(\"select\", {\n\t\t\t\t\t\t\t\t\t\t\tkey: 0,\n\t\t\t\t\t\t\t\t\t\t\t\"data-record-key\": field.key,\n\t\t\t\t\t\t\t\t\t\t\tvalue: row.key,\n\t\t\t\t\t\t\t\t\t\t\tonChange: ($event) => setRecordRowKey(field, index, $event)\n\t\t\t\t\t\t\t\t\t\t}, [(openBlock(true), createElementBlock(Fragment, null, renderList(recordKeyOptions(field, row), (option) => {\n\t\t\t\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"option\", {\n\t\t\t\t\t\t\t\t\t\t\t\tkey: option.value,\n\t\t\t\t\t\t\t\t\t\t\t\tvalue: option.value\n\t\t\t\t\t\t\t\t\t\t\t}, toDisplayString(option.label), 9, _hoisted_29$4);\n\t\t\t\t\t\t\t\t\t\t}), 128))], 40, _hoisted_28$4)) : (openBlock(), createElementBlock(\"input\", {\n\t\t\t\t\t\t\t\t\t\t\tkey: 1,\n\t\t\t\t\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\t\t\t\t\t\"data-record-key\": field.key,\n\t\t\t\t\t\t\t\t\t\t\tvalue: row.key,\n\t\t\t\t\t\t\t\t\t\t\tplaceholder: field.keyPlaceholder,\n\t\t\t\t\t\t\t\t\t\t\tonInput: ($event) => setRecordRowKey(field, index, $event)\n\t\t\t\t\t\t\t\t\t\t}, null, 40, _hoisted_30$4))]),\n\t\t\t\t\t\t\t\t\t\t(openBlock(true), createElementBlock(Fragment, null, renderList(field.recordFields ?? [], (rowField) => {\n\t\t\t\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"div\", {\n\t\t\t\t\t\t\t\t\t\t\t\tkey: rowField.key,\n\t\t\t\t\t\t\t\t\t\t\t\tclass: \"field\"\n\t\t\t\t\t\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\t\t\t\t\t\trowField.type !== \"boolean\" ? (openBlock(), createElementBlock(\"label\", _hoisted_31$4, toDisplayString(rowField.label), 1)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\t\t\t\t\t\trowField.type === \"boolean\" ? (openBlock(), createElementBlock(\"label\", _hoisted_32$4, [createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype: \"checkbox\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"data-record-input\": `${field.key}.${row.key}.${rowField.key}`,\n\t\t\t\t\t\t\t\t\t\t\t\t\tchecked: recordCellBoolean(row, rowField),\n\t\t\t\t\t\t\t\t\t\t\t\t\tonChange: ($event) => setRecordCellBoolean(field, row, rowField, $event)\n\t\t\t\t\t\t\t\t\t\t\t\t}, null, 40, _hoisted_33$4), createTextVNode(\" \" + toDisplayString(rowField.label), 1)])) : rowField.type === \"enum\" ? (openBlock(), createElementBlock(\"select\", {\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey: 2,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"data-record-input\": `${field.key}.${row.key}.${rowField.key}`,\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue: recordCellEnum(row, rowField),\n\t\t\t\t\t\t\t\t\t\t\t\t\tonChange: ($event) => setRecordCellEnum(field, row, rowField, $event)\n\t\t\t\t\t\t\t\t\t\t\t\t}, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(enumOptions)(rowField), (option) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"option\", {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey: option.value,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue: option.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t}, toDisplayString(option.label || option.value), 9, _hoisted_35$4);\n\t\t\t\t\t\t\t\t\t\t\t\t}), 128))], 40, _hoisted_34$4)) : rowField.type === \"number\" ? (openBlock(), createElementBlock(\"input\", {\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey: 3,\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"data-record-input\": `${field.key}.${row.key}.${rowField.key}`,\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue: recordCellText(row, rowField),\n\t\t\t\t\t\t\t\t\t\t\t\t\tmin: rowField.min,\n\t\t\t\t\t\t\t\t\t\t\t\t\tmax: rowField.max,\n\t\t\t\t\t\t\t\t\t\t\t\t\tonInput: ($event) => setRecordCellNumber(field, row, rowField, $event)\n\t\t\t\t\t\t\t\t\t\t\t\t}, null, 40, _hoisted_36$4)) : (openBlock(), createElementBlock(\"input\", {\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey: 4,\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"data-record-input\": `${field.key}.${row.key}.${rowField.key}`,\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue: recordCellText(row, rowField),\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder: rowField.placeholder,\n\t\t\t\t\t\t\t\t\t\t\t\t\tonInput: ($event) => setRecordCellString(field, row, rowField, $event)\n\t\t\t\t\t\t\t\t\t\t\t\t}, null, 40, _hoisted_37$4)),\n\t\t\t\t\t\t\t\t\t\t\t\trecordRowError(field, row, rowField) ? (openBlock(), createElementBlock(\"div\", _hoisted_38$4, toDisplayString(recordRowError(field, row, rowField)), 1)) : createCommentVNode(\"v-if\", true)\n\t\t\t\t\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t\t\t\t\t}), 128)),\n\t\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, [createBaseVNode(\"button\", {\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: \"danger\",\n\t\t\t\t\t\t\t\t\t\t\t\"data-icon\": \"×\",\n\t\t\t\t\t\t\t\t\t\t\t\"data-delete-record\": field.key,\n\t\t\t\t\t\t\t\t\t\t\ttitle: unref(t)(\"schema.deleteEntryTitle\"),\n\t\t\t\t\t\t\t\t\t\t\tonClick: ($event) => removeRecordRow(field, index)\n\t\t\t\t\t\t\t\t\t\t}, toDisplayString(unref(t)(\"common.delete\")), 9, _hoisted_39$4)])\n\t\t\t\t\t\t\t\t\t], 8, _hoisted_26$5);\n\t\t\t\t\t\t\t\t}), 128)),\n\t\t\t\t\t\t\t\t!(recordRows[field.key] ?? []).length ? (openBlock(), createElementBlock(\"div\", _hoisted_40$4, toDisplayString(unref(t)(\"schema.noEntries\")), 1)) : createCommentVNode(\"v-if\", true)\n\t\t\t\t\t\t\t], 8, _hoisted_24$5)\n\t\t\t\t\t\t])], 2112)) : createCommentVNode(\"v-if\", true)\n\t\t\t\t\t], 8, _hoisted_4$7);\n\t\t\t\t}), 128))]);\n\t\t\t};\n\t\t}\n\t}), [[\"__scopeId\", \"data-v-f9733942\"]]);\n\t//#endregion\n\t//#region src/web-editor/client/vue-schema-form-host.ts\n\tinit_vue_runtime_esm_bundler();\n\t/**\n\t* Generic schema-form host, mirroring the existing vue-item/vue-metadata/vue-tab\n\t* host pattern: it owns the form draft, mounts the self-contained SchemaForm\n\t* component into a root element, and bridges change events back to the owner.\n\t*/\n\tfunction createVueSchemaFormHost(deps) {\n\t\tlet app;\n\t\tlet draft;\n\t\tlet error = \"\";\n\t\tfunction mount(root) {\n\t\t\tunmount();\n\t\t\tconst schema = deps.getSchema();\n\t\t\tdraft = /* @__PURE__ */ reactive(normalizeValues(schema, cloneJson$1(deps.getValues())));\n\t\t\tapp = createApp(SchemaForm_default, {\n\t\t\t\tschema,\n\t\t\t\tvalues: draft,\n\t\t\t\tonChange: (nextError, values) => {\n\t\t\t\t\terror = nextError;\n\t\t\t\t\tdeps.markDirty();\n\t\t\t\t\tif (nextError) deps.setStatus(nextError, \"error\");\n\t\t\t\t\tdeps.onChange?.(cloneJson$1(values), nextError);\n\t\t\t\t},\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\terror = \"\";\n\t\t}\n\t\tfunction reset() {\n\t\t\terror = \"\";\n\t\t}\n\t\tfunction getError() {\n\t\t\treturn error;\n\t\t}\n\t\t/** Deep clone of the current form draft, or undefined before mounting. */\n\t\tfunction getValues() {\n\t\t\treturn draft === void 0 ? void 0 : cloneJson$1(draft);\n\t\t}\n\t\treturn {\n\t\t\tmount,\n\t\t\tunmount,\n\t\t\treset,\n\t\t\tgetError,\n\t\t\tgetValues\n\t\t};\n\t}\n\t//#endregion\n\t//#region src/web-editor/client/contribution-settings.ts\n\tfunction settingsContributionButtonId(tabId) {\n\t\treturn `settings-${encodeURIComponent(tabId)}TabBtn`;\n\t}\n\tfunction uniqueContributionDescriptors(tabs) {\n\t\tconst seen = /* @__PURE__ */ new Set();\n\t\treturn tabs.filter((tab) => {\n\t\t\tif (seen.has(tab.tabId)) return false;\n\t\t\tseen.add(tab.tabId);\n\t\t\treturn true;\n\t\t});\n\t}\n\t//#endregion\n\t//#region src/web-editor/client/contrib-tab-host.ts\n\tinit_api();\n\tinit_i18n();\n\tfunction startContributionTabs(options = {}) {\n\t\tconst api = createEditorApi(new URLSearchParams(location.search).get(\"token\") || \"\");\n\t\tconst nav = document.getElementById(\"contribSettingsNav\");\n\t\tconst panel = document.getElementById(\"contribSettingsPanel\");\n\t\tif (!nav || !panel) return () => {};\n\t\tconst navElement = nav;\n\t\tconst panelElement = panel;\n\t\tlet disposed = false;\n\t\tlet activeTabId;\n\t\tlet descriptors = [];\n\t\tlet providerKey;\n\t\tconst saveTimers = /* @__PURE__ */ new Map();\n\t\tconst editRevisions = /* @__PURE__ */ new Map();\n\t\tconst savedRevisions = /* @__PURE__ */ new Map();\n\t\tconst draftValues = /* @__PURE__ */ new Map();\n\t\tconst tabStatuses = /* @__PURE__ */ new Map();\n\t\tconst queuedSaves = /* @__PURE__ */ new Map();\n\t\tconst saveOrder = [];\n\t\tlet saveInFlight = false;\n\t\tlet refreshTimer;\n\t\tlet refreshSequence = 0;\n\t\tlet committedSaveEpoch = 0;\n\t\tlet schemaFormHost;\n\t\tconst statusElement = document.getElementById(\"settingsStatus\");\n\t\tlet placeholderActive = true;\n\t\tfunction setStatus(text, tone = \"\") {\n\t\t\tif (!statusElement) return;\n\t\t\tplaceholderActive = false;\n\t\t\tstatusElement.textContent = text;\n\t\t\tstatusElement.style.color = tone === \"error\" ? \"var(--error)\" : tone === \"success\" ? \"var(--success)\" : \"var(--muted)\";\n\t\t}\n\t\tfunction setTabStatus(tabId, text, tone = \"\") {\n\t\t\ttabStatuses.set(tabId, {\n\t\t\t\ttext,\n\t\t\t\ttone\n\t\t\t});\n\t\t\tif (activeTabId === tabId) setStatus(text, tone);\n\t\t}\n\t\tfunction showActiveStatus() {\n\t\t\tif (!activeTabId) return;\n\t\t\tconst status = tabStatuses.get(activeTabId);\n\t\t\tif (status) setStatus(status.text, status.tone);\n\t\t\telse setStatus(t(\"settings.ready\"));\n\t\t}\n\t\tfunction isDirty(tabId) {\n\t\t\treturn (editRevisions.get(tabId) ?? 0) !== (savedRevisions.get(tabId) ?? 0);\n\t\t}\n\t\tfunction setContributionActive() {\n\t\t\tfor (const button of navElement.querySelectorAll(\"[data-contrib-tab]\")) button.classList.toggle(\"active\", button.dataset.contribTab === activeTabId);\n\t\t}\n\t\tfunction clearActiveState() {\n\t\t\tactiveTabId = void 0;\n\t\t\tschemaFormHost?.unmount();\n\t\t\tschemaFormHost = void 0;\n\t\t\tsetContributionActive();\n\t\t\tpanelElement.replaceChildren();\n\t\t}\n\t\tfunction activate(tab) {\n\t\t\tactiveTabId = tab.tabId;\n\t\t\tsetContributionActive();\n\t\t\tmount(tab);\n\t\t\tshowActiveStatus();\n\t\t}\n\t\tfunction mount(tab) {\n\t\t\tschemaFormHost?.unmount();\n\t\t\tschemaFormHost = createVueSchemaFormHost({\n\t\t\t\tgetSchema: () => tab.schema,\n\t\t\t\tgetValues: () => draftValues.get(tab.tabId) ?? tab.values,\n\t\t\t\tmarkDirty: () => {},\n\t\t\t\tsetStatus: (text, tone) => setTabStatus(tab.tabId, text, tone),\n\t\t\t\tonChange: (values, error) => {\n\t\t\t\t\tdraftValues.set(tab.tabId, cloneJson$1(values));\n\t\t\t\t\tconst revision = (editRevisions.get(tab.tabId) ?? 0) + 1;\n\t\t\t\t\teditRevisions.set(tab.tabId, revision);\n\t\t\t\t\tcancelQueuedSave(tab.tabId);\n\t\t\t\t\tif (error) {\n\t\t\t\t\t\tclearSaveTimer(tab.tabId);\n\t\t\t\t\t\tsetTabStatus(tab.tabId, error, \"error\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tsetTabStatus(tab.tabId, t(\"status.unsavedChanges\"));\n\t\t\t\t\tclearSaveTimer(tab.tabId);\n\t\t\t\t\tconst timer = window.setTimeout(() => {\n\t\t\t\t\t\tsaveTimers.delete(tab.tabId);\n\t\t\t\t\t\tenqueueSave({\n\t\t\t\t\t\t\ttabId: tab.tabId,\n\t\t\t\t\t\t\tvalues,\n\t\t\t\t\t\t\trevision\n\t\t\t\t\t\t});\n\t\t\t\t\t}, 250);\n\t\t\t\t\tsaveTimers.set(tab.tabId, timer);\n\t\t\t\t}\n\t\t\t});\n\t\t\tschemaFormHost.mount(panelElement);\n\t\t}\n\t\tfunction clearSaveTimer(tabId) {\n\t\t\tconst timer = saveTimers.get(tabId);\n\t\t\tif (timer !== void 0) window.clearTimeout(timer);\n\t\t\tsaveTimers.delete(tabId);\n\t\t}\n\t\tfunction enqueueSave(job) {\n\t\t\tif (!queuedSaves.has(job.tabId)) saveOrder.push(job.tabId);\n\t\t\tqueuedSaves.set(job.tabId, job);\n\t\t\tdrainSaveQueue();\n\t\t}\n\t\tfunction cancelQueuedSave(tabId) {\n\t\t\tif (!queuedSaves.delete(tabId)) return;\n\t\t\tconst index = saveOrder.indexOf(tabId);\n\t\t\tif (index >= 0) saveOrder.splice(index, 1);\n\t\t}\n\t\tasync function drainSaveQueue() {\n\t\t\tif (saveInFlight) return;\n\t\t\tsaveInFlight = true;\n\t\t\ttry {\n\t\t\t\twhile (!disposed && saveOrder.length > 0) {\n\t\t\t\t\tconst tabId = saveOrder.shift();\n\t\t\t\t\tconst job = queuedSaves.get(tabId);\n\t\t\t\t\tqueuedSaves.delete(tabId);\n\t\t\t\t\tif (job) await save(job);\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tsaveInFlight = false;\n\t\t\t}\n\t\t}\n\t\tasync function save(job) {\n\t\t\tconst { tabId, values, revision } = job;\n\t\t\tconst requestProviderKey = providerKey;\n\t\t\tif (revision === editRevisions.get(tabId)) setTabStatus(tabId, t(\"settings.saving\"));\n\t\t\ttry {\n\t\t\t\tconst response = await api(`/api/contrib/${encodeURIComponent(tabId)}`, {\n\t\t\t\t\tmethod: \"PUT\",\n\t\t\t\t\tbody: values\n\t\t\t\t});\n\t\t\t\tif (disposed || revision !== editRevisions.get(tabId)) return;\n\t\t\t\tif (requestProviderKey !== providerKey) {\n\t\t\t\t\tconst latestValues = draftValues.get(tabId) ?? values;\n\t\t\t\t\tsetTabStatus(tabId, t(\"settings.providerRetrying\"));\n\t\t\t\t\tenqueueSave({\n\t\t\t\t\t\ttabId,\n\t\t\t\t\t\tvalues: cloneJson$1(latestValues),\n\t\t\t\t\t\trevision\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst canonicalValues = response.values ?? values;\n\t\t\t\tconst mountedValues = activeTabId === tabId ? schemaFormHost?.getValues() : void 0;\n\t\t\t\tcommittedSaveEpoch += 1;\n\t\t\t\tdraftValues.set(tabId, cloneJson$1(canonicalValues));\n\t\t\t\tsavedRevisions.set(tabId, revision);\n\t\t\t\tconst current = descriptors.find((candidate) => candidate.tabId === tabId);\n\t\t\t\tif (current) current.values = canonicalValues;\n\t\t\t\tif (current && mountedValues && JSON.stringify(mountedValues) !== JSON.stringify(canonicalValues)) mount(current);\n\t\t\t\tsetTabStatus(tabId, t(\"settings.saved\"), \"success\");\n\t\t\t} catch (error) {\n\t\t\t\tif (!disposed && revision === editRevisions.get(tabId)) setTabStatus(tabId, error instanceof Error ? error.message : String(error), \"error\");\n\t\t\t}\n\t\t}\n\t\tfunction renderButtons() {\n\t\t\tfor (const button of navElement.querySelectorAll(\"[data-contrib-tab]\")) button.remove();\n\t\t\tfor (const tab of descriptors) {\n\t\t\t\tconst button = document.createElement(\"button\");\n\t\t\t\tbutton.type = \"button\";\n\t\t\t\tbutton.className = \"\";\n\t\t\t\tbutton.id = settingsContributionButtonId(tab.tabId);\n\t\t\t\tbutton.dataset.contribTab = tab.tabId;\n\t\t\t\tbutton.dataset.icon = tab.icon;\n\t\t\t\tbutton.title = t(\"settings.editTab\", { title: tab.title });\n\t\t\t\tbutton.textContent = tab.title;\n\t\t\t\tbutton.onclick = () => {\n\t\t\t\t\tconst descriptor = descriptors.find((candidate) => candidate.tabId === tab.tabId);\n\t\t\t\t\tif (descriptor) activate(descriptor);\n\t\t\t\t};\n\t\t\t\tnavElement.appendChild(button);\n\t\t\t}\n\t\t\tsetContributionActive();\n\t\t}\n\t\tasync function refresh() {\n\t\t\tif (disposed) return;\n\t\t\tconst sequence = ++refreshSequence;\n\t\t\tconst saveEpochAtStart = committedSaveEpoch;\n\t\t\ttry {\n\t\t\t\tconst data = await api(\"/api/contrib\");\n\t\t\t\tif (disposed || sequence !== refreshSequence || saveEpochAtStart !== committedSaveEpoch) return;\n\t\t\t\tconst nextProviderKey = typeof data.providerKey === \"string\" ? data.providerKey : null;\n\t\t\t\tconst providerChanged = providerKey !== nextProviderKey;\n\t\t\t\tproviderKey = nextProviderKey;\n\t\t\t\tconst previousDescriptors = new Map(descriptors.map((descriptor) => [descriptor.tabId, descriptor]));\n\t\t\t\tdescriptors = uniqueContributionDescriptors(Array.isArray(data.tabs) ? data.tabs : []);\n\t\t\t\tfor (const descriptor of descriptors) if (!draftValues.has(descriptor.tabId) || !isDirty(descriptor.tabId)) {\n\t\t\t\t\tdraftValues.set(descriptor.tabId, cloneJson$1(descriptor.values));\n\t\t\t\t\tif (providerChanged) {\n\t\t\t\t\t\teditRevisions.set(descriptor.tabId, 0);\n\t\t\t\t\t\tsavedRevisions.set(descriptor.tabId, 0);\n\t\t\t\t\t\ttabStatuses.delete(descriptor.tabId);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\toptions.onAvailabilityChanged?.(descriptors.length > 0);\n\t\t\t\trenderButtons();\n\t\t\t\tif (activeTabId) if (!descriptors.some((descriptor) => descriptor.tabId === activeTabId)) clearActiveState();\n\t\t\t\telse {\n\t\t\t\t\tconst descriptor = descriptors.find((candidate) => candidate.tabId === activeTabId);\n\t\t\t\t\tconst previous = previousDescriptors.get(activeTabId);\n\t\t\t\t\tconst schemaChanged = !!descriptor && JSON.stringify(previous?.schema) !== JSON.stringify(descriptor.schema);\n\t\t\t\t\tconst cleanValuesChanged = !!descriptor && !isDirty(activeTabId) && JSON.stringify(previous?.values) !== JSON.stringify(descriptor.values);\n\t\t\t\t\tif (descriptor && (!schemaFormHost || providerChanged || schemaChanged || cleanValuesChanged)) mount(descriptor);\n\t\t\t\t\tshowActiveStatus();\n\t\t\t\t}\n\t\t\t\telse if (descriptors[0]) activate(descriptors[0]);\n\t\t\t\tif (descriptors.length > 0 && placeholderActive) setStatus(t(\"settings.ready\"));\n\t\t\t} catch (error) {\n\t\t\t\tif (disposed || sequence !== refreshSequence || saveEpochAtStart !== committedSaveEpoch) return;\n\t\t\t\tclearActiveState();\n\t\t\t\tdescriptors = [];\n\t\t\t\toptions.onAvailabilityChanged?.(false);\n\t\t\t\trenderButtons();\n\t\t\t\tsetStatus(error instanceof Error ? error.message : String(error), \"error\");\n\t\t\t}\n\t\t}\n\t\trefresh();\n\t\trefreshTimer = window.setInterval(() => {\n\t\t\trefresh();\n\t\t}, 1e3);\n\t\treturn () => {\n\t\t\tdisposed = true;\n\t\t\trefreshSequence += 1;\n\t\t\tif (refreshTimer !== void 0) window.clearInterval(refreshTimer);\n\t\t\tfor (const timer of saveTimers.values()) window.clearTimeout(timer);\n\t\t\tsaveTimers.clear();\n\t\t\tqueuedSaves.clear();\n\t\t\tsaveOrder.length = 0;\n\t\t\tclearActiveState();\n\t\t\toptions.onAvailabilityChanged?.(false);\n\t\t\tfor (const button of navElement.querySelectorAll(\"[data-contrib-tab]\")) button.remove();\n\t\t};\n\t}\n\t//#endregion\n\t//#region src/web-editor/client/tab-registry.ts\n\t/** Human-readable button id for a tab, e.g. \"regex\" -> \"regexTabBtn\". */\n\tfunction editorTabButtonId(id) {\n\t\treturn `${id}TabBtn`;\n\t}\n\tfunction getEditorTab(id) {\n\t\treturn EDITOR_TABS.find((tab) => tab.id === id);\n\t}\n\t/**\n\t* Copies only the given optional stack fields from `source` into `target`,\n\t* deleting them from `target` when absent from `source`. Mirrors the previous\n\t* per-tab draft synchronization in vue-tab-host.\n\t*/\n\tfunction copyStackFields(target, source, fields) {\n\t\tconst targetRecord = target;\n\t\tconst sourceRecord = source;\n\t\tfor (const key of fields) if (key in sourceRecord) targetRecord[key] = sourceRecord[key];\n\t\telse delete targetRecord[key];\n\t}\n\tvar EDITOR_TABS;\n\tvar init_tab_registry = __esmMin((() => {\n\t\tEDITOR_TABS = [\n\t\t\t{\n\t\t\t\tid: \"items\",\n\t\t\t\tlabelKey: \"tab.items\",\n\t\t\t\ticon: \"☰\",\n\t\t\t\ttitleKey: \"tab.itemsTitle\",\n\t\t\t\tmount: \"legacy\",\n\t\t\t\tstackFields: [],\n\t\t\t\tinternalDock: false\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"regex\",\n\t\t\t\tlabelKey: \"tab.regex\",\n\t\t\t\ticon: \".*\",\n\t\t\t\ttitleKey: \"tab.regexTitle\",\n\t\t\t\tmount: \"vue\",\n\t\t\t\tstackFields: [\"regex\"],\n\t\t\t\tinternalDock: false\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"policy\",\n\t\t\t\tlabelKey: \"tab.policy\",\n\t\t\t\ticon: \"⊕\",\n\t\t\t\ttitleKey: \"tab.policyTitle\",\n\t\t\t\tmount: \"vue\",\n\t\t\t\tstackFields: [\"tools\", \"skills\"],\n\t\t\t\tinternalDock: false\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"stack\",\n\t\t\t\tlabelKey: \"tab.stack\",\n\t\t\t\ticon: \"{}\",\n\t\t\t\ttitleKey: \"tab.stackTitle\",\n\t\t\t\tmount: \"vue\",\n\t\t\t\tstackFields: [\n\t\t\t\t\t\"context\",\n\t\t\t\t\t\"variables\",\n\t\t\t\t\t\"parameters\"\n\t\t\t\t],\n\t\t\t\tinternalDock: false\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"preview\",\n\t\t\t\tlabelKey: \"tab.preview\",\n\t\t\t\ticon: \"◱\",\n\t\t\t\ttitleKey: \"tab.previewTitle\",\n\t\t\t\tmount: \"vue\",\n\t\t\t\tstackFields: [],\n\t\t\t\tinternalDock: true\n\t\t\t}\n\t\t];\n\t}));\n\t//#endregion\n\t//#region src/context-diff.ts\n\tinit_tab_registry();\n\t/** Estimate tokens from characters using the same chars/4 approximation as payload capture. */\n\tfunction estimateApproxTokens(text) {\n\t\treturn Math.max(1, Math.ceil(text.length / 4));\n\t}\n\t/** Pure string hash used as the block identity shortcut. */\n\tfunction hashText(text) {\n\t\tlet hash = 2166136261;\n\t\tfor (let i = 0; i < text.length; i++) {\n\t\t\thash ^= text.charCodeAt(i);\n\t\t\thash = Math.imul(hash, 16777619);\n\t\t}\n\t\treturn (hash >>> 0).toString(16).padStart(8, \"0\");\n\t}\n\tfunction createBlock(key, role, text, serialized) {\n\t\tconst serializedHashInput = stringifyHashInput(serialized === void 0 ? {\n\t\t\trole,\n\t\t\ttext\n\t\t} : {\n\t\t\trole,\n\t\t\ttext,\n\t\t\tserialized\n\t\t});\n\t\treturn {\n\t\t\tkey,\n\t\t\trole,\n\t\t\ttext,\n\t\t\tchars: text.length,\n\t\t\tapproxTokens: estimateApproxTokens(text),\n\t\t\thash: hashText(serializedHashInput)\n\t\t};\n\t}\n\tfunction createTurnSnapshot(input) {\n\t\treturn {\n\t\t\tturnId: input.turnId,\n\t\t\tcapturedAt: input.capturedAt ?? \"\",\n\t\t\tstackId: input.stackId ?? \"\",\n\t\t\tblocks: input.blocks ?? []\n\t\t};\n\t}\n\tfunction turnApproxTokens(turn) {\n\t\tconst chars = turn.blocks.reduce((sum, block) => sum + block.chars, 0);\n\t\treturn chars === 0 ? 0 : Math.ceil(chars / 4);\n\t}\n\tfunction commonPrefixLength(a, b) {\n\t\tconst max = Math.min(a.length, b.length);\n\t\tlet index = 0;\n\t\twhile (index < max && a.charCodeAt(index) === b.charCodeAt(index)) index++;\n\t\treturn index;\n\t}\n\tfunction stringifyHashInput(value) {\n\t\ttry {\n\t\t\tconst serialized = JSON.stringify(value);\n\t\t\treturn serialized === void 0 ? String(value) : serialized;\n\t\t} catch {\n\t\t\treturn String(value);\n\t\t}\n\t}\n\t/**\n\t* A block hash includes fields that affect the provider wire request, while\n\t* the visible block text remains the useful prompt excerpt. When a hash\n\t* differs because metadata changed without changing the excerpt, no part of\n\t* that excerpt is safe to count as a reusable prefix.\n\t*/\n\tfunction safeCommonPrefixLength(before, after) {\n\t\tif (before.role !== after.role || before.text === after.text) return 0;\n\t\treturn commonPrefixLength(before.text, after.text);\n\t}\n\tfunction classify(before, after) {\n\t\tif (before && after) {\n\t\t\tif (before.hash === after.hash) return {\n\t\t\t\tstatus: \"same\",\n\t\t\t\tbefore,\n\t\t\t\tafter,\n\t\t\t\ttokenDelta: 0\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tstatus: \"modified\",\n\t\t\t\tbefore,\n\t\t\t\tafter,\n\t\t\t\ttokenDelta: 0\n\t\t\t};\n\t\t}\n\t\tif (before) return {\n\t\t\tstatus: \"removed\",\n\t\t\tbefore,\n\t\t\ttokenDelta: 0\n\t\t};\n\t\treturn {\n\t\t\tstatus: \"added\",\n\t\t\tafter,\n\t\t\ttokenDelta: 0\n\t\t};\n\t}\n\t/**\n\t* Allocate the request-level chars/4 delta across changed blocks. Per-block\n\t* token deltas are deliberately based on character deltas, with the single\n\t* request-level rounding remainder distributed across blocks so the chips and\n\t* summary describe the same integer total.\n\t*/\n\tfunction assignTokenDeltas(blocks, deltaTokens) {\n\t\tconst candidates = blocks.map((block) => ({\n\t\t\tblock,\n\t\t\tcharDelta: (block.after?.chars ?? 0) - (block.before?.chars ?? 0)\n\t\t})).filter(({ block, charDelta }) => block.status !== \"same\" && charDelta !== 0);\n\t\tif (candidates.length === 0) return;\n\t\tlet allocated = 0;\n\t\tfor (const candidate of candidates) {\n\t\t\tcandidate.block.tokenDelta = Math.trunc(candidate.charDelta / 4);\n\t\t\tallocated += candidate.block.tokenDelta;\n\t\t}\n\t\tlet remainder = deltaTokens - allocated;\n\t\tif (remainder === 0) return;\n\t\tconst direction = remainder > 0 ? 1 : -1;\n\t\tconst preferred = candidates.filter(({ charDelta }) => direction > 0 ? charDelta > 0 : charDelta < 0);\n\t\tconst targets = preferred.length > 0 ? preferred : candidates;\n\t\tconst wholeShare = Math.trunc(Math.abs(remainder) / targets.length);\n\t\tif (wholeShare > 0) {\n\t\t\tfor (const target of targets) target.block.tokenDelta += direction * wholeShare;\n\t\t\tremainder -= direction * wholeShare * targets.length;\n\t\t}\n\t\tfor (let index = 0; remainder !== 0; index++) {\n\t\t\ttargets[index % targets.length].block.tokenDelta += direction;\n\t\t\tremainder -= direction;\n\t\t}\n\t}\n\tfunction summarize(blocks, netTokens) {\n\t\tlet sameBlocks = 0;\n\t\tlet addedBlocks = 0;\n\t\tlet removedBlocks = 0;\n\t\tlet modifiedBlocks = 0;\n\t\tlet addedTokens = 0;\n\t\tlet removedTokens = 0;\n\t\tfor (const block of blocks) switch (block.status) {\n\t\t\tcase \"same\":\n\t\t\t\tsameBlocks++;\n\t\t\t\tbreak;\n\t\t\tcase \"added\":\n\t\t\t\taddedBlocks++;\n\t\t\t\tif (block.tokenDelta > 0) addedTokens += block.tokenDelta;\n\t\t\t\tif (block.tokenDelta < 0) removedTokens += -block.tokenDelta;\n\t\t\t\tbreak;\n\t\t\tcase \"removed\":\n\t\t\t\tremovedBlocks++;\n\t\t\t\tif (block.tokenDelta > 0) addedTokens += block.tokenDelta;\n\t\t\t\tif (block.tokenDelta < 0) removedTokens += -block.tokenDelta;\n\t\t\t\tbreak;\n\t\t\tcase \"modified\":\n\t\t\t\tmodifiedBlocks++;\n\t\t\t\tif (block.tokenDelta > 0) addedTokens += block.tokenDelta;\n\t\t\t\telse removedTokens += -block.tokenDelta;\n\t\t\t\tbreak;\n\t\t}\n\t\treturn {\n\t\t\tsameBlocks,\n\t\t\taddedBlocks,\n\t\t\tremovedBlocks,\n\t\t\tmodifiedBlocks,\n\t\t\tchangedBlocks: addedBlocks + removedBlocks + modifiedBlocks,\n\t\t\taddedTokens,\n\t\t\tremovedTokens,\n\t\t\tnetTokens\n\t\t};\n\t}\n\tfunction hasUniqueStableKeys(blocks) {\n\t\tconst keys = blocks.map((block) => block.key);\n\t\treturn keys.every((key) => key.length > 0) && new Set(keys).size === keys.length;\n\t}\n\tfunction alignBlocks(beforeBlocks, afterBlocks) {\n\t\tconst afterKeys = new Set(afterBlocks.map((block) => block.key));\n\t\tif (!(hasUniqueStableKeys(beforeBlocks) && hasUniqueStableKeys(afterBlocks) && beforeBlocks.some((block) => afterKeys.has(block.key)))) return alignPositional(beforeBlocks, afterBlocks);\n\t\tconst beforeByKey = new Map(beforeBlocks.map((block) => [block.key, block]));\n\t\tconst beforeIndexByKey = new Map(beforeBlocks.map((block, index) => [block.key, index]));\n\t\tconst aligned = [];\n\t\tlet beforeCursor = 0;\n\t\tlet afterCursor = 0;\n\t\tfor (let afterIndex = 0; afterIndex < afterBlocks.length; afterIndex++) {\n\t\t\tconst after = afterBlocks[afterIndex];\n\t\t\tconst beforeIndex = beforeIndexByKey.get(after.key);\n\t\t\tif (beforeIndex === void 0 || beforeIndex < beforeCursor) continue;\n\t\t\taligned.push(...alignPositional(beforeBlocks.slice(beforeCursor, beforeIndex), afterBlocks.slice(afterCursor, afterIndex)));\n\t\t\taligned.push({\n\t\t\t\tbefore: beforeByKey.get(after.key),\n\t\t\t\tafter\n\t\t\t});\n\t\t\tbeforeCursor = beforeIndex + 1;\n\t\t\tafterCursor = afterIndex + 1;\n\t\t}\n\t\taligned.push(...alignPositional(beforeBlocks.slice(beforeCursor), afterBlocks.slice(afterCursor)));\n\t\treturn aligned;\n\t}\n\tfunction alignPositional(beforeBlocks, afterBlocks) {\n\t\tconst maxLength = Math.max(beforeBlocks.length, afterBlocks.length);\n\t\treturn Array.from({ length: maxLength }, (_, index) => ({\n\t\t\tbefore: beforeBlocks[index],\n\t\t\tafter: afterBlocks[index]\n\t\t}));\n\t}\n\t/**\n\t* Diff two consecutive turn snapshots.\n\t*\n\t* The cache-boundary walk compares block arrays positionally while hashes\n\t* match. This preserves the serialized-prefix meaning even when a later\n\t* block is moved. Classification uses stable block keys after the boundary so\n\t* a middle insertion does not make every following block look modified.\n\t*/\n\tfunction diffTurns(previous, current) {\n\t\tconst beforeBlocks = previous?.blocks ?? [];\n\t\tconst afterBlocks = current.blocks;\n\t\tconst diffBlocks = alignBlocks(beforeBlocks, afterBlocks).map(({ before, after }) => classify(before, after));\n\t\tlet prefixChars = 0;\n\t\tlet boundaryCrossed = false;\n\t\tfor (let index = 0; index < Math.max(beforeBlocks.length, afterBlocks.length); index++) {\n\t\t\tconst before = beforeBlocks[index];\n\t\t\tconst after = afterBlocks[index];\n\t\t\tif (!boundaryCrossed) {\n\t\t\t\tif (before && after && before.hash === after.hash) {\n\t\t\t\t\tprefixChars += after.chars;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (before && after) prefixChars += safeCommonPrefixLength(before, after);\n\t\t\t\tboundaryCrossed = true;\n\t\t\t}\n\t\t}\n\t\tconst currentTokens = turnApproxTokens(current);\n\t\tconst previousTokens = previous ? turnApproxTokens(previous) : 0;\n\t\tconst currentChars = afterBlocks.reduce((sum, block) => sum + block.chars, 0);\n\t\tconst prefixTokens = !boundaryCrossed || prefixChars >= currentChars ? currentTokens : Math.min(currentTokens, Math.floor(prefixChars / 4));\n\t\tconst deltaTokens = currentTokens - previousTokens;\n\t\tassignTokenDeltas(diffBlocks, deltaTokens);\n\t\treturn {\n\t\t\tblocks: diffBlocks,\n\t\t\tprefixTokens,\n\t\t\tprefixRatio: currentTokens === 0 ? 0 : prefixTokens / currentTokens,\n\t\t\tdeltaTokens,\n\t\t\tsummary: summarize(diffBlocks, deltaTokens)\n\t\t};\n\t}\n\t//#endregion\n\t//#region src/web-editor/line-diff.ts\n\tvar MAX_LCS_CELLS = 5e5;\n\tvar MAX_INLINE_DIFF_CHARS = 5e4;\n\tvar GRAPHEME_SEGMENTER = new Intl.Segmenter(void 0, { granularity: \"grapheme\" });\n\tfunction diffTextLines(beforeText, afterText) {\n\t\tconst operations = lineOperations(splitLines(beforeText), splitLines(afterText));\n\t\tlet beforeLine = 1;\n\t\tlet afterLine = 1;\n\t\tconst annotated = annotateInlineChanges(operations.map((operation) => {\n\t\t\tconst row = {\n\t\t\t\tkind: operation.kind,\n\t\t\t\ttext: operation.text,\n\t\t\t\tparts: [{\n\t\t\t\t\ttext: operation.text,\n\t\t\t\t\tchanged: operation.kind !== \"same\"\n\t\t\t\t}]\n\t\t\t};\n\t\t\tif (operation.kind !== \"added\") row.beforeLine = beforeLine++;\n\t\t\tif (operation.kind !== \"removed\") row.afterLine = afterLine++;\n\t\t\treturn row;\n\t\t}));\n\t\tconst beforeLacksFinalNewline = beforeText.length > 0 && !beforeText.endsWith(\"\\n\");\n\t\tif (beforeLacksFinalNewline !== (afterText.length > 0 && !afterText.endsWith(\"\\n\"))) annotated.push({\n\t\t\tkind: \"note\",\n\t\t\ttext: \"No newline at end of file\",\n\t\t\tparts: [{\n\t\t\t\ttext: \"No newline at end of file\",\n\t\t\t\tchanged: false\n\t\t\t}],\n\t\t\tnoteSide: beforeLacksFinalNewline ? \"before\" : \"after\"\n\t\t});\n\t\treturn annotated;\n\t}\n\t/** `contextLines = 0` means changed lines only; `null` means the complete file. */\n\tfunction filterLineRows(rows, contextLines) {\n\t\tif (contextLines === null) return [...rows];\n\t\tconst context = Math.max(0, Math.floor(contextLines));\n\t\tconst keep = rows.map(() => false);\n\t\tfor (let index = 0; index < rows.length; index++) {\n\t\t\tif (rows[index].kind === \"same\") continue;\n\t\t\tfor (let nearby = Math.max(0, index - context); nearby <= Math.min(rows.length - 1, index + context); nearby++) keep[nearby] = true;\n\t\t}\n\t\tconst result = [];\n\t\tlet previousKept = -1;\n\t\tfor (let index = 0; index < rows.length; index++) {\n\t\t\tif (!keep[index]) continue;\n\t\t\tif (previousKept >= 0 && index > previousKept + 1) result.push({ kind: \"separator\" });\n\t\t\tresult.push(rows[index]);\n\t\t\tpreviousKept = index;\n\t\t}\n\t\treturn result;\n\t}\n\tfunction buildSplitLineRows(rows) {\n\t\tconst result = [];\n\t\tfor (let index = 0; index < rows.length;) {\n\t\t\tconst row = rows[index];\n\t\t\tif (row.kind === \"separator\") {\n\t\t\t\tresult.push({ kind: \"separator\" });\n\t\t\t\tindex++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (row.kind === \"same\") {\n\t\t\t\tresult.push({\n\t\t\t\t\tkind: \"line\",\n\t\t\t\t\tbefore: row,\n\t\t\t\t\tafter: row\n\t\t\t\t});\n\t\t\t\tindex++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst removed = [];\n\t\t\tconst added = [];\n\t\t\twhile (index < rows.length && rows[index].kind !== \"same\" && rows[index].kind !== \"separator\") {\n\t\t\t\tconst changed = rows[index];\n\t\t\t\tif (changed.kind === \"removed\" || changed.kind === \"note\" && changed.noteSide === \"before\") removed.push(changed);\n\t\t\t\telse added.push(changed);\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\tfor (let pair = 0; pair < Math.max(removed.length, added.length); pair++) result.push({\n\t\t\t\tkind: \"line\",\n\t\t\t\tbefore: removed[pair],\n\t\t\t\tafter: added[pair]\n\t\t\t});\n\t\t}\n\t\treturn result;\n\t}\n\tfunction splitLines(text) {\n\t\tif (text === \"\") return [];\n\t\tconst lines = text.split(\"\\n\");\n\t\tif (text.endsWith(\"\\n\")) lines.pop();\n\t\treturn lines;\n\t}\n\tfunction lineOperations(before, after) {\n\t\tlet prefix = 0;\n\t\twhile (prefix < before.length && prefix < after.length && before[prefix] === after[prefix]) prefix++;\n\t\tlet suffix = 0;\n\t\twhile (suffix < before.length - prefix && suffix < after.length - prefix && before[before.length - suffix - 1] === after[after.length - suffix - 1]) suffix++;\n\t\tconst beforeMiddle = before.slice(prefix, before.length - suffix);\n\t\tconst afterMiddle = after.slice(prefix, after.length - suffix);\n\t\tconst result = before.slice(0, prefix).map((text) => ({\n\t\t\tkind: \"same\",\n\t\t\ttext\n\t\t}));\n\t\tresult.push(...diffMiddle(beforeMiddle, afterMiddle));\n\t\tresult.push(...before.slice(before.length - suffix).map((text) => ({\n\t\t\tkind: \"same\",\n\t\t\ttext\n\t\t})));\n\t\treturn result;\n\t}\n\tfunction diffMiddle(before, after) {\n\t\tif (before.length === 0) return after.map((text) => ({\n\t\t\tkind: \"added\",\n\t\t\ttext\n\t\t}));\n\t\tif (after.length === 0) return before.map((text) => ({\n\t\t\tkind: \"removed\",\n\t\t\ttext\n\t\t}));\n\t\tif ((before.length + 1) * (after.length + 1) > MAX_LCS_CELLS) return [...before.map((text) => ({\n\t\t\tkind: \"removed\",\n\t\t\ttext\n\t\t})), ...after.map((text) => ({\n\t\t\tkind: \"added\",\n\t\t\ttext\n\t\t}))];\n\t\tconst width = after.length + 1;\n\t\tconst matrix = new Uint32Array((before.length + 1) * width);\n\t\tfor (let beforeIndex = before.length - 1; beforeIndex >= 0; beforeIndex--) for (let afterIndex = after.length - 1; afterIndex >= 0; afterIndex--) {\n\t\t\tconst offset = beforeIndex * width + afterIndex;\n\t\t\tmatrix[offset] = before[beforeIndex] === after[afterIndex] ? matrix[(beforeIndex + 1) * width + afterIndex + 1] + 1 : Math.max(matrix[(beforeIndex + 1) * width + afterIndex], matrix[offset + 1]);\n\t\t}\n\t\tconst result = [];\n\t\tlet beforeIndex = 0;\n\t\tlet afterIndex = 0;\n\t\twhile (beforeIndex < before.length && afterIndex < after.length) if (before[beforeIndex] === after[afterIndex]) {\n\t\t\tresult.push({\n\t\t\t\tkind: \"same\",\n\t\t\t\ttext: before[beforeIndex]\n\t\t\t});\n\t\t\tbeforeIndex++;\n\t\t\tafterIndex++;\n\t\t} else if (matrix[(beforeIndex + 1) * width + afterIndex] >= matrix[beforeIndex * width + afterIndex + 1]) result.push({\n\t\t\tkind: \"removed\",\n\t\t\ttext: before[beforeIndex++]\n\t\t});\n\t\telse result.push({\n\t\t\tkind: \"added\",\n\t\t\ttext: after[afterIndex++]\n\t\t});\n\t\twhile (beforeIndex < before.length) result.push({\n\t\t\tkind: \"removed\",\n\t\t\ttext: before[beforeIndex++]\n\t\t});\n\t\twhile (afterIndex < after.length) result.push({\n\t\t\tkind: \"added\",\n\t\t\ttext: after[afterIndex++]\n\t\t});\n\t\treturn result;\n\t}\n\tfunction annotateInlineChanges(rows) {\n\t\tconst result = rows.map((row) => ({\n\t\t\t...row,\n\t\t\tparts: [...row.parts]\n\t\t}));\n\t\tfor (let index = 0; index < result.length;) {\n\t\t\tif (result[index].kind === \"same\") {\n\t\t\t\tindex++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst start = index;\n\t\t\twhile (index < result.length && result[index].kind !== \"same\") index++;\n\t\t\tconst removed = result.slice(start, index).filter((row) => row.kind === \"removed\");\n\t\t\tconst added = result.slice(start, index).filter((row) => row.kind === \"added\");\n\t\t\tfor (let pair = 0; pair < Math.min(removed.length, added.length); pair++) {\n\t\t\t\tconst [beforeParts, afterParts] = inlineParts(removed[pair].text, added[pair].text);\n\t\t\t\tremoved[pair].parts = beforeParts;\n\t\t\t\tadded[pair].parts = afterParts;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\tfunction inlineParts(before, after) {\n\t\tif (before.length + after.length > MAX_INLINE_DIFF_CHARS) return [[{\n\t\t\ttext: before,\n\t\t\tchanged: true\n\t\t}], [{\n\t\t\ttext: after,\n\t\t\tchanged: true\n\t\t}]];\n\t\tconst beforeGraphemes = splitGraphemes(before);\n\t\tconst afterGraphemes = splitGraphemes(after);\n\t\tlet prefix = 0;\n\t\twhile (prefix < beforeGraphemes.length && prefix < afterGraphemes.length && beforeGraphemes[prefix] === afterGraphemes[prefix]) prefix++;\n\t\tlet suffix = 0;\n\t\twhile (suffix < beforeGraphemes.length - prefix && suffix < afterGraphemes.length - prefix && beforeGraphemes[beforeGraphemes.length - suffix - 1] === afterGraphemes[afterGraphemes.length - suffix - 1]) suffix++;\n\t\treturn [partsForLine(beforeGraphemes, prefix, suffix), partsForLine(afterGraphemes, prefix, suffix)];\n\t}\n\tfunction partsForLine(graphemes, prefix, suffix) {\n\t\tconst parts = [];\n\t\tif (prefix > 0) parts.push({\n\t\t\ttext: graphemes.slice(0, prefix).join(\"\"),\n\t\t\tchanged: false\n\t\t});\n\t\tparts.push({\n\t\t\ttext: graphemes.slice(prefix, graphemes.length - suffix).join(\"\"),\n\t\t\tchanged: true\n\t\t});\n\t\tif (suffix > 0) parts.push({\n\t\t\ttext: graphemes.slice(graphemes.length - suffix).join(\"\"),\n\t\t\tchanged: false\n\t\t});\n\t\treturn parts;\n\t}\n\tfunction splitGraphemes(text) {\n\t\treturn Array.from(GRAPHEME_SEGMENTER.segment(text), (part) => part.segment);\n\t}\n\t//#endregion\n\t//#region src/web-editor/client/preview-diff.ts\n\tfunction previewSections(value) {\n\t\treturn value ? [value.system, ...value.messages || []] : [];\n\t}\n\t/** Converts compiled preview sections into stable blocks for saved-vs-draft alignment. */\n\tfunction previewToTurnSnapshot(value, turnId) {\n\t\treturn createTurnSnapshot({\n\t\t\tturnId,\n\t\t\tstackId: value.stackId,\n\t\t\tblocks: previewSections(value).map((section) => createBlock(section.diffKey ?? section.id, section.role ?? \"\", section.content))\n\t\t});\n\t}\n\t//#endregion\n\t//#region src/web-editor/client/components/ContextDiffPanel.vue?vue&type=script&setup=true&lang.ts\n\tinit_vue_runtime_esm_bundler();\n\tinit_api();\n\tinit_i18n();\n\tvar _hoisted_1$6 = { class: \"context-diff-dock\" };\n\tvar _hoisted_2$6 = [\"aria-label\"];\n\tvar _hoisted_3$6 = [\"aria-selected\"];\n\tvar _hoisted_4$6 = [\"aria-selected\"];\n\tvar _hoisted_5$6 = [\"aria-selected\"];\n\tvar _hoisted_6$6 = [\"title\"];\n\tvar _hoisted_7$6 = {\n\t\tclass: \"context-diff-compiled\",\n\t\trole: \"tabpanel\"\n\t};\n\tvar _hoisted_8$6 = { class: \"context-diff-panel-head\" };\n\tvar _hoisted_9$6 = { class: \"context-diff-title\" };\n\tvar _hoisted_10$6 = { class: \"context-diff-meta\" };\n\tvar _hoisted_11$6 = { key: 0 };\n\tvar _hoisted_12$6 = { key: 1 };\n\tvar _hoisted_13$6 = {\n\t\tkey: 2,\n\t\tclass: \"error\"\n\t};\n\tvar _hoisted_14$6 = { key: 3 };\n\tvar _hoisted_15$6 = {\n\t\tkey: 0,\n\t\tclass: \"context-diff-diagnostics\"\n\t};\n\tvar _hoisted_16$6 = {\n\t\tkey: 1,\n\t\tclass: \"context-diff-error\"\n\t};\n\tvar _hoisted_17$5 = {\n\t\tkey: 2,\n\t\tclass: \"section-text\"\n\t};\n\tvar _hoisted_18$4 = {\n\t\tkey: 3,\n\t\tclass: \"context-diff-empty\"\n\t};\n\tvar _hoisted_19$4 = {\n\t\tkey: 4,\n\t\tclass: \"context-diff-sections\"\n\t};\n\tvar _hoisted_20$4 = {\n\t\tkey: 0,\n\t\tclass: \"context-diff-group\",\n\t\topen: \"\"\n\t};\n\tvar _hoisted_21$4 = { class: \"context-diff-group-summary\" };\n\tvar _hoisted_22$4 = { class: \"group-title\" };\n\tvar _hoisted_23$4 = { class: \"context-diff-group-messages\" };\n\tvar _hoisted_24$4 = { class: \"section-title\" };\n\tvar _hoisted_25$4 = { class: \"section-meta\" };\n\tvar _hoisted_26$4 = [\"onClick\"];\n\tvar _hoisted_27$3 = { class: \"section-text\" };\n\tvar _hoisted_28$3 = { class: \"section-title\" };\n\tvar _hoisted_29$3 = { class: \"section-meta\" };\n\tvar _hoisted_30$3 = [\"onClick\"];\n\tvar _hoisted_31$3 = { class: \"section-text\" };\n\tvar _hoisted_32$3 = {\n\t\tclass: \"context-diff-diff\",\n\t\trole: \"tabpanel\"\n\t};\n\tvar _hoisted_33$3 = { class: \"context-diff-panel-head\" };\n\tvar _hoisted_34$3 = { class: \"context-diff-title\" };\n\tvar _hoisted_35$3 = { class: \"context-diff-meta\" };\n\tvar _hoisted_36$3 = { key: 0 };\n\tvar _hoisted_37$3 = { key: 1 };\n\tvar _hoisted_38$3 = {\n\t\tkey: 2,\n\t\tclass: \"error\"\n\t};\n\tvar _hoisted_39$3 = {\n\t\tkey: 3,\n\t\tclass: \"error\"\n\t};\n\tvar _hoisted_40$3 = { key: 4 };\n\tvar _hoisted_41$3 = { key: 5 };\n\tvar _hoisted_42$2 = {\n\t\tkey: 0,\n\t\tclass: \"context-diff-error\"\n\t};\n\tvar _hoisted_43$2 = {\n\t\tkey: 1,\n\t\tclass: \"context-diff-error\"\n\t};\n\tvar _hoisted_44$2 = {\n\t\tkey: 2,\n\t\tclass: \"context-diff-empty\"\n\t};\n\tvar _hoisted_45$1 = { class: \"context-diff-summary\" };\n\tvar _hoisted_46$1 = [\"aria-label\"];\n\tvar _hoisted_47$1 = { class: \"diff-layout-buttons\" };\n\tvar _hoisted_48$1 = [\"aria-pressed\"];\n\tvar _hoisted_49$1 = [\"aria-pressed\"];\n\tvar _hoisted_50$1 = [\"aria-label\"];\n\tvar _hoisted_51$1 = { value: \"0\" };\n\tvar _hoisted_52 = { value: \"3\" };\n\tvar _hoisted_53 = { value: \"all\" };\n\tvar _hoisted_54 = {\n\t\tkey: 0,\n\t\tclass: \"unchanged-toggle\"\n\t};\n\tvar _hoisted_55 = {\n\t\tkey: 0,\n\t\tclass: \"context-diff-details\"\n\t};\n\tvar _hoisted_56 = { class: \"run-metadata-grid\" };\n\tvar _hoisted_57 = {\n\t\tkey: 0,\n\t\tclass: \"metadata-note\"\n\t};\n\tvar _hoisted_58 = { class: \"metadata-note\" };\n\tvar _hoisted_59 = {\n\t\tkey: 1,\n\t\tclass: \"context-diff-empty compact\"\n\t};\n\tvar _hoisted_60 = {\n\t\tkey: 2,\n\t\tclass: \"context-diff-blocks\"\n\t};\n\tvar _hoisted_61 = { class: \"block-content\" };\n\tvar _hoisted_62 = { class: \"block-head\" };\n\tvar _hoisted_63 = { class: \"block-status\" };\n\tvar _hoisted_64 = { class: \"block-key\" };\n\tvar _hoisted_65 = {\n\t\tkey: 0,\n\t\tclass: \"block-role\"\n\t};\n\tvar _hoisted_66 = { class: \"block-token-chip\" };\n\tvar _hoisted_67 = {\n\t\tkey: 0,\n\t\tclass: \"metadata-only-change\"\n\t};\n\tvar _hoisted_68 = [\"aria-label\"];\n\tvar _hoisted_69 = {\n\t\tkey: 0,\n\t\tclass: \"git-line-separator\",\n\t\trole: \"row\"\n\t};\n\tvar _hoisted_70 = { class: \"line-number old\" };\n\tvar _hoisted_71 = { class: \"line-number new\" };\n\tvar _hoisted_72 = { class: \"line-marker\" };\n\tvar _hoisted_73 = {\n\t\tkey: 0,\n\t\tclass: \"note-side\"\n\t};\n\tvar _hoisted_74 = { key: 0 };\n\tvar _hoisted_75 = [\"aria-label\"];\n\tvar _hoisted_76 = { class: \"split-header\" };\n\tvar _hoisted_77 = {\n\t\tkey: 0,\n\t\tclass: \"git-line-separator split-separator\",\n\t\trole: \"row\"\n\t};\n\tvar _hoisted_78 = {\n\t\tkey: 1,\n\t\tclass: \"split-line\",\n\t\trole: \"row\"\n\t};\n\tvar _hoisted_79 = { class: \"line-number\" };\n\tvar _hoisted_80 = { class: \"line-marker\" };\n\tvar _hoisted_81 = { key: 0 };\n\tvar _hoisted_82 = { class: \"line-number\" };\n\tvar _hoisted_83 = { class: \"line-marker\" };\n\tvar _hoisted_84 = { key: 0 };\n\t//#endregion\n\t//#region src/web-editor/client/components/ContextDiffPanel.vue\n\tvar ContextDiffPanel_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({\n\t\t__name: \"ContextDiffPanel\",\n\t\tprops: {\n\t\t\tgetStackDraft: { type: Function },\n\t\t\tsubscribeStackDraft: { type: Function },\n\t\t\tonStatus: { type: Function },\n\t\t\tonExpandedChanged: { type: Function }\n\t\t},\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 mode = /* @__PURE__ */ ref(\"compiled\");\n\t\t\tconst preview = /* @__PURE__ */ ref(null);\n\t\t\tconst savedPreview = /* @__PURE__ */ ref(null);\n\t\t\tconst previewText = /* @__PURE__ */ ref(\"\");\n\t\t\tconst previewDiagnostics = /* @__PURE__ */ ref([]);\n\t\t\tconst draftDiff = /* @__PURE__ */ ref(null);\n\t\t\tconst previewError = /* @__PURE__ */ ref(\"\");\n\t\t\tconst previewLoading = /* @__PURE__ */ ref(false);\n\t\t\tconst previewStatus = /* @__PURE__ */ ref(\"\");\n\t\t\tconst contextDiff = /* @__PURE__ */ ref(null);\n\t\t\tconst contextDiffError = /* @__PURE__ */ ref(\"\");\n\t\t\tconst contextDiffLoading = /* @__PURE__ */ ref(false);\n\t\t\tconst showUnchanged = /* @__PURE__ */ ref(false);\n\t\t\tconst diffLayout = /* @__PURE__ */ ref(\"unified\");\n\t\t\tconst lineContext = /* @__PURE__ */ ref(\"3\");\n\t\t\tconst expanded = /* @__PURE__ */ ref(false);\n\t\t\tlet previewTimer;\n\t\t\tlet pollTimer;\n\t\t\tlet stopDraftSubscription;\n\t\t\tlet previewSequence = 0;\n\t\t\tlet previewAbort;\n\t\t\tlet contextDiffSequence = 0;\n\t\t\tlet contextDiffAbort;\n\t\t\tconst compiledSections = computed(() => previewSections(preview.value));\n\t\t\tconst previewGroups = computed(() => {\n\t\t\t\tconst groups = [];\n\t\t\t\tconst byKey = /* @__PURE__ */ new Map();\n\t\t\t\tfor (const section of compiledSections.value) {\n\t\t\t\t\tconst key = historySourceKey(section);\n\t\t\t\t\tif (!key) {\n\t\t\t\t\t\tgroups.push({\n\t\t\t\t\t\t\tkey: `section:${section.id}`,\n\t\t\t\t\t\t\tlabel: section.title || section.id,\n\t\t\t\t\t\t\thistory: false,\n\t\t\t\t\t\t\tsections: [section]\n\t\t\t\t\t\t});\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tlet group = byKey.get(key);\n\t\t\t\t\tif (!group) {\n\t\t\t\t\t\tgroup = {\n\t\t\t\t\t\t\tkey,\n\t\t\t\t\t\t\tlabel: historySourceLabel(section),\n\t\t\t\t\t\t\thistory: true,\n\t\t\t\t\t\t\tsections: []\n\t\t\t\t\t\t};\n\t\t\t\t\t\tbyKey.set(key, group);\n\t\t\t\t\t\tgroups.push(group);\n\t\t\t\t\t}\n\t\t\t\t\tgroup.sections.push(section);\n\t\t\t\t}\n\t\t\t\treturn groups;\n\t\t\t});\n\t\t\tconst latestDiff = computed(() => contextDiff.value?.latestDiff ?? null);\n\t\t\tconst latestTurn = computed(() => contextDiff.value?.latest?.turn ?? null);\n\t\t\tconst activeDiff = computed(() => mode.value === \"draft\" ? draftDiff.value : latestDiff.value);\n\t\t\tconst diffBlocks = computed(() => activeDiff.value?.blocks ?? []);\n\t\t\tconst visibleDiffBlocks = computed(() => showUnchanged.value ? diffBlocks.value : diffBlocks.value.filter((block) => block.status !== \"same\"));\n\t\t\tconst hiddenUnchangedCount = computed(() => diffBlocks.value.filter((block) => block.status === \"same\").length);\n\t\t\tconst deltaText = computed(() => {\n\t\t\t\tconst delta = activeDiff.value?.deltaTokens ?? 0;\n\t\t\t\treturn `${delta > 0 ? \"+\" : \"\"}${delta}`;\n\t\t\t});\n\t\t\tconst deltaClass = computed(() => {\n\t\t\t\tconst delta = activeDiff.value?.deltaTokens ?? 0;\n\t\t\t\treturn delta > 0 ? \"positive\" : delta < 0 ? \"negative\" : \"neutral\";\n\t\t\t});\n\t\t\tconst prefixPercent = computed(() => Math.round((latestDiff.value?.prefixRatio ?? 0) * 100));\n\t\t\tconst changedBlocks = computed(() => activeDiff.value?.summary.changedBlocks ?? 0);\n\t\t\tconst latestUsage = computed(() => contextDiff.value?.latest?.usage ?? null);\n\t\t\tonMounted(() => {\n\t\t\t\tstopDraftSubscription = props.subscribeStackDraft?.(schedulePreviewRefresh);\n\t\t\t\trefreshPreview();\n\t\t\t\trefreshContextDiff();\n\t\t\t\tpollTimer = window.setInterval(() => {\n\t\t\t\t\trefreshContextDiff();\n\t\t\t\t\tschedulePollingPreviewRefresh();\n\t\t\t\t}, 2e3);\n\t\t\t});\n\t\t\tonUnmounted(() => {\n\t\t\t\tif (previewTimer !== void 0) window.clearTimeout(previewTimer);\n\t\t\t\tif (pollTimer !== void 0) window.clearInterval(pollTimer);\n\t\t\t\tstopDraftSubscription?.();\n\t\t\t\tinvalidatePreviewRequest();\n\t\t\t\tinvalidateContextDiffRequest();\n\t\t\t\tprops.onExpandedChanged?.(false);\n\t\t\t});\n\t\t\tfunction toggleExpanded() {\n\t\t\t\texpanded.value = !expanded.value;\n\t\t\t\tprops.onExpandedChanged?.(expanded.value);\n\t\t\t}\n\t\t\tfunction schedulePreviewRefresh() {\n\t\t\t\tinvalidatePreviewRequest();\n\t\t\t\tpreview.value = null;\n\t\t\t\tsavedPreview.value = null;\n\t\t\t\tpreviewText.value = \"\";\n\t\t\t\tpreviewDiagnostics.value = [];\n\t\t\t\tdraftDiff.value = null;\n\t\t\t\tpreviewLoading.value = true;\n\t\t\t\tpreviewStatus.value = t(\"diff.draftChangedRefreshing\");\n\t\t\t\tschedulePreviewTimer();\n\t\t\t}\n\t\t\tfunction schedulePollingPreviewRefresh() {\n\t\t\t\tschedulePreviewTimer();\n\t\t\t}\n\t\t\tfunction schedulePreviewTimer() {\n\t\t\t\tif (previewTimer !== void 0) window.clearTimeout(previewTimer);\n\t\t\t\tpreviewTimer = window.setTimeout(() => {\n\t\t\t\t\tpreviewTimer = void 0;\n\t\t\t\t\trefreshPreview();\n\t\t\t\t}, 500);\n\t\t\t}\n\t\t\tfunction invalidatePreviewRequest() {\n\t\t\t\tconst sequence = ++previewSequence;\n\t\t\t\tpreviewAbort?.abort();\n\t\t\t\tpreviewAbort = void 0;\n\t\t\t\tpreviewLoading.value = false;\n\t\t\t\treturn sequence;\n\t\t\t}\n\t\t\tasync function refreshPreview() {\n\t\t\t\tconst sequence = invalidatePreviewRequest();\n\t\t\t\tconst draft = props.getStackDraft?.();\n\t\t\t\tif (!draft) {\n\t\t\t\t\tpreview.value = null;\n\t\t\t\t\tsavedPreview.value = null;\n\t\t\t\t\tpreviewText.value = \"\";\n\t\t\t\t\tpreviewDiagnostics.value = [];\n\t\t\t\t\tdraftDiff.value = null;\n\t\t\t\t\tpreviewError.value = \"\";\n\t\t\t\t\tpreviewStatus.value = t(\"diff.selectStackToPreview\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tpreviewLoading.value = true;\n\t\t\t\tpreviewError.value = \"\";\n\t\t\t\tpreviewStatus.value = \"\";\n\t\t\t\tconst controller = new AbortController();\n\t\t\t\tpreviewAbort = controller;\n\t\t\t\ttry {\n\t\t\t\t\tconst loaded = await api(`/api/stacks/${encodeURIComponent(draft.selector)}`, { signal: controller.signal });\n\t\t\t\t\tconst previewPath = `/api/stacks/${encodeURIComponent(draft.selector)}/preview`;\n\t\t\t\t\tconst [draftData, savedData] = await Promise.all([api(previewPath, {\n\t\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\t\tbody: { stack: draft.stack },\n\t\t\t\t\t\tsignal: controller.signal\n\t\t\t\t\t}), api(previewPath, {\n\t\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\t\tbody: { stack: loaded.stack },\n\t\t\t\t\t\tsignal: controller.signal\n\t\t\t\t\t})]);\n\t\t\t\t\tif (sequence !== previewSequence) return;\n\t\t\t\t\tpreview.value = draftData.preview ?? null;\n\t\t\t\t\tsavedPreview.value = savedData.preview ?? null;\n\t\t\t\t\tpreviewText.value = draftData.text ?? \"\";\n\t\t\t\t\tpreviewDiagnostics.value = draftData.diagnostics ?? [];\n\t\t\t\t\tdraftDiff.value = preview.value && savedPreview.value ? diffTurns(previewToTurnSnapshot(savedPreview.value, \"saved\"), previewToTurnSnapshot(preview.value, \"draft\")) : null;\n\t\t\t\t\tpreviewStatus.value = preview.value ? t(\"diff.draftRefreshed\") : t(\"diff.previewNoSections\");\n\t\t\t\t\tprops.onStatus?.(previewStatus.value, preview.value ? \"success\" : \"warning\");\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (controller.signal.aborted || sequence !== previewSequence) return;\n\t\t\t\t\tpreviewError.value = error instanceof Error ? error.message : String(error);\n\t\t\t\t\tprops.onStatus?.(previewError.value, \"error\");\n\t\t\t\t} finally {\n\t\t\t\t\tif (sequence === previewSequence) previewLoading.value = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tasync function refreshContextDiff() {\n\t\t\t\tconst sequence = invalidateContextDiffRequest();\n\t\t\t\tcontextDiffLoading.value = true;\n\t\t\t\tcontextDiffError.value = \"\";\n\t\t\t\tconst controller = new AbortController();\n\t\t\t\tcontextDiffAbort = controller;\n\t\t\t\ttry {\n\t\t\t\t\tconst next = await api(\"/api/context-diff\", { signal: controller.signal });\n\t\t\t\t\tif (sequence !== contextDiffSequence) return;\n\t\t\t\t\tcontextDiff.value = next;\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (controller.signal.aborted || sequence !== contextDiffSequence) return;\n\t\t\t\t\tcontextDiffError.value = error instanceof Error ? error.message : String(error);\n\t\t\t\t} finally {\n\t\t\t\t\tif (sequence === contextDiffSequence) contextDiffLoading.value = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction invalidateContextDiffRequest() {\n\t\t\t\tconst sequence = ++contextDiffSequence;\n\t\t\t\tcontextDiffAbort?.abort();\n\t\t\t\tcontextDiffAbort = void 0;\n\t\t\t\tcontextDiffLoading.value = false;\n\t\t\t\treturn sequence;\n\t\t\t}\n\t\t\tfunction blockKey(block) {\n\t\t\t\treturn block.after?.key ?? block.before?.key ?? \"\";\n\t\t\t}\n\t\t\tfunction blockRole(block) {\n\t\t\t\treturn block.after?.role ?? block.before?.role ?? \"\";\n\t\t\t}\n\t\t\tfunction blockTokenText(block) {\n\t\t\t\tif (block.status !== \"same\") {\n\t\t\t\t\tconst delta = block.tokenDelta;\n\t\t\t\t\treturn t(\"diff.blockTokensDelta\", { delta: `${delta > 0 ? \"+\" : \"\"}${delta}` });\n\t\t\t\t}\n\t\t\t\treturn t(\"diff.blockTokens\", { count: block.after?.approxTokens ?? 0 });\n\t\t\t}\n\t\t\tfunction blockLineRows(block) {\n\t\t\t\treturn filterLineRows(diffTextLines(block.before?.text ?? \"\", block.after?.text ?? \"\"), block.status === \"same\" || lineContext.value === \"all\" ? null : Number(lineContext.value));\n\t\t\t}\n\t\t\tfunction blockSplitRows(block) {\n\t\t\t\treturn buildSplitLineRows(blockLineRows(block));\n\t\t\t}\n\t\t\tfunction lineMarker(row) {\n\t\t\t\treturn row.kind === \"added\" ? \"+\" : row.kind === \"removed\" ? \"−\" : row.kind === \"note\" ? \"\\\\\" : \" \";\n\t\t\t}\n\t\t\tfunction eofNoteSide(row) {\n\t\t\t\treturn row.noteSide === \"before\" ? t(\"diff.before\") : t(\"diff.after\");\n\t\t\t}\n\t\t\tfunction metadataOnlyChange(block) {\n\t\t\t\treturn block.status === \"modified\" && block.before?.text === block.after?.text && block.before?.hash !== block.after?.hash;\n\t\t\t}\n\t\t\tfunction metadataChangeText(block) {\n\t\t\t\tconst beforeRole = block.before?.role ?? \"—\";\n\t\t\t\tconst afterRole = block.after?.role ?? \"—\";\n\t\t\t\treturn t(\"diff.metadataChanged\", { detail: beforeRole === afterRole ? t(\"diff.roleUnchanged\", { role: afterRole }) : t(\"diff.roleChanged\", {\n\t\t\t\t\tbefore: beforeRole,\n\t\t\t\t\tafter: afterRole\n\t\t\t\t}) });\n\t\t\t}\n\t\t\tfunction formatUsageTokens(value) {\n\t\t\t\treturn value === void 0 ? \"—\" : value.toLocaleString();\n\t\t\t}\n\t\t\tfunction cacheHitText() {\n\t\t\t\tconst usage = latestUsage.value;\n\t\t\t\tif (!usage) return \"—\";\n\t\t\t\tif (usage.cacheHitRatio === null) return t(\"diff.notReported\");\n\t\t\t\treturn `${(usage.cacheHitRatio * 100).toFixed(1)}%`;\n\t\t\t}\n\t\t\tfunction sectionRole(section) {\n\t\t\t\treturn section.role?.trim() || (section.id === \"system\" ? \"system\" : \"message\");\n\t\t\t}\n\t\t\tfunction roleClass(section) {\n\t\t\t\treturn `role-${sectionRole(section).toLowerCase().replace(/[^a-z0-9]+/g, \"-\")}`;\n\t\t\t}\n\t\t\tfunction historySourceKey(section) {\n\t\t\t\tconst diffKey = section.diffKey || \"\";\n\t\t\t\tif (diffKey.startsWith(\"implicit-history:\")) return \"implicit-history\";\n\t\t\t\treturn diffKey.match(/^(chat-history:.+):[^:]+:\\d+$/)?.[1];\n\t\t\t}\n\t\t\tfunction historySourceLabel(section) {\n\t\t\t\treturn section.title?.replace(/\\s+#\\d+$/, \"\").trim() || \"Chat history\";\n\t\t\t}\n\t\t\tfunction groupTitle(group) {\n\t\t\t\tconst count = group.sections.length;\n\t\t\t\treturn `${group.label} (${t(count === 1 ? \"diff.messageOne\" : \"diff.messageMany\", { count })})`;\n\t\t\t}\n\t\t\tfunction sectionMeta(section) {\n\t\t\t\treturn t(\"diff.sectionMeta\", {\n\t\t\t\t\trolePrefix: `${sectionRole(section)} · `,\n\t\t\t\t\tchars: section.chars,\n\t\t\t\t\ttokens: section.approxTokens\n\t\t\t\t});\n\t\t\t}\n\t\t\tasync function copyPreviewText(text) {\n\t\t\t\tif (!text) return;\n\t\t\t\tif (navigator.clipboard && window.isSecureContext) await navigator.clipboard.writeText(text);\n\t\t\t\telse {\n\t\t\t\t\tconst area = document.createElement(\"textarea\");\n\t\t\t\t\tarea.value = text;\n\t\t\t\t\tarea.style.position = \"fixed\";\n\t\t\t\t\tarea.style.left = \"-9999px\";\n\t\t\t\t\tdocument.body.appendChild(area);\n\t\t\t\t\tarea.select();\n\t\t\t\t\tdocument.execCommand(\"copy\");\n\t\t\t\t\tarea.remove();\n\t\t\t\t}\n\t\t\t\tprops.onStatus?.(t(\"inspector.copiedText\"), \"success\");\n\t\t\t}\n\t\t\tfunction turnLabel() {\n\t\t\t\tconst turn = latestTurn.value;\n\t\t\t\tif (!turn) return \"—\";\n\t\t\t\treturn turn.turnId.replace(/^turn-/, \"\");\n\t\t\t}\n\t\t\treturn (_ctx, _cache) => {\n\t\t\t\treturn openBlock(), createElementBlock(\"div\", _hoisted_1$6, [\n\t\t\t\t\tcreateBaseVNode(\"div\", {\n\t\t\t\t\t\tclass: \"context-diff-mode-tabs\",\n\t\t\t\t\t\trole: \"tablist\",\n\t\t\t\t\t\t\"aria-label\": unref(t)(\"diff.dockAria\")\n\t\t\t\t\t}, [\n\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\tclass: normalizeClass({ active: mode.value === \"compiled\" }),\n\t\t\t\t\t\t\trole: \"tab\",\n\t\t\t\t\t\t\t\"aria-selected\": mode.value === \"compiled\",\n\t\t\t\t\t\t\tonClick: _cache[0] || (_cache[0] = ($event) => mode.value = \"compiled\")\n\t\t\t\t\t\t}, toDisplayString(unref(t)(\"tab.preview\")), 11, _hoisted_3$6),\n\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\tclass: normalizeClass({ active: mode.value === \"draft\" }),\n\t\t\t\t\t\t\trole: \"tab\",\n\t\t\t\t\t\t\t\"aria-selected\": mode.value === \"draft\",\n\t\t\t\t\t\t\tonClick: _cache[1] || (_cache[1] = ($event) => mode.value = \"draft\")\n\t\t\t\t\t\t}, toDisplayString(unref(t)(\"diff.draftTab\")), 11, _hoisted_4$6),\n\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\tclass: normalizeClass({ active: mode.value === \"run\" }),\n\t\t\t\t\t\t\trole: \"tab\",\n\t\t\t\t\t\t\t\"aria-selected\": mode.value === \"run\",\n\t\t\t\t\t\t\tonClick: _cache[2] || (_cache[2] = ($event) => mode.value = \"run\")\n\t\t\t\t\t\t}, toDisplayString(unref(t)(\"diff.runTab\")), 11, _hoisted_5$6),\n\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\tclass: \"context-diff-expand\",\n\t\t\t\t\t\t\ttitle: expanded.value ? unref(t)(\"diff.splitTitle\") : unref(t)(\"diff.focusTitle\"),\n\t\t\t\t\t\t\tonClick: toggleExpanded\n\t\t\t\t\t\t}, toDisplayString(expanded.value ? unref(t)(\"diff.split\") : unref(t)(\"diff.focus\")), 9, _hoisted_6$6)\n\t\t\t\t\t], 8, _hoisted_2$6),\n\t\t\t\t\twithDirectives(createBaseVNode(\"div\", _hoisted_7$6, [\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_8$6, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_9$6, toDisplayString(unref(t)(\"diff.compiledDraft\")), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_10$6, [preview.value ? (openBlock(), createElementBlock(\"span\", _hoisted_11$6, toDisplayString(unref(t)(\"diff.compiledMeta\", {\n\t\t\t\t\t\t\t\ttokens: preview.value.approxTokens,\n\t\t\t\t\t\t\t\tchars: preview.value.totalChars\n\t\t\t\t\t\t\t})), 1)) : previewLoading.value ? (openBlock(), createElementBlock(\"span\", _hoisted_12$6, toDisplayString(unref(t)(\"diff.refreshing\")), 1)) : previewError.value ? (openBlock(), createElementBlock(\"span\", _hoisted_13$6, toDisplayString(previewError.value), 1)) : (openBlock(), createElementBlock(\"span\", _hoisted_14$6, toDisplayString(unref(t)(\"diff.noPreview\")), 1))]),\n\t\t\t\t\t\t\tpreviewText.value ? (openBlock(), createElementBlock(\"button\", {\n\t\t\t\t\t\t\t\tkey: 0,\n\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\tclass: \"context-diff-copy-full\",\n\t\t\t\t\t\t\t\tonClick: _cache[3] || (_cache[3] = ($event) => copyPreviewText(previewText.value))\n\t\t\t\t\t\t\t}, toDisplayString(unref(t)(\"inspector.copyFull\")), 1)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\tclass: \"context-diff-refresh\",\n\t\t\t\t\t\t\t\tonClick: schedulePreviewRefresh\n\t\t\t\t\t\t\t}, toDisplayString(unref(t)(\"profiles.refresh\")), 1)\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tpreviewDiagnostics.value.length ? (openBlock(), createElementBlock(\"div\", _hoisted_15$6, [createBaseVNode(\"strong\", null, toDisplayString(unref(t)(\"diff.compilerDiagnostics\", { count: previewDiagnostics.value.length })), 1), (openBlock(true), createElementBlock(Fragment, null, renderList(previewDiagnostics.value, (diagnostic, index) => {\n\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"div\", {\n\t\t\t\t\t\t\t\tkey: index,\n\t\t\t\t\t\t\t\tclass: normalizeClass([\"context-diff-diagnostic\", diagnostic.level])\n\t\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\t\tcreateTextVNode(toDisplayString(diagnostic.level.toUpperCase()), 1),\n\t\t\t\t\t\t\t\tdiagnostic.itemId ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(\" · \" + toDisplayString(diagnostic.itemId), 1)], 64)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\t\tcreateTextVNode(\": \" + toDisplayString(diagnostic.message), 1)\n\t\t\t\t\t\t\t], 2);\n\t\t\t\t\t\t}), 128))])) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\tpreviewError.value ? (openBlock(), createElementBlock(\"div\", _hoisted_16$6, toDisplayString(previewError.value), 1)) : compiledSections.value.length === 0 && previewText.value ? (openBlock(), createElementBlock(\"pre\", _hoisted_17$5, toDisplayString(previewText.value), 1)) : compiledSections.value.length === 0 ? (openBlock(), createElementBlock(\"div\", _hoisted_18$4, toDisplayString(previewLoading.value ? unref(t)(\"diff.loadingPreview\") : unref(t)(\"diff.selectStackHint\")), 1)) : (openBlock(), createElementBlock(\"div\", _hoisted_19$4, [(openBlock(true), createElementBlock(Fragment, null, renderList(previewGroups.value, (group) => {\n\t\t\t\t\t\t\treturn openBlock(), createElementBlock(Fragment, { key: group.key }, [group.history ? (openBlock(), createElementBlock(\"details\", _hoisted_20$4, [createBaseVNode(\"summary\", _hoisted_21$4, [createBaseVNode(\"span\", _hoisted_22$4, toDisplayString(groupTitle(group)), 1)]), createBaseVNode(\"div\", _hoisted_23$4, [(openBlock(true), createElementBlock(Fragment, null, renderList(group.sections, (section) => {\n\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"details\", {\n\t\t\t\t\t\t\t\t\tkey: section.id,\n\t\t\t\t\t\t\t\t\tclass: normalizeClass([\"context-diff-section\", roleClass(section)]),\n\t\t\t\t\t\t\t\t\topen: \"\"\n\t\t\t\t\t\t\t\t}, [createBaseVNode(\"summary\", null, [\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_24$4, toDisplayString(section.title || section.id), 1),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", { class: normalizeClass([\"section-role\", roleClass(section)]) }, toDisplayString(sectionRole(section)), 3),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_25$4, toDisplayString(sectionMeta(section)), 1),\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: \"context-diff-copy-section\",\n\t\t\t\t\t\t\t\t\t\tonClick: withModifiers(($event) => copyPreviewText(section.content), [\"prevent\", \"stop\"])\n\t\t\t\t\t\t\t\t\t}, toDisplayString(unref(t)(\"inspector.copy\")), 9, _hoisted_26$4)\n\t\t\t\t\t\t\t\t]), createBaseVNode(\"pre\", _hoisted_27$3, toDisplayString(section.content), 1)], 2);\n\t\t\t\t\t\t\t}), 128))])])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(group.sections, (section) => {\n\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"details\", {\n\t\t\t\t\t\t\t\t\tkey: section.id,\n\t\t\t\t\t\t\t\t\tclass: normalizeClass([\"context-diff-section\", roleClass(section)]),\n\t\t\t\t\t\t\t\t\topen: \"\"\n\t\t\t\t\t\t\t\t}, [createBaseVNode(\"summary\", null, [\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_28$3, toDisplayString(section.title || section.id), 1),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", { class: normalizeClass([\"section-role\", roleClass(section)]) }, toDisplayString(sectionRole(section)), 3),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_29$3, toDisplayString(sectionMeta(section)), 1),\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: \"context-diff-copy-section\",\n\t\t\t\t\t\t\t\t\t\tonClick: withModifiers(($event) => copyPreviewText(section.content), [\"prevent\", \"stop\"])\n\t\t\t\t\t\t\t\t\t}, toDisplayString(unref(t)(\"inspector.copy\")), 9, _hoisted_30$3)\n\t\t\t\t\t\t\t\t]), createBaseVNode(\"pre\", _hoisted_31$3, toDisplayString(section.content), 1)], 2);\n\t\t\t\t\t\t\t}), 128))], 64);\n\t\t\t\t\t\t}), 128))]))\n\t\t\t\t\t], 512), [[vShow, mode.value === \"compiled\"]]),\n\t\t\t\t\twithDirectives(createBaseVNode(\"div\", _hoisted_32$3, [createBaseVNode(\"div\", _hoisted_33$3, [\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_34$3, toDisplayString(mode.value === \"draft\" ? unref(t)(\"diff.draftTitle\") : unref(t)(\"diff.runTitle\")), 1),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_35$3, [mode.value === \"draft\" && previewLoading.value ? (openBlock(), createElementBlock(\"span\", _hoisted_36$3, toDisplayString(unref(t)(\"diff.refreshing\")), 1)) : mode.value === \"run\" && contextDiffLoading.value ? (openBlock(), createElementBlock(\"span\", _hoisted_37$3, toDisplayString(unref(t)(\"diff.refreshing\")), 1)) : mode.value === \"draft\" && previewError.value ? (openBlock(), createElementBlock(\"span\", _hoisted_38$3, toDisplayString(previewError.value), 1)) : mode.value === \"run\" && contextDiffError.value ? (openBlock(), createElementBlock(\"span\", _hoisted_39$3, toDisplayString(contextDiffError.value), 1)) : activeDiff.value ? (openBlock(), createElementBlock(\"span\", _hoisted_40$3, toDisplayString(changedBlocks.value === 0 ? unref(t)(\"diff.noChanges\") : unref(t)(\"diff.changedBlocks\", { count: changedBlocks.value })), 1)) : (openBlock(), createElementBlock(\"span\", _hoisted_41$3, toDisplayString(mode.value === \"draft\" ? unref(t)(\"diff.noDraftComparison\") : unref(t)(\"diff.noCapturedRuns\")), 1))]),\n\t\t\t\t\t\tcreateBaseVNode(\"button\", {\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\tclass: \"context-diff-refresh\",\n\t\t\t\t\t\t\tonClick: _cache[4] || (_cache[4] = ($event) => mode.value === \"draft\" ? schedulePreviewRefresh() : refreshContextDiff())\n\t\t\t\t\t\t}, toDisplayString(unref(t)(\"profiles.refresh\")), 1)\n\t\t\t\t\t]), mode.value === \"draft\" && previewError.value ? (openBlock(), createElementBlock(\"div\", _hoisted_42$2, toDisplayString(previewError.value), 1)) : mode.value === \"run\" && contextDiffError.value ? (openBlock(), createElementBlock(\"div\", _hoisted_43$2, toDisplayString(contextDiffError.value), 1)) : !activeDiff.value ? (openBlock(), createElementBlock(\"div\", _hoisted_44$2, toDisplayString(mode.value === \"draft\" ? unref(t)(\"diff.draftEmpty\") : unref(t)(\"diff.runEmpty\")), 1)) : (openBlock(), createElementBlock(Fragment, { key: 3 }, [\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_45$1, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"span\", { class: normalizeClass([\"summary-delta\", deltaClass.value]) }, toDisplayString(unref(t)(\"diff.estimatedDelta\", { delta: deltaText.value })), 3),\n\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, toDisplayString(unref(t)(\"diff.changed\", { count: changedBlocks.value })), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", {\n\t\t\t\t\t\t\t\tclass: \"diff-view-controls\",\n\t\t\t\t\t\t\t\t\"aria-label\": unref(t)(\"diff.displayOptionsAria\")\n\t\t\t\t\t\t\t}, [createBaseVNode(\"div\", _hoisted_47$1, [createBaseVNode(\"button\", {\n\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\tclass: normalizeClass({ active: diffLayout.value === \"unified\" }),\n\t\t\t\t\t\t\t\t\"aria-pressed\": diffLayout.value === \"unified\",\n\t\t\t\t\t\t\t\tonClick: _cache[5] || (_cache[5] = ($event) => diffLayout.value = \"unified\")\n\t\t\t\t\t\t\t}, toDisplayString(unref(t)(\"diff.unified\")), 11, _hoisted_48$1), createBaseVNode(\"button\", {\n\t\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\t\tclass: normalizeClass({ active: diffLayout.value === \"split\" }),\n\t\t\t\t\t\t\t\t\"aria-pressed\": diffLayout.value === \"split\",\n\t\t\t\t\t\t\t\tonClick: _cache[6] || (_cache[6] = ($event) => diffLayout.value = \"split\")\n\t\t\t\t\t\t\t}, toDisplayString(unref(t)(\"diff.split\")), 11, _hoisted_49$1)]), createBaseVNode(\"label\", null, [createBaseVNode(\"span\", null, toDisplayString(unref(t)(\"diff.lines\")), 1), withDirectives(createBaseVNode(\"select\", {\n\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": _cache[7] || (_cache[7] = ($event) => lineContext.value = $event),\n\t\t\t\t\t\t\t\t\"aria-label\": unref(t)(\"diff.lineContextAria\")\n\t\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"option\", _hoisted_51$1, toDisplayString(unref(t)(\"diff.changesOnly\")), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"option\", _hoisted_52, toDisplayString(unref(t)(\"diff.threeLinesContext\")), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"option\", _hoisted_53, toDisplayString(unref(t)(\"diff.allLines\")), 1)\n\t\t\t\t\t\t\t], 8, _hoisted_50$1), [[vModelSelect, lineContext.value]])])], 8, _hoisted_46$1),\n\t\t\t\t\t\t\thiddenUnchangedCount.value ? (openBlock(), createElementBlock(\"label\", _hoisted_54, [withDirectives(createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": _cache[8] || (_cache[8] = ($event) => showUnchanged.value = $event),\n\t\t\t\t\t\t\t\ttype: \"checkbox\"\n\t\t\t\t\t\t\t}, null, 512), [[vModelCheckbox, showUnchanged.value]]), createTextVNode(\" \" + toDisplayString(unref(t)(\"diff.showUnchanged\", { count: hiddenUnchangedCount.value })), 1)])) : createCommentVNode(\"v-if\", true)\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tmode.value === \"run\" ? (openBlock(), createElementBlock(\"details\", _hoisted_55, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"summary\", null, toDisplayString(unref(t)(\"diff.runMetadata\")), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_56, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, toDisplayString(unref(t)(\"diff.turn\")), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"strong\", null, toDisplayString(turnLabel()), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, toDisplayString(unref(t)(\"diff.providerModel\")), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"strong\", null, toDisplayString(latestUsage.value ? `${latestUsage.value.provider}/${latestUsage.value.model}` : unref(t)(\"diff.usagePending\")), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, toDisplayString(unref(t)(\"diff.actualPromptTokens\")), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"strong\", null, toDisplayString(formatUsageTokens(latestUsage.value?.promptTokens)), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, toDisplayString(unref(t)(\"diff.actualCacheReadWrite\")), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"strong\", null, toDisplayString(formatUsageTokens(latestUsage.value?.cacheRead)) + \" / \" + toDisplayString(formatUsageTokens(latestUsage.value?.cacheWrite)), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, toDisplayString(unref(t)(\"diff.actualCacheHitRate\")), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"strong\", null, toDisplayString(cacheHitText()), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, toDisplayString(unref(t)(\"diff.actualUncached\")), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"strong\", null, toDisplayString(formatUsageTokens(latestUsage.value?.input)) + \" / \" + toDisplayString(formatUsageTokens(latestUsage.value?.output)), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", null, toDisplayString(unref(t)(\"diff.estimatedPrefix\")), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"strong\", null, toDisplayString(unref(t)(\"diff.prefixValue\", {\n\t\t\t\t\t\t\t\t\ttokens: latestDiff.value?.prefixTokens ?? 0,\n\t\t\t\t\t\t\t\t\tpercent: prefixPercent.value\n\t\t\t\t\t\t\t\t})), 1)\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\tlatestUsage.value?.cacheStatus === \"not-reported\" ? (openBlock(), createElementBlock(\"p\", _hoisted_57, toDisplayString(unref(t)(\"diff.cacheNotReportedNote\")), 1)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\tcreateBaseVNode(\"p\", _hoisted_58, toDisplayString(unref(t)(\"diff.estimateNote\")), 1)\n\t\t\t\t\t\t])) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\tvisibleDiffBlocks.value.length === 0 ? (openBlock(), createElementBlock(\"div\", _hoisted_59, toDisplayString(mode.value === \"draft\" ? unref(t)(\"diff.draftSame\") : unref(t)(\"diff.runSame\")), 1)) : (openBlock(), createElementBlock(\"div\", _hoisted_60, [(openBlock(true), createElementBlock(Fragment, null, renderList(visibleDiffBlocks.value, (block, index) => {\n\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"div\", {\n\t\t\t\t\t\t\t\tkey: `${blockKey(block)}-${index}`,\n\t\t\t\t\t\t\t\tclass: normalizeClass([\"context-diff-block\", block.status])\n\t\t\t\t\t\t\t}, [_cache[9] || (_cache[9] = createBaseVNode(\"span\", { class: \"block-gutter\" }, null, -1)), createBaseVNode(\"div\", _hoisted_61, [createBaseVNode(\"div\", _hoisted_62, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_63, toDisplayString(block.status), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_64, toDisplayString(blockKey(block)), 1),\n\t\t\t\t\t\t\t\tblockRole(block) ? (openBlock(), createElementBlock(\"span\", _hoisted_65, toDisplayString(blockRole(block)), 1)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_66, toDisplayString(blockTokenText(block)), 1)\n\t\t\t\t\t\t\t]), metadataOnlyChange(block) ? (openBlock(), createElementBlock(\"div\", _hoisted_67, toDisplayString(metadataChangeText(block)), 1)) : diffLayout.value === \"unified\" ? (openBlock(), createElementBlock(\"div\", {\n\t\t\t\t\t\t\t\tkey: 1,\n\t\t\t\t\t\t\t\tclass: \"git-diff unified\",\n\t\t\t\t\t\t\t\trole: \"table\",\n\t\t\t\t\t\t\t\t\"aria-label\": unref(t)(\"diff.unifiedAria\")\n\t\t\t\t\t\t\t}, [(openBlock(true), createElementBlock(Fragment, null, renderList(blockLineRows(block), (row, rowIndex) => {\n\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(Fragment, { key: rowIndex }, [row.kind === \"separator\" ? (openBlock(), createElementBlock(\"div\", _hoisted_69, \"⋯\")) : (openBlock(), createElementBlock(\"div\", {\n\t\t\t\t\t\t\t\t\tkey: 1,\n\t\t\t\t\t\t\t\t\tclass: normalizeClass([\"git-line\", row.kind]),\n\t\t\t\t\t\t\t\t\trole: \"row\"\n\t\t\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_70, toDisplayString(row.beforeLine ?? \"\"), 1),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_71, toDisplayString(row.afterLine ?? \"\"), 1),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_72, toDisplayString(lineMarker(row)), 1),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"code\", null, [row.kind === \"note\" ? (openBlock(), createElementBlock(\"span\", _hoisted_73, toDisplayString(eofNoteSide(row)) + \" · \", 1)) : createCommentVNode(\"v-if\", true), (openBlock(true), createElementBlock(Fragment, null, renderList(row.parts, (part, partIndex) => {\n\t\t\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(Fragment, { key: partIndex }, [part.changed && row.kind !== \"same\" ? (openBlock(), createElementBlock(\"mark\", _hoisted_74, toDisplayString(part.text), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(part.text), 1)], 64))], 64);\n\t\t\t\t\t\t\t\t\t}), 128))])\n\t\t\t\t\t\t\t\t], 2))], 64);\n\t\t\t\t\t\t\t}), 128))], 8, _hoisted_68)) : (openBlock(), createElementBlock(\"div\", {\n\t\t\t\t\t\t\t\tkey: 2,\n\t\t\t\t\t\t\t\tclass: \"git-diff split\",\n\t\t\t\t\t\t\t\trole: \"table\",\n\t\t\t\t\t\t\t\t\"aria-label\": unref(t)(\"diff.splitAria\")\n\t\t\t\t\t\t\t}, [createBaseVNode(\"div\", _hoisted_76, [createBaseVNode(\"span\", null, toDisplayString(unref(t)(\"diff.before\")), 1), createBaseVNode(\"span\", null, toDisplayString(unref(t)(\"diff.after\")), 1)]), (openBlock(true), createElementBlock(Fragment, null, renderList(blockSplitRows(block), (row, rowIndex) => {\n\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(Fragment, { key: rowIndex }, [row.kind === \"separator\" ? (openBlock(), createElementBlock(\"div\", _hoisted_77, \"⋯\")) : (openBlock(), createElementBlock(\"div\", _hoisted_78, [createBaseVNode(\"div\", { class: normalizeClass([\"git-line\", row.before?.kind ?? \"blank\"]) }, [\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_79, toDisplayString(row.before?.beforeLine ?? \"\"), 1),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_80, toDisplayString(row.before ? lineMarker(row.before) : \"\"), 1),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"code\", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(row.before?.parts ?? [], (part, partIndex) => {\n\t\t\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(Fragment, { key: partIndex }, [part.changed && row.before?.kind !== \"same\" ? (openBlock(), createElementBlock(\"mark\", _hoisted_81, toDisplayString(part.text), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(part.text), 1)], 64))], 64);\n\t\t\t\t\t\t\t\t\t}), 128))])\n\t\t\t\t\t\t\t\t], 2), createBaseVNode(\"div\", { class: normalizeClass([\"git-line\", row.after?.kind ?? \"blank\"]) }, [\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_82, toDisplayString(row.after?.afterLine ?? \"\"), 1),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_83, toDisplayString(row.after ? lineMarker(row.after) : \"\"), 1),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"code\", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(row.after?.parts ?? [], (part, partIndex) => {\n\t\t\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(Fragment, { key: partIndex }, [part.changed && row.after?.kind !== \"same\" ? (openBlock(), createElementBlock(\"mark\", _hoisted_84, toDisplayString(part.text), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(part.text), 1)], 64))], 64);\n\t\t\t\t\t\t\t\t\t}), 128))])\n\t\t\t\t\t\t\t\t], 2)]))], 64);\n\t\t\t\t\t\t\t}), 128))], 8, _hoisted_75))])], 2);\n\t\t\t\t\t\t}), 128))]))\n\t\t\t\t\t], 64))], 512), [[vShow, mode.value === \"draft\" || mode.value === \"run\"]])\n\t\t\t\t]);\n\t\t\t};\n\t\t}\n\t}), [[\"__scopeId\", \"data-v-136213cf\"]]);\n\t//#endregion\n\t//#region src/web-editor/client/vue-context-diff-host.ts\n\tinit_vue_runtime_esm_bundler();\n\t/** Mounts the self-contained preview/diff dock component into a root element. */\n\tfunction createVueContextDiffHost(deps) {\n\t\tlet app;\n\t\tfunction mount(root) {\n\t\t\tunmount();\n\t\t\tapp = createApp(ContextDiffPanel_default, {\n\t\t\t\tgetStackDraft: deps.getStackDraft,\n\t\t\t\tsubscribeStackDraft: deps.subscribeStackDraft,\n\t\t\t\tonStatus: deps.setStatus,\n\t\t\t\tonExpandedChanged: deps.setExpanded\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\t//#endregion\n\t//#region src/web-editor/client/editor-view-coordinator.ts\n\t/**\n\t* Synchronously announces the next editor view before its host mounts.\n\t*\n\t* The stack editor is split across legacy tab and Preview dock hosts. A single\n\t* activation signal lets the inactive Vue host unmount before view state changes.\n\t*/\n\tfunction activateEditorView(viewId) {\n\t\tactiveViewId = viewId;\n\t\tfor (const listener of [...listeners]) listener(viewId);\n\t}\n\tfunction currentEditorView() {\n\t\treturn activeViewId;\n\t}\n\tfunction subscribeEditorView(listener) {\n\t\tlisteners.add(listener);\n\t\treturn () => listeners.delete(listener);\n\t}\n\tvar activeViewId, listeners;\n\tvar init_editor_view_coordinator = __esmMin((() => {\n\t\tactiveViewId = \"items\";\n\t\tlisteners = /* @__PURE__ */ new Set();\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/context-diff-tab-host.ts\n\tinit_editor_view_coordinator();\n\tfunction startContextDiffTabs(deps) {\n\t\tconst nav = document.querySelector(\".view-tabs\");\n\t\tconst dockArea = document.getElementById(\"editorDockArea\");\n\t\tconst workspace = document.getElementById(\"workspace\");\n\t\tconst legacyPanel = document.getElementById(\"tabPanel\");\n\t\tconst panel = document.getElementById(\"contextDiffPanel\");\n\t\tconst status = document.getElementById(\"status\");\n\t\tif (!nav || !dockArea || !workspace || !legacyPanel || !panel) return () => {};\n\t\tconst definition = getEditorTab(\"preview\");\n\t\tif (!definition?.internalDock) return () => {};\n\t\tconst definitionId = definition.id;\n\t\tconst button = document.querySelector(`[data-dock-tab=\"${definitionId}\"]`);\n\t\tif (!button) return () => {};\n\t\tconst navElement = nav;\n\t\tconst dockAreaElement = dockArea;\n\t\tconst workspaceElement = workspace;\n\t\tconst legacyPanelElement = legacyPanel;\n\t\tconst panelElement = panel;\n\t\tconst buttonElement = button;\n\t\tconst statusElement = status;\n\t\tlet active = false;\n\t\tlet contextDiffHost;\n\t\tfunction setStatus(text, tone = \"\") {\n\t\t\tif (!statusElement) return;\n\t\t\tstatusElement.textContent = text;\n\t\t\tstatusElement.style.color = tone === \"error\" ? \"var(--error)\" : tone === \"success\" ? \"var(--success)\" : \"var(--muted)\";\n\t\t}\n\t\tfunction setActiveButton(activeState) {\n\t\t\tbuttonElement.classList.toggle(\"active\", activeState);\n\t\t}\n\t\tfunction clearLegacyActive() {\n\t\t\tfor (const element of navElement.querySelectorAll(\"[data-tab]\")) element.classList.remove(\"active\");\n\t\t}\n\t\tfunction clearActiveState() {\n\t\t\tif (!active) return;\n\t\t\tactive = false;\n\t\t\tsetActiveButton(false);\n\t\t\tdockAreaElement.classList.remove(\"dock-open\");\n\t\t\tdockAreaElement.classList.remove(\"dock-focus\");\n\t\t\tpanelElement.classList.remove(\"open\");\n\t\t\tcontextDiffHost?.unmount();\n\t\t\tcontextDiffHost = void 0;\n\t\t}\n\t\tfunction activate() {\n\t\t\tactivateEditorView(definitionId);\n\t\t\tactive = true;\n\t\t\tclearLegacyActive();\n\t\t\tsetActiveButton(true);\n\t\t\tworkspaceElement.style.display = \"\";\n\t\t\tlegacyPanelElement.classList.remove(\"open\");\n\t\t\tdockAreaElement.classList.add(\"dock-open\");\n\t\t\tpanelElement.classList.add(\"open\");\n\t\t\tif (!contextDiffHost) contextDiffHost = createVueContextDiffHost({\n\t\t\t\tgetStackDraft: deps.getStackDraft,\n\t\t\t\tsubscribeStackDraft: deps.subscribeStackDraft,\n\t\t\t\tsetStatus,\n\t\t\t\tsetExpanded: (expanded) => dockAreaElement.classList.toggle(\"dock-focus\", expanded)\n\t\t\t});\n\t\t\tcontextDiffHost.mount(panelElement);\n\t\t}\n\t\tbuttonElement.onclick = (event) => {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tif (active) {\n\t\t\t\tdocument.querySelector(\"[data-tab=\\\"items\\\"]\")?.click();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tactivate();\n\t\t};\n\t\tconst stopEditorView = subscribeEditorView((viewId) => {\n\t\t\tif (viewId !== definitionId) clearActiveState();\n\t\t});\n\t\treturn () => {\n\t\t\tbuttonElement.onclick = null;\n\t\t\tstopEditorView();\n\t\t\tclearActiveState();\n\t\t\tdockAreaElement.classList.remove(\"dock-focus\");\n\t\t};\n\t}\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\"&\": \"&amp;\",\n\t\t\t\"<\": \"&lt;\",\n\t\t\t\">\": \"&gt;\",\n\t\t\t\"\\\"\": \"&quot;\",\n\t\t\t\"'\": \"&#039;\"\n\t\t})[character]);\n\t}\n\tfunction attr(value) {\n\t\treturn escapeHtml(value).replace(/`/g, \"&#096;\");\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(t(\"inspector.validationComplete\"), \"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(t(\"inspector.armed\"));\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(t(\"inspector.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 = t(\"inspector.armedButton\");\n\t\t\t\tbutton.classList.add(\"primary\");\n\t\t\t\tbutton.title = t(\"inspector.armedButtonTitle\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (payloadSnapshot.status === \"captured\") {\n\t\t\t\tbutton.textContent = t(\"inspector.viewPayload\");\n\t\t\t\tbutton.title = t(\"inspector.viewPayloadTitle\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tbutton.textContent = t(\"chrome.armPayload\");\n\t\t\tbutton.title = t(\"inspector.armTitle\");\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 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=\\\"\" + attr(t(\"inspector.payloadTitle\")) + \"\\\"><div class=\\\"preview-head\\\"><div><div class=\\\"preview-title\\\">\" + escapeHtml(t(\"inspector.payloadTitle\")) + \"</div><div class=\\\"preview-meta\\\">\" + escapeHtml(t(\"inspector.noPayload\")) + \"</div></div><div class=\\\"preview-actions\\\"><button data-payload-arm=\\\"true\\\" data-icon=\\\"◆\\\" title=\\\"\" + attr(t(\"inspector.armNextTitle\")) + \"\\\">\" + escapeHtml(t(\"inspector.armNext\")) + \"</button><button data-preview-close=\\\"true\\\" data-icon=\\\"×\\\" title=\\\"\" + attr(t(\"inspector.closePayload\")) + \"\\\">\" + escapeHtml(t(\"modal.close\")) + \"</button></div></div><div class=\\\"preview-body\\\"><div class=\\\"empty\\\">\" + escapeHtml(t(\"inspector.armEmptyBody\")) + \"</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 ? t(\"inspector.armedAt\", { time: snapshot.armedAt }) : t(\"inspector.armedWaiting\");\n\t\t\t\tpreviewCopyTexts = [];\n\t\t\t\tpane.innerHTML = \"<div class=\\\"preview-dialog\\\" role=\\\"dialog\\\" aria-modal=\\\"true\\\" aria-label=\\\"\" + attr(t(\"inspector.payloadTitle\")) + \"\\\"><div class=\\\"preview-head\\\"><div><div class=\\\"preview-title\\\">\" + escapeHtml(t(\"inspector.armedTitle\")) + \"</div><div class=\\\"preview-meta\\\">\" + escapeHtml(meta) + \"</div></div><div class=\\\"preview-actions\\\"><button class=\\\"danger\\\" data-payload-clear=\\\"true\\\" data-icon=\\\"×\\\" title=\\\"\" + attr(t(\"inspector.clearArmedTitle\")) + \"\\\">\" + escapeHtml(t(\"inspector.clear\")) + \"</button><button data-preview-close=\\\"true\\\" data-icon=\\\"×\\\" title=\\\"\" + attr(t(\"inspector.closePayload\")) + \"\\\">\" + escapeHtml(t(\"modal.close\")) + \"</button></div></div><div class=\\\"preview-body\\\"><div class=\\\"empty\\\">\" + escapeHtml(t(\"inspector.armedBody\")) + \"</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=\\\"\" + attr(t(\"inspector.copySectionTitle\")) + \"\\\" onclick=\\\"event.preventDefault()\\\">\" + escapeHtml(t(\"inspector.copy\")) + \"</button></summary><pre class=\\\"preview-text\\\">\" + escapeHtml(section.content || \"\") + \"</pre></details>\";\n\t\t\t}).join(\"\");\n\t\t\tconst metaParts = [\n\t\t\t\tt(\"inspector.chars\", { count: formatCount(capture.chars) }),\n\t\t\t\t\"~\" + formatCount(capture.approxTokens) + \" tokens\",\n\t\t\t\tcapture.stackId ? t(\"inspector.stackId\", { id: capture.stackId }) : void 0,\n\t\t\t\tcapture.truncated ? t(\"inspector.truncated\") : void 0\n\t\t\t].filter(Boolean);\n\t\t\tpane.innerHTML = \"<div class=\\\"preview-dialog\\\" role=\\\"dialog\\\" aria-modal=\\\"true\\\" aria-label=\\\"\" + attr(t(\"inspector.payloadTitle\")) + \"\\\"><div class=\\\"preview-head\\\"><div><div class=\\\"preview-title\\\">\" + escapeHtml(t(\"inspector.payloadTitle\")) + \"</div><div class=\\\"preview-meta\\\">\" + escapeHtml(metaParts.join(\" · \") + (capture.capturedAt ? \" · \" + capture.capturedAt : \"\")) + \"</div></div><div class=\\\"preview-actions\\\"><button class=\\\"preview-copy\\\" data-copy-index=\\\"0\\\" data-icon=\\\"□\\\" title=\\\"\" + attr(t(\"inspector.copyPayloadTitle\")) + \"\\\">\" + escapeHtml(t(\"inspector.copyFull\")) + \"</button><button data-payload-arm=\\\"true\\\" data-icon=\\\"◆\\\" title=\\\"\" + attr(t(\"inspector.armNextTitle\")) + \"\\\">\" + escapeHtml(t(\"inspector.armAgain\")) + \"</button><button class=\\\"danger\\\" data-payload-clear=\\\"true\\\" data-icon=\\\"×\\\" title=\\\"\" + attr(t(\"inspector.clearCapturedTitle\")) + \"\\\">\" + escapeHtml(t(\"inspector.clear\")) + \"</button><button data-preview-close=\\\"true\\\" data-icon=\\\"×\\\" title=\\\"\" + attr(t(\"inspector.closePayload\")) + \"\\\">\" + escapeHtml(t(\"modal.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 ? t(\"inspector.stringifyError\") : capture.truncated ? t(\"inspector.rawTruncated\") : t(\"inspector.rawPayload\"),\n\t\t\t\tmeta: t(\"inspector.chars\", { count: formatCount((capture.text || \"\").length) }),\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) + \" · \" + t(\"inspector.chars\", { count: formatCount(content.length) }),\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(t(\"inspector.copiedText\"), \"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\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\tinit_i18n();\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$5, _hoisted_8$5, _hoisted_9$5, _hoisted_10$5, _hoisted_11$5, _hoisted_12$5, _hoisted_13$5, _hoisted_14$5, _hoisted_15$5, _hoisted_16$5, _hoisted_17$4, _hoisted_18$3, _hoisted_19$3, _hoisted_20$3, _hoisted_21$3, _hoisted_22$3, _hoisted_23$3, _hoisted_24$3, _hoisted_25$3, _hoisted_26$3, _hoisted_27$2, _hoisted_28$2, _hoisted_29$2, _hoisted_30$2, _hoisted_31$2, _hoisted_32$2, _hoisted_33$2, _hoisted_34$2, _hoisted_35$2, _hoisted_36$2, _hoisted_37$2, _hoisted_38$2, _hoisted_39$2, _hoisted_40$2, _hoisted_41$2, 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\tinit_i18n();\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$5 = { class: \"field\" };\n\t\t_hoisted_8$5 = [\"value\"];\n\t\t_hoisted_9$5 = { class: \"field\" };\n\t\t_hoisted_10$5 = [\"value\"];\n\t\t_hoisted_11$5 = [\"value\"];\n\t\t_hoisted_12$5 = {\n\t\t\tkey: 0,\n\t\t\tclass: \"field\"\n\t\t};\n\t\t_hoisted_13$5 = [\"value\"];\n\t\t_hoisted_14$5 = [\"value\"];\n\t\t_hoisted_15$5 = { class: \"item-body\" };\n\t\t_hoisted_16$5 = {\n\t\t\tkey: 0,\n\t\t\tclass: \"field content-field\"\n\t\t};\n\t\t_hoisted_17$4 = [\"value\"];\n\t\t_hoisted_18$3 = {\n\t\t\tkey: 1,\n\t\t\tclass: \"field wide slot-options\"\n\t\t};\n\t\t_hoisted_19$3 = { class: \"segmented\" };\n\t\t_hoisted_20$3 = [\"value\"];\n\t\t_hoisted_21$3 = {\n\t\t\tkey: 1,\n\t\t\tclass: \"options-grid\"\n\t\t};\n\t\t_hoisted_22$3 = [\"title\"];\n\t\t_hoisted_23$3 = [\"checked\"];\n\t\t_hoisted_24$3 = [\"title\"];\n\t\t_hoisted_25$3 = [\"checked\"];\n\t\t_hoisted_26$3 = [\"title\"];\n\t\t_hoisted_27$2 = [\"checked\"];\n\t\t_hoisted_28$2 = [\"title\"];\n\t\t_hoisted_29$2 = [\"value\"];\n\t\t_hoisted_30$2 = [\"title\"];\n\t\t_hoisted_31$2 = [\"value\"];\n\t\t_hoisted_32$2 = [\"title\"];\n\t\t_hoisted_33$2 = [\"value\"];\n\t\t_hoisted_34$2 = [\"title\"];\n\t\t_hoisted_35$2 = [\"value\"];\n\t\t_hoisted_36$2 = [\"title\"];\n\t\t_hoisted_37$2 = [\"value\"];\n\t\t_hoisted_38$2 = [\"title\"];\n\t\t_hoisted_39$2 = [\"checked\"];\n\t\t_hoisted_40$2 = {\n\t\t\tkey: 3,\n\t\t\tclass: \"wide option-note\"\n\t\t};\n\t\t_hoisted_41$2 = { class: \"wide option-note\" };\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\tconst slotOptions = computed(() => {\n\t\t\t\t\tconst names = [...props.slotNames];\n\t\t\t\t\tif (item.slot && !names.includes(item.slot)) names.push(item.slot);\n\t\t\t\t\treturn names;\n\t\t\t\t});\n\t\t\t\tfunction slotLabel(name) {\n\t\t\t\t\treturn props.slotNames.includes(name) ? name : t(\"item.slotUnregistered\", { name });\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\toptionsError.value = false;\n\t\t\t\t\temit(\"error\", \"\");\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\tif (parsed === null || typeof parsed !== \"object\" || Array.isArray(parsed)) throw new Error(\"Item options must be a JSON object\");\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\tconst known = `item.opt.${key}`;\n\t\t\t\t\tconst translated = t(known);\n\t\t\t\t\treturn translated === known ? t(\"item.opt.advanced\") : translated;\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, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"item.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, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"item.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$5, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"item.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$5)]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_9$5, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"item.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 || unref(t)(\"item.roleNone\")), 9, _hoisted_11$5);\n\t\t\t\t\t\t}), 128))], 40, _hoisted_10$5)]),\n\t\t\t\t\t\titem.kind === \"slot\" ? (openBlock(), createElementBlock(\"div\", _hoisted_12$5, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"item.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(slotOptions.value, (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(slotLabel(slot)), 9, _hoisted_14$5);\n\t\t\t\t\t\t}), 128))], 40, _hoisted_13$5)])) : createCommentVNode(\"v-if\", true)\n\t\t\t\t\t]), createBaseVNode(\"div\", _hoisted_15$5, [item.kind === \"block\" ? (openBlock(), createElementBlock(\"div\", _hoisted_16$5, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"item.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$4)])) : (openBlock(), createElementBlock(\"div\", _hoisted_18$3, [\n\t\t\t\t\t\tcreateBaseVNode(\"label\", null, toDisplayString(unref(t)(\"item.slotOptions\")), 1),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_19$3, [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}, toDisplayString(unref(t)(\"item.form\")), 3), 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$3)) : (openBlock(), createElementBlock(\"div\", _hoisted_21$3, [\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$3), createTextVNode(\" \" + toDisplayString(unref(t)(\"item.includeLastUserMessage\")), 1)], 8, _hoisted_22$3),\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$3), createTextVNode(\" \" + toDisplayString(unref(t)(\"item.stripAssistantThinking\")), 1)], 8, _hoisted_24$3),\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$2), createTextVNode(\" \" + toDisplayString(unref(t)(\"item.includeSummaries\")), 1)], 8, _hoisted_26$3),\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}, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"item.toolHistory\")), 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[19] || (_cache[19] = [createBaseVNode(\"option\", { value: \"keep\" }, \"keep\", -1), createBaseVNode(\"option\", { value: \"drop\" }, \"drop\", -1)])], 40, _hoisted_29$2)], 8, _hoisted_28$2),\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}, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"item.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\tonInput: _cache[13] || (_cache[13] = ($event) => setArrayOption(\"roles\", $event.target.value))\n\t\t\t\t\t\t\t\t}, null, 40, _hoisted_31$2)], 8, _hoisted_30$2),\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}, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"item.maxMessages\")), 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\tonInput: _cache[14] || (_cache[14] = ($event) => setNumberOption(\"maxMessages\", $event.target.value))\n\t\t\t\t\t\t\t\t}, null, 40, _hoisted_33$2)], 8, _hoisted_32$2),\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}, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"item.maxChars\")), 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\tonInput: _cache[15] || (_cache[15] = ($event) => setNumberOption(\"maxChars\", $event.target.value))\n\t\t\t\t\t\t\t\t}, null, 40, _hoisted_35$2)], 8, _hoisted_34$2)\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}, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"item.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[20] || (_cache[20] = [createBaseVNode(\"option\", { value: \"xml\" }, \"xml\", -1), createBaseVNode(\"option\", { value: \"plain\" }, \"plain\", -1)])], 40, _hoisted_37$2)], 8, _hoisted_36$2)) : 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$2), createTextVNode(\" \" + toDisplayString(unref(t)(\"item.includeTime\")), 1)], 8, _hoisted_38$2)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\tstructuredOptionCount.value === 0 ? (openBlock(), createElementBlock(\"div\", _hoisted_40$2, toDisplayString(unref(t)(\"item.noStructuredOptions\")), 1)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_41$2, toDisplayString(unref(t)(\"item.unknownKeysPreserved\")), 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.getSlotNames(),\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(t(\"error.invalidItemOptionsShort\"), \"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(nextMode = \"form\") {\n\t\t\tmode = nextMode;\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\tgetMode: () => mode,\n\t\t\tgetError: () => error\n\t\t};\n\t}\n\tvar init_vue_item_host = __esmMin((() => {\n\t\tinit_i18n();\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$4, _hoisted_8$4, _hoisted_9$4, _hoisted_10$4, _hoisted_11$4, _hoisted_12$4, _hoisted_13$4, _hoisted_14$4, _hoisted_15$4, _hoisted_16$4, _hoisted_17$3, 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\tinit_i18n();\n\t\t_hoisted_1$4 = { class: \"metadata-head\" };\n\t\t_hoisted_2$4 = [\n\t\t\t\"data-icon\",\n\t\t\t\"aria-expanded\",\n\t\t\t\"title\"\n\t\t];\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\", \"title\"];\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 = { class: \"field\" };\n\t\t_hoisted_12$4 = { class: \"checkline\" };\n\t\t_hoisted_13$4 = [\"checked\"];\n\t\t_hoisted_14$4 = { class: \"field wide\" };\n\t\t_hoisted_15$4 = [\"value\"];\n\t\t_hoisted_16$4 = { class: \"field wide\" };\n\t\t_hoisted_17$3 = [\"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 || t(\"metadata.noId\"),\n\t\t\t\t\tprops.stack.name || t(\"stackList.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, [createBaseVNode(\"button\", {\n\t\t\t\t\t\tid: \"metadataToggleBtn\",\n\t\t\t\t\t\t\"data-icon\": collapsed.value ? \"▸\" : \"▾\",\n\t\t\t\t\t\t\"aria-expanded\": !collapsed.value,\n\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\ttitle: unref(t)(\"metadata.toggleTitle\"),\n\t\t\t\t\t\tonClick: toggleMetadata\n\t\t\t\t\t}, toDisplayString(unref(t)(\"metadata.title\")), 9, _hoisted_2$4), createBaseVNode(\"div\", _hoisted_3$4, toDisplayString(summary.value), 1)]), withDirectives(createBaseVNode(\"div\", _hoisted_4$4, [\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_5$4, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"metadata.stackId\")), 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: unref(t)(\"metadata.stackIdTitle\")\n\t\t\t\t\t\t}, null, 8, _hoisted_6$4)]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_7$4, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"metadata.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$4)]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_9$4, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"metadata.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[4] || (_cache[4] = [\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$4)]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_11$4, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"metadata.autoActivate\")), 1), createBaseVNode(\"label\", _hoisted_12$4, [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$4), createTextVNode(\" \" + toDisplayString(unref(t)(\"metadata.enabled\")), 1)])]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_14$4, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"metadata.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$4)]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_16$4, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"metadata.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$3)])\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 ? t(\"status.metadataHidden\") : t(\"status.metadataShown\"));\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_i18n();\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$3, _hoisted_8$3, _hoisted_9$3, _hoisted_10$3, _hoisted_11$3, _hoisted_12$3, _hoisted_13$3, _hoisted_14$3, _hoisted_15$3, _hoisted_16$3, _hoisted_17$2, _hoisted_18$2, _hoisted_19$2, _hoisted_20$2, _hoisted_21$2, _hoisted_22$2, _hoisted_23$2, _hoisted_24$2, _hoisted_25$2, _hoisted_26$2, 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\tinit_i18n();\n\t\t_hoisted_1$3 = { class: \"tab-section\" };\n\t\t_hoisted_2$3 = { class: \"tab-section-title\" };\n\t\t_hoisted_3$3 = { class: \"tab-section-meta\" };\n\t\t_hoisted_4$3 = {\n\t\t\tid: \"policyRows\",\n\t\t\tclass: \"data-table\"\n\t\t};\n\t\t_hoisted_5$3 = { class: \"data-row header policy-row\" };\n\t\t_hoisted_6$3 = [\"data-policy-kind\", \"data-policy-mode\"];\n\t\t_hoisted_7$3 = { class: \"policy-title\" };\n\t\t_hoisted_8$3 = { class: \"modal-meta\" };\n\t\t_hoisted_9$3 = { class: \"field\" };\n\t\t_hoisted_10$3 = { class: \"segmented policy-mode\" };\n\t\t_hoisted_11$3 = [\"data-policy-mode-option\", \"onClick\"];\n\t\t_hoisted_12$3 = { class: \"field\" };\n\t\t_hoisted_13$3 = {\n\t\t\tclass: \"selected-patterns\",\n\t\t\t\"data-selected-patterns\": \"\"\n\t\t};\n\t\t_hoisted_14$3 = {\n\t\t\tkey: 0,\n\t\t\tclass: \"selected-pattern-empty\"\n\t\t};\n\t\t_hoisted_15$3 = [\n\t\t\t\"data-remove-policy-pattern\",\n\t\t\t\"title\",\n\t\t\t\"onClick\"\n\t\t];\n\t\t_hoisted_16$3 = [\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_17$2 = { class: \"resource-picker\" };\n\t\t_hoisted_18$2 = { key: 0 };\n\t\t_hoisted_19$2 = [\n\t\t\t\"list\",\n\t\t\t\"placeholder\",\n\t\t\t\"value\",\n\t\t\t\"onInput\",\n\t\t\t\"onKeydown\"\n\t\t];\n\t\t_hoisted_20$2 = [\"id\"];\n\t\t_hoisted_21$2 = [\"value\"];\n\t\t_hoisted_22$2 = {\n\t\t\tclass: \"resource-list\",\n\t\t\t\"data-resource-list\": \"\"\n\t\t};\n\t\t_hoisted_23$2 = {\n\t\t\tkey: 0,\n\t\t\tclass: \"resource-empty\"\n\t\t};\n\t\t_hoisted_24$2 = [\n\t\t\t\"data-resource-name\",\n\t\t\t\"title\",\n\t\t\t\"onClick\"\n\t\t];\n\t\t_hoisted_25$2 = {\n\t\t\tkey: 1,\n\t\t\tclass: \"resource-empty\"\n\t\t};\n\t\t_hoisted_26$2 = {\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 = [{ kind: \"tools\" }, { kind: \"skills\" }];\n\t\t\t\tfunction kindLabel(kind) {\n\t\t\t\t\treturn t(kind === \"tools\" ? \"policy.tools\" : \"policy.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(t(\"error.duplicatePattern\", {\n\t\t\t\t\t\t\tkind,\n\t\t\t\t\t\t\tmode: row.mode,\n\t\t\t\t\t\t\tpattern: duplicate\n\t\t\t\t\t\t}));\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 tp(\"policy.allowListActiveOne\", \"policy.allowListActiveMany\", patterns.length);\n\t\t\t\t\tif (mode === \"allow\" && patterns.length) return t(\"policy.unrestricted\", { kind: kindLabel(kind) });\n\t\t\t\t\tif (mode === \"deny\" && patterns.length) return tp(\"policy.denyListActiveOne\", \"policy.denyListActiveMany\", patterns.length);\n\t\t\t\t\treturn t(\"policy.unrestricted\", { kind: kindLabel(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 ? t(\"policy.sourceLabel\", { source: resource.source }) : \"\",\n\t\t\t\t\t\tresource.active ? t(\"policy.currentlyActive\") : t(\"policy.registeredInactive\"),\n\t\t\t\t\t\tresource.hidden ? t(\"policy.hiddenFromModel\") : \"\"\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 ? t(\"policy.suffixHidden\") : \"\";\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\tcreateBaseVNode(\"div\", _hoisted_2$3, toDisplayString(unref(t)(\"policy.title\")), 1),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_3$3, toDisplayString(unref(t)(\"policy.meta\")), 1),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_4$3, [createBaseVNode(\"div\", _hoisted_5$3, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, toDisplayString(unref(t)(\"policy.resource\")), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, toDisplayString(unref(t)(\"policy.mode\")), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, toDisplayString(unref(t)(\"policy.patterns\")), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, toDisplayString(unref(t)(\"policy.available\")), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, toDisplayString(unref(t)(\"policy.status\")), 1)\n\t\t\t\t\t\t]), (openBlock(), createElementBlock(Fragment, null, renderList(policyKinds, ({ kind }) => {\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_7$3, toDisplayString(kindLabel(kind)), 1), createBaseVNode(\"div\", _hoisted_8$3, toDisplayString(kind), 1)]),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_9$3, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"policy.mode\")), 1), createBaseVNode(\"div\", _hoisted_10$3, [(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\tlabelKey: \"policy.unrestrictedOption\"\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\tlabelKey: \"policy.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\tlabelKey: \"policy.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(unref(t)(option.labelKey)), 11, _hoisted_11$3);\n\t\t\t\t\t\t\t\t}), 64))])]),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_12$3, [\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"label\", null, toDisplayString(unref(t)(\"policy.patterns\")), 1),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_13$3, [!selectedPatterns(kind).length ? (openBlock(), createElementBlock(\"span\", _hoisted_14$3, toDisplayString(unref(t)(\"policy.noPatterns\")), 1)) : (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: unref(t)(\"policy.removePatternTitle\"),\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[0] || (_cache[0] = createBaseVNode(\"span\", { \"aria-hidden\": \"true\" }, \"x\", -1))], 8, _hoisted_15$3);\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_16$3)\n\t\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_17$2, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"policy.availableKind\", { kind: kindLabel(kind) })), 1), props.resources[kind]?.length ? (openBlock(), createElementBlock(\"div\", _hoisted_18$2, [\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: unref(t)(\"policy.filterPlaceholder\"),\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_19$2),\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_21$2);\n\t\t\t\t\t\t\t\t\t}), 128))], 8, _hoisted_20$2),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_22$2, [!availableResources(kind).length ? (openBlock(), createElementBlock(\"div\", _hoisted_23$2, toDisplayString(unref(t)(\"policy.noMatching\", { kind: kindLabel(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_24$2);\n\t\t\t\t\t\t\t\t\t}), 128))])\n\t\t\t\t\t\t\t\t])) : (openBlock(), createElementBlock(\"div\", _hoisted_25$2, toDisplayString(unref(t)(\"policy.noRegistered\", { kind: kindLabel(kind) })), 1))]),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_26$2, toDisplayString(policySummary(kind)), 1)\n\t\t\t\t\t\t\t], 8, _hoisted_6$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$2, _hoisted_8$2, _hoisted_9$2, _hoisted_10$2, _hoisted_11$2, _hoisted_12$2, _hoisted_13$2, _hoisted_14$2, _hoisted_15$2, _hoisted_16$2, _hoisted_17$1, _hoisted_18$1, _hoisted_19$1, _hoisted_20$1, _hoisted_21$1, _hoisted_22$1, _hoisted_23$1, _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$1, _hoisted_45, _hoisted_46, _hoisted_47, _hoisted_48, _hoisted_49, _hoisted_50, _hoisted_51, 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\tinit_i18n();\n\t\t_hoisted_1$2 = { class: \"tab-section\" };\n\t\t_hoisted_2$2 = { class: \"tab-section-title\" };\n\t\t_hoisted_3$2 = { class: \"tab-section-meta\" };\n\t\t_hoisted_4$2 = { class: \"modal-toolbar\" };\n\t\t_hoisted_5$2 = [\"title\"];\n\t\t_hoisted_6$2 = [\"title\"];\n\t\t_hoisted_7$2 = { class: \"modal-meta\" };\n\t\t_hoisted_8$2 = {\n\t\t\tid: \"regexRows\",\n\t\t\tclass: \"data-table\"\n\t\t};\n\t\t_hoisted_9$2 = { class: \"regex-controls\" };\n\t\t_hoisted_10$2 = [\"title\", \"onClick\"];\n\t\t_hoisted_11$2 = [\"title\", \"onClick\"];\n\t\t_hoisted_12$2 = { class: \"regex-fields\" };\n\t\t_hoisted_13$2 = [\"value\"];\n\t\t_hoisted_14$2 = { class: \"checkline\" };\n\t\t_hoisted_15$2 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_16$2 = { class: \"field\" };\n\t\t_hoisted_17$1 = [\"onUpdate:modelValue\", \"placeholder\"];\n\t\t_hoisted_18$1 = { class: \"field\" };\n\t\t_hoisted_19$1 = [\"onUpdate:modelValue\", \"placeholder\"];\n\t\t_hoisted_20$1 = { class: \"field\" };\n\t\t_hoisted_21$1 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_22$1 = [\"value\"];\n\t\t_hoisted_23$1 = { class: \"field\" };\n\t\t_hoisted_24$1 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_25$1 = [\"value\"];\n\t\t_hoisted_26$1 = { class: \"field\" };\n\t\t_hoisted_27$1 = [\"onUpdate:modelValue\", \"title\"];\n\t\t_hoisted_28$1 = [\"value\"];\n\t\t_hoisted_29$1 = { class: \"field\" };\n\t\t_hoisted_30$1 = [\"onUpdate:modelValue\", \"placeholder\"];\n\t\t_hoisted_31$1 = { class: \"field span-2\" };\n\t\t_hoisted_32$1 = [\"title\"];\n\t\t_hoisted_33$1 = [\"onUpdate:modelValue\", \"value\"];\n\t\t_hoisted_34$1 = { class: \"field span-2\" };\n\t\t_hoisted_35$1 = [\"title\"];\n\t\t_hoisted_36$1 = [\"onUpdate:modelValue\", \"value\"];\n\t\t_hoisted_37$1 = { class: \"field\" };\n\t\t_hoisted_38$1 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_39$1 = { class: \"field\" };\n\t\t_hoisted_40$1 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_41$1 = { class: \"field\" };\n\t\t_hoisted_42$1 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_43$1 = { class: \"field\" };\n\t\t_hoisted_44$1 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_45 = { class: \"field span-2\" };\n\t\t_hoisted_46 = [\"onUpdate:modelValue\", \"placeholder\"];\n\t\t_hoisted_47 = { class: \"field span-3\" };\n\t\t_hoisted_48 = [\"onUpdate:modelValue\", \"placeholder\"];\n\t\t_hoisted_49 = { class: \"field span-3\" };\n\t\t_hoisted_50 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_51 = [\"title\", \"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 regexFrequencies = [\"turn\", \"request\"];\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\t\"toolResult\"\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\tfrequency: selectedChoice(rule.frequency, regexFrequencies, \"turn\"),\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 || t(\"regex.ruleLabel\", { index: index + 1 });\n\t\t\t\t\t\tif (!rule.id) errors.push(t(\"regex.errorId\", { index: index + 1 }));\n\t\t\t\t\t\telse if (seen.has(rule.id)) errors.push(t(\"regex.errorDuplicateId\", { id: rule.id }));\n\t\t\t\t\t\tseen.add(rule.id);\n\t\t\t\t\t\tif (!rule.pattern) errors.push(t(\"regex.errorPattern\", { label }));\n\t\t\t\t\t\tif (hasInputValue(row.maxMessages) && !rule.maxMessages) errors.push(t(\"regex.errorPositiveInteger\", {\n\t\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t\tfield: \"maxMessages\"\n\t\t\t\t\t\t}));\n\t\t\t\t\t\tif (hasInputValue(row.maxChars) && !rule.maxChars) errors.push(t(\"regex.errorPositiveInteger\", {\n\t\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t\tfield: \"maxChars\"\n\t\t\t\t\t\t}));\n\t\t\t\t\t\tif (hasInputValue(row.minDepth) && rule.minDepth === void 0) errors.push(t(\"regex.errorNonNegativeInteger\", {\n\t\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t\tfield: \"minDepth\"\n\t\t\t\t\t\t}));\n\t\t\t\t\t\tif (hasInputValue(row.maxDepth) && rule.maxDepth === void 0) errors.push(t(\"regex.errorNonNegativeInteger\", {\n\t\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t\tfield: \"maxDepth\"\n\t\t\t\t\t\t}));\n\t\t\t\t\t\tif (rule.minDepth !== void 0 && rule.maxDepth !== void 0 && rule.maxDepth < rule.minDepth) errors.push(t(\"regex.errorDepthOrder\", { label }));\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\"frequency\",\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\tif (rule.effect !== \"finalize\") rule.frequency = form.frequency || \"turn\";\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 t(\"regex.warnFinalize\");\n\t\t\t\t\tif (typeof rule.replace === \"string\" && /\\{\\{\\s*match\\s*\\}\\}/i.test(rule.replace)) return t(\"regex.warnMatch\");\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\tcreateBaseVNode(\"div\", _hoisted_2$2, toDisplayString(unref(t)(\"regex.title\")), 1),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_3$2, toDisplayString(unref(t)(\"regex.meta\")), 1),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_4$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: unref(t)(\"regex.addRuleTitle\"),\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}, toDisplayString(unref(t)(\"regex.addRule\")), 9, _hoisted_5$2),\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: unref(t)(\"regex.validateTitle\"),\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}, toDisplayString(unref(t)(\"regex.validate\")), 9, _hoisted_6$2),\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\tcreateBaseVNode(\"span\", _hoisted_7$2, toDisplayString(unref(t)(\"regex.saveNote\")), 1)\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_8$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_9$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: unref(t)(\"regex.upTitle\"),\n\t\t\t\t\t\t\t\t\tonClick: ($event) => moveRule(index, -1)\n\t\t\t\t\t\t\t\t}, toDisplayString(unref(t)(\"regex.up\")), 9, _hoisted_10$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: unref(t)(\"regex.downTitle\"),\n\t\t\t\t\t\t\t\t\tonClick: ($event) => moveRule(index, 1)\n\t\t\t\t\t\t\t\t}, toDisplayString(unref(t)(\"regex.down\")), 9, _hoisted_11$2)]),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_12$2, [\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_13$2),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_14$2, [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_15$2), [[vModelCheckbox, row.enabled]]), createTextVNode(\" \" + toDisplayString(unref(t)(\"regex.enabled\")), 1)]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_16$2, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"regex.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: unref(t)(\"regex.idPlaceholder\")\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_17$1), [[vModelText, row.id]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_18$1, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"regex.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: unref(t)(\"regex.namePlaceholder\")\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_19$1), [[vModelText, row.name]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_20$1, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"regex.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_22$1);\n\t\t\t\t\t\t\t\t\t}), 64))], 8, _hoisted_21$1), [[vModelSelect, row.stage]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_23$1, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"regex.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_25$1);\n\t\t\t\t\t\t\t\t\t}), 64))], 8, _hoisted_24$1), [[vModelSelect, row.effect]])]),\n\t\t\t\t\t\t\t\t\twithDirectives(createBaseVNode(\"div\", _hoisted_26$1, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"regex.frequency\")), 1), withDirectives(createBaseVNode(\"select\", {\n\t\t\t\t\t\t\t\t\t\t\"onUpdate:modelValue\": ($event) => row.frequency = $event,\n\t\t\t\t\t\t\t\t\t\t\"data-regex-frequency\": \"\",\n\t\t\t\t\t\t\t\t\t\ttitle: unref(t)(\"regex.frequencyTitle\")\n\t\t\t\t\t\t\t\t\t}, [(openBlock(), createElementBlock(Fragment, null, renderList(regexFrequencies, (frequency) => {\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: frequency,\n\t\t\t\t\t\t\t\t\t\t\tvalue: frequency\n\t\t\t\t\t\t\t\t\t\t}, toDisplayString(frequency), 9, _hoisted_28$1);\n\t\t\t\t\t\t\t\t\t}), 64))], 8, _hoisted_27$1), [[vModelSelect, row.frequency]])], 512), [[vShow, row.effect !== \"finalize\"]]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_29$1, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"regex.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: unref(t)(\"regex.flagsPlaceholder\")\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_30$1), [[vModelText, row.flags]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_31$1, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"regex.targets\")), 1), createBaseVNode(\"div\", {\n\t\t\t\t\t\t\t\t\t\tclass: \"regex-checks\",\n\t\t\t\t\t\t\t\t\t\ttitle: unref(t)(\"regex.targetsTitle\")\n\t\t\t\t\t\t\t\t\t}, [(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_33$1), [[vModelCheckbox, row.targets]]), createTextVNode(\" \" + toDisplayString(target), 1)]);\n\t\t\t\t\t\t\t\t\t}), 64))], 8, _hoisted_32$1)]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_34$1, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"regex.roles\")), 1), createBaseVNode(\"div\", {\n\t\t\t\t\t\t\t\t\t\tclass: \"regex-checks\",\n\t\t\t\t\t\t\t\t\t\ttitle: unref(t)(\"regex.rolesTitle\")\n\t\t\t\t\t\t\t\t\t}, [(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_36$1), [[vModelCheckbox, row.roles]]), createTextVNode(\" \" + toDisplayString(role), 1)]);\n\t\t\t\t\t\t\t\t\t}), 64))], 8, _hoisted_35$1)]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_37$1, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"item.maxMessages\")), 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_38$1), [[vModelText, row.maxMessages]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_39$1, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"item.maxChars\")), 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_40$1), [[vModelText, row.maxChars]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_41$1, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"regex.minDepth\")), 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_42$1), [[vModelText, row.minDepth]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_43$1, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"regex.maxDepth\")), 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_44$1), [[vModelText, row.maxDepth]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_45, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"regex.trimStrings\")), 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: unref(t)(\"regex.trimStringsPlaceholder\")\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_46), [[vModelText, row.trimStrings]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_47, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"regex.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: unref(t)(\"regex.patternPlaceholder\")\n\t\t\t\t\t\t\t\t\t}, null, 8, _hoisted_48), [[vModelText, row.pattern]])]),\n\t\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_49, [createBaseVNode(\"label\", null, toDisplayString(unref(t)(\"regex.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_50), [[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: unref(t)(\"regex.deleteTitle\"),\n\t\t\t\t\t\t\t\t\tonClick: ($event) => deleteRule(index)\n\t\t\t\t\t\t\t\t}, toDisplayString(unref(t)(\"stackTab.deleteVariable\")), 9, _hoisted_51)\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$1, _hoisted_8$1, _hoisted_9$1, _hoisted_10$1, _hoisted_11$1, _hoisted_12$1, _hoisted_13$1, _hoisted_14$1, _hoisted_15$1, _hoisted_16$1, _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, _hoisted_44, 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\tinit_i18n();\n\t\t_hoisted_1$1 = { class: \"tab-section\" };\n\t\t_hoisted_2$1 = { class: \"tab-section-title\" };\n\t\t_hoisted_3$1 = { class: \"tab-section-meta\" };\n\t\t_hoisted_4$1 = [\"title\"];\n\t\t_hoisted_5$1 = [\"checked\"];\n\t\t_hoisted_6$1 = { class: \"option-note\" };\n\t\t_hoisted_7$1 = [\"title\"];\n\t\t_hoisted_8$1 = [\"checked\"];\n\t\t_hoisted_9$1 = { class: \"option-note\" };\n\t\t_hoisted_10$1 = [\"title\"];\n\t\t_hoisted_11$1 = [\"checked\"];\n\t\t_hoisted_12$1 = {\n\t\t\tclass: \"field\",\n\t\t\tfor: \"mergeSeparatorInput\"\n\t\t};\n\t\t_hoisted_13$1 = { class: \"field-label\" };\n\t\t_hoisted_14$1 = [\n\t\t\t\"placeholder\",\n\t\t\t\"value\",\n\t\t\t\"disabled\"\n\t\t];\n\t\t_hoisted_15$1 = { class: \"option-note\" };\n\t\t_hoisted_16$1 = { class: \"tab-section\" };\n\t\t_hoisted_17 = { class: \"tab-section-title\" };\n\t\t_hoisted_18 = { class: \"tab-section-meta\" };\n\t\t_hoisted_19 = { class: \"extension-catalog-grid\" };\n\t\t_hoisted_20 = {\n\t\t\tid: \"macroCatalog\",\n\t\t\tclass: \"extension-catalog\"\n\t\t};\n\t\t_hoisted_21 = {\n\t\t\tkey: 0,\n\t\t\tclass: \"option-note\"\n\t\t};\n\t\t_hoisted_22 = [\"textContent\"];\n\t\t_hoisted_23 = {\n\t\t\tid: \"slotCatalog\",\n\t\t\tclass: \"extension-catalog\"\n\t\t};\n\t\t_hoisted_24 = {\n\t\t\tkey: 0,\n\t\t\tclass: \"option-note\"\n\t\t};\n\t\t_hoisted_25 = { class: \"tab-section\" };\n\t\t_hoisted_26 = { class: \"tab-section-title\" };\n\t\t_hoisted_27 = { class: \"tab-section-meta\" };\n\t\t_hoisted_28 = { class: \"modal-toolbar\" };\n\t\t_hoisted_29 = [\"title\"];\n\t\t_hoisted_30 = { class: \"modal-meta\" };\n\t\t_hoisted_31 = {\n\t\t\tid: \"variablesRows\",\n\t\t\tclass: \"data-table\"\n\t\t};\n\t\t_hoisted_32 = { key: 0 };\n\t\t_hoisted_33 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_34 = [\"onUpdate:modelValue\"];\n\t\t_hoisted_35 = [\"value\", \"onChange\"];\n\t\t_hoisted_36 = { value: \"text\" };\n\t\t_hoisted_37 = [\"title\", \"onClick\"];\n\t\t_hoisted_38 = { class: \"tab-section\" };\n\t\t_hoisted_39 = { class: \"tab-section-title\" };\n\t\t_hoisted_40 = { class: \"tab-section-meta\" };\n\t\t_hoisted_41 = { class: \"modal-toolbar\" };\n\t\t_hoisted_42 = [\"title\"];\n\t\t_hoisted_43 = [\"title\"];\n\t\t_hoisted_44 = {\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\tresources: {},\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(t(\"stackTab.rawDraft\"));\n\t\t\t\tconst mergeEnabled = /* @__PURE__ */ ref(props.stack.context?.mergeConsecutiveRoles === true);\n\t\t\t\tconst customSeparatorEnabled = /* @__PURE__ */ ref(Object.hasOwn(props.stack.context ?? {}, \"mergeSeparator\"));\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 = t(\"stackTab.rawDraft\");\n\t\t\t\t\tmergeEnabled.value = props.stack.context?.mergeConsecutiveRoles === true;\n\t\t\t\t\tcustomSeparatorEnabled.value = Object.hasOwn(props.stack.context ?? {}, \"mergeSeparator\");\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: props.stack.schemaVersion === 2 && typeof value !== \"string\" ? JSON.stringify(value) : String(value ?? \"\"),\n\t\t\t\t\t\tformat: props.stack.schemaVersion === 2 && typeof value !== \"string\" ? \"json\" : \"text\"\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 updateContext(mutate) {\n\t\t\t\t\tconst context = { ...props.stack.context && typeof props.stack.context === \"object\" ? props.stack.context : {} };\n\t\t\t\t\tmutate(context);\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 setMergeConsecutiveRoles(event) {\n\t\t\t\t\tconst checked = event.target.checked;\n\t\t\t\t\tmergeEnabled.value = checked;\n\t\t\t\t\tupdateContext((context) => {\n\t\t\t\t\t\tif (checked) context.mergeConsecutiveRoles = true;\n\t\t\t\t\t\telse delete context.mergeConsecutiveRoles;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tfunction setMergeSeparator(event) {\n\t\t\t\t\tconst value = event.target.value;\n\t\t\t\t\tupdateContext((context) => {\n\t\t\t\t\t\tcontext.mergeSeparator = value;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tfunction setCustomMergeSeparator(event) {\n\t\t\t\t\tconst checked = event.target.checked;\n\t\t\t\t\tcustomSeparatorEnabled.value = checked;\n\t\t\t\t\tupdateContext((context) => {\n\t\t\t\t\t\tif (checked) {\n\t\t\t\t\t\t\tif (typeof context.mergeSeparator !== \"string\") context.mergeSeparator = \"\\n\\n\";\n\t\t\t\t\t\t} else delete context.mergeSeparator;\n\t\t\t\t\t});\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\tformat: \"text\"\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\tlet jsonError = \"\";\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\tif (props.stack.schemaVersion === 2 && row.format === \"json\") try {\n\t\t\t\t\t\t\tvariables[name] = JSON.parse(row.value);\n\t\t\t\t\t\t} catch {\n\t\t\t\t\t\t\tjsonError ||= t(\"stackTab.invalidParameterJson\", { name });\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse variables[name] = row.value;\n\t\t\t\t\t}\n\t\t\t\t\tif (!jsonError && 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 (props.stack.schemaVersion !== 2) 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 ? t(\"stackTab.duplicateVarNames\") : jsonError;\n\t\t\t\t\temit(\"change\", stackError.value);\n\t\t\t\t}\n\t\t\t\tfunction setVariableFormat(row, format) {\n\t\t\t\t\tif (format === row.format) return;\n\t\t\t\t\tif (format === \"json\") row.value = JSON.stringify(row.value);\n\t\t\t\t\telse try {\n\t\t\t\t\t\tconst parsed = JSON.parse(row.value);\n\t\t\t\t\t\trow.value = typeof parsed === \"string\" ? parsed : JSON.stringify(parsed);\n\t\t\t\t\t} catch {}\n\t\t\t\t\trow.format = format;\n\t\t\t\t\tsyncVariables();\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 = t(\"stackTab.copiedJson\");\n\t\t\t\t\t\temit(\"status\", t(\"stackTab.copiedJsonStatus\"), \"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 = t(\"stackTab.appliedJson\");\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(t(\"error.stackJsonNotObject\"));\n\t\t\t\t\tconst candidate = stack;\n\t\t\t\t\tif (typeof candidate.id !== \"string\" || !candidate.id.trim()) throw new Error(t(\"error.stackJsonNoId\"));\n\t\t\t\t\tif (!Array.isArray(candidate.items)) throw new Error(t(\"error.stackJsonNoItems\"));\n\t\t\t\t\tcandidate.items.forEach((item, index) => {\n\t\t\t\t\t\tconst label = t(\"error.itemLabel\", { index: index + 1 });\n\t\t\t\t\t\tif (!item || typeof item !== \"object\" || Array.isArray(item)) throw new Error(t(\"error.itemNotObject\", { label }));\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(t(\"error.itemKind\", { label }));\n\t\t\t\t\t\tif (typeof candidateItem.id !== \"string\" || !candidateItem.id.trim()) throw new Error(t(\"error.itemNoId\", { label }));\n\t\t\t\t\t\tif (candidateItem.kind === \"block\" && typeof candidateItem.content !== \"string\") throw new Error(t(\"error.itemContent\", { label }));\n\t\t\t\t\t\tif (candidateItem.kind === \"slot\" && typeof candidateItem.slot !== \"string\") throw new Error(t(\"error.itemSlot\", { label }));\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\tcreateBaseVNode(\"div\", _hoisted_2$1, toDisplayString(unref(t)(\"stackTab.contextOptions\")), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_3$1, toDisplayString(unref(t)(\"stackTab.contextMeta\")), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"label\", {\n\t\t\t\t\t\t\t\tclass: \"checkline\",\n\t\t\t\t\t\t\t\ttitle: unref(t)(\"stackTab.allowDuplicateTitle\")\n\t\t\t\t\t\t\t}, [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_5$1), createTextVNode(\" \" + toDisplayString(unref(t)(\"stackTab.allowDuplicate\")), 1)], 8, _hoisted_4$1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_6$1, toDisplayString(unref(t)(\"stackTab.allowDuplicateNote\")), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"label\", {\n\t\t\t\t\t\t\t\tclass: \"checkline\",\n\t\t\t\t\t\t\t\ttitle: unref(t)(\"stackTab.mergeTitle\")\n\t\t\t\t\t\t\t}, [createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\tid: \"mergeConsecutiveRolesInput\",\n\t\t\t\t\t\t\t\ttype: \"checkbox\",\n\t\t\t\t\t\t\t\tchecked: props.stack.context?.mergeConsecutiveRoles === true,\n\t\t\t\t\t\t\t\tonChange: setMergeConsecutiveRoles\n\t\t\t\t\t\t\t}, null, 40, _hoisted_8$1), createTextVNode(\" \" + toDisplayString(unref(t)(\"stackTab.merge\")), 1)], 8, _hoisted_7$1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_9$1, toDisplayString(unref(t)(\"stackTab.mergeNote\")), 1),\n\t\t\t\t\t\t\tmergeEnabled.value ? (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: unref(t)(\"stackTab.customMergeSeparatorTitle\")\n\t\t\t\t\t\t\t\t}, [createBaseVNode(\"input\", {\n\t\t\t\t\t\t\t\t\tid: \"customMergeSeparatorInput\",\n\t\t\t\t\t\t\t\t\ttype: \"checkbox\",\n\t\t\t\t\t\t\t\t\tchecked: customSeparatorEnabled.value,\n\t\t\t\t\t\t\t\t\tonChange: setCustomMergeSeparator\n\t\t\t\t\t\t\t\t}, null, 40, _hoisted_11$1), createTextVNode(\" \" + toDisplayString(unref(t)(\"stackTab.customMergeSeparator\")), 1)], 8, _hoisted_10$1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"label\", _hoisted_12$1, [createBaseVNode(\"span\", _hoisted_13$1, toDisplayString(unref(t)(\"stackTab.mergeSeparator\")), 1), createBaseVNode(\"textarea\", {\n\t\t\t\t\t\t\t\t\tid: \"mergeSeparatorInput\",\n\t\t\t\t\t\t\t\t\trows: \"2\",\n\t\t\t\t\t\t\t\t\tplaceholder: unref(t)(\"stackTab.mergeSeparatorPlaceholder\"),\n\t\t\t\t\t\t\t\t\tvalue: props.stack.context?.mergeSeparator ?? \"\\n\\n\",\n\t\t\t\t\t\t\t\t\tdisabled: !customSeparatorEnabled.value,\n\t\t\t\t\t\t\t\t\tonChange: setMergeSeparator\n\t\t\t\t\t\t\t\t}, null, 40, _hoisted_14$1)]),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_15$1, toDisplayString(unref(t)(\"stackTab.mergeSeparatorNote\")), 1)\n\t\t\t\t\t\t\t], 64)) : createCommentVNode(\"v-if\", true)\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_16$1, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_17, toDisplayString(unref(t)(\"stackTab.extensions\")), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_18, toDisplayString(unref(t)(\"stackTab.extensionsMeta\")), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_19, [createBaseVNode(\"div\", _hoisted_20, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"strong\", null, toDisplayString(unref(t)(\"stackTab.registeredMacros\")), 1),\n\t\t\t\t\t\t\t\tprops.resources.macros.length === 0 ? (openBlock(), createElementBlock(\"div\", _hoisted_21, toDisplayString(unref(t)(\"common.none\")), 1)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\t\t(openBlock(true), createElementBlock(Fragment, null, renderList(props.resources.macros, (macro) => {\n\t\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"div\", {\n\t\t\t\t\t\t\t\t\t\tkey: macro.name,\n\t\t\t\t\t\t\t\t\t\tclass: \"extension-catalog-entry\"\n\t\t\t\t\t\t\t\t\t}, [createBaseVNode(\"code\", { textContent: toDisplayString(`{{ extensions.${macro.name} }}`) }, null, 8, _hoisted_22), createBaseVNode(\"span\", null, toDisplayString(macro.description || macro.source || \"\"), 1)]);\n\t\t\t\t\t\t\t\t}), 128))\n\t\t\t\t\t\t\t]), createBaseVNode(\"div\", _hoisted_23, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"strong\", null, toDisplayString(unref(t)(\"stackTab.availableSlots\")), 1),\n\t\t\t\t\t\t\t\tprops.resources.slots.length === 0 ? (openBlock(), createElementBlock(\"div\", _hoisted_24, toDisplayString(unref(t)(\"common.none\")), 1)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\t\t(openBlock(true), createElementBlock(Fragment, null, renderList(props.resources.slots, (slot) => {\n\t\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"div\", {\n\t\t\t\t\t\t\t\t\t\tkey: slot.name,\n\t\t\t\t\t\t\t\t\t\tclass: \"extension-catalog-entry\"\n\t\t\t\t\t\t\t\t\t}, [createBaseVNode(\"code\", null, toDisplayString(slot.name), 1), createBaseVNode(\"span\", null, toDisplayString(slot.description || slot.source || \"\"), 1)]);\n\t\t\t\t\t\t\t\t}), 128))\n\t\t\t\t\t\t\t])])\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_25, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_26, toDisplayString(unref(t)(\"stackTab.parameters\")), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_27, [\n\t\t\t\t\t\t\t\tcreateTextVNode(toDisplayString(unref(t)(\"stackTab.parametersMetaPre\")), 1),\n\t\t\t\t\t\t\t\t_cache[1] || (_cache[1] = createBaseVNode(\"code\", null, \"parameters\", -1)),\n\t\t\t\t\t\t\t\tcreateTextVNode(toDisplayString(unref(t)(\"stackTab.parametersMetaMid\")), 1),\n\t\t\t\t\t\t\t\t_cache[2] || (_cache[2] = createBaseVNode(\"code\", null, \"variables\", -1)),\n\t\t\t\t\t\t\t\tcreateTextVNode(toDisplayString(unref(t)(\"stackTab.parametersMetaPost\")), 1)\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_28, [\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: unref(t)(\"stackTab.addVariableTitle\"),\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}, toDisplayString(unref(t)(\"stackTab.addVariable\")), 9, _hoisted_29),\n\t\t\t\t\t\t\t\t_cache[3] || (_cache[3] = createBaseVNode(\"span\", { class: \"modal-spacer\" }, null, -1)),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_30, toDisplayString(unref(t)(\"stackTab.variablesSavedNote\")), 1)\n\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_31, [createBaseVNode(\"div\", { class: normalizeClass([\n\t\t\t\t\t\t\t\t\"data-row\",\n\t\t\t\t\t\t\t\t\"header\",\n\t\t\t\t\t\t\t\t\"variable-row\",\n\t\t\t\t\t\t\t\t{ \"parameter-row\": props.stack.schemaVersion === 2 }\n\t\t\t\t\t\t\t]) }, [\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, toDisplayString(unref(t)(\"item.name\")), 1),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"div\", null, toDisplayString(unref(t)(\"stackTab.value\")), 1),\n\t\t\t\t\t\t\t\tprops.stack.schemaVersion === 2 ? (openBlock(), createElementBlock(\"div\", _hoisted_32, toDisplayString(unref(t)(\"stackTab.valueType\")), 1)) : createCommentVNode(\"v-if\", true),\n\t\t\t\t\t\t\t\t_cache[4] || (_cache[4] = createBaseVNode(\"div\", null, null, -1))\n\t\t\t\t\t\t\t], 2), (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: normalizeClass([\n\t\t\t\t\t\t\t\t\t\t\"data-row\",\n\t\t\t\t\t\t\t\t\t\t\"variable-row\",\n\t\t\t\t\t\t\t\t\t\t{ \"parameter-row\": props.stack.schemaVersion === 2 }\n\t\t\t\t\t\t\t\t\t]),\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_33), [[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_34), [[vModelText, row.value]]),\n\t\t\t\t\t\t\t\t\tprops.stack.schemaVersion === 2 ? (openBlock(), createElementBlock(\"select\", {\n\t\t\t\t\t\t\t\t\t\tkey: 0,\n\t\t\t\t\t\t\t\t\t\t\"data-var-format\": \"\",\n\t\t\t\t\t\t\t\t\t\tvalue: row.format,\n\t\t\t\t\t\t\t\t\t\tonChange: ($event) => setVariableFormat(row, $event.target.value)\n\t\t\t\t\t\t\t\t\t}, [createBaseVNode(\"option\", _hoisted_36, toDisplayString(unref(t)(\"stackTab.textValue\")), 1), _cache[5] || (_cache[5] = createBaseVNode(\"option\", { value: \"json\" }, \"JSON\", -1))], 40, _hoisted_35)) : createCommentVNode(\"v-if\", true),\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: unref(t)(\"stackTab.deleteVariableTitle\"),\n\t\t\t\t\t\t\t\t\t\tonClick: ($event) => deleteVariable(index)\n\t\t\t\t\t\t\t\t\t}, toDisplayString(unref(t)(\"stackTab.deleteVariable\")), 9, _hoisted_37)\n\t\t\t\t\t\t\t\t], 2);\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_38, [\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_39, toDisplayString(unref(t)(\"stackTab.stackJson\")), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_40, toDisplayString(unref(t)(\"stackTab.stackJsonMeta\")), 1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_41, [\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: unref(t)(\"stackTab.copyJsonTitle\"),\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}, toDisplayString(unref(t)(\"inspector.copy\")), 9, _hoisted_42),\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: unref(t)(\"stackTab.applyJsonTitle\"),\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}, toDisplayString(unref(t)(\"stackTab.applyJson\")), 9, _hoisted_43),\n\t\t\t\t\t\t\t\t_cache[6] || (_cache[6] = createBaseVNode(\"span\", { class: \"modal-spacer\" }, null, -1)),\n\t\t\t\t\t\t\t\tcreateBaseVNode(\"span\", _hoisted_44, 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\tfunction mount(kind, root) {\n\t\t\tunmount();\n\t\t\tconst stack = deps.getStack();\n\t\t\tconst definition = getEditorTab(kind);\n\t\t\tif (!stack || !definition || definition.mount === \"legacy\") return;\n\t\t\tdraft = cloneJson(stack);\n\t\t\tconst input = {\n\t\t\t\tstack: draft,\n\t\t\t\tresources: deps.getResources(),\n\t\t\t\tonChange: (error) => {\n\t\t\t\t\tsyncDraft(kind);\n\t\t\t\t\terrors[kind] = error;\n\t\t\t\t\tdeps.markDirty();\n\t\t\t\t\tif (errors[kind]) deps.setStatus(errors[kind], \"error\");\n\t\t\t\t},\n\t\t\t\tonStatus: deps.setStatus,\n\t\t\t\tcopyText: deps.copyText,\n\t\t\t\tapplyStack: deps.applyStack,\n\t\t\t\tvalidateStack: deps.validateStack\n\t\t\t};\n\t\t\tconst factory = vueTabMounts[kind];\n\t\t\tif (!factory) return;\n\t\t\tconst { component, props } = factory(input);\n\t\t\tapp = createApp(component, props);\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\tfor (const key of Object.keys(errors)) delete errors[key];\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 definition = getEditorTab(kind);\n\t\t\tif (!definition) return;\n\t\t\tcopyStackFields(stack, cloneJson(draft), definition.stackFields);\n\t\t}\n\t\treturn {\n\t\t\t/** Generic entry point for any registered vue tab id. */\n\t\t\tmount,\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\tvar vueTabMounts;\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\tinit_tab_registry();\n\t\tvueTabMounts = {\n\t\t\tregex: (input) => ({\n\t\t\t\tcomponent: RegexEditor_default,\n\t\t\t\tprops: {\n\t\t\t\t\tstack: input.stack,\n\t\t\t\t\tonChange: input.onChange,\n\t\t\t\t\tonValidate: input.validateStack\n\t\t\t\t}\n\t\t\t}),\n\t\t\tpolicy: (input) => ({\n\t\t\t\tcomponent: PolicyEditor_default,\n\t\t\t\tprops: {\n\t\t\t\t\tstack: input.stack,\n\t\t\t\t\tresources: input.resources,\n\t\t\t\t\tonChange: input.onChange,\n\t\t\t\t\tonStatus: input.onStatus\n\t\t\t\t}\n\t\t\t}),\n\t\t\tstack: (input) => ({\n\t\t\t\tcomponent: StackEditor_default,\n\t\t\t\tprops: {\n\t\t\t\t\tstack: input.stack,\n\t\t\t\t\tresources: input.resources,\n\t\t\t\t\tcopyText: input.copyText,\n\t\t\t\t\tonApply: () => input.applyStack(cloneJson(input.stack)),\n\t\t\t\t\tonChange: input.onChange,\n\t\t\t\t\tonStatus: input.onStatus\n\t\t\t\t}\n\t\t\t})\n\t\t};\n\t}));\n\t//#endregion\n\t//#region src/web-editor/client/legacy-editor.ts\n\tvar legacy_editor_exports = /* @__PURE__ */ __exportAll({\n\t\tgetLegacyEditorDraft: () => getLegacyEditorDraft,\n\t\trefreshLegacyEditorLocale: () => refreshLegacyEditorLocale,\n\t\tstartLegacyEditor: () => startLegacyEditor,\n\t\tsubscribeLegacyEditorDraft: () => subscribeLegacyEditorDraft\n\t});\n\tfunction getLegacyEditorDraft() {\n\t\tif (!currentStack || !selectedId) return void 0;\n\t\treturn {\n\t\t\tselector: selectedId,\n\t\t\tstack: structuredClone(currentStack)\n\t\t};\n\t}\n\tfunction subscribeLegacyEditorDraft(listener) {\n\t\tdraftListeners.add(listener);\n\t\treturn () => draftListeners.delete(listener);\n\t}\n\tfunction notifyDraftChanged() {\n\t\tfor (const listener of [...draftListeners]) listener();\n\t}\n\tfunction slotToneClass(slot) {\n\t\tif (typeof slot !== \"string\") return \"slot-custom\";\n\t\tif (semanticSlotNames.has(slot)) return `slot-${slot}`;\n\t\treturn builtInSlotNames.includes(slot) ? \"slot-built-in\" : \"slot-custom\";\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(t(\"status.unsavedChanges\"));\n\t\tnotifyDraftChanged();\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\"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], [data-dock-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\teditorResources = normalizeEditorResources(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\teditorResources = normalizeEditorResources(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(t(\"confirm.discardChanges\"))) 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 ? typeof options.selectedItemIndex === \"number\" ? Math.min(Math.max(options.selectedItemIndex, 0), loadedStack.items.length - 1) : 0 : -1;\n\t\tdirty = false;\n\t\tvueTabHost.resetErrors();\n\t\tvueItemHost.reset(options.itemMode);\n\t\trenderDirtyState();\n\t\trenderAll(data.diagnostics || []);\n\t\tsetStatus(t(\"status.loaded\", { id: loadedStack.id }));\n\t\tnotifyDraftChanged();\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\tif (currentEditorView() === \"preview\") {\n\t\t\trenderItemList();\n\t\t\trenderItemEditor();\n\t\t\treturn;\n\t\t}\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\\\">\" + escapeHtml(t(\"stackList.empty\")) + \"</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\\\">\" + escapeHtml(t(\"stackList.errorCount\", { count: stack.errors })) + \"</span>\" : stack.warnings ? \"<span class=\\\"badge warning\\\">\" + escapeHtml(t(\"stackList.warningCount\", { count: stack.warnings })) + \"</span>\" : \"\";\n\t\t\tconst scopeBadge = stack.scope === \"global\" ? \"<span class=\\\"badge\\\">\" + escapeHtml(t(\"stackList.global\")) + \"</span>\" : \"\";\n\t\t\trow.innerHTML = \"<div class=\\\"stack-name\\\">\" + escapeHtml(stack.id) + (stack.active ? \"<span class=\\\"badge\\\">\" + escapeHtml(t(\"stackList.active\")) + \"</span>\" : \"\") + scopeBadge + diag + \"</div><div class=\\\"stack-meta\\\">\" + escapeHtml(stack.name || t(\"stackList.unnamed\")) + \"</div><div class=\\\"stack-meta\\\">\" + escapeHtml(t(\"stackList.itemCount\", { count: stack.itemCount })) + \" | \" + 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 normalizeEditorResources(value) {\n\t\treturn {\n\t\t\ttools: normalizeResourceList(value?.tools),\n\t\t\tskills: normalizeResourceList(value?.skills),\n\t\t\tmacros: normalizeExtensionResourceList(value?.macros),\n\t\t\tslots: normalizeExtensionResourceList(value?.slots)\n\t\t};\n\t}\n\tfunction normalizeExtensionResourceList(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\tdependencies: Array.isArray(resource.dependencies) ? resource.dependencies.filter((dependency) => typeof dependency === \"string\") : []\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 = t(\"itemList.total\", { count: currentStack.items.length });\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 kind-\" + (item.kind === \"slot\" ? \"slot\" : \"block\") + (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\tconst kindBadge = \"<span class=\\\"item-kind-badge \" + (item.kind === \"slot\" ? \"slot\" : \"block\") + \"\\\">\" + escapeHtml(item.kind) + \"</span>\";\n\t\t\tconst slotBadge = item.kind === \"slot\" ? \"<span class=\\\"item-slot-badge \" + slotToneClass(item.slot) + \"\\\">\" + escapeHtml(item.slot || \"custom\") + \"</span>\" : \"\";\n\t\t\trow.innerHTML = \"<div class=\\\"drag-handle\\\" title=\\\"\" + attr(t(\"itemList.dragToReorder\")) + \"\\\">≡</div><div><div class=\\\"item-title\\\">\" + escapeHtml(displayItemName(item)) + diagBadge + \"</div><div class=\\\"item-meta\\\">\" + kindBadge + slotBadge + \" <span>id: \" + escapeHtml(item.id) + (item.role ? \" · \" + escapeHtml(item.role) : \"\") + \"</span></div></div><button type=\\\"button\\\" class=\\\"item-toggle \" + (enabled ? \"enabled\" : \"disabled\") + \"\\\" title=\\\"\" + attr(t(\"itemList.toggleItem\")) + \"\\\">\" + escapeHtml(enabled ? t(\"itemList.on\") : t(\"itemList.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\\\">\" + escapeHtml(t(\"itemEditor.none\")) + \"</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(t(\"status.appliedStack\"), \"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(t(\"confirm.deleteItem\", { id: 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 savedItemIndex = selectedItemIndex;\n\t\tconst savedItemMode = vueItemHost.getMode();\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(t(\"status.saved\", { id: selectedId }), \"success\");\n\t\tawait selectStack(selectedId, {\n\t\t\tkeepDirty: true,\n\t\t\tselectedItemIndex: savedItemIndex,\n\t\t\titemMode: savedItemMode\n\t\t});\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(t(\"confirm.overwriteStack\", { message: error.message || \"Preset already exists.\" }))) 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\tsetStatus(t(actionLabel, { id: data.stack?.id || stack.id }), \"success\");\n\t}\n\tasync function createNewStack() {\n\t\tif (dirty && !confirm(t(\"confirm.discardChanges\"))) return;\n\t\tconst promptedId = prompt(t(\"prompt.newStackId\"), uniqueStackId(\"new-preset\"));\n\t\tif (promptedId === null) return;\n\t\tconst id = sanitizeStackId(promptedId);\n\t\tif (!id) throw new Error(t(\"error.stackIdEmpty\"));\n\t\tif (id !== promptedId.trim() && !confirm(t(\"confirm.useStackId\", { id }))) return;\n\t\tconst promptedName = prompt(t(\"prompt.stackDisplayName\"), \"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(t(\"confirm.activateNewStack\")), \"status.created\", { scope });\n\t}\n\tfunction defaultNewStack(id, name) {\n\t\treturn {\n\t\t\tschemaVersion: 2,\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(t(\"error.importNotObject\"));\n\t\tconst stack = imported;\n\t\tif (!stack.id || typeof stack.id !== \"string\") {\n\t\t\tconst promptedId = prompt(t(\"prompt.stackId\"), 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(t(\"error.importNoItems\"));\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(t(\"confirm.activateImportedStack\")), \"status.imported\", { scope });\n\t}\n\tasync function forkStack() {\n\t\tconst source = stackForSubmit();\n\t\tconst forkId = prompt(t(\"prompt.forkStackId\"), uniqueForkId(source.id || \"preset\"));\n\t\tif (!forkId) return;\n\t\tconst forkName = prompt(t(\"prompt.forkDisplayName\"), (source.name || source.id || \"Preset\") + \" 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(t(\"confirm.activateFork\")), \"status.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 || \"preset\") + \".json\", json, \"application/json\")) {\n\t\t\tsetStatus(t(\"status.exported\", { id: stack.id || \"preset\" }), \"success\");\n\t\t\treturn;\n\t\t}\n\t\tawait copyTextToClipboard(json);\n\t\tsetStatus(t(\"status.copiedJson\", { id: stack.id || \"preset\" }), \"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(t(\"status.activated\", { id: 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(t(\"status.stackDisabled\"), \"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 = t(\"confirm.deleteStack\", { id: displayId });\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(t(\"status.deleted\", { id: displayId }), \"success\");\n\t\t} else {\n\t\t\trenderStackList();\n\t\t\trenderEmpty();\n\t\t\tsetStatus(t(\"status.deletedNoneRemain\", { id: displayId }), \"success\");\n\t\t}\n\t}\n\tasync function reloadFromDisk() {\n\t\tif (dirty && !confirm(t(\"confirm.discardChanges\"))) return;\n\t\tstacks = (await api(\"/api/reload\", { method: \"POST\" })).stacks || [];\n\t\trenderStackList();\n\t\tawait loadStacks(selectedId);\n\t\tsetStatus(t(\"status.reloaded\"), \"success\");\n\t}\n\tfunction stackForSubmit() {\n\t\tif (!currentStack) throw new Error(t(\"error.noStackSelected\"));\n\t\tconst itemOptionsError = vueItemHost.getError();\n\t\tif (itemOptionsError) throw new Error(t(\"error.invalidItemOptions\", { message: 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 countText = (one, many, count) => count === 1 ? t(one, { count }) : t(many, { count });\n\t\tconst summary = !latestDiagnostics.length ? t(\"diag.none\") : [errors ? countText(\"diag.errorOne\", \"diag.errorMany\", errors) : \"\", warnings ? countText(\"diag.warningOne\", \"diag.warningMany\", warnings) : \"\"].filter(Boolean).join(\" · \") || countText(\"diag.noteOne\", \"diag.noteMany\", latestDiagnostics.length);\n\t\tconst body = !latestDiagnostics.length ? \"<div class=\\\"diagnostic info\\\">\" + escapeHtml(t(\"diag.noDiagnostics\")) + \"</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=\\\"\" + attr(t(\"diag.toggle\")) + \"\\\"><span class=\\\"diagnostics-title\\\">\" + escapeHtml(t(\"diag.title\", { 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\tnotifyDraftChanged();\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\\\">\" + escapeHtml(t(\"empty.title\")) + \"</div><div>\" + escapeHtml(t(\"empty.body\")) + \"</div><div class=\\\"empty-actions\\\"><button id=\\\"emptyNewStackBtn\\\" class=\\\"primary\\\" data-icon=\\\"+\\\" title=\\\"\" + attr(t(\"chrome.newStackTitle\")) + \"\\\">\" + escapeHtml(t(\"chrome.newStack\")) + \"</button><button id=\\\"emptyImportBtn\\\" data-icon=\\\"⇪\\\" title=\\\"\" + attr(t(\"chrome.importTitle\")) + \"\\\">\" + escapeHtml(t(\"chrome.import\")) + \"</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(t(\"status.noStacks\"));\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 || t(\"stackList.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 ? t(\"chrome.showSidebar\") : t(\"chrome.hideSidebar\");\n\t\tsetStatus(sidebarCollapsed ? t(\"status.sidebarHidden\") : t(\"status.sidebarShown\"));\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) el(\"previewTabBtn\").click();\n\t\t}\n\t}\n\t/**\n\t* Re-render all legacy surfaces after a locale switch. State is already in\n\t* memory; this simply regenerates the imperative DOM with the new strings.\n\t*/\n\tfunction refreshLegacyEditorLocale() {\n\t\tif (!editorStarted) return;\n\t\tel(\"sidebarToggleBtn\").title = sidebarCollapsed ? t(\"chrome.showSidebar\") : t(\"chrome.hideSidebar\");\n\t\tif (currentStack) renderAll(latestDiagnostics);\n\t\telse if (!stacks.length) renderEmpty();\n\t\telse renderStackList();\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(\"payloadBtn\").onclick = () => run(openPayloadCapture);\n\t\tconst moreActions = el(\"moreActions\");\n\t\tmoreActions.onclick = (event) => {\n\t\t\tif (event.target.closest(\"button\")) moreActions.open = false;\n\t\t};\n\t\tconst closeMoreActions = (event) => {\n\t\t\tif (moreActions.open && !moreActions.contains(event.target)) moreActions.open = false;\n\t\t};\n\t\tdocument.querySelectorAll(\"[data-tab]\").forEach((button) => {\n\t\t\tbutton.onclick = () => {\n\t\t\t\tactivateEditorView(button.dataset.tab || \"items\");\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\tdocument.addEventListener(\"click\", closeMoreActions);\n\t\twindow.addEventListener(\"keydown\", handleEditorShortcut);\n\t\twindow.addEventListener(\"pi-forge:profile-applied\", handleProfileApplied);\n\t\tconst stopEditorView = subscribeEditorView((viewId) => {\n\t\t\tif ([\n\t\t\t\t\"items\",\n\t\t\t\t\"regex\",\n\t\t\t\t\"policy\",\n\t\t\t\t\"stack\"\n\t\t\t].includes(viewId)) return;\n\t\t\tvueTabHost.unmount();\n\t\t});\n\t\tconst previousBeforeUnload = window.onbeforeunload;\n\t\tconst beforeUnload = () => dirty ? t(\"status.unsavedChanges\") : 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\tdocument.removeEventListener(\"click\", closeMoreActions);\n\t\t\twindow.removeEventListener(\"keydown\", handleEditorShortcut);\n\t\t\twindow.removeEventListener(\"pi-forge:profile-applied\", handleProfileApplied);\n\t\t\tmoreActions.onclick = null;\n\t\t\tstopEditorView();\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\tdraftListeners.clear();\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\teditorResources = {\n\t\t\ttools: [],\n\t\t\tskills: [],\n\t\t\tmacros: [],\n\t\t\tslots: []\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, editorResources, latestDiagnostics, diagnosticsCollapsed, activeTab, metadataCollapsed, editorStarted, editorIsActive, draftListeners, builtInSlotNames, semanticSlotNames, roles, validateStack, 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\tinit_editor_view_coordinator();\n\t\tinit_i18n();\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\teditorResources = {\n\t\t\ttools: [],\n\t\t\tskills: [],\n\t\t\tmacros: [],\n\t\t\tslots: []\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\tdraftListeners = /* @__PURE__ */ new Set();\n\t\tbuiltInSlotNames = [\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\tsemanticSlotNames = /* @__PURE__ */ new Set([\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\"date\",\n\t\t\t\"date-cwd\"\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, 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: () => editorResources,\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\tgetSlotNames: () => editorResources.slots.length > 0 ? editorResources.slots.map((slot) => slot.name) : builtInSlotNames,\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_api();\n\tinit_i18n();\n\tinit_tab_registry();\n\tinit_theme();\n\tvar _hoisted_1 = { class: \"app-root\" };\n\tvar _hoisted_2 = [\"aria-label\"];\n\tvar _hoisted_3 = [\"aria-current\"];\n\tvar _hoisted_4 = [\"aria-current\"];\n\tvar _hoisted_5 = [\"aria-current\"];\n\tvar _hoisted_6 = [\"data-icon\", \"title\"];\n\tvar _hoisted_7 = [\"title\", \"value\"];\n\tvar _hoisted_8 = { class: \"editor-surface\" };\n\tvar _hoisted_9 = {\n\t\tid: \"shell\",\n\t\tclass: \"shell\"\n\t};\n\tvar _hoisted_10 = { class: \"main\" };\n\tvar _hoisted_11 = {\n\t\tclass: \"view-tabs\",\n\t\t\"aria-label\": \"Preset editor sections\",\n\t\t\"data-i18n-aria\": \"nav.stackSectionsAria\"\n\t};\n\tvar _hoisted_12 = [\n\t\t\"id\",\n\t\t\"data-tab\",\n\t\t\"data-dock-tab\",\n\t\t\"data-icon\",\n\t\t\"title\",\n\t\t\"data-i18n\",\n\t\t\"data-i18n-title\"\n\t];\n\tvar _hoisted_13 = {\n\t\tid: \"settingsSurface\",\n\t\tclass: \"settings-surface\"\n\t};\n\tvar _hoisted_14 = { class: \"settings-surface-head\" };\n\tvar _hoisted_15 = { class: \"settings-surface-body\" };\n\tvar _hoisted_16 = [\"aria-label\"];\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\tlet stopContributionTabs;\n\t\t\tlet stopContextDiffTabs;\n\t\t\tlet refreshLegacyLocale;\n\t\t\tconst activeSurface = /* @__PURE__ */ ref(\"stacks\");\n\t\t\tconst hasContributionSettings = /* @__PURE__ */ ref(false);\n\t\t\tconst api = createEditorApi(new URLSearchParams(location.search).get(\"token\") || \"\");\n\t\t\tconst localeSetting = /* @__PURE__ */ ref(\"auto\");\n\t\t\tfunction resolveLocaleSetting(setting) {\n\t\t\t\tif (setting === \"auto\") return navigator.language.toLowerCase().startsWith(\"zh\") ? \"zh-CN\" : \"en\";\n\t\t\t\treturn setting;\n\t\t\t}\n\t\t\tasync function loadLocaleSetting() {\n\t\t\t\ttry {\n\t\t\t\t\tconst locale = (await api(\"/api/editor-config\"))?.locale;\n\t\t\t\t\tif (locale === \"en\" || locale === \"zh-CN\" || locale === \"auto\") {\n\t\t\t\t\t\tlocaleSetting.value = locale;\n\t\t\t\t\t\tsetEditorLocale(resolveLocaleSetting(locale));\n\t\t\t\t\t}\n\t\t\t\t} catch {}\n\t\t\t}\n\t\t\tasync function changeLocaleSetting(setting) {\n\t\t\t\tlocaleSetting.value = setting;\n\t\t\t\tsetEditorLocale(resolveLocaleSetting(setting));\n\t\t\t\ttry {\n\t\t\t\t\tawait api(\"/api/editor-config\", {\n\t\t\t\t\t\tmethod: \"PUT\",\n\t\t\t\t\t\tbody: { locale: setting }\n\t\t\t\t\t});\n\t\t\t\t} catch {}\n\t\t\t}\n\t\t\twatch(editorLocale, () => {\n\t\t\t\ttranslateDom(document);\n\t\t\t\trefreshLegacyLocale?.();\n\t\t\t});\n\t\t\tonMounted(async () => {\n\t\t\t\tapplyEditorTheme(editorTheme.value);\n\t\t\t\ttry {\n\t\t\t\t\tconst { getLegacyEditorDraft, refreshLegacyEditorLocale, startLegacyEditor, subscribeLegacyEditorDraft } = 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\trefreshLegacyLocale = refreshLegacyEditorLocale;\n\t\t\t\t\ttranslateDom(document);\n\t\t\t\t\tloadLocaleSetting();\n\t\t\t\t\tstopContributionTabs = startContributionTabs({ onAvailabilityChanged: (available) => {\n\t\t\t\t\t\thasContributionSettings.value = available;\n\t\t\t\t\t\tif (!available && activeSurface.value === \"settings\") activeSurface.value = \"stacks\";\n\t\t\t\t\t} });\n\t\t\t\t\tstopContextDiffTabs = startContextDiffTabs({\n\t\t\t\t\t\tgetStackDraft: getLegacyEditorDraft,\n\t\t\t\t\t\tsubscribeStackDraft: subscribeLegacyEditorDraft\n\t\t\t\t\t});\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\tstopContextDiffTabs?.();\n\t\t\t\tstopContributionTabs?.();\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\", {\n\t\t\t\t\t\tclass: \"surface-nav\",\n\t\t\t\t\t\t\"aria-label\": unref(t)(\"nav.editorSectionsAria\")\n\t\t\t\t\t}, [\n\t\t\t\t\t\t_cache[7] || (_cache[7] = 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}, toDisplayString(unref(t)(\"nav.stacks\")), 11, _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}, toDisplayString(unref(t)(\"nav.profiles\")), 11, _hoisted_4),\n\t\t\t\t\t\twithDirectives(createBaseVNode(\"button\", {\n\t\t\t\t\t\t\tid: \"settingsSurfaceBtn\",\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\tclass: normalizeClass({ active: activeSurface.value === \"settings\" }),\n\t\t\t\t\t\t\t\"aria-current\": activeSurface.value === \"settings\" ? \"page\" : void 0,\n\t\t\t\t\t\t\tonClick: _cache[2] || (_cache[2] = ($event) => activeSurface.value = \"settings\")\n\t\t\t\t\t\t}, toDisplayString(unref(t)(\"nav.settings\")), 11, _hoisted_5), [[vShow, hasContributionSettings.value]]),\n\t\t\t\t\t\t_cache[8] || (_cache[8] = 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\" ? unref(t)(\"nav.themeToLight\") : unref(t)(\"nav.themeToDark\"),\n\t\t\t\t\t\t\tonClick: _cache[3] || (_cache[3] = (...args) => unref(toggleEditorTheme) && unref(toggleEditorTheme)(...args))\n\t\t\t\t\t\t}, toDisplayString(unref(editorTheme) === \"dark\" ? unref(t)(\"nav.themeLight\") : unref(t)(\"nav.themeDark\")), 9, _hoisted_6),\n\t\t\t\t\t\tcreateBaseVNode(\"select\", {\n\t\t\t\t\t\t\tid: \"localeSelect\",\n\t\t\t\t\t\t\tclass: \"locale-select\",\n\t\t\t\t\t\t\ttitle: unref(t)(\"nav.locale\"),\n\t\t\t\t\t\t\tvalue: localeSetting.value,\n\t\t\t\t\t\t\tonChange: _cache[4] || (_cache[4] = ($event) => changeLocaleSetting($event.target.value))\n\t\t\t\t\t\t}, [..._cache[6] || (_cache[6] = [\n\t\t\t\t\t\t\tcreateBaseVNode(\"option\", { value: \"auto\" }, \"Auto\", -1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"option\", { value: \"en\" }, \"English\", -1),\n\t\t\t\t\t\t\tcreateBaseVNode(\"option\", { value: \"zh-CN\" }, \"中文\", -1)\n\t\t\t\t\t\t])], 40, _hoisted_7)\n\t\t\t\t\t], 8, _hoisted_2),\n\t\t\t\t\twithDirectives(createBaseVNode(\"section\", _hoisted_8, [_cache[5] || (setBlockTracking(-1, true), (_cache[5] = createBaseVNode(\"div\", { class: \"legacy-editor-root\" }, [\n\t\t\t\t\t\t_cache[12] || (_cache[12] = createStaticVNode(\"<header class=\\\"topbar\\\"><button id=\\\"sidebarToggleBtn\\\" class=\\\"icon\\\" data-icon=\\\"☰\\\" title=\\\"Toggle presets sidebar\\\" aria-label=\\\"Toggle presets sidebar\\\" data-i18n-title=\\\"chrome.toggleSidebar\\\" data-i18n-aria=\\\"chrome.toggleSidebar\\\"></button><div class=\\\"brand\\\" data-i18n=\\\"chrome.brand\\\">pi-forge preset editor</div><div id=\\\"status\\\" class=\\\"status\\\" data-i18n=\\\"chrome.loading\\\">Loading</div><span id=\\\"dirtyBadge\\\" class=\\\"dirty-badge\\\" title=\\\"The current preset has unsaved edits\\\" data-i18n=\\\"chrome.unsaved\\\" data-i18n-title=\\\"chrome.unsavedTitle\\\">Unsaved</span><button id=\\\"reloadBtn\\\" data-icon=\\\"↻\\\" title=\\\"Reload presets from disk\\\" data-i18n=\\\"chrome.reload\\\" data-i18n-title=\\\"chrome.reloadTitle\\\">Reload</button><button id=\\\"disableBtn\\\" data-icon=\\\"■\\\" title=\\\"Disable the active preset\\\" data-i18n=\\\"chrome.disableStack\\\" data-i18n-title=\\\"chrome.disableStackTitle\\\">Disable preset</button></header>\", 1)),\n\t\t\t\t\t\tcreateBaseVNode(\"div\", _hoisted_9, [_cache[11] || (_cache[11] = createStaticVNode(\"<aside class=\\\"sidebar\\\"><div class=\\\"side-head\\\"><div class=\\\"side-title\\\" data-i18n=\\\"nav.stacks\\\">Presets</div><div id=\\\"cwd\\\" class=\\\"cwd\\\"></div></div><div id=\\\"stackList\\\" class=\\\"stack-list\\\"></div></aside>\", 1)), createBaseVNode(\"main\", _hoisted_10, [\n\t\t\t\t\t\t\t_cache[9] || (_cache[9] = createStaticVNode(\"<div class=\\\"main-actions\\\"><div class=\\\"new-stack-control\\\"><select id=\\\"stackCreateScope\\\" aria-label=\\\"Preset scope\\\" title=\\\"Scope for new presets, imports, and forks\\\" data-i18n-title=\\\"chrome.scopeTitle\\\" data-i18n-aria=\\\"chrome.scopeAria\\\"><option value=\\\"project\\\" data-i18n=\\\"chrome.scopeProject\\\">Project</option><option value=\\\"global\\\" data-i18n=\\\"chrome.scopeGlobal\\\">Global</option></select><button id=\\\"newStackBtn\\\" data-icon=\\\"+\\\" title=\\\"Create a new preset (Ctrl/Cmd+N)\\\" data-i18n=\\\"chrome.newStack\\\" data-i18n-title=\\\"chrome.newStackTitle\\\">New preset</button></div><button id=\\\"activateBtn\\\" class=\\\"primary\\\" data-icon=\\\"▶\\\" title=\\\"Make this preset active for the current Pi session\\\" data-i18n=\\\"chrome.activate\\\" data-i18n-title=\\\"chrome.activateTitle\\\">Activate</button><button id=\\\"saveBtn\\\" class=\\\"primary\\\" data-icon=\\\"✓\\\" title=\\\"Save the edited preset JSON to disk (Ctrl/Cmd+S)\\\" data-i18n=\\\"chrome.save\\\" data-i18n-title=\\\"chrome.saveTitle\\\">Save</button><button id=\\\"validateBtn\\\" data-icon=\\\"!\\\" title=\\\"Validate the edited preset without saving (Ctrl/Cmd+Shift+Enter)\\\" data-i18n=\\\"chrome.validate\\\" data-i18n-title=\\\"chrome.validateTitle\\\">Validate</button><span class=\\\"action-spacer\\\"></span><details id=\\\"moreActions\\\" class=\\\"action-menu\\\"><summary data-icon=\\\"⋯\\\" title=\\\"Show less-used preset actions\\\" data-i18n=\\\"chrome.more\\\" data-i18n-title=\\\"chrome.moreTitle\\\">More</summary><div class=\\\"action-menu-popover\\\"><button id=\\\"payloadBtn\\\" data-icon=\\\"◆\\\" title=\\\"Capture the next provider payload in the browser\\\" data-i18n=\\\"chrome.armPayload\\\" data-i18n-title=\\\"chrome.armPayloadTitle\\\">Arm payload</button><button id=\\\"forkBtn\\\" data-icon=\\\"⑂\\\" title=\\\"Create a new preset from the current edits\\\" data-i18n=\\\"chrome.fork\\\" data-i18n-title=\\\"chrome.forkTitle\\\">Fork</button><button id=\\\"importBtn\\\" data-icon=\\\"⇪\\\" title=\\\"Import Pi Forge preset JSON\\\" data-i18n=\\\"chrome.import\\\" data-i18n-title=\\\"chrome.importTitle\\\">Import JSON</button><button id=\\\"exportBtn\\\" data-icon=\\\"⇩\\\" title=\\\"Download the current preset JSON, or copy it if download is unavailable\\\" data-i18n=\\\"chrome.export\\\" data-i18n-title=\\\"chrome.exportTitle\\\">Export JSON</button><button id=\\\"deleteStackBtn\\\" class=\\\"danger\\\" data-icon=\\\"×\\\" title=\\\"Delete the selected preset JSON file\\\" data-i18n=\\\"chrome.deleteStack\\\" data-i18n-title=\\\"chrome.deleteStackTitle\\\">Delete preset</button></div></details><input id=\\\"importFileInput\\\" type=\\\"file\\\" accept=\\\"application/json,.json\\\" hidden></div><section id=\\\"metadataPanel\\\" class=\\\"metadata-panel\\\"><div id=\\\"metadataHost\\\"></div></section>\", 2)),\n\t\t\t\t\t\t\tcreateBaseVNode(\"nav\", _hoisted_11, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(EDITOR_TABS), (tab) => {\n\t\t\t\t\t\t\t\treturn openBlock(), createElementBlock(\"button\", {\n\t\t\t\t\t\t\t\t\tkey: tab.id,\n\t\t\t\t\t\t\t\t\tid: unref(editorTabButtonId)(tab.id),\n\t\t\t\t\t\t\t\t\t\"data-tab\": tab.internalDock ? void 0 : tab.id,\n\t\t\t\t\t\t\t\t\t\"data-dock-tab\": tab.internalDock ? tab.id : void 0,\n\t\t\t\t\t\t\t\t\tclass: normalizeClass({ active: tab.id === \"items\" }),\n\t\t\t\t\t\t\t\t\t\"data-icon\": tab.icon,\n\t\t\t\t\t\t\t\t\ttitle: unref(t)(tab.titleKey),\n\t\t\t\t\t\t\t\t\t\"data-i18n\": tab.labelKey,\n\t\t\t\t\t\t\t\t\t\"data-i18n-title\": tab.titleKey\n\t\t\t\t\t\t\t\t}, toDisplayString(unref(t)(tab.labelKey)), 11, _hoisted_12);\n\t\t\t\t\t\t\t}), 128))]),\n\t\t\t\t\t\t\t_cache[10] || (_cache[10] = createStaticVNode(\"<div id=\\\"editorDockArea\\\" class=\\\"editor-dock-area\\\"><section id=\\\"workspace\\\" class=\\\"workspace\\\"><div class=\\\"items-pane\\\"><div class=\\\"pane-head\\\"><span data-i18n=\\\"chrome.items\\\">Stack 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\\\" data-i18n=\\\"chrome.addBlock\\\" data-i18n-title=\\\"chrome.addBlockTitle\\\">Add block</button><button id=\\\"addSlotBtn\\\" data-icon=\\\"+\\\" title=\\\"Add a runtime slot item\\\" data-i18n=\\\"chrome.addSlot\\\" data-i18n-title=\\\"chrome.addSlotTitle\\\">Add slot</button><span class=\\\"item-tools-spacer\\\"></span><button id=\\\"deleteItemBtn\\\" class=\\\"danger\\\" data-icon=\\\"×\\\" title=\\\"Delete the selected Stack item\\\" data-i18n=\\\"chrome.deleteItem\\\" data-i18n-title=\\\"chrome.deleteItemTitle\\\">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><section id=\\\"contextDiffPanel\\\" class=\\\"context-diff-panel\\\"></section></div>\", 1))\n\t\t\t\t\t\t])]),\n\t\t\t\t\t\t_cache[13] || (_cache[13] = createBaseVNode(\"div\", {\n\t\t\t\t\t\t\tid: \"preview\",\n\t\t\t\t\t\t\tclass: \"preview\"\n\t\t\t\t\t\t}, null, -1)),\n\t\t\t\t\t\t_cache[14] || (_cache[14] = createBaseVNode(\"div\", {\n\t\t\t\t\t\t\tid: \"stackModal\",\n\t\t\t\t\t\t\tclass: \"modal\"\n\t\t\t\t\t\t}, null, -1))\n\t\t\t\t\t])).cacheIndex = 5, setBlockTracking(1), _cache[5])], 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\twithDirectives(createBaseVNode(\"section\", _hoisted_13, [createBaseVNode(\"header\", _hoisted_14, [createBaseVNode(\"div\", null, [createBaseVNode(\"h1\", null, toDisplayString(unref(t)(\"settings.pluginSettings\")), 1), createBaseVNode(\"p\", null, toDisplayString(unref(t)(\"settings.pluginSettingsMeta\")), 1)]), _cache[15] || (_cache[15] = createBaseVNode(\"div\", {\n\t\t\t\t\t\tid: \"settingsStatus\",\n\t\t\t\t\t\tclass: \"settings-surface-status\",\n\t\t\t\t\t\t\"data-i18n\": \"settings.loading\"\n\t\t\t\t\t}, \"Loading settings…\", -1))]), createBaseVNode(\"div\", _hoisted_15, [createBaseVNode(\"nav\", {\n\t\t\t\t\t\tid: \"contribSettingsNav\",\n\t\t\t\t\t\tclass: \"settings-nav\",\n\t\t\t\t\t\t\"aria-label\": unref(t)(\"settings.navAria\")\n\t\t\t\t\t}, null, 8, _hoisted_16), _cache[16] || (_cache[16] = createBaseVNode(\"main\", {\n\t\t\t\t\t\tid: \"contribSettingsPanel\",\n\t\t\t\t\t\tclass: \"settings-panel\"\n\t\t\t\t\t}, null, -1))])], 512), [[vShow, activeSurface.value === \"settings\"]])\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